The dynamic wp_ajax_
hooks serve mostly organizational convenience on PHP side.
You could choose not to use it, then you would probably have to:
- hook into
admin_init
- check that
DOING_AJAX
istrue
- check that request (
$_REQUEST['action']
and rest of it) is your special kind of request
Then either process your request and die()
or let anything else through to normal handling.
Related Posts:
- Using Backbone with the WordPress AJAX API
- WP-AJAX vs WP REST API: What to use for requests to the website from outside?
- Including WordPress in RESTful API
- REST API endpoint for elasticpress autosuggest
- Admin Notification after save_post, when ajax saving in gutenberg
- Detecting post type within init action
- Gutenberg – how to correctly perform ajax request on backend
- wp_ajax_[service] returning 0
- Is there a hook that fires before an ajax call?
- AJAX request from Chrome Extension to WordPress Website
- WP REST API route request explain
- wp_ajax action is not running
- Confused on AJAX submit form through page template
- Conditional action hooks
- Solve cors problem using rest api or ajax
- Extending wp JavaScript base class to make a post request to a custom REST endpoint
- Can I fire an add_action hook inside of a function that recieves data via wp_ajax?
- How to check an ajax nonce in PHP
- WordPress Ajax Problems
- How to add WP API and JS featured image attachment
- how to send Ajax request in wordpress backend
- Identical wp_rest nonce returned from rest_api
- How do I get reusable blocks via frontend REST API?
- Is there builtin way to use protected AJAX endpoint?
- rest_no_route custom route
- Test WordPress api with postman
- Which allowed API hooks work to add wp_ajax action?
- How to load content from many posts on a page, only if needed
- How do I query posts by a sub value with the API?
- Mapping Backbone Models to serialized array in wp_options table
- merge wp rest api query to get posts per category does not work
- Ways to load admin-ajax faster without initializing all plugins?
- Using admin-ajax prevents regular php form submission
- How to make a fetch() POST request to wordpress rest api?
- post values to custom post type which has advanced custom fields
- ajax problem – function on server is not called
- i’m trying to get all my media query attachments via ajax in wordpress
- change wordpress pagination url after doing the request
- REST public POST giving 403 forbidden nginx
- Refresh Gutenberg with JS for it show updated post
- Set cors header for ajax requests
- Is it good practice to use REST API in wp-admin plugin page? [closed]
- Is there a hook that fires after an ajax call?
- Content including hooks inside wp-settings.php are being called twice in WordPress
- 404 error custom post type rest api
- Hook after all metadata are set is triggering several time
- How to require files in a custom endpoint
- Create a post with REST API and adding a category
- Call public static method from ajax ‘wpcf7_mail_sent’ hook
- Why function called by admin-ajax executes synchronously?
- Should I edit a user meta field with PUT, PATCH, or POST and WP::Editable
- How to trigger lost password email using REST API?
- Trying to send AJAX data to WordPress hook
- WordPress blocking polling request when signed into Admin
- how reduce fetch/XHR response time
- Custom WP rest api endpoint only working on non https?
- Why are the most recent posts not appearing in a fetch request, unless I’m logged in?
- How to submit a button automatically after every scheduled hours?
- At what stage does wp_ajax hooks gets applied during WordPress request?
- JavaScript implementation of Gzip
- How to call a REST endpoint when a post is published?
- Initialize JS with an ajax loaded ACF form
- WordPress Nonce Issue for Ajax Login and Logout
- How to modify wp_ajax function?
- Vue.js + AJAX Shortcode
- Turn jQuery.ajax() request into XMLHttpRequest (vanilla JavaScript)
- Display sub-taxonomies based on SELECTED parent-taxonomy
- Why my admin doesn’t work after adding rest_prepare_post filter?
- Is it safe to manually sign a user in using AJAX?
- Long Polling: Stuck in while loop
- Show Post Content with AJAX
- update_post_meta using ajax
- Select posts by name and category per REST API
- Exposing data using a custom WordPress API
- Custom Login with Ajax not working with IE
- 400 Bad Request when sending XHR from React.js to admin-ajax.php
- Load image src through Ajax by ID?
- Using get_theme_mod in php ajax form doesn’t work
- What exactly does ‘authenticated’ mean for wp_ajax_nopriv?
- Use AJAX in a WordPress Plugin to Get Data From Custom Database?
- Custom RPC end-point security best pratice?
- Ajax mousedown call getting “cancelled” when clicking link
- WordPress Ajax Not Firing
- Get uploaded attachment width & height and attachment ID after upload them
- Refresh checkout fields on add to cart with order bump
- Add Server Side validation in Ajax mail form
- Ajax not sending the data correctly- Multidimensional array
- Need to forward Data from WooCommerce Webhook sent to same site WordPress REST API custom endpoint
- How to check Ajax request only when i opened the Notifications list?
- All WordPress AJAX calls always return 0
- Class called in template, AJAX not registering
- Same query in category.php and in function.php, but different result
- How to use nonces for frontend AJAX voting if the page gets cached?
- problem when adding wp_editor with ajax [duplicate]
- Get wp-load.php PATH with wp_localize_script and JavaScript for plugin
- Ajax request to admin-ajax.php and window.location.href
- Objects and get_post_meta() gives me 1 string for latitude and longitude
- WordPress ajax requst returns zero
- wp_editor() in content that was loaded with ajax [duplicate]
- Send button using own contact form [closed]