Disable inline_edit() on edit.php

I was never able to find a filter either, but there is a check for whether the taxonomy is allowed to show it’s UI. So what I used to do in one of my plugins was to tweak the $wp_taxonomies global variable on the edit page. /** * Disable the UI for categories, but only … Read more

Edit default comments page in WP Admin

The comments are displayed using an instance of the WP_Comments_List_Table class which is defined as the global variable $wp_list_table. You could extend this class and then use any action after $wp_list_table is defined (admin_head-edit-comments.php would work) to create an instance of your own class, copy all properties of $wp_list_table to the instance of your class … Read more

Admin toolbar shows up when not logged in

Apparently the W3 Total Cache plugin caused this problem. I tried removing the toolbar via CSS by using display:none;. When this didn’t worked, I found that the CSS that styled the toolbar was in one of the cache folders of this plugin.

Hide posts having children terms when display posts by category in edit.php

By default when you run a query for a hierarchical taxonomy term, WordPress also returns post from its children. This happen on backend and on frontend as well. ‘tax_query’ argument has an argument ‘include_children’ that was introduced for the scope, from Codex: include_children (boolean) Whether or not to include children for hierarchical taxonomies. Defaults to … Read more

Correct check for any admin page with editor

Inspect the global variable $pagenow, and use post_type_supports() to find post types with an editor: function has_post_editor() { global $pagenow; if ( empty ( $pagenow ) ) return FALSE; if ( ! in_array( $pagenow, array ( ‘post-new.php’, ‘post.php’ ) ) ) return FALSE; return post_type_supports( get_current_screen()->post_type, ‘editor’ ); }

Correct folder permissions?

For starters, the WordPress Codex has a wealth of information on this very topic. For the sake of brevity that should take care of most of it; however, there are some relievant points that should be made: If you do not wish WordPress (essentially PHP) to have access to the file system with the exception … Read more

How do I add an admin notice within javascript in the admin interface for posts?

Look at F:\sites\wp-git\wp-admin\js\common.js: $(‘div.updated, div.error’).not(‘.below-h2, .inline’).insertAfter( $(‘div.wrap h2:first’) ); If your notice has the class updated or error, it will be set after the first h2 automatically. When you create custom messages, make sure you are using one of these classes. Then you can just append them to body, and WordPress will move them to … Read more