If you check the source for admin-ajax.php
you will notice that the admin_init
hook fires and that the system checks $_REQUEST['action']
for hooks. Given that, you could hook to admin_init
, check the “request” super global, construct wp_ajax_*
and wp_ajax_nopriv_*
values, then use has_action()
to see if anything is hooked in.
Related Posts:
- add_action(), add_filter() before or after function
- Trouble understanding apply_filters()
- What is the very earliest action hook you can call?
- wp_headers vs send_headers. When to use each?
- How many filter/action hooks are healthy?
- Earliest hook to reliably get $post/$posts
- Remove Editor From Homepage
- What does (10, 2) mean when used with add_filter
- Valid characters for actions, hooks and filters
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- How to check if a hook is hooked or not?
- Is it possible to use object in add_action?
- AJAX filter posts on click based on category
- Store source permalink on XMLRPC calls
- How can I send data to admin-ajax via JS Fetch?
- How to make post and comment count unclickable with dashboard_glance_items hook
- Hook into admin post list page
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- How do I know if author field was changed on post save?
- Using hooks to place content in theme dynamically
- About Hooks and Filters
- Shortcodes not resolved in AJAX call response
- PHP5, Inheritance, Singleton – action & filter hook limitations
- Ajax, filters and shortcodes
- Should I use add_action(‘publish_post or add_filter(‘publish_post?
- Please explain me what the do_action does
- Apply the_title filter to post titles AND backend auto social-sharing plugin, but not nav menu
- add_action uses ‘echo’ add_filter uses ‘return’, why?
- Multiple Ajax Data Action
- changing variable through filters or action hooks
- Too many actions/filters!
- Apply a filter only once
- How to get list of all hooks of current theme / plugin?
- Making a class available via actions filters
- How does WordPress call functions attached to a certain action hook before calling functions attached to other hooks
- How to get current action?
- Conditionally call add_action depending on post_type?
- how to change appearence of the content of default post list columns?
- Anonymous function is executed twice in wp_head while added from the_posts filter?
- Explanation for remove_filter used in the below code [closed]
- How to change the blog title with add_filter? details below
- How To Get User Data in Callback Function for pre_user_nicename?
- What’s the best way to split admin-only functionality in the theme’s functions.php file?
- Filter list by a unique meta value dilemma
- return values from hooks do_action and apply_filters, which is better
- How to get all the predefined do_action() calls from an active theme
- Is it possible to track down Actions and Filters?
- When to use actions and when to use filters
- Return a custom value in a function added to an action hook
- Is possible dequeue/remove style from wp_footer() hook and add on wp_head() hook?
- Same Conditionals Not Working on Two Different Hooks
- How to call a function or method that is Namespaced using another plugin
- How to change currency programmatically on creating order action?
- add filter login_redirect does not contain original requested redirect
- get_header and hook avoid normal call
- Removing an action, or dequeueing style – Both not working
- Can the wp_filter object hold multiple values with the same key
- How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
- apply_filters/do_action tag characters limit
- Replace a word with a word in the URL string
- Is there a filter called ‘network_admin_init’?
- How to add ‘total’ value to custom column title on the posts list page
- Filter taxonomy admin pagination
- When to use add_action when registering/enqueuing scripts
- Insert term when page is published – avoid duplicates after edits
- Capture post content before page renders
- Correct method of redirecting user login
- Shortcodes — Using add_action, add_filter in the shortcode
- How to remove action with slashes and arrows?
- Can the wordpress color palettes by changed through Javascript?
- How do I use remove_action on an add_action that uses an array?
- Using add_filters() , apply_filter(), add_action() and do_action() in extending a plugin
- Ajax Filtering Pagination
- Action for opening attachment or manipulating all attachment links
- Put data in my-account/view-order/id/ page
- Change add_filter based on Ajax
- Filter posts by categories ajax is showing all the posts
- What action/filter can be used for modifying the page to be rendered?
- Hook inside a hook
- Code restricted to dashboard, running unexpectedly in the frontend (pre_get_post and admin-ajax.php)
- What problems could happen if I replaced add_filter and add_action with the function calling
- check, if any “add_action” function contains string XXXXXXXXX
- Remove action added from class
- Custom search fields and AJAX support
- Adding to an array & passing it through do_action/apply_filters
- Hook into ‘when user logs in’ [persistent login]
- Custom registration field to SQL database
- Updating User Profile on Registration
- Is this correct usage of filters in WordPress [closed]
- How would I remove an inline googleAPI font script in the the parent theme header.php?
- Loading a sidebar on an Ajax call
- can’t output gray scaled image I’ve created using add_image_size
- Is it possible to make get variable out of filter in Class?
- GET form action. Redirect to self
- Can you call a filter hook by “add_action”?
- How to change content hash value, within the_block_template_skip_link action?
- How to use add_filter to add the extra data to existing array?
- How could I create real-time filtering in this case?
- How to use render_block filter in Gutenberg when editing a page?
- Load More : Admin Ajax 400 Bad request, returning 0