WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Toolbar Buddy

This plugin adds useful admin links and resources for iThemes Builder and popular iThemes/PluginBuddy Plugins to the WordPress Toolbar / Admin Bar.

Does this plugin work with latest WordPress version and also older versions?

Yes, this plugin works really fine with the latest WordPress 3.3+ and also 3.4! And sorry, it DOES NOT work with older WordPress versions so please update your install if you haven't done yet :).

I don't see any new toolbar entries/links?

You must be an "Administrator" or "Super Administrator" (Multisite) in your install! Otherwise nothing gets displayed. Toolbar Buddy just takes over completely the behavior of its supported theme and/or plugins. (So if you have a general problem with that you should contact the iThemes support.)

Note: Toolbar Buddy also respects the removal of "My Theme" menu if set via "Builder" or child theme functions.php file. In this case NO Builder-specific links will be displayed!

Help, I now have two Builder-related toolbar items?

Toolbar Buddy items appear under "iBuddy" where the original "Builder" items just appear under "Builder". That way you can manage your current layout used by the site and its depending widget content. "iBuddy" then manages all other things... :) (Note: By user request I just decided to let both go hand in hand as the default setting. Removal of original "Builder" item in plugin version 1.0 was disabled by plugin version 1.1. --- Since I still wanted to have only one item I added the optional removing of the original item via a constant in your child theme's functions.php file - just add this code:

/** Toolbar Buddy: Remove Original Builder Toolbar Items */
define( 'TBB_REMOVE_BUILDER_ORIGINAL_TOOLBAR', TRUE );

Why is the main toolbar entry called "iBuddy"?

This is just my shortened version of the term "iThemes and PluginBuddy". I wanted it really short and unique and somewhat related to this brand so I came up with that name. I hope you like it... If not, just introduce your own wording/branding via another language file. --- Since the rebranding of "PluginBuddy" to just iThemes or iThemes Plugins, I still think "iBuddy" remains the perfect fit, especially regarding the hugely popular "BackupBuddy" plugin among others :).

How are new resources being added to the toolbar/admin bar?

Just drop me a note on my Twitter @deckerweb or via my contact page and I'll add the link if it is useful for admins/ webmasters and the iThemes Builder and iThemes Plugins/PluginBuddy communities.

How could my plugin/extension or child theme options page be added to the toolbar/admin bar links?

This is possible of course and highly welcomed! Just drop me a note on my Twitter @deckerweb or via my contact page and we sort out the details! Particularly, I need the admin url for the primary options page (like so wp-admin/admin.php?page=foo) - this is relevant for both, plugins and child themes. For child themes then I also need the correct name defined in the stylesheet (like so Footheme) and the correct folder name (like so footheme-folder) because this would be the template name when using with child themes. (Note: I don't own all the premium stuff myself yet so you're more than welcomed to help me out with these things. Thank you!)

Is this plugin Multisite compatible?

Yes, it is! :) Works really fine in Multisite invironment - also see next Q/A...

In Multisite, could I "network enable" this plugin?

Of course, that's possible and fully supported! If you use "BackupBuddy" in Multisite then you will have it running network-activated. And so you should do the same with Toolbar Buddy to fully support the slightly different stuff of BackupBuddy in Multisite!

If you don't use BackupBuddy in your Multisite then it's better to enable Toolbar Buddy only on a per site basis because all other setting links are only site-related! Only in the following edge case it makes sense to network-activate (with no BackupBuddy active): if all of the sites in Multisite have one or all of the following in common: Builder Theme / Builder plugin add-ons / LoopBuddy plugin / DisplayBuddy plugin(s). This might be the case if you use Multisite for multilingual projects, especially with that awesome plugin: http://wordpress.org/extend/plugins/multilingual-press/

Can custom menu items be hooked in via theme/child theme or other plugins?

Yes, this is possible since version 1.2 of the plugin! There are 5 action hooks available for hooking custom menu items in -- tbb_custom_ithemes_group_items for the "Builder" section, tbb_custom_displaybuddy_group_items for the "DisplayBuddy" section, tbb_custom_loopbuddy_group_items for the "LoopBuddy" section, tbb_custom_backupbuddy_group_items for the "BackupBuddy" section and tbb_custom_iresource_group_items for the resource group section. Here's an example code:

add_action( 'tbb_custom_iresource_group_items', 'tbb_custom_additional_iresource_group_item' );
/**
 * Toolbar Buddy: Custom iResource Group Items
 *
 * @global mixed $wp_admin_bar
 */
function tbb_custom_additional_iresource_group_item() {

    global $wp_admin_bar;

    $wp_admin_bar->add_menu( array(
        'parent' => 'ddw-ibuddy-iresourcegroup',
        'title'  => __( 'Custom Menu Item Name', 'your-textdomain' ),
        'href'   => 'http://deckerweb.de/',
        'meta'   => array( 'title' => __( 'Custom Menu Item Name Tooltip', 'your-textdomain' ) )
    ) );
}

Can certain sections be removed?

Yes, this is possible since version 1.2 of the plugin! You can remove the following sections: "Builder Theme" area (all items) / "DisplayBuddy" area (all items) / "LoopBuddy" area (all items) / "BackupBuddy" area (all items) / "Resources link group" at the bottom (all items) / "German language stuff" (all items)

To achieve this add one, some or all of the following constants to your child theme's functions.php or similar file (or functionality plugin or whatever...):

/** Toolbar Buddy: Remove all Builder Items */
define( 'TBB_BUILDER_DISPLAY', FALSE );

/** Toolbar Buddy: Remove Builder's Manage Content Items */
define( 'TBB_BUILDER_MANAGE_CONTENT_DISPLAY', FALSE );

/** Toolbar Buddy: Remove DisplayBuddy Items */
define( 'TBB_DISPLAYBUDDY_DISPLAY', FALSE );

/** Toolbar Buddy: Remove LoopBuddy Items */
define( 'TBB_LOOPBUDDY_DISPLAY', FALSE );

/** Toolbar Buddy: Remove BackupBuddy Items */
define( 'TBB_BACKUPBUDDY_DISPLAY', FALSE );

/** Toolbar Buddy: Remove iResource Items */
define( 'TBB_RESOURCES_DISPLAY', FALSE );

/** Toolbar Buddy: Remove German Language Items */
define( 'TBB_DE_DISPLAY', FALSE );

Can the the whole toolbar entry be removed, especially for certain users?

Yes, that's also possible! This could be useful if your site has special user roles/capabilities or other settings that are beyond the default WordPress stuff etc. For example: if you want to disable the display of any "Toolbar Buddy" items for all user roles of "Editor" please use this code:

/** Toolbar Buddy: Remove ALL items for "Editor" user role */
if ( current_user_can( 'editor' ) ) {
    define( 'TBB_ALL_DISPLAY', FALSE );
}

To hide only from the user with a user ID of "2":

/** Toolbar Buddy: Remove ALL items for user ID 2 */
if ( 2 == get_current_user_id() ) {
    define( 'TBB_ALL_DISPLAY', FALSE );
}

To hide items only in frontend use this code:

/** Toolbar Buddy: Remove ALL items from frontend */
if ( ! is_admin() ) {
    define( 'TBB_ALL_DISPLAY', FALSE );
}

In general, use this constant do hide any "Toolbar Buddy" items:

/** Toolbar Buddy: Remove ALL items */
define( 'TBB_ALL_DISPLAY', FALSE );

Available Filters to Customize More Stuff

All filters are listed with the filter name in bold and the below additional info, helper functions (if available) as well as usage examples.

tbb_filter_capability_all

  • Default value: edit_posts
  • 4 Predefined helper functions:
    • __tbb_admin_only -- returns 'administrator' role -- usage:
add_filter( 'tbb_filter_capability_all', '__tbb_admin_only' );
  • __tbb_role_editor -- returns 'editor' role -- usage:
add_filter( 'tbb_filter_capability_all', '__tbb_role_editor' );
  • __tbb_cap_edit_theme_options -- returns 'edit_theme_options' capability -- usage:
add_filter( 'tbb_filter_capability_all', '__tbb_cap_edit_theme_options' );
  • __tbb_cap_manage_options -- returns 'manage_options' capability -- usage:
add_filter( 'tbb_filter_capability_all', '__tbb_cap_manage_options' );
  • __tbb_cap_install_plugins -- returns 'install_plugins' capability -- usage:
add_filter( 'tbb_filter_capability_all', '__tbb_cap_install_plugins' );
  • Another example:
add_filter( 'tbb_filter_capability_all', 'custom_tbb_capability_all' );
/**
 * Toolbar Buddy: Change Main Capability
 */
function custom_tbb_capability_all() {
    return 'activate_plugins';
}

--> Changes the capability to activate_plugins

tbb_filter_main_icon

  • Default value: iThemes Logo default graphic from the plugin's "images" folder
  • 8 Predefined helper functions:
add_filter( 'tbb_filter_main_icon', '__tbb_icon_builder' );

add_filter( 'tbb_filter_main_icon', '__tbb_icon_buildertwo' );

add_filter( 'tbb_filter_main_icon', '__tbb_icon_pluginbuddy' );

add_filter( 'tbb_filter_main_icon', '__tbb_icon_pluginbuddytwo' );

add_filter( 'tbb_filter_main_icon', '__tbb_icon_displaybuddy' );

add_filter( 'tbb_filter_main_icon', '__tbb_icon_loopbuddy' );

add_filter( 'tbb_filter_main_icon', '__tbb_icon_backupbuddy' );

add_filter( 'tbb_filter_main_icon', '__tbb_child_images_icon' );

--> Where the last helper function returns the icon file (icon-tbb.png) found in your current child theme's /images/ subfolder

  • Example for using with child themes and Builder (or any other parent theme):
add_filter( 'tbb_filter_main_icon', 'custom_child_tbb_main_icon' );
/**
 * Toolbar Buddy: Change Main Icon (Child Theme)
 */
function custom_child_tbb_main_icon() {
    return get_stylesheet_directory_uri() . '/images/custom-icon.png';
}

--> Uses a custom image from your active child theme's /images/ folder

--> Recommended dimensions are 16px x 16px

tbb_filter_main_icon_display

  • Returning the CSS class for the main item icon
  • Default value: icon-ibuddy (class is: .icon-ibuddy)
  • 1 Predefined helper function:
    • __tbb_no_icon_display() -- usage:
add_filter( 'tbb_filter_main_icon_display', '__tbb_no_icon_display' );
  • This way you can REMOVE the icon!
    • Another example:
add_filter( 'tbb_filter_main_icon_display', 'custom_tbb_main_icon_display_class' );
/**
 * Toolbar Buddy: Change Main Icon CSS Class
 */
function custom_tbb_main_icon_display_class() {
    return 'your-custom-icon-class';
}

--> You then have to define CSS rules in your style.css file of your child theme stylesheet for your own custom class .your-custom-icon-class

tbb_filter_main_item

  • Default value: "iBuddy"
  • Example code for your functions.php file or similar file from child theme:
add_filter( 'tbb_filter_main_item', 'custom_tbb_main_item' );
/**
 * Toolbar Buddy: Change Main Item Name
 */
function custom_tbb_main_item() {
    return __( 'Your custom main item', 'your-child-theme-textdomain' );
}

tbb_filter_main_item_tooltip

  • Default value: "iBuddy"
  • Example code for your functions.php file or similar file from child theme:
add_filter( 'tbb_filter_main_item_tooltip', 'custom_tbb_main_item_tooltip' );
/**
 * Toolbar Buddy: Change Main Item Name's Tooltip
 */
function custom_tbb_main_item_tooltip() {
    return __( 'Your custom main item tooltip', 'your-child-theme-textdomain' );
}

tbb_filter_ibuddy_hq_name

  • Default value: "iBuddy HQ"
  • Used for the resource group item in the toolbar to enable proper branding
  • Change things like in the other examples/principles shown above

Final note: I DON'T recommend to add customization code snippets to your main theme's/child theme's functions.php file! Please use a functionality plugin or an MU-plugin instead! This way you can also use this better for Multisite environments. In general you are then more independent from theme/child theme changes etc. If you don't know how to create such a plugin yourself just use one of my recommended 'Code Snippets' plugins. Read & bookmark these Sites:

All the custom & branding stuff code above can also be found as a Gist on GitHub: https://gist.github.com/2597157 (you can also add your questions/ feedback there :)

Requires: 3.3 or higher
Compatible up to: 3.5.2
Last Updated: 2012-12-9
Downloads: 7,759

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2 100,2,2 100,3,3 100,1,1 100,5,5 100,5,5
100,3,3 100,2,2 100,3,3 100,1,1 100,5,5 100,5,5
100,1,1 100,3,3 100,1,1 100,6,6 100,5,5
100,4,4 100,5,5 100,6,6
100,5,5 100,6,6
100,1,1 100,6,6
100,7,7
83,6,5
100,5,5
100,1,1