How to change menu page capability
How to change menu page capability
How to change menu page capability
Add a javascript to all admin pages: add_action( ‘admin_print_scripts’, ‘auto_collapse_menu’ ); function auto_collapse_menu(){ wp_enqueue_script( ‘autocollapsemenu’, plugins_url( ‘autocollapsemenu.js’, __FILE__ ), array( ‘jquery’ ), false, true ); } The javascript: jQuery(document).ready( function($){ // catch every click inside element with ID ‘adminmenu’ $( ‘#adminmenu’ ).click( function(e){ // true if the menu is folded, false if not var bodyFolded … Read more
Typically most themes will include an edit link on the post/page itself that takes you directly to the backend to edit the post. If not, you can always add it yourself with code similar to the following in single.php, page.php, etc.: <?php edit_post_link(‘(Edit this post)’, ‘<p>’, ‘</p>’); ?> (See http://codex.wordpress.org/Function_Reference/edit_post_link for more details.) Also, check … Read more
What you see on that image is the full-screen mode which is the default mode in the block editor (that applies to Pages, Posts and custom post types), and which is intended to help users to work without distraction. Secondly, there’s also a note in wp-admin/admin-header.php which says that // Default to is-fullscreen-mode to avoid … Read more
That’s a bit of a late answer and I don’t know if @Jay ever sorted it out, but to anyone having the same issue, here’s how I fixed it. Menu Pages function my_admin_menu() { add_menu_page( ‘Page title’, ‘Menu title’, ‘manage_options’, ‘my_page’, null, null, 99 ); add_submenu_page( ‘my_page’, ‘Subpage 1 title’, ‘Subpage 1 menu title’, ‘manage_options’, … Read more
You are Missing few Things. First of all hook the function wpt_theme_init with admin_init or similar one. otherwise your function will not execute. example below add_action( ‘admin_init’, ‘wpt_theme_init’ ); add_settings_section and add_settings_field take 4th argument as a $page parameter. which is wptsettings in your case. remember? you have named your page wptsettings in add_theme_page ( … Read more
It’s an issue with Chrome. It was reported on the Google Chrome product forum today now that it has hit the stable release. I originally saw this issue on this thread: WordPress admin menu formatting issue I wrote a quick plugin as a workaround until they fix it: https://github.com/raffjones/chrome-admin-menu-fix.
How to remove_menu_page added by a plugin that appears to have no referenceable slug
Otto has suggested a fix in Chrome itself until the bug is resolved: Go to chrome://flags/#disable-slimming-paint Enable the “Disable slimming paint” option. Ensure that the “Enable slimming paint” option below it is not turned on. Relaunch Chrome. If you don’t want to take this approach you can fix this with CSS: function chromefix_inline_css() { wp_add_inline_style( … Read more
Alright…I found the answer. They implemented it as a filter (which for the life of me I could not figure out via that Trac). See here: Proper use of option_page_capability_{$page_name} Once I added the capability filter in my plugin options class – works like a charm.