Set different custom menu items for different user roles
Set different custom menu items for different user roles
Set different custom menu items for different user roles
Also an tutorial with an solution for page and post to add thumbnail in a column: http://wpengineer.com/1960/display-post-thumbnail-post-page-overview/ Change the content from thumbnail to your content and remove the hooks for post: // for posts // add_filter( ‘manage_posts_columns’, ‘fb_AddThumbColumn’ ); // add_action( ‘manage_posts_custom_column’, ‘fb_AddThumbValue’, 10, 2 ); // for pages add_filter( ‘manage_pages_columns’, ‘fb_AddThumbColumn’ ); add_action( ‘manage_pages_custom_column’, … Read more
Custom post types as sub menu pages and role capabilities issue
Calling the “wp-link-wrap” pop-up modal
Essentially, you shouldn’t wrap your REST route declarations inside is_admin() since WordPress will not load them (see @DarkNueron comment). What you can do is pass a ‘permission_callback’ function to the register_rest_route function. If the function returns true, the request is allowed to continue; if false, an error is returned. So you could do: register_rest_route(‘your-namespace/v1’, ‘/options/’, … Read more
you could filter gettext to change it. Note that this will change every translatable instance of “Profile”. function change_admin_profile_to_account( $thename ){ $thename = str_replace( ‘Profile’, ‘Account’, $thename ); return $thename; } add_filter( ‘gettext’, ‘change_admin_profile_to_account’ );
This is not an exact answer, but I think there are enough elements to build the desired output. I sort the menu manipulating the global $menu, not really best practice, but for now it works. The result of this example is moving Links Manager, Comments and Media Library to the end of the first block. … Read more
Insted of using some custom code that will not work on wp update (as you have experienced) why don’t use the core meta uploader? Go in the “Media -> Add New” on your backend. Simply add a new file. After you uploaded it, click on Edit and set the attachment title with the line of … Read more
I rewrote the code: /* Plugin Name: Admin Menu Post List Plugin URI: Description: Display a simple post list in admin menu for easy access Version: 0.2 Author: Eliot Akira Author URI: License: GPL2 */ /* * Load CSS in header */ function custom_post_list_view_css() { ?> <style> .post_list_view_headline { padding-left: 10px !important; padding-right: 10px !important; … Read more
I just ran into this. The reason is that you are overriding the window.send_to_editor function with one of your own. WordPress uses this function to insert galleries and other stuff, so now that you’ve changed it, it can’t. Ideally’ you’d want to use an event triggered by the media uploader instead of just replacing the … Read more