Skill / SKILL.md

Ajax Security

wpultimatesecurity/WordPress-Security-Skills

Use when registering or handling WordPress AJAX over admin-ajax.php - wp_ajax_{action} / wp_ajax_nopriv_{action} hooks, JavaScript that posts to admin_url('admin-ajax.php'), or wp.apiFetch / fetch calls to custom actions. Verifies the nonce with check_ajax_referer, gates the action with current_user_can, unslashes and sanitizes every field, and replies with wp_send_json_success / wp_send_json_error. Prevents CSRF, broken access control, and injection on the AJAX surface.
2 views 57 repository stars 0 commentsUpdated Nov 27, 2026
Overview

Use when registering or handling WordPress AJAX over admin-ajax.php - wp_ajax_{action} / wp_ajax_nopriv_{action} hooks, JavaScript that posts to admin_url('admin-ajax.php'), or wp.apiFetch / fetch calls to custom actions. Verifies the nonce with check_ajax_referer, gates the action with current_user_can, unslashes and sanitizes every field, and replies with wp_send_json_success / wp_send_json_error. Prevents CSRF, broken access control, and injection on the AJAX surface.

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/wpultimatesecurity/WordPress-Security-Skills' skill-source

Use the complete skill-source/skills/ajax-security directory with your client’s skill installer.

Source directory skills/ajax-security

Compatibility & requirements

Declared compatibility

Examples generally use PHP 7.4 syntax; check each API against target WordPress/PHP versions. Use maintained WordPress and supported PHP in production. Shell examples require their named tools.

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Source & validation
Source status
Awaiting source check
Format validation
Format valid
Checked at
Pending source check
Content SHA-256
cc583afd70468f839796159923051d2048522db8d8415402d557290bc9b4bb44
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills