Skip to content

Commit

Permalink
Implementing suggestions as described in issue #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
zamoose committed Oct 31, 2012
1 parent f5d5a31 commit dd32f76
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tha-example-index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<?php tha_html_before(); ?><html>
<head>
<?php tha_head_top(); ?>
<title><?php wp_title(); ?></title>
Expand All @@ -7,7 +7,7 @@
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>

<?php tha_body_top(); ?>
<?php tha_header_before(); ?>
<div id="header">
<?php tha_header_top(); ?>
Expand Down Expand Up @@ -69,5 +69,6 @@
</div><!-- #footer -->
<?php tha_footer_after(); ?>
<?php wp_footer(); ?>
<?php tha_body_bottom(); ?>
</body>
</html>
22 changes: 21 additions & 1 deletion tha-theme-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
* When the 'all' parameter was set, specific hook types do not need to be
* added explicitly.
*/
'body',
'head',
'header',
'content',
Expand Down Expand Up @@ -94,6 +95,26 @@ function tha_current_theme_supports( $bool, $args, $registered ) {
}
add_filter( 'current_theme_supports-tha_hooks', 'tha_current_theme_supports', 10, 3 );

/**
* HTML <html> hook
* Special case, useful for <DOCTYPE>, etc.
* $tha_supports[] = 'html;
*/
function tha_html_before() {
do_action( 'tha_html_before' );
}
/**
* HTML <body> hooks
* $tha_supports[] = 'body';
*/
function tha_body_top() {
do_action( 'tha_body_top' );
}

function tha_body_bottom() {
do_action( 'tha_body_bottom' );
}

/**
* HTML <head> hooks
*
Expand All @@ -107,7 +128,6 @@ function tha_head_bottom() {
do_action( 'tha_head_bottom' );
}


/**
* Semantic <header> hooks
*
Expand Down

0 comments on commit dd32f76

Please sign in to comment.