This plugin adds useful admin links and resources for the Thesis Theme/Framework to the WordPress Toolbar / Admin Bar.
Yes, this plugin works really fine with the latest WordPress 3.3+ including latest 3.4-alpha! And sorry, it DOES NOT work with older WordPress versions so please update your install if you haven't done yet :).
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 Thesis #thesiswp community.
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. For skins I need a certain skin-only function name or class name. (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!)
Yes, it is! :) Works really fine in Multisite invironment - here I just recommend to activate on a per site basis so to load things only where and when needed.
Yes, you could. -- However, it doesn't make much sense. The plugin is intented for a per site use as the admin links refer to the special settings, plugin-support and child theme/skin support for that certain site/blog. So if you have a Multisite install with 5 sites but only 3 would run on "Thesis" then the other 2 sites will only see support links in the Toolbar / Admin Bar... I guess, you got it? :)
Though intended for a per site use it could make some sense in such an edge case: if all of the sites in Multisite use the Thesis Theme and have lots of Thesis-specific plugins. This might be the case if you use Multisite for multilingual projects, especially with that awesome plugin: http://wordpress.org/extend/plugins/multilingual-press/
Yes, this is possible! You can remove the following sections: "Child Theme/Skin" area (all items) / "Extensions" (main item + sub 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 custom_functions.php file or child theme's or skin's functions.php or similar file:
/** Thesis Toolbar: Remove Child Theme/Skin Items */
define( 'TSTB_CHILD_SKIN_DISPLAY', FALSE );
/** Thesis Toolbar: Remove Extensions Items */
define( 'TSTB_EXTENSIONS_DISPLAY', FALSE );
/** Thesis Toolbar: Remove Resource Items */
define( 'TSTB_RESOURCES_DISPLAY', FALSE );
/** Thesis Toolbar: Remove German Language Items */
define( 'TSTB_DE_DISPLAY', FALSE );
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 "Thesis Toolbar" items for all user roles of "Editor" please use this code:
/** Thesis Toolbar: Remove all items for "Editor" user role */
if ( current_user_can( 'editor' ) ) {
define( 'TSTB_DISPLAY', FALSE );
}
To hide only from the user with a user ID of "2":
/** Thesis Toolbar: Remove all items for user ID 2 */
if ( 2 == get_current_user_id() ) {
define( 'TSTB_DISPLAY', FALSE );
}
To hide items only in frontend use this code:
/** Thesis Toolbar: Remove all items from frontend */
if ( !is_admin() ) {
define( 'TSTB_DISPLAY', FALSE );
}
In general, use this constant do hide any "Thesis Toolbar" items:
/** Thesis Toolbar: Remove all items */
define( 'TSTB_DISPLAY', FALSE );
All filters are listed with the filter name in bold and the below additional info, helper functions (if available) as well as usage examples.
tstb_filter_capability_all
edit_theme_options__tstb_admin_only -- returns 'administrator' role -- usage:add_filter( 'tstb_filter_capability_all', '__tstb_admin_only' );
__tstb_role_editor -- returns 'editor' role -- usage:add_filter( 'tstb_filter_capability_all', '__tstb_role_editor' );
__tstb_cap_switch_themes -- returns 'edit_switch_themes' capability -- usage:add_filter( 'tstb_filter_capability_all', '__tstb_cap_switch_themes' );
__tstb_cap_manage_options -- returns 'manage_options' capability -- usage:add_filter( 'tstb_filter_capability_all', '__tstb_cap_manage_options' );
__tstb_cap_install_plugins -- returns 'install_plugins' capability -- usage:add_filter( 'tstb_filter_capability_all', '__tstb_cap_install_plugins' );
add_filter( 'tstb_filter_capability_all', 'custom_tstb_capability_all' );
/**
* Thesis Toolbar: Change Main Capability
*/
function custom_tstb_capability_all() {
return 'activate_plugins';
}
--> Changes the capability to activate_plugins
tstb_filter_main_icon
__tstb_colornamehere_icon() this results in the following filters ready for usage:add_filter( 'tstb_filter_main_icon', '__tstb_blue_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_brown_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_green_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_green2_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_grey_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_khaki_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_orange_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_pink_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_red_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_turquoise_icon' );
add_filter( 'tstb_filter_main_icon', '__tstb_yellow_icon' );
add_filter( 'tstb_filter_main_icon', 'custom_folder_tstb_main_icon' );
/**
* Thesis Toolbar: Change Main Icon ("custom" Folder)
*/
function custom_folder_tstb_main_icon() {
return THESIS_CUSTOM_FOLDER . '/images/custom-icon.png';
}
add_filter( 'tstb_filter_main_icon', 'custom_child_tstb_main_icon' );
/**
* Thesis Toolbar: Change Main Icon (Child Theme)
*/
function custom_child_tstb_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
tstb_filter_main_icon_display
icon-thesis (class is: .icon-thesis)__tstb_no_icon_display() -- usage:add_filter( 'tstb_filter_main_icon_display', '__tstb_no_icon_display' );
add_filter( 'tstb_filter_main_icon_display', 'custom_tstb_main_icon_display_class' );
/**
* Thesis Toolbar: Change Main Icon CSS Class
*/
function custom_tstb_main_icon_display_class() {
return 'your-custom-icon-class';
}
--> You then have to define CSS rules in your custom.css file or your child theme/skin stylesheet for your own custom class .your-custom-icon-class
tstb_filter_main_item
custom_functions.php file or similar file from child theme/skin:add_filter( 'tstb_filter_main_item', 'custom_tstb_main_item' );
/**
* Thesis Toolbar: Change Main Item Name
*/
function custom_tstb_main_item() {
return __( 'Your custom main item', 'your-child-theme-textdomain' );
}
tstb_filter_main_item_tooltip
custom_functions.php file or similar file from child theme/skin:add_filter( 'tstb_filter_main_item_tooltip', 'custom_tstb_main_item_tooltip' );
/**
* Thesis Toolbar: Change Main Item Name's Tooltip
*/
function custom_tstb_main_item_tooltip() {
return __( 'Your custom main item tooltip', 'your-child-theme-textdomain' );
}
tstb_filter_thesis_name and tstb_filter_thesis_name_tooltip
Final note: If you don't like to add your customizations to your custom_functions.php file or similar file of child theme/skin 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.
All the custom & branding stuff code above can also be found as a Gist on GitHub: https://gist.github.com/2181318
Requires: 3.3 or higher
Compatible up to: 3.4-alpha
Last Updated: 2012-3-25
Downloads: 5,484
0 of 1 support threads in the last two months have been resolved.
Got something to say? Need help?