WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Genesis Toolbar Extras

This plugin adds useful admin settings links and massive resources for Genesis Framework and its ecosystem to the WordPress Toolbar / Admin Bar.

Why another Genesis Toolbar plugin, there are already some others!?

You're right! If you're happy with one of the others then that's absolutely great and you don't need to switch anything! :) I just made this new plugin here for my own needs and some of my client admins. As I am an open source evangelist I like to release my stuff to give back to the community!

The main purpose of my plugin here is to have all things under one roof. So if you're the admin and running Genesis plus a child theme and a few of the Genesis plugins on your site you then have the full experience: all settings links from almost all stuff available. All is working out of the box so you can concentrate on your work and content! It's a huge time saver! And, since all third-party stuff and community resources are supported as well you're not left alone in the dark! The official stuff by StudioPress is incredible awesome but we have a BIG Genesis community and ecosystem out there. My mission is to support all from that if at all possible - I'll add support for new stuff if something gets released. Of course, this will be maintained as I use and need such a kind of plugin in my own daily work!

One plugin to rule them all :-)

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

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

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 Genesis #genesiswp community.

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). (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 - it will ever ONLY display for admins or users who can see the left-hand "G" menu. Still, I just recommend to activate on a per site basis so to load things only where and when needed.

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

Yes, you could! It will ever ONLY display for admins or users who can see the left-hand "G" menu so you're on the safe side :). Of course it makes only sense if you have one or more sites running with Genesis in your Multisite environment. However, it's a lightweight plugin but activation on a per site basis is the recommended way from my point of view. Almost all admin links are intended for a per-site use and not for network-related stuff.

How can I access the style.css and functions.php files from the toolbar?

Via add_theme_support( 'gtbe-theme-editor' ); you can easily add Theme Editor links for style.css and functions.php of your current child theme to the child theme section -- if enabled it will only display if the user has the proper cabalitities and if the Theme Editor is not disabled via wp-config!

/** Genesis Toolbar Extras: Add Theme Editor support */
add_theme_support( 'gtbe-theme-editor' );

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

Yes, this is possible since version 1.1 of the plugin! There are 4 action hooks available for hooking custom menu items in -- gtbe_custom_main_items for the main section, gtbe_custom_theme_items for the child theme section, gtbe_custom_extend_items for the extensions section plus gtbe_custom_group_items for the resource group section. Here's an example code:

add_action( 'gtbe_custom_group_items', 'gtbe_custom_additional_group_item' );
/**
 * Genesis Toolbar Extras: Custom Resource Group Items
 *
 * @global mixed $wp_admin_bar
 */
function gtbe_custom_additional_group_item() {

    global $wp_admin_bar;

    $wp_admin_bar->add_menu( array(
        'parent' => 'ddw-genesis-genesisgroup',
        'id'     => 'your-unique-item-id',
        '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! You can remove the following sections: "Child Theme" area (all items) / "Extensions" (main item + sub items!) / "Manage Content" group (all items) / "Resources link group" at the bottom (all items) / "My.StudioPress" Resources / "Old Support Forums" stuff / "German language stuff" (all items) / "Translations" (all items)

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

/** Genesis Toolbar Extras: Remove Child Theme Items */
define( 'GTBE_CHILD_THEME_DISPLAY', FALSE );

/** Genesis Toolbar Extras: Remove Extensions Items */
define( 'GTBE_EXTENSIONS_DISPLAY', FALSE );

/** Genesis Toolbar Extras: Remove Manage Content Items */
define( 'GTBE_MANAGE_CONTENT_DISPLAY', FALSE );

/** Genesis Toolbar Extras: Remove Resource Items */
define( 'GTBE_RESOURCES_DISPLAY', FALSE );

/** Genesis Toolbar Extras: Remove My.StudioPress Items */
define( 'GTBE_MYSP_DISPLAY', FALSE );

/** Genesis Toolbar Extras: Remove my.StudioPress Items */
define( 'GTBE_OLDFORUMS_DISPLAY', FALSE );

/** Genesis Toolbar Extras: Remove German Language Items */
define( 'GTBE_DE_DISPLAY', FALSE );

/** Genesis Toolbar Extras: Remove Translations Items */
define( 'GTBE_TRANSLATIONS_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 "Genesis Toolbar Extras" items for all user roles of "Editor" please use this code:

/** Genesis Toolbar Extras: Remove all items for "Editor" user role */
if ( current_user_can( 'editor' ) ) {
    define( 'GTBE_DISPLAY', FALSE );
}

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

/** Genesis Toolbar Extras: Remove all items for user ID 2 */
if ( 2 == get_current_user_id() ) {
    define( 'GTBE_DISPLAY', FALSE );
}

To hide items only in frontend use this code:

/** Genesis Toolbar Extras: Remove all items from frontend */
if ( ! is_admin() ) {
    define( 'GTBE_DISPLAY', FALSE );
}

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

/** Genesis Toolbar Extras: Remove all items */
define( 'GTBE_DISPLAY', FALSE );

Can I remove the original Toolbar items for WordPress SEO by Yoast?

Yes, this is also possible! Since v1.1.0 of my plugin support for Yoast's great plugin is included so if you only want his stuff to appear within "Genesis Toolbar Extras" just add this constant to your active child theme's functions.php file or functionality plugin:

/** Genesis Toolbar Extras: Remove original Yoast SEO items */
define( 'GTBE_REMOVE_WPSEO_YOAST_TOOLBAR', true );

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.

gtbe_filter_capability_all

  • Default value: edit_posts (needed for the "manage content" stuff...)
  • 5 Predefined helper functions:
    • __gtbe_admin_only -- returns 'administrator' role -- usage:
add_filter( 'gtbe_filter_capability_all', '__gtbe_admin_only' );
  • __gtbe_role_editor -- returns 'editor' role -- usage:
add_filter( 'gtbe_filter_capability_all', '__gtbe_role_editor' );
  • __gtbe_cap_edit_theme_options -- returns 'edit_theme_options' capability -- usage:
add_filter( 'gtbe_filter_capability_all', '__gtbe_cap_edit_theme_options' );
  • __gtbe_cap_manage_options -- returns 'manage_options' capability -- usage:
add_filter( 'gtbe_filter_capability_all', '__gtbe_cap_manage_options' );
  • __gtbe_cap_install_plugins -- returns 'install_plugins' capability -- usage:
add_filter( 'gtbe_filter_capability_all', '__gtbe_cap_install_plugins' );
  • Another example:
add_filter( 'gtbe_filter_capability_all', 'custom_gtbe_capability_all' );
/**
 * Genesis Toolbar Extras: Change Main Capability
 */
function custom_gtbe_capability_all() {
    return 'switch_themes';
}

--> Changes the capability to switch_themes

gtbe_filter_main_icon

  • Default value: Genesis "G" logo (favicon) with turquoise/light blue touch... :)
  • 9 Predefined helper functions for the 9 included colored icons, returning special colored icon values - the helper function always has this name: __gtbe_colornamehere_icon() this results in the following filters ready for usage:
add_filter( 'gtbe_filter_main_icon', '__gtbe_brown_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_darkblue_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_green_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_ivory_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_orange_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_pink_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_red_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_white_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_yellow_icon' );

add_filter( 'gtbe_filter_main_icon', '__gtbe_child_images_icon' );

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

  • Example for using with current child theme:
add_filter( 'gtbe_filter_main_icon', 'custom_gtbe_main_icon' );
/**
 * Genesis Toolbar Extras: Change Main Icon
 */
function custom_gtbe_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

gtbe_filter_main_icon_display

  • Returning the CSS class for the main item icon
  • Default value: icon-genesistbe (class is: .icon-genesistbe)
  • 1 Predefined helper function:
    • __gtbe_no_icon_display() -- usage:
add_filter( 'gtbe_filter_main_icon_display', '__gtbe_no_icon_display' );

--> This way you can REMOVE the icon!

  • Another example:
add_filter( 'gtbe_filter_main_icon_display', 'custom_gtbe_main_icon_display_class' );
/**
 * Genesis Toolbar Extras: Change Main Icon CSS Class
 */
function custom_gtbe_main_icon_display_class() {
    return 'your-custom-icon-class';
}

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

--> Recommended dimensions are 16px x 16px

gtbe_filter_main_item

  • Default value: "Genesis"
  • Example code for your child theme's functions.php file:
add_filter( 'gtbe_filter_main_item', 'custom_gtbe_main_item' );
/**
 * Genesis Toolbar Extras: Change Main Item Name
 */
function custom_gtbe_main_item() {
    return __( 'Your custom main item', 'your-child-theme-textdomain' );
}

gtbe_filter_main_item_tooltip

  • Default value: "Genesis Framework"
  • Example code for your child theme's functions.php file:
add_filter( 'gtbe_filter_main_item_tooltip', 'custom_gtbe_main_item_tooltip' );
/**
 * Genesis Toolbar Extras: Change Main Item Name's Tooltip
 */
function custom_gtbe_main_item_tooltip() {
    return __( 'Your custom main item tooltip', 'your-child-theme-textdomain' );
}

gtbe_filter_genesis_name and gtbe_filter_genesis_name_tooltip

  • Default value for both: "Genesis"
  • Used for some items within toolbar links to enable proper branding
  • Change things like in the other examples/principles shown above

gtbe_filter_theme_support_url

  • Default value for both: if applicable, support URL accordingly to the used child theme
  • Important: Has to be an URL!
  • Note: automatically opens in a new window/tab.
  • Only used for supported third party child themes.
  • Example code for your child theme's functions.php file:
add_filter( 'gtbe_filter_theme_support_url', 'custom_theme_support_url' );
/**
 * Genesis Toolbar Extras: Custom Support URL
 */
function custom_theme_support_url() {
    return 'http://genesisfinder.com/';
}

gtbe_filter_theme_docs_url

  • Default value for both: if applicable, docs/knowledge base URL accordingly to the used child theme
  • Important: Has to be an URL!
  • Note: automatically opens in a new window/tab.
  • Only used for supported third party child themes.
  • Example code for your child theme's functions.php file:
add_filter( 'gtbe_filter_theme_docs_url', 'custom_theme_docs_url' );
/**
 * Genesis Toolbar Extras: Custom Docs URL
 */
function custom_theme_docs_url() {
    return 'http://genesisfinder.com/';
}

gtbe_filter_url_child_readme

  • Default value for both: get_stylesheet_directory() . '/README.txt'
  • Important: Has to be an existing/ readable .txt file.
  • Note: Could only be used if an original 'README.txt' file is there in the child theme's root folder.
  • Example code for your child theme's functions.php file:
add_filter( 'gtbe_filter_url_child_readme', 'custom_url_child_readme' );
/**
 * Genesis Toolbar Extras: Custom README URL
 */
function custom_url_child_readme() {
    return 'http://your-support-site.com/customers/readme.txt';
}

gtbe_filter_url_child_changelog

  • Default value for both: get_stylesheet_directory() . '/changelog.txt'
  • Important: Has to be an existing/ readable .txt file.
  • Note: Could only be used if an original 'changelog.txt' file is there in the child theme's root folder.
  • Example code for your child theme's functions.php file:
add_filter( 'gtbe_filter_url_child_changelog', 'custom_url_child_changelog' );
/**
 * Genesis Toolbar Extras: Custom Changelog URL
 */
function custom_url_child_changelog() {
    return 'http://your-theme-shop-site.com/theme-xy/changelog.txt';
}

Final note: If you don't like to add your customizations to your child theme's functions.php file you can also add them to a functionality plugin or an MU-plugin. This way you can also use this better for Multisite environments. In general you are then more independent from child theme changes etc.

Final note: I DON'T recommend to add customization code snippets to your 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 not abusing the functions.php for plugin-specific stuff and you are then also more independent from 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/2198788 (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: 33,128

Ratings

4 stars
4.7 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,4,4 100,3,3 100,4,4 100,2,2 100,4,4
100,5,5 100,3,3 100,4,4 100,2,2 100,4,4
100,3,3 100,3,3 100,4,4 100,2,2 100,4,4
100,4,4 100,3,3 100,5,5 100,3,3 100,4,4 100,6,6
100,4,4 100,3,3 100,5,5 100,2,2 100,4,4 100,6,6
100,2,2 100,2,2 100,4,4 100,6,6
100,6,6
100,4,4
100,5,5
100,1,1