WordPress sets is_admin()
to true for all ajax requests (front-end or admin-side). (See codex).
There’s isn’t away of over-riding this (and you shouldn’t anyway). If your ajax request can be fired from both front-end and admin side, then you may want to include whether it ‘is admin’ or not when you post the data. But without any details on the ‘issues’ it causes with your plug-in, it’s hard to offer a work-aroudn.
Related Posts:
- Conditional check for front-end which includes ajax
- Admin Ajax is returning 0
- How does admin-ajax.php work?
- 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
- Are there any action like ‘init_frontend’
- front end logo upload like happytables
- 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]
- Restrict function call to page load but not ajax call
- front end editing using iFrames, best approach?
- Determining whether it’s a AJAX call from front-end or from back-end
- WordPress Frontend Check If Current User Is Administrator
- How to disable accessing the custom post types from frontend via a link?
- Wp ajax not working from “current_screen” admin hook
- Parsing post->ID in included plugin file
- How to show WordPress admin dashboard forms on front-end?
- Login to admin by frontend form?
- Can you check if https is enabled on frontend from admin
- Disabling “View” mentions from backend?
- Editing post in admin panel
- Lock Display Name To Nickname
- How to fix: Clicking ‘Quick Edit’ link in Admin (edit.php) makes posts disappear?
- 500 error for regular users, not for admin
- What are the standard admin CSS id/class tags?
- Add custom column to Users admin panel
- wp_verify_nonce vs check_admin_referer
- Add a Separator to the Admin Menu?
- How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?
- how to know if admin is in edit page or post [duplicate]
- Modal window from within WordPress admin
- Where in WP can I check history or log of updates of plugins etc?
- Adding a custom admin page
- How to remove entire admin menu?
- How do I remove dashboard access from specific user roles?
- How can I speed up my WP admin section?
- How to pass parameters to admin_notices?
- Admin: very slow edit page caused by core meta query
- if admin is logged in
- Search posts by ID in admin
- How to Change the Default Home Page for the WordPress Dashboard?
- Setting admin edit panels & metaboxes positions and visibility for ALL users and admins
- Find out which moderator approved comment?
- The website cannot display the page
- How To Remove WordPress Version From The Admin Footer
- Sort pages in loop by admin’s page attributes order field?
- Edit “thank you for creating with WordPress” in version 3.3.1
- Hide other users’ posts in admin panel
- Set Default Admin Colour For All Users
- Editor Styles and Typekit
- Upload post thumbnail from the front end
- WordPress admin stylesheet
- This CSS Stuffing Works, But Is This A Good Practice?
- Is it possible to create a WordPress tour? V3.3.1
- Securing Admin Accounts – Username Discovery
- How do I optimize a custom post type admin page with 25,000 posts?
- Settings API – adding setting fields dynamically?
- Disable Media Uploads to non Admin Users
- How do I load a CSS style into WordPress admin area only?
- Can an admin check passwords of registered users?
- How can I target WordPress 3.8 new interface MP6 with CSS?
- Notification that the admin is online
- Does wordpress create activity, update logs?
- sort child pages on admin
- How-to make the admin area mobile friendly [closed]
- WordPress AJAX File Upload – FrontEnd
- Custom column for changing post status via ajax
- How to remove list view from media library?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- Load plugin scripts and styles only on plugin page
- Plugin to remove Admin menu items based on user role?
- How to obtain the user ID of the current profile being edited in WP-Admin?
- 3.3: How do you hide the new dashboard welcome panel?
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- Add my own button next to “Screen options” and “Help” in the admin
- Settings API – easiest way of validating checkboxes?
- Should I use is_admin() inside ‘admin_init’ hook callback
- Custom admin email for new user registration
- Send Admin Emails to Multiple Email Addresses
- Stop admin-ajax?
- How do I set up the defualt page icon for admin menu?
- Prevent author from changing their posts if admin has modified
- Cannot access admin panel
- Make A WordPress Page Accessible To Admins Only, Redirect Other User Roles
- Disable all https in WordPress
- localhost/wp-admin on my local redirects to production site’s /wp-admin
- How to remove administrator role in settings -> general -> New User Default Role?
- Is there a more efficient admin search function/plugin?
- Can a users profile be put under the dashboard menu
- WordPress Admins or Roles per Page
- Styling Shortcodes in Visual Editor
- initial sort order for a sortable custom column in admin
- Showing WP_Error message with admin_notice action hook
- WordPress admin screen very slow / timing out when editing or adding a new page/custom post
- Uploading files in admin panel?
- turn off new user registration emails
- Redirect Admin User in Dashboard
- Send automatic mail to Admin when user/member changes/adds profile