This plugin adds useful admin links and resources for Gravity Forms to the WordPress Toolbar / Admin Bar.
Quick Access to Gravity Forms Resources – Time Saver & Helper Tool!
This small and lightweight plugin just adds a lot Gravity Forms related resources to your toolbar / admin bar. Also links to all admin settings pages pages of the plugin are included, making the life of form administrators/ developers a lot easier. So you might just switch from the fontend of your site to read current ‘Entries’ or just ‘Add a new Form’ etc. How cool is that? π Also, support for all official and lots of third-party add-ons is included!
Please note: The plugin requires the Gravity Forms base plugin, a paid premium product released by Rocketgenius Inc. (via gravityforms.com).
The plugin out of the box supports links to settings pages of all officially available Gravity Forms Add-Ons, 15 to date (counting only the ones with settings pages!):
At this time the plugin out of the box supports also all third-party Gravity Forms related plugins (only the ones with settings pages!):
As the name suggests this plugin is primarily intended towards website admins/ developers. Beside the forum, support links etc. the main plugin settings links will only appear if the current user has the appropiate rights/ capabillities for these. This just goes hand in hand with the very same user rights Gravity Forms itself uses to display its menu entries. So also Editors or any user with the proper rights could view ‘Entries’ etc (you could easily tweak all those roles & caps with the awesome “Members” plugin!).
gravity-forms-toolbar.pot
) for translators is also always included πThis plugin is a co-work from:
David Decker – DECKERWEB from deckerweb.de and GenesisThemes
and
Milan Petrovic – Dev4Press from dev4press.com
Enjoy using Gravity Forms Toolbar? Please consider making a small donation to support the project’s continued development.
/wp-content/languages/gravity-forms-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 as well, just use a language file like gravity-forms-toolbar-en_US.mo/.po
to achieve that.Easy plugin translation platform with GlotPress tool:Translate “Gravity Forms Toolbar”…
Note: All my plugins are internationalized/ translateable by default. This is very important for all users worldwide. So please contribute your language to the plugin to make it even more useful. For translating and validating I recommend the awesome “Poedit Editor, Pro Version”, which works fine on macOS, Windows and Linux.
Idea Behind / Philosophy: Just a little leightweight plugin for all the form developers and managers out there working
with the incredible Gravity Forms to make their daily admin life a bit easier. I’ll try to add more add-on/plugin support if it makes some sense. So stay tuned :).
Gravity Forms News Planet I also have started a little news/feed service via “FriendFeed” that you can subscribe to: http://friendfeed.com/gravityforms-news — Please contact me via my Twitter for new resources (that have an RSS feed and are related to Gravity Forms!)
David: Special Thanks go out to my family for allowing me to do such spare time projects (aka free plugins) and supporting me in every possible way!
NOTE: Only works with Gravity Forms as active base plugin. This is a paid premium product by Rocketgenius Inc., available via gravityforms.com.
gravity-forms-toolbar
folder to the /wp-content/plugins/
directoryNote: The “Gravity Forms” base plugin is required for this add-on plugin in order to work. If you don’t own a copy it yet, this premium plugin has to be bought. More info about that you’ll find here: http://ddwb.me/getgravityforms
Own translation/wording: For custom and update-secure language files please upload them to /wp-content/languages/gravity-forms-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 as well, just use a language file like gravity-forms-toolbar-en_US.mo/.po
to achieve that.
Gravity Forms Toolbar in default state. (Click here for larger version of screenshot)
Gravity Forms Toolbar in action - a secondary level - form management. (Click here for larger version of screenshot)
Gravity Forms Toolbar in action - a third level, for the official (and some third-party) Add-Ons. ([https://www.dropbox.com/s/2zlvbaxw8mbat88/screenshot-3.png))
Gravity Forms Toolbar in action - a secondary level - docs. (Click here for larger version of screenshot)
Gravity Forms Toolbar in action - a primary level - notification of new entries & updates. (Click here for larger version of screenshot)
Gravity Forms Toolbar in action - notification of new entries & updates on top-level. (Click here for larger version of screenshot)
Gravity Forms Toolbar - little admin settings page of the plugin.(Click here for larger version of screenshot)
Gravity Forms Toolbar - help tab on admin settings page of the plugin. (Click here for larger version of screenshot)
Yes, this plugin works really fine with WordPress 3.3 and 3.3.1!
It also works great with WP 3.2 – and also should with WP 3.1 – but we only tested extensively with WP 3.3+ this time. So you always should run the latest WordPress version for a lot of reasons.
Just drop me a note on my Twitter @deckerweb or via my contact page and I’ll add the link(s) if it is useful for admins/ webmasters and the Gravity Forms 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
). I also need the correct name of the main PHP class or function (to check if the plugin extension exists or not). (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!)
Simple answer: Linking/ adding is only possible where a plugin has its own admin pages and these are properly accessable.
Yes, this is possible since version 1.5 of the plugin! There are 3 action hooks available for hooking custom menu items in — gftb_custom_main_items
for the main section, gftb_custom_extension_items
for the exentensions section plus gftb_custom_group_items
for the resource group section. Here’s an example code:
add_action( 'gftb_custom_group_items', 'gftb_custom_additional_group_item' ); /** * Gravity Forms Toolbar: Custom Resource Group Items * * @global mixed $wp_admin_bar */ function gftb_custom_additional_group_item() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'parent' => 'ddw-gravityforms-gfgroup', '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' ) ) ) ); }
Of course, just via plugin options! — Additionally, you can use some constants – which can come in handy for customizing stuff for clients etc. You can remove the following sections: Official “Add-Ons” (all items) / “Extensions” area (all items) / “Resources link group” at the bottom (all items) / “German language stuff” (all items) / “Dutch language stuff” (all items)
To achieve this add one, some or all of the following constants to your theme’s/child theme’s functions.php
file:
/** Gravity Forms Toolbar: Remove Add-On Items */ define( 'GFTB_ADDONS_DISPLAY', FALSE ); /** Gravity Forms Toolbar: Remove Extensions Items */ define( 'GFTB_EXTENSIONS_DISPLAY', FALSE ); /** Gravity Forms Toolbar: Remove Resource Items */ define( 'GFTB_RESOURCES_DISPLAY', FALSE ); /** Gravity Forms Toolbar: Remove German Language Items */ define( 'GFTB_DE_DISPLAY', FALSE ); /** Gravity Forms Toolbar: Remove Dutch Language Items */ define( 'GFTB_NL_DISPLAY', FALSE ); /** Gravity Forms Toolbar: Remove Spanish Language Items */ define( 'GFTB_ES_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 “Gravity Forms Toolbar” items for all user roles of “Editor” please use this code:
/** Gravity Forms Toolbar: Remove all items for "Editor" user role */ if ( current_user_can( 'editor' ) ) { define( 'GFTB_DISPLAY', FALSE ); }
To hide only from the user with a user ID of “2”:
/** Gravity Forms Toolbar: Remove all items for user ID 2 */ if ( 2 == get_current_user_id() ) { define( 'GFTB_DISPLAY', FALSE ); }
To hide items only in frontend use this code:
/** Gravity Forms Toolbar: Remove all items from frontend */ if ( ! is_admin() ) { define( 'GFTB_DISPLAY', FALSE ); }
In general, use this constant do hide any “Gravity Forms Toolbar” items:
/** Gravity Forms Toolbar: Remove all items */ define( 'GFTB_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.
gftb_filter_capability_all
gravityforms_edit_forms
(set by Gravity Forms plugin itself!)6 Predefined helper functions:
__gftb_admin_only
— returns 'administrator'
role — usage:add_filter( ‘gftb_filter_capability_all’, ‘__gftb_admin_only’ );
__gftb_role_editor
— returns 'editor'
role — usage:add_filter( ‘gftb_filter_capability_all’, ‘__gftb_role_editor’ );
__gftb_cap_manage_options
— returns 'manage_options'
capability — usage:add_filter( ‘gftb_filter_capability_all’, ‘__gftb_cap_manage_options’ );
__gftb_cap_install_plugins
— returns 'install_plugins'
capability — usage:add_filter( ‘gftb_filter_capability_all’, ‘__gftb_cap_install_plugins’ );
__gftb_cap_activate_plugins
— returns 'activate_plugins'
capability — usage:add_filter( ‘gftb_filter_capability_all’, ‘__gftb_cap_activate_plugins’ );
__gftb_cap_edit_theme_options
— returns 'edit_theme_options'
capability — usage:add_filter( ‘gftb_filter_capability_all’, ‘__gftb_cap_edit_theme_options’ );
Another example:
add_filter( ‘gftb_filter_capability_all’, ‘custom_gftb_capability_all’ );
/**
–> Changes the capability to switch_themes
gftb_filter_main_icon
10 Predefined helper functions for the 11 included colored icons, returning special colored icon values – the helper function always has this name: __gftb_colornamehere_icon()
this results in the following filters ready for usage:
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_blue_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_lightgreen_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_lightgrey_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_orange_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_pink_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_red_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_turquoise_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_yellow_icon’ );
add_filter( ‘gftb_filter_main_icon’, ‘__gftb_theme_images_icon’ );
–> Where the last helper function returns the icon file (icon-gftb.png
) found in your current theme’s/child theme’s /images/
subfolder
Example for using with current child theme:
add_filter( ‘gftb_filter_main_icon’, ‘custom_gftb_main_icon’ );
/**
–> Uses a custom image from your active child theme’s /images/
folder
–> Recommended dimensions are 16px x 16px
gftb_filter_main_icon_display
icon-gravityforms
(class is: .icon-gravityforms
)1 Predefined helper function:
__gftb_no_icon_display()
— usage:add_filter( ‘gftb_filter_main_icon_display’, ‘__gftb_no_icon_display’ );
–> This way you can REMOVE the icon!
Another example:
add_filter( ‘gftb_filter_main_icon_display’, ‘custom_gftb_main_icon_display_class’ );
/**
–> 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 16px
gftb_filter_main_item
Example code for your theme’s/child theme’s functions.php
file:
add_filter( ‘gftb_filter_main_item’, ‘custom_gftb_main_item’ );
/**
gftb_filter_main_item_tooltip
Example code for your theme’s/child theme’s functions.php
file:
add_filter( ‘gftb_filter_main_item_tooltip’, ‘custom_gftb_main_item_tooltip’ );
/**
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:
functions.php
file: Resource One – Resource Two(both by Thomas Griffin Media)All the custom & branding stuff code above can also be found as a Gist on Github: https://gist.github.com/2732242 (you can also add your questions/ feedback there π
constants
in your active theme/child theme — this way you can customize for your staff members or clients if you need some more users with extended or restricted admin bar/toolbar access (See “FAQ” section here) — this is additional to the existing settings via plugin’s options page!/wp-content/languages/gravity-forms-toolbar/
(just create this folder) – this enables you to use complete custom wording or translations.