How to Add Admin Bar and Admin Menu or Submenu Notification Bubbles?

You just create the bubble (circle) with CSS, and have text site on top of it. Example CSS span.mbe-update-bubble{ position: absolute !important; top: 6px !important; left: 6px !important; -webkit-border-radius: 10px !important; -khtml-border-radius: 10px !important; -moz-border-radius: 10px !important; border-radius: 10px !important; background: #ccc !important; color: #464646 !important; width: 10px !important; height: 10px !important; padding: 3px !important; … Read more

Reorder dashboard widgets

Clearing things up First, there’s a slight misunderstanding. wp_dashboard_setup is an action and not a filter. If it would be a filter, it would have one or multiple arguments and would need to return the first one. How-To #1 For an example of this action, see the following mu-plugin I use: <?php /** * Plugin … Read more

Integrate post tags in Post Edit page with qTranslate

When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any). In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately after that. Looking at source … Read more

Custom taxonomy position in admin panel

It will definately not show in custom_1 because you probably must have defined it for custom_2.However, you can define a custom submenu with link same as that of the taxonomy in which the parent link is that of custom_2. Following is what i mean. add_submenu_page( ‘edit.php?post_type=custom_1’, ‘Page Title’, ‘Menu Title’, ‘add_users’,’edit-tags.php?taxonomy=custom_taxonomy’, ” );

Hide allow trackbacks/pingbacks

Method 1 (CSS) You can hide it for all non-admins via CSS: function hide_ping_track_wpse_103502() { if( get_post_type() === “post” ){ if( ! current_user_can( ‘manage_options’ ) ){ // only for non-admins echo “<style>.meta-options label[for=ping_status], #ping_status{display:none !important;} </style>”; } } } add_action( ‘admin_head-post.php’, ‘hide_ping_track_wpse_103502’ ); Before: After: Method 2 (PHP) You can also remove the native discussion … Read more

How can I delete all inactive widgets?

You should do it with after_setup_theme action: function remove_inactive_widgets() { $sidebars_widgets = get_option( ‘sidebars_widgets’ ); $sidebars_widgets[‘wp_inactive_widgets’] = array(); update_option( ‘sidebars_widgets’, $sidebars_widgets ); } add_action( ‘after_setup_theme’, ‘remove_inactive_widgets’ );

Make sub menu items a main link in the admin menu using fuctions.php

OK, it’s a bit messy, but it works. Take a look function remove_submenus() { global $submenu; unset($submenu[‘themes.php’][10]); // Removes Menu } add_action(‘admin_menu’, ‘remove_submenus’); function new_nav_menu () { global $menu; $menu[99] = array(”, ‘read’, ‘separator’, ”, ‘menu-top menu-nav’); add_menu_page(__(‘Nav Menus’, ‘mav-menus’), __(‘Nav Menus’, ‘nav-menus’), ‘edit_themes’, ‘nav-menus.php’, ”, 99); } add_action(‘admin_menu’, ‘new_nav_menu’); Essentially it is removing the … Read more