It uses get_terms
and wp_get_object_terms
internally to get the categories. You can achieve what you want using a filter associated with these functions.
<?php
//$args = apply_filters( 'get_terms_args', $args, $taxonomies );
add_filter('get_terms_args', 'wpse53900_filter_cat');
function wpse53900_filter_cat($args, $taxonomies){
//this is where you can check the taxonomies and roles to filter out the ones you want
//additionally, make sure to add a check here so that your code runs only on the post edit/add screens
}
Should give you an idea! 😉
Related Posts:
- Add a Separator to the Admin Menu?
- Adding a custom admin page
- How to remove entire admin menu?
- Plugin to remove Admin menu items based on user role?
- Add my own button next to “Screen options” and “Help” in the admin
- How to show custom menu items in the WordPress android app?
- Remove ability to access certain admin menus
- Appearance->Editor not visible
- Custom WP_List_Table displays blank rows
- How do I set up a webhook?
- Admin pages have no content
- WordPress Left Hand Side Admin Menu Always Collapsed
- Reorder plugin items in the admin menu
- Re-ordering Admin Submenu Sections
- Reference external file as a function
- Add number new posts (post_status = pending) to administration menu [duplicate]
- add_submenu_page set for multiple roles [duplicate]
- How To Create User Specific Admin User Pages?
- Change the Default Pages Menu View in wp-admin
- How to change admin menu position of “Media”?
- Change top level menu item to point to custom submenu item
- Associating custom submenu item with post type of top level menu item
- Admin doesn’t have sufficient permissions to plugin’s page
- Remove Admin sidebar link
- Single category’s posts list in admin menu
- Dashboard menu missing
- WordPress Remove Submenus
- page not updating with database
- Why am I timing out when using the Menu Editor?
- 500 internal server error on wp-admin only
- How can I POST or GET to the same admin page from which I am POST-ing or GET-ing
- Output the admin menu_position for each item
- How can I add a menu item to the admin area?
- Backend Checkboxes working – but not visual?
- WordPress Admin Menu Order for ‘admin.php’ pages
- Give admin_menu permission to specific users
- Show all admin menus in a table
- Highlight active Admin Menu when added though add_menu_page
- require/include php file in add_menu()
- Create WordPress Menu Item Without Linking to a Custom Page
- Simple CSS admin pagination
- How to change the default url for ‘Posts’ link?
- Unsure how to add simple checkboxes that write to a small table to admin
- Add a link to the Admin menu
- Reference external file as a function
- Display admin sidebar into custom post pages if logged
- Add custom column to Users admin panel
- Modal window from within WordPress admin
- Edit “thank you for creating with WordPress” in version 3.3.1
- How to save dismissable notice state in WP 4.2?
- Get current active wp color scheme
- Cannot login to WordPress Admin with SSL terminated load balancer
- How to fix admin stylesheet muck-up? [closed]
- Turn off admin emails for new user registrations
- Remove admin AND editor from the “change role to” menu in user listing
- Adding custom Javascript to the head tag in Admin
- Admin account only shows Profile and Dashboard with no activity
- Replacing the List table of a Post Type
- Adding scripts to admin page in my theme
- Why adding Categories does not auto refresh in Backend while using my custom theme?
- How can I place the “Add New Post” contents on a custom page?
- Getting Rid of the WordPress.com Toolbar on Other Sites?
- How to notify the admin about something that happened during a cron job
- wp_dropdown_pages() in theme admin page
- I’m receiving requests to change the admin email. How can this be happening?
- How can I load an inline script after the enqueued scripts in admin?
- How to send little data between admin pages of my plugin?
- Set admin body to ltr on a rtl installation
- Can I mass change all admin emails for a multisite instance?
- WordPress admin area used to administer other site
- Add ‘Last Modified’ and Attachments (Yes/No) to WordPress Users Column
- WordPress administrator area access disabled temporarily due to widespread brute force attacks
- Why can’t a custom postype be registered with “admin_init” hook?
- remove menus for a specific role?
- I’m a super admin and I want to give an admin the ability to add new users…?
- Return User Meta text as links to post edit inside the user columns
- Order All Pages table in administration
- Is there a filter to remove or replace the post title’s link in the admin post table view (edit.php)?
- How to pass a specific post id from “all posts” list in Admin panel
- How to change the link of the wordpress logo in the admin bar?
- Shows site under construction but comes up after I login to admin
- Wp-Admin FTPS Connection Error unlike Filezilla
- WordPress Admin Panel Left Sidebar No showing on Post create page
- Reset WordPress admin users to limit access
- Is it possible to push admin notices to one specific user instead of all users?
- After upgrading to WP 5.1.1 sometimes I need to reauth infinitively
- Trying to hide a submenu link which is created by Co-authors Plus plugin
- Blank WordPress admin/dashboard (7 updates pending)
- How can I create multiple different admin roles with their own capabilities
- Find out if post was just updated on post edit screen
- Wp-admin page not found following copy of site
- Custom redirection when managing users in admin
- Why doesn’t the Media Browser use thumbnail sized images?
- wordpress login loop after install
- Change Admin URL
- How to remove certain feed from my dashboard in WP admin
- Hiding the media-new.php File URL option via jQuery
- Buddypress send admin notification email when new subscriber registers
- Background image in login showing in admin area
- Modify ‘the_content’ appearance in the admin area