Untitled Snippet

add_action(‘wp_ajax_tssh_send_results’, ‘tssh_send_results’); add_action(‘wp_ajax_nopriv_tssh_send_results’, ‘tssh_send_results’); function tssh_send_results() { $nonce = isset($_POST[‘nonce’]) ? sanitize_text_field($_POST[‘nonce’]) : ”; if (!wp_verify_nonce($nonce, ‘tssh_quiz_nonce’)) { wp_send_json_error(‘Security check failed. Please refresh and try again.’); } $email = isset($_POST[’email’]) ? sanitize_email($_POST[’email’]) : ”; if (!$email || !is_email($email)) { wp_send_json_error(‘Please…Continue reading

Cortex Image Meta API (copy)

/** * Cortex Image Meta API – REST Endpoints for WordPress Image Optimization * v1.0 – Separated from Cortex SEO Meta API * * For image alt text, titles, captions, and optimization scoring. * Works with RankMath focus keywords for…Continue reading

Hierarchical category menu shortcode

/** * Upgraded: Hierarchical category menu shortcode with: * – Collapsed-by-default children * – Per-branch toggle (checkbox styled like radio) * – Multiple branches can be open concurrently * – Auto-expand active branch path (ancestors of current) * – localStorage…Continue reading