Plugin / Hooked Editable Content

Jon Anwyl

Frequently Asked Questions (FAQ)

Download, unzip and upload the plugin folder to the /wp-content/plugins/ directory Activate the plugin through the ‘Plugins’ menu in WordPress You should now find the ‘Hooked Editors’ menu beneath ‘Pages’ in your Admin menu.
Check out a few examples with explanation here.
For hooked editors that are hooked to an action, yes. For those hooked to a filter, no. The output from actions is wrapped in a div with classes hec-content and hec-content-[Hooked editor title] where [Hooked editor title] is converted to lower case and spaces have been replaced by hyphens. So for example, if the hooked editor has the title ‘Site notice’, then you can target the output container using the css selector .hec-content-site-notice.
Yes. Use the ‘Hide Hooked Content’ options for an editor. You can disable generic content, specific content, or both. The content will not be displayed on the front end.
It depends on the circumstances. The WP Editor allows full html and shortcodes just like the normal post / page editor, while the text editor strips out any html, line breaks, etc. So text editor is probably best when you want to limit users to plain text content. The full WP editor will generally be fine with an action, but filters might be a bit trickier. For example, if your theme outputs the filter like this echo esc_html( apply_filters( 'some_filter', $output ) ); then any html will be escaped. So unless you want to display escaped html, you’re better off preventing any user confusion by choosing the text editor.
Click on ‘Hooked Editors’ in the main menu, then click on ‘Re-order hooked editors’ just below the main heading ‘Editors’ at the top of the screen. You can now drag the rows of the table into the order you want.
Yes. By default, only administrators can add, edit and delete hooked editors. The plugin uses the following custom capabilities, all of which are added only to administrators: edit_hec_hooks, edit_others_hec_hooks, publish_hec_hooks, read_private_hec_hooks, delete_hec_hooks, delete_private_hec_hooks, delete_published_hec_hooks, delete_others_hec_hooks, edit_private_hec_hooks, edit_published_hec_hooks. You can add some or all of these capabilities to other roles or users. Note that on deactivation the plugin only removes these custom capabilities automatically from the administrator role. If you add capabilities to other users or roles they will not be removed automatically.
Yes, by including the post type in the ‘Excluded post types’ meta box when editing the hooked editor. You can also exclude a post type from all hooked editors using the filter hec_excluded_post_types: function mytheme_exclude_hooked_editors( $excluded_post_types, $hooked_editor, $hooked_editor_info ) { $excluded_post_types[] = 'my_custom_post_type'; return $excluded_post_types; } add_filter( 'hec_excluded_post_types', 'mytheme_exclude_hooked_editors', 10, 3 );
If you switch to a new theme you won’t lose any of the hooked content, but it will be hooked to actions / filters in the old theme, so it won’t display to start with. You will need to update the settings of your hooked editors so that they are hooked to actions / filters in your new theme. Note that you can hook an editor to more than one hook, so if you’re switching between themes a lot for some reason, you could hook an editor to one hook in one theme and an equivalent hook in another.

Ratings

5
1 reviews

Rating breakdown

Details Information

Version

1.0.3

First Released

26 Jun, 2017

Total Downloads

427

Wordpress Version

4.7 or higher

Tested up to:

4.8.11

Require PHP Version:

-

Tags

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.