OpenHook, The Customizations Manager Plugin for WordPress

You’re a WordPress blogger, and you’ve finally picked out a beautiful theme for your site. Now it’s time to customize, but the thought of creating a site functionality plugin or a child theme is a bit daunting to you.

You’re not alone! And that’s why I want to introduce you to two things.

Hooks and Actions

First, it’s WordPress’ hooks and actions system. WordPress has numerous hooks, customization points, throughout its system, into which you can easily add your own actions, or customizations. Themes (and even plugins) can have their own hooks, and some themes certainly have many more than others.

Let’s look at a very basic example. A common customization which you might want to make is to add your copyright statement to the footer of your site. In many themes, you can accomplish by adding your code to the wp_footer hook. The code would look like this:

function custom_add_copyright_statement() {
 echo '<p>Copyright &copy; 1603, William Shakespeare</p>';
}
add_action( 'wp_footer', 'custom_add_copyright_statement' );

Decently simple, right? But what if we could make that simpler? That’s where the second thing I want to introduce you comes into play.

OpenHook 4.2.1, the Customizations Manager for WordPress

What is OpenHook? In short, OpenHook is a WordPress plugin that streamlines the process of adding customizations to you WordPress or your hook-enabled themes and plugins. But wait, there’s more!

Features

  • Customize the hooks present in your favorite themes!
    • NEW! Define any hook you want within OpenHook and add an action to it! In addition to the following themes which OpenHook supports explicitly, you can now use OpenHook to customize ANY hook (even something as arcane as theme_hook_before_meta_987) in ANY theme or plugin that has ANY hooks, from WordPress’ bare minimum hooks to hooks that are dynamically created and are as infinitely diverse as your site can be!
    • Hooks are explicitly enabled for the following themes
  • OpenBox, a PHP-friendly “box” for use in customizing Thesis 2
  • Quick access to the header and footer hooks of WordPress
  • All hooks can be customized with text, HTML/CSS/JavaScript, PHP, or shortcodes
  • All actions created with OpenHook can be selectively disabled
  • A variety of actions already present in Flat, Thesis 1.8.x, and WordPress can be selectively disabled
  • Hook visualization allows you to see exactly where each hook is fired on the front-end of your site
  • Shortcodes
    • , for masking email addresses from some spam robots
    • [global], which makes use of custom fields on a draft page in order to provide a library of reusable strings
    • [php], an admin-only shortcode for including PHP code within posts
  • Ability to disable all shortcodes
  • Display of phpinfo() in the admin panel
  • Options management, including tools to upgrade from OpenHook 2 and to uninstall (delete) all OpenHook options
  • Only users with the edit_themes permission may access OpenHook or its features. If enabled by such a user, other users may use or [global] shortcodes in their entries as well.

Praise for OpenHook

OpenHook is a featured add-on in The Girl’s Guide to Web Design, and I’m excited that it is being used to help train others in the joy of web design!

https://twitter.com/SDavisMedia/status/178492697873625088

https://twitter.com/AmandaAitken/status/179575800662732800

Requirements

  • An installation of WordPress 4.1 or newer, naturally
  • The exec function must not be disabled by your host if you plan to use OpenHook to add PHP customizations

The basic features require requirements are pretty obvious: a WordPress installation (tested with version 3.3.1) which is using the Thesis theme (tested with version 1.8.4).

OpenHook may work with older versions, but given the ease with which both of those softwares can be updated, you really, really are encouraged to stay up-to-date!

Installation

OpenHook is available from the WordPress plugin repository, and so can be installed automatically from within your blog’s administration panel.

If you must do or just prefer the manual method, OpenHook is installed just like any other WordPress plugin.

Download

Visit the WordPress plugins repository to download the latest version!

Support

For support inquiries, please use the Contact panel within the OpenHook itself, the plugin repository support page, or the comments below!

Supporters

OpenHook development has been supported by the following generous individuals:

Donate to Further Development

If you would like to support OpenHook development, you may do so in one of two ways. The simplest way would be a monetary donation via PayPal:

Donate to OpenHook development

Or you can buy me something directly from my wish list, thereby saving me the trouble! (Note that there are several wishlists in the left sidebar from which to choose, if you’re bored and want to shop around for me.)

 

Changelog

4.2.1

  • [fixed] load_plugin_textdomain() changed to properly reference the /languages directory (thanks pm1932)
  • [changed] Localization namespace is now thesis-openhook to conform to WordPress’ guideline that this namespace match OpenHook’s slug in the plugins repository (see https://make.wordpress.org/plugins/2015/09/01/plugin-translations-on-wordpress-org/)
  • [changed] Author links updated to reflect current domain and Twitter account

4.2.0

  • [added] Ability to define custom hooks and to then add actions to them, effectively opening OpenHook support to all hooks across all WordPress themes!
  • [added] New themes: K2
  • [added] Ability to specify priorities on actions
  • [added] Access to the WordPress hook comment_form
  • [added] Include FB like button in admin panel sidebar
  • [fixed] Contact form link now works
  • [fixed] Asterisks denoting that a hook has customizations added to it are now more accurate
  • [fixed] OpenHook version and the Flat & THA hook options are now properly deleted when deleting OpenHook options
  • [fixed] OpenHook::upgrade()‘s “is an upgraded needed?” checks now actually work, preventing upgrade code from processing on every page load
  • [fixed] More WP_DEBUG notices taken care of
  • [changed] OpenHook admin panels are more responsive on smaller screens
  • [changed] Only one theme’s actions may be enabled at one time, saving processor power & preventing hook name conflicts
  • [changed] Explicitly adhere to semantic versioning going forward
  • [changed] OpenHook CSS is now minified
  • [changed] File structure organized
  • [changed] Simplified admin panel tabs to only highlight active action groups

4.1

  • [added] Flat hooks
  • [added] Theme Hook Alliance hooks
  • [fixed] OpenBox is now compatible with Thesis 2.1.x
  • [changed] Various text & links throughout OpenHook admin panel
  • [changed] Optimized various bits of code, bringing it in line with WP coding standards
  • [changed] Admin sidebar no longer appears on the server info page

4.0.1

  • [fixed] Fixed broken class calls in options management functions

4.0

  • [added] Now supporting Headway theme hooks!
  • [added] Shortcodes manager introduced!
  • [added] Users can now choose whether all hook panels are displayed or just one at a time
  • [added] PHP shortcode – Arbitrary PHP code in your posts! (Admin users only.)
  • [added] Email shortcode – Encodes email addresses for use in posts to thwart harvesters
  • [added] Global shortcode – Take advantage of custom fields on a draft post to create a library of strings which may be used in any post
  • [changed] Various code optimizations

3.4

  • [added] OpenBox – a box added to Thesis 2’s box management, allowing for arbitrary code in Thesis 2’s skin editor
  • [changed] OpenHook is now programmed as a class to allow its code to be self-contained. More code refinements will be coming
  • [changed] Plugin is now named simply “OpenHook.” Viva la simplicity!

3.3.1

  • [fixed] thesis_hook_after_post_box restored. Hat tip: Doug Foster

3.3

  • [added] Hook visualization (Based upon http://headwaythemes.com/headway-hooks-visualized/)
  • [changed] Improved handling of the options management functions (upgrade/delete options)
  • [changed] When action groups are disabled, the hook pages now include a nag stating as much
  • [fixed] Warnings about empty arrays when activating action groups

3.2.1

  • [fixed] Bumped to make the repository update

3.2

  • [added] Hooks with customizations are marked with asterisks in the dropdown select box
  • [changed] Add link to phpinfo() under Tools menu
  • [changed] Verbiage for unhooking updated
  • [fixed] Many undefined variable errors
  • [fixed] Slashes are now properly stripped when upgrading from 2.x.x
  • [fixed] Default Thesis 404 content can now be properly removed

3.1

  • [fixed] Rare issue where the general settings panel doesn’t fully appear

3

  • [changed] Total rewrite of the plugin
  • [added] phpinfo() panel
  • [added] per-hook disabling of custom actions
  • [added] option to process shortcodes on custom actions
  • [added] ability to choose which actions to process (WordPress’ or Thesis’ or both’s)
  • [added] ability to remove all OpenHook options
  • [removed] several deprecated options

2.3.2

2.3.1

  • [fixed] Fixed two stupid typos that killed everything that was right with the world. Well, they broke the plugin anyway. Thanks, Jim (http://doggybytes.ca/), for reporting so quickly!

2.3

  • [added] Thesis 1.7’s four new hooks are now included.
  • [removed] OpenHook’s file editing panels have been removed — Thesis has these by default now.
  • [changed] Readme.txt updated.

2.2.5

  • [fixed] Reverted change introduced in 2.2.3 regarding stripping of slashes

2.2.4

  • [fixed] Fixed a syntax error, reported by multiple users.

2.2.3

  • [fixed] Fixed a bug which prevented the After Teasers Box hook from saving properly. Thanks, Michael Curving.
  • [fixed] Fixed an issue where the file editors would strip slashes unnecessarily. Thanks, Kristarella.
  • 2.2.2: Adding content to the wp_footer hook block actually works now. Thanks, Illustrata
  • 2.2.1: Very minor bug fix: Removed option to remove thesis_admin_link() so that it can be used elsewhere; this function is no longer added via a hook in Thesis 1.5, so the OpenHook option essentially did nothing. There’s nothing to gain by upgrading other than a slightly cleaner “Footer” section on the main OpenHook page. ;)
  • 2.2:
    • New hooks: wp_head, thesis_hook_comment_field, and wp_footer!
    • Separation of stylesheet editing to its own page.
    • Addition of custom functions file editing, also on its own page.
    • Major internationalization improvements
    • Jump box added to quickly navigate to any of the dozens of hooks
    • Option to include an invisible, nofollowed Project Honey Pot link in the footer area to help in the war against spammers.
    • …and probably more that I can’t even remember!
  • 2.1: Added two new hooks: thesis_hook_before_content_area and thesis_hook_after_content_area.
  • 2.0.2:
    • Added ability to customize the save button text.
    • Added a bit more explanatory text on the OpenHook panel in the top area.
    • Fixed a bug with the “404 Title” hook that prevented slashes from being stripped properly. Thanks, Justin Thomas.
  • 2.0.1: Fixed a bug with the “After Header” checkbox for PHP usage thanks to Alec Wild
  • 2.0:
    • Reorganization of just about all of the under-the-hood code.
    • More robust stylesheet editing — should work for more people now.
    • Complete stylistic redesign to match other WordPress admin panels.
    • Save buttons added liberally throughout the page.
    • Added support for the latest Thesis hooks.
  • 1.1:
    • Debug info bugfix thanks to firstdayblack
    • Simple custom/custom.css editing from within the OpenHook panel
  • 1.0: Renamed from 0.2 to mark inclusion in the WordPress plugin directory!
  • 0.2:
    • Some code reorganization
    • Added options to easily remove Thesis’ default actions
    • Add some explanatory text to some hooks
  • 0.1: Initial release

The OpenHook Customizations Manager is released under the GPL and was both inspired and based upon K2 Hook Up.

Seven of Your Favorite, Most Indispensable WordPress Plugins

For the past few years, it seems as though at least a couple of times a month I’ll come across new “Top x WordPress Plugins” posts, where one user takes the time to enumerate a few of their most-loved blogs.

But who cares what they think, right? I wanted to know what you thought, so I turned to the hive mind which is Twitter (Hey, follow me!), and asked what you considered the most indispensable WordPress plugins. I threw in the criterion that the plugin be not spam-related — yes, I know you love Akismet; I do too! — and this is what you said.  Continue reading