Form Submission Test'; echo '
Test URL: ' . $test_url . '
'; // Check if form was submitted if ($_SERVER['REQUEST_METHOD'] === 'POST') { echo '';
print_r($_POST);
echo '';
// Check if submit_snippet is set
if (isset($_POST['submit_snippet'])) {
echo '✓ submit_snippet is set
'; } else { echo '✗ submit_snippet is NOT set
'; } // Check if nonce is set if (isset($_POST['pc_hfap_nonce'])) { echo '✓ nonce is set
'; // Verify nonce if (wp_verify_nonce($_POST['pc_hfap_nonce'], 'pc_hfap_save_snippet')) { echo '✓ nonce is valid
'; } else { echo '✗ nonce is invalid
'; } } else { echo '✗ nonce is NOT set
'; } // Check required fields echo '✓ Title: ' . esc_html($_POST['pc_hfap_title']) . '
'; } else { echo '✗ Title is empty
'; } if (!empty($_POST['pc_hfap_location'])) { echo '✓ Location: ' . esc_html($_POST['pc_hfap_location']) . '
'; } else { echo '✗ Location is empty
'; } if (!empty($_POST['pc_hfap_code'])) { echo '✓ Code length: ' . strlen($_POST['pc_hfap_code']) . ' chars
'; } else { echo '✗ Code is empty
'; } } else { echo 'This page is for testing form submission. Submit the form to see results.
'; echo '