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:
- 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?
- AJAX filter posts on click based on category
- Store source permalink on XMLRPC calls
- How to make post and comment count unclickable with dashboard_glance_items hook
- Hook into admin post list page
- How do I know if author field was changed on post save?
- About Hooks and Filters
- Shortcodes not resolved in AJAX call response
- Ajax, filters and shortcodes
- Should I use add_action(‘publish_post or add_filter(‘publish_post?
- 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
- 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
- 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
- Same Conditionals Not Working on Two Different Hooks
- Can the wp_filter object hold multiple values with the same key
- apply_filters/do_action tag characters limit
- Is there a filter called ‘network_admin_init’?
- Insert term when page is published – avoid duplicates after edits
- Capture post content before page renders
- Correct method of redirecting user login
- How to remove action with slashes and arrows?
- How do I use remove_action on an add_action that uses an array?
- Does a plugin with a AJAX button filter exist? [closed]
- Changing WordPress core without hacking core
- How to pass variables to custom filter from multiple functions
- Comment search plugin
- Proper after_setup_theme and wp_head cleanup
- Issue understanding and using WordPress filters and actions
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- How to get a single hook from wp_head()?
- Add a filter inside an action init
- Is it possible to apply_filter on a wp_ajax_ action?
- Is it possible to bind a function to a filter hook via Ajax?
- Filter for when the post is updated
- Add a filter to an action [closed]
- How can I specify the post status of an untrashed post?
- Filter get_page_by_path()
- Remove actions/filters that are set with create_function()
- Most performant/functional way to add actions/filters?
- Remove tags without a specific meta key from “choose from the most used tags”
- How to access page variable inside action hook
- Use has_filter on comment_post
- Echo string in admin panel footer beside version no
- How to change default text for specific post type
- How can I edit comment meta value before it is saved?
- Disable sanitize_file_name on upload without modifying functions.php
- Redirect after post deleted
- Making an add_filter() call from within an add_filter() call
- Plugin default settings hook
- alternative to the_content filter
- Action hook to control access to certain parts of my site
- Finding actual functions added to hooks and filters
- Best practice: Custom Post Type / Filter / Load more
- How to pass a variable between filter/action functions?
- style_loader_tag not changing stylesheet to preload
- Adding link options in insert/edit link dialog window
- Hook to change the site URL
- post value to function with Ajax and jQuery
- AJAX Post Filter
- how to use apply filter for Class?
- How can I see exactly what arguments are being passed through a filter so that I may modify them?
- WordPress set featured image to first image of the post
- Display post after choice two taxonomy terms
- adding an action inside if condition not working
- 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
- 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)
- check, if any “add_action” function contains string XXXXXXXXX
- Remove action added from class
- 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?
- can’t output gray scaled image I’ve created using add_image_size
- Can you call a filter hook by “add_action”?