开发者 |
daveshine
deckerweb |
---|---|
更新时间 | 2014年1月22日 18:01 |
捐献地址: | 去捐款 |
PHP版本: | 3.6 及以上 |
WordPress版本: | 3.8 |
版权: | GPL-2.0+ |
版权网址: | 版权信息 |
Quick Access to Xtreme One Framework Resources - Time Saver! This plugin just adds a lot Xtreme One Framework related resources to your toolbar / admin bar. Also links to all settings pages of this framework are added making life for webmasters a lot easier. So you might just switch from the frontend of your site to the Xtreme One 'Xtreme Widget Manager' or adjust the 'Framework Settings' etc. -- Use this time saver and get quicker access :-)Please note: The plugin requires the Xtreme One Theme Framework (in version 1.5.3 or higher), a paid premium product released by Inpsyde GmbH (via marketpress.com). General Features
mange_options
. (Note: I am open for suggestions here if this should maybe changed to a more suitable capability.)xtreme-one-toolbar.pot
) for translators is also always included :)xtreme-one-toolbar
folder to the /wp-content/plugins/
directory/wp-content/languages/xtreme-one-toolbar/
(just create this folder) - This enables you to use fully custom translations that won't be overridden on plugin updates. Also, complete custom English wording is possible with that, just use a language file like xtreme-one-toolbar-en_US.mo/.po
to achieve that (for creating one see the tools on "Other Notes").Yes, this plugin works really fine with the latest WordPress 3.6+, of course also WordPress 3.8! :-) 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 Xtreme One 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 themes. For 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. (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! Of course it makes only sense if you have one or more sites running with Xtreme One 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. 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 Xtreme One Framework and have lots of plugins in common. This might be the case if you use Multisite for multilingual projects, especially with that awesome plugin: http://wordpress.org/plugins/multilingual-press/
Yes, this is possible since version 1.1.0 of the plugin! There are two action hooks available for hooking custom menu items in -- xotb_custom_main_items
for the main section and xotb_custom_group_items
for the resource group section. Here's an example code:
`
add_action( 'xotb_custom_group_items', 'xotb_custom_additional_group_item' );
/**
Yes, this is possible! You can remove the following sections: "Child Theme" 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 child theme's functions.php
file:
`
/* Xtreme One Toolbar: Remove Theme Items /
define( 'XOTB_THEME_DISPLAY', FALSE );
/* Xtreme One Toolbar: Remove Extensions Items /
define( 'XOTB_EXTENSIONS_DISPLAY', FALSE );
/* Xtreme One Toolbar: Remove Resource Items /
define( 'XOTB_RESOURCES_DISPLAY', FALSE );
/* Xtreme One Toolbar: Remove German Language Items /
define( 'XOTB_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 "Xtreme One Toolbar" items for all user roles of "Editor" please use this code:
/** Xtreme One Toolbar: Remove all items for "Editor" user role */ if ( current_user_can( 'editor' ) ) { define( 'XOTB_DISPLAY', FALSE ); }
To hide only from the user with a user ID of "2":
/** Xtreme One Toolbar: Remove all items for user ID 2 */ if ( 2 == get_current_user_id() ) { define( 'XOTB_DISPLAY', FALSE ); }
To hide items only in frontend use this code:
/** Xtreme One Toolbar: Remove all items from frontend */ if ( ! is_admin() ) { define( 'XOTB_DISPLAY', FALSE ); }
In general, use this constant do hide any "Xtreme One Toolbar" items:
/** Xtreme One Toolbar: Remove all items */ define( 'XOTB_DISPLAY', FALSE );
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 "Xtreme One Toolbar" just add this constant to your active child theme's functions.php file
or a functionality plugin:
/** Xtreme One Toolbar: Remove original Yoast SEO items */ define( 'XOTB_REMOVE_WPSEO_YOAST_TOOLBAR', true );
Yes, also possible :) - I've included a helper function for that too!
/** Xtreme One Toolbar: Remove the 'Xtreme News' Dashboard widget */ add_action( 'init', '__xotb_remove_xtreme_dashboard_widget' );
All filters are listed with the filter name in bold and the below additional info, helper functions (if available) as well as usage examples. xotb_filter_capability_all
edit_posts
(needed for the "manage content" stuff...)__xotb_admin_only
-- returns 'administrator'
role -- usage:
add_filter( 'xotb_filter_capability_all', '__xotb_admin_only' );
__xotb_role_editor
-- returns 'editor'
role -- usage:
add_filter( 'xotb_filter_capability_all', '__xotb_role_editor' );
__xotb_cap_edit_theme_options
-- returns 'edit_theme_options'
capability -- usage:
add_filter( 'xotb_filter_capability_all', '__xotb_cap_edit_theme_options' );
__xotb_cap_install_plugins
-- returns 'install_plugins'
capability -- usage:
add_filter( 'xotb_filter_capability_all', '__xotb_cap_install_plugins' );
--> Changes the capability to
switch_themes`__xotb_colornamehere_icon()
this results in the following filters ready for usage:
`
add_filter( 'xotb_filter_main_icon', '__xotb_blue_icon' );--> Where the last helper function returns the icon file (
icon-xotb.png) found in your current child theme's
images` subfolder
--> Uses a custom image from your active child theme's
/images/` folder
--> Recommended dimensions are 16px x 16pxicon-xtreme
(class is: .icon-xtreme
)__xotb_no_icon_display()
-- usage:
add_filter( 'xotb_filter_main_icon_display', '__xotb_no_icon_display' );
--> You then have to define CSS rules in your theme/child theme stylesheet for your own custom class
.your-custom-icon-class`
--> Recommended dimensions are 16px x 16pxfunctions.php
file:
`
add_filter( 'xotb_filter_main_item', 'custom_xotb_main_item' );
/**functions.php
file:
`
add_filter( 'xotb_filter_main_item_tooltip', 'custom_xotb_main_item_tooltip' );
/**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.
All the custom & branding stuff code above can also be found as a Gist on Github: https://gist.github.com/2519992 (you can also add your questions/ feedback there :)
xotb_custom_main_items
for the main section and xotb_custom_group_items
for the resource group section (See FAQ section here for more info on that).