开发者 |
daveshine
deckerweb |
---|---|
更新时间 | 2019年2月22日 06:00 |
捐献地址: | 去捐款 |
PHP版本: | 3.3 及以上 |
WordPress版本: | 5.1 |
版权: | GPL-2.0+ |
版权网址: | 版权信息 |
Have Quicker Access to Your Digital Downloads - Time Saver! This small and lightweight plugin extension just adds a lot Easy Digital Downloads plugin related resources to your toolbar / admin bar. Also links to all setting/ tab pages of the plugin are added making life administrators a lot easier. So you might just switch from the fontend of your site to 'Payment History' or to the 'Add new Download' page etc.General Features
edit_posts
. (Note: I am open for suggestions here if this should maybe changed to a more suitable capability.)edd-toolbar.pot
) for translators is also always included :)edd-toolbar
folder to the /wp-content/plugins/
directory -- or just upload the ZIP package via 'Plugins > Add New > Upload' in your WP Admin/wp-content/languages/edd-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 edd-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.3+ including latest 3.4-beta! And sorry, it DOES NOT work with older WordPress versions so please update your install if you haven't done yet :).
Just drop me @deckerweb or Pippin Williamson @pippinsplugins a note via Twitter or via our contact pages and we'll add the link if it is useful for admins/ webmasters and the Easy Digital Downloads plugin ecosystem.
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 for that certain site/blog. So if you have a Multisite install with 5 sites but only 3 would run "Easy Digital Downloads" 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 Easy Digital Downloads. This might be the case if you use Multisite for multilingual projects, especially via that awesome plugin: http://wordpress.org/extend/plugins/multilingual-press/
This plugin has NO settings page because I believe it's just not neccessarry. All customizing could be done via filters, constants and regular WordPress user roles & capabilities. As the plugin is indended for a admin/ webmaster use that's the way to go. This way we can save the overhaul of an options panel/settings page, additional database storing & requests, uninstall routines and such. End result: a lightweight system that just works and saves clicks & time :-).
Yes, this is possible since version 1.2 of the plugin! There are two action hooks available for hooking custom menu items in -- eddtb_custom_main_items
for the main section and eddtb_custom_group_items
for the resource group section. Here's an example code:
`
add_action( 'eddtb_custom_group_items', 'eddtb_custom_additional_group_item' );
/**
Yes, this is possible! You can remove the following links or sections: "Add-Ons" settings link, "Resources link group" at the bottom (all items), "German language stuff" (all items) and "Translations resources" (all items)
To achieve this add one, some or all of the following constants to your current theme's/child theme's functions.php
or similar file:
`
/* Easy Digital Downloads Toolbar: Remove Add-On(s) Item(s) /
define( 'EDDTB_ADDONS_DISPLAY', FALSE );
/* Easy Digital Downloads Toolbar: Remove Resource Items /
define( 'EDDTB_RESOURCES_DISPLAY', FALSE );
/* Easy Digital Downloads Toolbar: Remove German Language Items /
define( 'EDDTB_DE_DISPLAY', FALSE );
/* Easy Digital Downloads Toolbar: Remove Translations Items /
define( 'EDDTB_TRANSLATIONS_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 "Easy Digital Downloads Toolbar" items for all user roles of "Editor" please use this code:
/** Easy Digital Downloads Toolbar: Remove all items for "Editor" user role */ if ( current_user_can( 'editor' ) ) { define( 'EDDTB_DISPLAY', FALSE ); }
To hide only from the user with a user ID of "2":
/** Easy Digital Downloads Toolbar: Remove all items for user ID 2 */ if ( 2 == get_current_user_id() ) { define( 'EDDTB_DISPLAY', FALSE ); }
To hide items only in frontend use this code:
/** Easy Digital Downloads Toolbar: Remove all items from frontend */ if ( ! is_admin() ) { define( 'EDDTB_DISPLAY', FALSE ); }
In general, use this constant do hide any "Easy Digital Downloads Toolbar" items:
/** Easy Digital Downloads Toolbar: Remove all items */ define( 'EDDTB_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. eddtb_filter_capability_all
edit_theme_options
__eddtb_admin_only
-- returns 'administrator'
role -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_admin_only' );
__eddtb_role_editor
-- returns 'editor'
role -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_role_editor' );
__eddtb_role_shop_manager
-- returns 'shop_manager'
role -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_role_shop_manager' );
__eddtb_role_shop_accountant
-- returns 'shop_accountant'
role -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_role_shop_accountant' );
__eddtb_role_shop_worker
-- returns 'shop_worker'
role -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_role_shop_worker' );
__eddtb_role_shop_vendor
-- returns 'shop_vendor'
role -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_role_shop_vendor' );
__eddtb_cap_manage_options
-- returns 'manage_options'
capability -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_cap_manage_options' );
__eddtb_cap_edit_theme_options
-- returns 'edit_theme_options'
capability -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_cap_edit_theme_options' );
__eddtb_cap_install_plugins
-- returns 'install_plugins'
capability -- usage:
add_filter( 'eddtb_filter_capability_all', '__eddtb_cap_install_plugins' );
--> Changes the capability to
activate_plugins`__eddtb_colornamehere_icon()
this results in the following filters ready for usage:
`
add_filter( 'eddtb_filter_main_icon', '__eddtb_blue2_icon' );icon-eddtb.png
) found in your current theme's/child theme's images
subfolder
--> Uses a custom image from your active child theme's
/images/` foldericon-edd
(class is: .icon-edd
)__eddtb_no_icon_display()
-- usage:
add_filter( 'eddtb_filter_main_icon_display', '__eddtb_no_icon_display' );
--> You then have to define CSS rules in your
custom.cssfile or your child theme/skin stylesheet for your own custom class
.your-custom-icon-class`functions.php
file or similar file:
`
add_filter( 'eddtb_filter_main_item', 'custom_eddtb_main_item' );
/**functions.php
file or similar file:
`
add_filter( 'eddtb_filter_main_item_tooltip', 'custom_eddtb_main_item_tooltip' );
/**functions.php
file or similar file of theme/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 theme/child theme changes etc.
This is possible! Plugin and theme developers could use the included hooks to add stuff to the main items or resource group items section. The hooks are:
eddtb_custom_main_items
for the main sectioneddtb_custom_group_items
for the resource group sectionfunctions.php
file! Please use a functionality plugin or an MU-plugin instead! This way 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:
functions.php
file: Resource One - Resource Two (both by Thomas Griffin Media)eddtb_custom_main_items
for the main section and eddtb_custom_group_items
for the resource group section (See FAQ section here for more info on that).http://yoursite.com/downloads/
to get quick access to your downlods listing. Note, also supports user-defined slug via EDD_SLUG
constant (since EDD v1.0.3)!