rtPanel Hooks Editor Plugin Launched

Published on Oct 19, 2011
,

Here comes yet another plugin that makes life easier for people who are using the rtPanel WordPress Theme Framework: the rtPanel Hooks Editor. This plugin is an add-on for rtPanel Theme Framework and should be used along with it.

Features of the rtPanel Hooks Editor

  • It adds an option page under rtPanel theme options, using which a user can write codes for various actions/filters hooks supported by the rtPanel Theme Framework – https://rtcamp.com/rtpanel/docs/developer/.
  • A user need not edit any theme files to achieve desired functionality. He can do so from the rtPanel Admin dashboard.
  • The plugin offers the option to add hooks at desired places on themes. For example: before or after the logo, header, post title, post meta, content wrapper, side bar and footer.

See the image below for reference:

rtPanel - Hooks Editor
rtPanel – Hooks Editor

Note: You need to be very careful while adding any code here as this could break your theme.

Following is a simple example of code that can be executed here:

<div class="hello-world">
<?php echo 'Hello World'; ?>
</div>

I hope you enjoy using this plugin and writing your own actions and filters. If you face any technical difficulties, feel free to post your questions on our dedicated support forum. Our rtPanel team will answer them to the best of our ability.

Important Links:

On this page

Contributor

Joshua Abenazer

Joshua

Joshua Abenazer

Not Available

Comments

  1. Love this plugin! More themes should have these standard hooks.

    Only thing is when I added it, I got the following message “The plugin generated 224 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

    As far as I can tell it hasn’t had any negative impacts.

    1. @Anthony
      Just an update, we tried to reproduce the issue but couldn’t.
      If you notice this again, please let us know which other plugins you are using. It might be a plugin conflict.

  2. That’s awesome! would have been great if you could make hook names shorter. So, rtp_hooks_after_header could be rtp_after_header 🙂

    1. Thanks Puneet for taking your time out, and trying out this plugin. Your suggestion is highly appreciated.

    2. @Puneet
      First, thanks for spending time on rtPanel. 🙂
      There are many reasons as why we have used rtp_hooks_* and not rtp_*. Some of them are:

      rtp_hooks_* clubs all functions related to “hooks”. We can use rtp_something_* for some other kind of grouping. This ensures future-compatibility.
      Many IDEs/code-editors scans source-codes of included files and list all functions found in sidebar. In this case, all “hooks” will be easy to find.
      Codes become more readable as anyone by just reading a function-name can guess this is hook and can be “called” from elsewhere.
      It reduces chances of conflicting with another functions. Say there is some other function to do some work “after header”, then this reduces chances of collisions. I personally believe its better to develop conventions which will be easy to follows, rather than trusting our own memories! 😉
      rtPanel theme will have many plugins developed for it. As plugins and themes will evolve over the time, “plugins” can just “search” for all rtPanel hooks by finding all function names in rtPanel theme which starts with rtp_hooks_. We have a use case for this which will make this point clearer in future.

      There are few more points but most of them won’t make sense as of now. May be they will make sense after a year or two!

      Rest, your suggestions are always welcome & appreciated. 🙂

      1. Thanks Rahul for the explanation. 🙂 Now, I understood the importance of _hooks_ 🙂
        It’s always good to get tips from an experienced developer.
        Thanks again and wish you good luck! 🙂

  3. This is what I was searching for. Thanks for this hook.

  4. Fantastic job here Joshua!! Plugin is very pleasing and inspired me to add it. Thank you and keep up the good work.

Leave a Reply