Check the constant DOING_AJAX
. It is always defined when someone uses the WordPress AJAX API.
if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
return;
if ( is_admin() )
add_action( 'admin_init', 'xcsn_redirect_from_admin' );
Related Posts:
- Admin Ajax is returning 0
- How does admin-ajax.php work?
- is_admin() returns true when using admin-ajax.php from front end script
- How to save dismissable notice state in WP 4.2?
- Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”
- WP List Table custom quick edit box – post meta data missing and columns change on submit
- Conditional check for front-end which includes ajax
- Is it possible to hook AJAX to UPDATE-button?
- Is it safe to post form data via Ajax to the settings api? Am I missing something?
- Help with shortcode in admin-ajax [closed]
- Determining whether it’s a AJAX call from front-end or from back-end
- Wp ajax not working from “current_screen” admin hook
- Parsing post->ID in included plugin file
- How to fix: Clicking ‘Quick Edit’ link in Admin (edit.php) makes posts disappear?
- What are the standard admin CSS id/class tags?
- how to know if admin is in edit page or post [duplicate]
- How to remove entire admin menu?
- The website cannot display the page
- Set Default Admin Colour For All Users
- How can I target WordPress 3.8 new interface MP6 with CSS?
- Settings API – easiest way of validating checkboxes?
- initial sort order for a sortable custom column in admin
- Uploading files in admin panel?
- Redirect Admin User in Dashboard
- Read only capability for custom post in admin area
- How can ‘admin_email’ be set?
- Remove ability to access certain admin menus
- Hide update messages from non-admin users?
- Daily notices of failed login attempts for non-existent admin user
- Reorder plugin items in the admin menu
- Reference external file as a function
- “Automatically add new top-level pages” Default
- Get email address of type Administrator
- Which hook for processing plugin page form data?
- Calling a shortcode in the backend
- Is there a way to have admins that are logged in to wordpress not have to enter the password for password protected pages while browsing the website?
- Error thrown. Cannot create references to/from string offsets
- How to receive security update notification email?
- Include admins in author drop-down on edit post screen
- How to restrict wp-admin and prevent upload errors
- Adding another “Add Post” button to admin
- Admin page redirect to another admin page
- How to determine if an admin is logged in outside the loop
- What determines whether admin toolbar is shown to a logged-in user?
- Adding text in more than one language (at the same time)
- How to get view count of every page on site and add that (increasing) number to Dashboard Widget
- WordPress as a web app – always auto-save post and meta data
- Disable the “Skip to Toolbar” tabbing accessibility feature
- Custom Thickbox Broken on Dashboard Page?
- Categorizing Page Templates
- Super slow admin panel
- My WordPress Admin looks messed up when I edit posts or pages
- POMO_Reader->substr() call endless loop?
- jQuery UI AutoComplete & wp_enqueue_script
- Plugin admin panel JavaScript Broken
- Force Contributors to add Tags via edit-tags.php
- Edit Auto Update Admin Notification
- Unable to Access WP Admin or Login buttons after Migration
- How to enqueue admin content outside admincp
- admin_enqueue_scripts the same css file as wp_enqueue_style
- Unable to get to the admin panel
- How to find a spam link?
- Is there alternative to WP_List_Table?
- How to change all “Post” texts in dahboard into “Article”?
- Filter WooCommerce Orders
- Directly editing content on webpage, is it possible?
- How to disable Media Library uploads for non-Admin users?
- Page can’t hand request – HTTP ERROR 500 – when updating something
- Admin user lacks admin permissions after hack and can’t reinstate
- How to change the User name and Password of admin account
- Redirect public site to another one but allow administrators to access the old site
- Posts in sidebar only by admin
- Display an image of selected template in admin to aid user when using complex templates
- How to remove the default checked attribute from inputs in admin?
- Passing state from child component to parent component in a Gutenberg Sidebar
- I can’t enter the control panel of my wordpress site after channing the URL to https://
- Admin user column sort by numeric meta key
- Shop in Subdomain feeding main domain order in admin area
- Can I retrieve Published changes when changes have been Saved but not Published in WordPress Semplice?
- I can’t access login page
- Admin Access for specific page(s)
- Get Link of Page Selected through a Select Field in Custom Admin Page
- how to disable the e-mail verification on wp-admin/options-general.php multisite admin e-mail
- conditionally update css on edit.php
- Simple CSS admin pagination
- Can I show the tag admin interface on a post when logged in as an admin?
- Editing post in admin panel
- Making a custom upload form and page in the admin section
- site admin for subscribers
- Customise the add media pop-up to include rel attribute option
- admin panel save option with ajax
- WordPress gallery image link gives 404 when not logged in
- Custom Div with links on Admin Bar
- WordPress admin loads erratically “connection reset by peer”
- Remove “minor-publishing” div from Publish admin metabox
- New User Notification – Setting Email
- Can’t access my wp admin: captcha images invisible, gives me error message
- You do not have permission to access this document on form submit
- Woo Commerce Settings for Check-out Form [closed]
- What Role to assign remote site developer?