* // Declare support for all hook types
* add_theme_support( 'remax_store_hooks', array( 'all' ) );
*
* // Declare support for certain hook types only
* add_theme_support( 'remax_store_hooks', array( 'header', 'content', 'footer' ) );
*
*/
add_theme_support( 'remax_store_hooks', array(
/**
* As a Theme developer, use the 'all' parameter, to declare support for all
* hook types.
* Please make sure you then actually reference all the hooks in this file,
* Plugin developers depend on it!
*/
'all',
/**
* Themes can also choose to only support certain hook types.
* Please make sure you then actually reference all the hooks in this type
* family.
*
* When the 'all' parameter was set, specific hook types do not need to be
* added explicitly.
*/
'html',
'body',
'head',
'header',
'content',
'entry',
'comments',
'sidebars',
'sidebar',
'footer',
/**
* If/when WordPress Core implements similar methodology, Themes and Plugins
* will be able to check whether the version of THA supplied by the theme
* supports Core hooks.
*/
//'core',
) );
/**
* Determines, whether the specific hook type is actually supported.
*
* Plugin developers should always check for the support of a specific
* hook type before hooking a callback function to a hook of this type.
*
* Example:
*
* if ( current_theme_supports( 'remax_store_hooks', 'header' ) )
* add_action( 'remax_store_head_top', 'prefix_header_top' );
*
*
* @param bool $bool true
* @param array $args The hook type being checked
* @param array $registered All registered hook types
*
* @return bool
*/
function remax_store_current_theme_supports( $bool, $args, $registered ) {
return in_array( $args[0], $registered[0] ) || in_array( 'all', $registered[0] );
}
add_filter( 'current_theme_supports-remax_store_hooks', 'remax_store_current_theme_supports', 10, 3 );
/**
* HTML hook
* Special case, useful for , etc.
* $remax_store_supports[] = 'html;
*/
function remax_store_html_before() {
do_action( 'remax_store_html_before' );
}
/**
* HTML hooks
* $remax_store_supports[] = 'body';
*/
function remax_store_body_top() {
do_action( 'remax_store_body_top' );
}
function remax_store_body_bottom() {
do_action( 'remax_store_body_bottom' );
}
/**
* HTML hooks
*
* $remax_store_supports[] = 'head';
*/
function remax_store_head_top() {
do_action( 'remax_store_head_top' );
}
function remax_store_head_bottom() {
do_action( 'remax_store_head_bottom' );
}
/**
* Semantic hooks
*
* $remax_store_supports[] = 'header';
*/
function remax_store_header_before() {
do_action( 'remax_store_header_before' );
}
function remax_store_header() {
do_action( 'remax_store_header' );
}
function remax_store_site_branding() {
do_action( 'remax_store_site_branding' );
}
function remax_store_menu() {
do_action( 'remax_store_menu' );
}
function remax_store_header_after() {
do_action( 'remax_store_header_after' );
}
function remax_store_header_cart() {
do_action( 'remax_store_header_cart' );
}
/**
* Semantic hooks
*
* $remax_store_supports[] = 'content';
*/
function remax_store_content_before() {
do_action( 'remax_store_content_before' );
}
function remax_store_content_after() {
do_action( 'remax_store_content_after' );
}
function remax_store_content_top() {
do_action( 'remax_store_content_top' );
}
function remax_store_content_bottom() {
do_action( 'remax_store_content_bottom' );
}
function remax_store_content_while_before() {
do_action( 'remax_store_content_while_before' );
}
function remax_store_content_while_after() {
do_action( 'remax_store_content_while_after' );
}
function remax_store_content_loop(){
do_action('remax_store_content_loop');
}
/**
* Semantic hooks
*
* $remax_store_supports[] = 'entry';
*/
function remax_store_entry_before() {
do_action( 'remax_store_entry_before' );
}
function remax_store_entry_after() {
do_action( 'remax_store_entry_after' );
}
function remax_store_entry_content_before() {
do_action( 'remax_store_entry_content_before' );
}
function remax_store_entry_content_after() {
do_action( 'remax_store_entry_content_after' );
}
function remax_store_entry_top() {
do_action( 'remax_store_entry_top' );
}
function remax_store_entry_bottom() {
do_action( 'remax_store_entry_bottom' );
}
/**
* Comments block hooks
*
* $remax_store_supports[] = 'comments';
*/
function remax_store_comments_before() {
do_action( 'remax_store_comments_before' );
}
function remax_store_comments_after() {
do_action( 'remax_store_comments_after' );
}
/**
* Semantic hooks
*
* $remax_store_supports[] = 'sidebar';
*/
function remax_store_sidebars_before() {
do_action( 'remax_store_sidebars_before' );
}
function remax_store_sidebars_after() {
do_action( 'remax_store_sidebars_after' );
}
/**
* Semantic