Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create gh-pages branch via GitHub

  • Loading branch information...
commit 420b53ded4b3893fe06ccbc41d85120b75b955cf 1 parent 4762d8f
@zamoose zamoose authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  index.html
  2. +1 −1  params.json
View
2  index.html
@@ -116,6 +116,8 @@
<ul>
<li>
<a href="http://wordpress.org/extend/themes/the-bootstrap">The Bootstrap</a> by Konstantin Obenland (<a href="https://github.com/obenland/the-bootstrap">github</a>)</li>
+<li>
+<a href="https://github.com/bueltge/Documentation">Documentation</a> by Frank Bültge</li>
</ul>
</li>
</ul>
View
2  params.json
@@ -1 +1 @@
-{"note":"Don't delete this file! It's used internally to help with page regeneration.","google":"","body":"# Theme Hook Alliance #\r\n\r\n## Status ##\r\n**1.0**\r\n\r\n## What? ##\r\nChild theme authors and plugin developers need a consistent set of entry points to allow for easy customization and altering of functionality. Core WordPress offers a suite of [action hooks](http://codex.wordpress.org/Plugin_API/Action_Reference/) and [template tags](http://codex.wordpress.org/Template_tags) but does not cover many of the common use cases. The Theme Hook Alliance is a community-driven effort to agree on a set of third-party action hooks that THA themes pledge to implement in order to give that desired consistency.\r\n\r\n## Why? ##\r\nThere have been [discussions](http://www.wptavern.com/forum/themes-templates/494-standard-theme-hook-names.html) about implementing a common set of hooks, a [Trac ticket](http://core.trac.wordpress.org/ticket/18561#comment:92) and even an [initial pass](http://codex.wordpress.org/User_talk:Dcole07) at implementing something similar. However, for whatever reason[s], these efforts have not gained traction. I proposed this third-party solution [here](http://literalbarrage.org/blog/2012/06/29/wordpress-theme-hook-alliance) and this project is intended to be an implementation of these goals.\r\n\r\n## What about WordPress? ##\r\nAs stated above, there have been attempts to have something along these lines added to WordPress Core in the past and, while they have generally been seen as good ideas, they have remained as such.\r\n\r\nTaking this out of the realm of Core and into the third-party realm is a bit of a risky proposition, to be sure. If the conventions laid out below are not adopted in a widespread fashion, this effort will ultimately fail.\r\n\r\nHowever, this is no reason to wait. Child themes have recently been approved for release in the official [Themes Repository](http://wordpress.org/extend/themes) and plugin authors continue to need more reliable entry points into WordPress' content flow so as to avoid nasty hacks like output buffering.\r\n\r\n### When Core does it, Core wins ###\r\nA small note: none of the proposed theme hooks are intended to replace or rewrite existing WordPress functionality. So, for instance, if a desired result can be obtained by filtering the output of e.g. `the_content()`, there is no need to create an entirely new hook. Therefore, any functions that duplicate work Core performs already should be rejected immediately.\r\n\r\n### What if Core adds some (or all) of these filters? ###\r\nIf this idea gains enough traction, there is a chance that a partial, or even full, portion of these hooks will make their way into Core. When/if this occurs, we can simply update `tha-theme-hooks.php` to include the new `do_action()` calls at the appropriate places. Then, THA users will simply need to update their copy of `tha-theme-hooks.php` to take advantage.\r\n\r\nFor example, if Core were to introduce a `before_header()` hook, we could (in theory) simply alter `tha_header_before()` as follows\r\n\r\n```php\r\n\tfunction tha_header_before() {\r\n\t\tdo_action( 'tha_header_before' );\r\n\t\tdo_action( 'before_header' );\r\n\t}\r\n```\r\n\r\nThis would allow all themes using the THA hooks to avoid rewriting/refactoring in the case of a Core change.\r\n\r\n## Conventions ##\r\n\r\n* Hooks should be of the form \t`tha_` + `[section of the theme]` + `_[placement within block]`.\r\n* Hooks should be named based upon the generally-accepted semantic name for the section of a theme they cover, e.g., `tha_content_*` should refer to the section/block of a theme containing the content (or \"The Loop\"), while `tha_sidebar_*` would refer to the sidebars generally called by `get_sidebar()`.\r\n* Hooks should be suffixed based upon their placement within a block.\r\n\t* Hooks immediately *preceding* a block should use `_before`.\r\n\t* Hooks immediately *following* a block should use `_after`.\r\n\t* Hooks placed at the very *beginning* of a block should use `_top`.\r\n\t* Hooks placed at the very *end* of a block should use `_bottom`.\r\n* If the theme section covered by a hook can contain multiple semantic elements, it should be pluralized. (Primarily applies to `tha_sidebars_before/after` in the early goings.)\r\n\r\n## Usage ##\r\n\r\n1. Copy `tha-theme-hooks.php` to a directory inside of your theme; say, `include/`, for instance.\r\n2. Include `tha-theme-hooks.php` via `<?php include( 'include/tha-theme-hooks.php' ); ?>` in your `functions.php` or similar.\r\n3. Using `tha-example-index.php` as a guide, *be sure to implement all of the hooks described in `tha-theme-hooks.php` in order to offer full compatibility*.\r\n4. Profit!\r\n\r\n## Core Compatibility ##\r\nWorking on it!\r\n\r\n## THA-Compatible Themes ##\r\n* **In-Progress**\r\n\t* [Oenology](http://www.chipbennett.net/themes/oenology/) by Chip Bennett ([github](https://github.com/chipbennett/oenology))\r\n\t* [Elbee Elgee](http://literalbarrage.org/blog/code/elbee-elgee) by Doug Stewart ([bitbucket](https://bitbucket.org/zamoose/elbee-elgee))\r\n* **Full Support**\r\n\t* [The Bootstrap](http://wordpress.org/extend/themes/the-bootstrap) by Konstantin Obenland ([github](https://github.com/obenland/the-bootstrap))","name":"Themehookalliance","tagline":"Theme Hooks -- Let's get on it!"}
+{"note":"Don't delete this file! It's used internally to help with page regeneration.","name":"Themehookalliance","body":"# Theme Hook Alliance #\r\n\r\n## Status ##\r\n**1.0**\r\n\r\n## What? ##\r\nChild theme authors and plugin developers need a consistent set of entry points to allow for easy customization and altering of functionality. Core WordPress offers a suite of [action hooks](http://codex.wordpress.org/Plugin_API/Action_Reference/) and [template tags](http://codex.wordpress.org/Template_tags) but does not cover many of the common use cases. The Theme Hook Alliance is a community-driven effort to agree on a set of third-party action hooks that THA themes pledge to implement in order to give that desired consistency.\r\n\r\n## Why? ##\r\nThere have been [discussions](http://www.wptavern.com/forum/themes-templates/494-standard-theme-hook-names.html) about implementing a common set of hooks, a [Trac ticket](http://core.trac.wordpress.org/ticket/18561#comment:92) and even an [initial pass](http://codex.wordpress.org/User_talk:Dcole07) at implementing something similar. However, for whatever reason[s], these efforts have not gained traction. I proposed this third-party solution [here](http://literalbarrage.org/blog/2012/06/29/wordpress-theme-hook-alliance) and this project is intended to be an implementation of these goals.\r\n\r\n## What about WordPress? ##\r\nAs stated above, there have been attempts to have something along these lines added to WordPress Core in the past and, while they have generally been seen as good ideas, they have remained as such.\r\n\r\nTaking this out of the realm of Core and into the third-party realm is a bit of a risky proposition, to be sure. If the conventions laid out below are not adopted in a widespread fashion, this effort will ultimately fail.\r\n\r\nHowever, this is no reason to wait. Child themes have recently been approved for release in the official [Themes Repository](http://wordpress.org/extend/themes) and plugin authors continue to need more reliable entry points into WordPress' content flow so as to avoid nasty hacks like output buffering.\r\n\r\n### When Core does it, Core wins ###\r\nA small note: none of the proposed theme hooks are intended to replace or rewrite existing WordPress functionality. So, for instance, if a desired result can be obtained by filtering the output of e.g. `the_content()`, there is no need to create an entirely new hook. Therefore, any functions that duplicate work Core performs already should be rejected immediately.\r\n\r\n### What if Core adds some (or all) of these filters? ###\r\nIf this idea gains enough traction, there is a chance that a partial, or even full, portion of these hooks will make their way into Core. When/if this occurs, we can simply update `tha-theme-hooks.php` to include the new `do_action()` calls at the appropriate places. Then, THA users will simply need to update their copy of `tha-theme-hooks.php` to take advantage.\r\n\r\nFor example, if Core were to introduce a `before_header()` hook, we could (in theory) simply alter `tha_header_before()` as follows\r\n\r\n```php\r\n\tfunction tha_header_before() {\r\n\t\tdo_action( 'tha_header_before' );\r\n\t\tdo_action( 'before_header' );\r\n\t}\r\n```\r\n\r\nThis would allow all themes using the THA hooks to avoid rewriting/refactoring in the case of a Core change.\r\n\r\n## Conventions ##\r\n\r\n* Hooks should be of the form \t`tha_` + `[section of the theme]` + `_[placement within block]`.\r\n* Hooks should be named based upon the generally-accepted semantic name for the section of a theme they cover, e.g., `tha_content_*` should refer to the section/block of a theme containing the content (or \"The Loop\"), while `tha_sidebar_*` would refer to the sidebars generally called by `get_sidebar()`.\r\n* Hooks should be suffixed based upon their placement within a block.\r\n\t* Hooks immediately *preceding* a block should use `_before`.\r\n\t* Hooks immediately *following* a block should use `_after`.\r\n\t* Hooks placed at the very *beginning* of a block should use `_top`.\r\n\t* Hooks placed at the very *end* of a block should use `_bottom`.\r\n* If the theme section covered by a hook can contain multiple semantic elements, it should be pluralized. (Primarily applies to `tha_sidebars_before/after` in the early goings.)\r\n\r\n## Usage ##\r\n\r\n1. Copy `tha-theme-hooks.php` to a directory inside of your theme; say, `include/`, for instance.\r\n2. Include `tha-theme-hooks.php` via `<?php include( 'include/tha-theme-hooks.php' ); ?>` in your `functions.php` or similar.\r\n3. Using `tha-example-index.php` as a guide, *be sure to implement all of the hooks described in `tha-theme-hooks.php` in order to offer full compatibility*.\r\n4. Profit!\r\n\r\n## Core Compatibility ##\r\nWorking on it!\r\n\r\n## THA-Compatible Themes ##\r\n* **In-Progress**\r\n\t* [Oenology](http://www.chipbennett.net/themes/oenology/) by Chip Bennett ([github](https://github.com/chipbennett/oenology))\r\n\t* [Elbee Elgee](http://literalbarrage.org/blog/code/elbee-elgee) by Doug Stewart ([bitbucket](https://bitbucket.org/zamoose/elbee-elgee))\r\n* **Full Support**\r\n\t* [The Bootstrap](http://wordpress.org/extend/themes/the-bootstrap) by Konstantin Obenland ([github](https://github.com/obenland/the-bootstrap))\r\n\t* [Documentation](https://github.com/bueltge/Documentation) by Frank Bültge","google":"","tagline":"Theme Hooks -- Let's get on it!"}
Please sign in to comment.
Something went wrong with that request. Please try again.