Difference between admin and user admin

A “user admin screen” (or interface page) is a page in wp-admin for managing users. An “admin screen” (or interface page) is any page in wp-admin, which includes user admin screens but also screens for managing other types of data.

Ajax solution similar to WP Categories functioning in Admin area

first your form that calls the ajax must have the an action filed with the value of the ajax hook for example your ajax call is: add_action(‘wp_ajax_show_all_tracks’, ‘show_all_tracks’); the your form action field must be: <input type=”hidden” name=”action” value=”show_all_tracks” /> thats for start’ so as for adding tracks you need to add a function to … Read more

How to replace “Password Protected” text with icon in Admin

Try this (don’t forget to replace icon URL): add_filter( ‘display_post_states’, ‘password_protected_icon’ ); function password_protected_icon( $post_states ) { $text = __(‘Password protected’); $pos = array_search( $text, $post_states); if( false !== $pos ) $post_states[$pos] = ‘<img src=”http://i.stack.imgur.com/aIDa6.png” title=”‘.htmlspecialchars($text).'”/>’; return $post_states; }

How do you force the wordpress dashboard to be 1 coulmn by default?

I found a promising looking answer to this question in the following post: http://wordpress.org/support/topic/customizing-admin-area-using-functionsphp-2-questions It recommends using this code in the functions.php file: function so_screen_layout_columns( $columns ) { $columns[‘dashboard’] = 1; return $columns; } add_filter( ‘screen_layout_columns’, ‘so_screen_layout_columns’ ); function so_screen_layout_dashboard() { return 1; } add_filter( ‘get_user_option_screen_layout_dashboard’, ‘so_screen_layout_dashboard’ ); Hope that helps!

How do I add a favicon that only shows during viewing of my plugin’s admin panel?

When you add your admin (sub)page, then you’re (hopfully) using add_*menu_page(). You can simply save its result in a var. This var is the $hook_suffix. Then you can simply add your callback (that adds the favicon) to the admin_head-{$suffix} hook Source Link. As the plugins screenshot shows you, there’re also the load-{$hook_suffix}-hooks Source Link, which … Read more

Redirect from the dashboard to edit.php if wp_is_mobile() is true

The action you’re looking for is auth_redirect, which is before the headers but still recognizes $pagenow to tell which page you’re on: add_action(‘auth_redirect’, ‘the_mobile_boot’); function the_mobile_boot() { global $pagenow; if ( $pagenow == ‘index.php’ && wp_is_mobile() ) { header( ‘Location: ‘ . get_admin_url(null, ‘edit.php’) ); exit; } }