Can’t call external stylesheet for WordPress admin (using wp_admin_css)?

You need to use wp_enqueue_style and hook it into admin_print_styles add_action( ‘admin_print_styles’ , ‘my_wp_admin_css’ ); function my_wp_admin_css() { wp_enqueue_style(‘my_admin_style’ , WP_PLUGIN_URL . ‘/myPlugin/stylesheet.css’ ); } If you just want the stylesheet on your plugins page you can use: $mypage = add_management_page( ‘myplugin’, ‘myplugin’, 9, __FILE__, ‘myplugin_admin_page’ ); add_action( “admin_print_styles-$mypage”, ‘myplugin_admin_head’ );   function myplugin_admin_head() { … Read more

Admin table list API?

Yes, in version 3.1 WP_List_Table class was introduced and admin started to move to using it. As of 3.2.x it currently is not officially declared to be stable API to be used by developers, but in practice it is usually more viable approach than building tables from scratch anyway. On admin loops – admin side … Read more

The uploaded file exceeds!

A php.ini in your WordPress directory has no effect if PHP is running as a service, not per CGI or FastCGI. Find the php.ini in your PHP installation path, adjust the values there and restart PHP and your web server. So … until here this was off topic because general PHP questions belong to Stack … Read more

Adding Custom Capabilites

I just happened to provide a short example of setting up a custom role capability (exaplanation and code). In your case, however, you want to add the capability to particular users – not roles. The following code may be a starting point for what you want to do: >>> Setting it up // The IDs … Read more

Add javascript confirmation popup on “Move to Trash” link

Put the following in your functions.php: if (! empty($GLOBALS[‘pagenow’]) && ‘post.php’ === $GLOBALS[‘pagenow’]) add_action(‘admin_footer’, ‘trash_click_error’); function trash_click_error() { echo <<<JQUERY <script> jQuery(function($) { $(‘#delete-action a’).unbind(); $(‘#delete-action a’).click(function(event) { event.preventDefault(); alert(‘Error!’); setTimeout( function() { $(‘#save-action .spinner’).hide(); $(‘#publish’).removeClass(‘button-primary-disabled’); }, 1 ); }); }); </script> JQUERY; }