Hot answers tagged

6

Here's a script that you can enqueue into your admin panel. It will add a new tab to the category tabs called "Active". Whenever a checkbox is checked, it gets added to the "Active" tab list, you can also click links in the "Active" tab list to remove them ( uncheck them ). Add this as an external script, custom-tabs.js maybe: jQuery( document ).ready( ...


2

You need the !is_admin() check. This will return false on admin pages, failing your condition. On front end pages, that condition will return true, executing your conditional statement if ( !is_admin() ) { // Do something only on frontend }


1

After a little bit of trial and error, I finally got my code to work. This will redirect http://example.com/wp-admin/plugins to http://example.com/wp-admin/admin.php?page=pretty-plugins.php if the current user doesn't have access to update core. add_action( 'admin_menu', 'block_direct_plugin_page_access' ); function block_direct_plugin_page_access() { ...


1

This removes the 'quick edit' button from the page edit dashboard for all users who cannot edit theme options (usually admins). So, quick edit is no longer available for common editors, assuming there has been no messing with default capabilities. The two added filters are the same. One of them is probably meant to apply to the post edit dashboard and ...


1

"Headers already sent" errors are frequently caused by plugin conflicts. Since you have access to phpMyAdmin, you could try emptying the active_plugins data from the options table. (But first I would copy and save the option_value elsewhere for resetting it if it doesn't help.)



Only top voted, non community-wiki answers of a minimum length are eligible