Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update documentation, more hooks, add GPLv2 to the actual code.

  • Loading branch information...
commit 1c5f5a46357c06acbb2a817c7770c65244dfabd7 1 parent 3569176
@zamoose authored
Showing with 26 additions and 2 deletions.
  1. +2 −2 README.md
  2. +11 −0 tha-example-index.php
  3. +13 −0 tha-theme-hooks.php
View
4 README.md
@@ -8,10 +8,10 @@ Original idea [here](http://literalbarrage.org/blog/2012/06/29/wordpress-theme-h
## Conventions ##
-* Hooks are generally of the form `tha_` + `[section of the theme]` + `_[placement within block]`
+* Hooks should be of the form `tha_` + `[section of the theme]` + `_[placement within block]`
+* 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()`
* Hooks should be suffixed based upon their placement within a block
* Hooks immediately *preceding* a block should use `_before`
* Hooks immediately *following* a block should use `_after`
* Hooks placed at the very *beginning* of a block should use `_top`
* Hooks placed at the very *end* of a block should use `_bottom`
-* 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()`
View
11 tha-example-index.php
@@ -17,5 +17,16 @@
<?php tha_content_bottom(); ?>
</div><!-- #content -->
+
+ <?php tha_sidebars_before(); ?>
+ <div id="sidebar">
+
+ </div><!-- #sidebar-->
+ <?php tha_sidebars_after(); ?>
+
+ <div id="footer">
+
+ </div><!-- #footer -->
+
</body>
</html>
View
13 tha-theme-hooks.php
@@ -1,4 +1,17 @@
<?php
+/*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*/
+
+define( 'THA_HOOKS_SUPPORT', true );
function tha_head_top() {
do_action( 'tha_head_top' );
Please sign in to comment.
Something went wrong with that request. Please try again.