Editor Styles and Typekit

Tom Nowell’s TinyMCE plugin solution works brilliantly, just update the JavaScript to use Typekit’s new async code. Once you use the new async embed code, the 403 problem disappears and you’ll have Typekit-enabled TinyMCE with no fuss! Tom has put all the code together in a blog post. He did all the heavy lifting on … Read more

Set Default Admin Colour For All Users

You can set (in terms of force) a default color within functions.php like this: add_filter( ‘get_user_option_admin_color’, ‘update_user_option_admin_color’, 5 ); function update_user_option_admin_color( $color_scheme ) { $color_scheme=”light”; return $color_scheme; } Update: The following color schemes are available per default at WP 3.8 fresh light blue coffee ectoplasm midnight ocean sunrise Bonus (found on wpmudev): Disable the Admin … Read more

Hide other users’ posts in admin panel

Here is what I use: // Show only posts and media related to logged in author add_action(‘pre_get_posts’, ‘query_set_only_author’ ); function query_set_only_author( $wp_query ) { global $current_user; if( is_admin() && !current_user_can(‘edit_others_posts’) ) { $wp_query->set( ‘author’, $current_user->ID ); add_filter(‘views_edit-post’, ‘fix_post_counts’); add_filter(‘views_upload’, ‘fix_media_counts’); } } // Fix post counts function fix_post_counts($views) { global $current_user, $wp_query; unset($views[‘mine’]); $types = … Read more

Edit “thank you for creating with WordPress” in version 3.3.1

Credit definitely goes to @kaiser, but here is a full working solution. You can add this code to your functions.php file (in your theme): function wpse_edit_footer() { add_filter( ‘admin_footer_text’, ‘wpse_edit_text’, 11 ); } function wpse_edit_text($content) { return “New Footer Text”; } add_action( ‘admin_init’, ‘wpse_edit_footer’ );

How To Remove WordPress Version From The Admin Footer

Add this to your functions.php: function my_footer_shh() { remove_filter( ‘update_footer’, ‘core_update_footer’ ); } add_action( ‘admin_menu’, ‘my_footer_shh’ ); or, if you’d like to hide it from everyone except admins: function my_footer_shh() { if ( ! current_user_can(‘manage_options’) ) { // ‘update_core’ may be more appropriate remove_filter( ‘update_footer’, ‘core_update_footer’ ); } } add_action( ‘admin_menu’, ‘my_footer_shh’ );

Find out which moderator approved comment?

To record the moderator that approves the comment: function wpse_comment_moderator_log( $comment ) { global $current_user; get_currentuserinfo(); update_comment_meta( $comment->comment_ID, ‘approved_by’, $current_user->user_login ); } add_action( ‘comment_unapproved_to_approved’, ‘wpse_comment_moderator_log’ ); To display it after the comment text: function wpse_display_moderator( $comment_text, $comment ) { $approved_by = get_comment_meta( $comment->comment_ID, ‘approved_by’, true ); if ( $approved_by ) { $comment_text .= ” – … Read more

Setting admin edit panels & metaboxes positions and visibility for ALL users and admins

You can remove the default meta boxes with remove_meta_box and re-add them in a different position with add_meta_box: add_action(‘do_meta_boxes’, ‘wpse33063_move_meta_box’); function wpse33063_move_meta_box(){ remove_meta_box( ‘postimagediv’, ‘post’, ‘side’ ); add_meta_box(‘postimagediv’, __(‘Featured Image’), ‘post_thumbnail_meta_box’, ‘post’, ‘normal’, ‘high’); } The answer above is from the following thread: How to change default position of WP meta boxes? UPDATE If the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)