Grant access to admin menu?

I am not claiming this is a canonical list but the user related capabilities I see are: add_users create_users delete_users edit_users list_users promote_users remove_users I got this working with only list_users and edit_users. I did test all combinations of those, just a few obvious ones. Of course, you may want more capabilities than that.

Remove the theme info from main dashboard screen- not appearance

You can remove this via javascript. The class of the theme informations is versions and the ID of this Meta Box is dashboard_right_now. The follow screenshot demonstrate how I find this class and id via Crome Webinspector. add_action( ‘admin_footer-index.php’, ‘fb_remove_comments_areas’ ); function () { ?> <script type=”text/javascript”> //<![CDATA[ jQuery(document).ready( function($) { $( ‘#dashboard_right_now .versions’ ).remove(); … Read more

Reference external file as a function

You can’t. Create a function that loads that file: function load_admin_page_file() { require ‘admin-members.php’; } Then use that function name as callback argument. In PHP 5.3 you can use a lambda: add_menu_page( ‘Members’, ‘Members’, ‘manage_options’, ‘members’, function() { require ‘admin-members.php’; } );

Change Admin menu placement using hooks

I’ve fixed it… Posting the solution here if it helps someone… Here is the final code that fixed my problem : /** Remove the Menu registered by Plugin **/ add_action( ‘admin_menu’, ‘my_remove_tp’, 999 ); function my_remove_tp() { remove_submenu_page( ‘themes.php’, ‘upprev/admin/index.php’ ); } /** Re-Register the menu from here **/ add_action(‘admin_menu’, ‘upprev_menu2’); function upprev_menu2(){ add_options_page(‘upPrev Menu’, … Read more

Plugin admin list pages as submenu

You do not post how you add the top level menu page, however I think when you click on a submenu item you have an url like: http://www.example.com/wp-admin/admin.php?page=theme_admin_{$pageid} So the id of page is in the $_GET[‘page’] variable with a fixed string prepended to it. So why don’t use something like: function display_page_test() { $id … Read more