storefront/inc/storefront-template-hooks.php

91 lines
3.2 KiB
PHP
Raw Normal View History

2014-08-17 16:55:38 +01:00
<?php
/**
2016-02-19 17:00:23 +00:00
* Storefront hooks
2014-08-17 16:55:38 +01:00
*
* @package storefront
*/
/**
* General
2016-02-19 16:57:56 +00:00
*
2014-08-17 16:55:38 +01:00
* @see storefront_header_widget_region()
2014-08-28 18:25:08 +01:00
* @see storefront_get_sidebar()
2014-08-17 16:55:38 +01:00
*/
2016-02-19 16:57:56 +00:00
add_action( 'storefront_before_content', 'storefront_header_widget_region', 10 );
add_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
2014-08-17 16:55:38 +01:00
/**
* Header
2016-02-19 16:57:56 +00:00
*
2015-03-24 09:21:12 +00:00
* @see storefront_skip_links()
2014-08-17 16:55:38 +01:00
* @see storefront_secondary_navigation()
* @see storefront_site_branding()
* @see storefront_primary_navigation()
*/
add_action( 'storefront_header', 'storefront_header_container', 0 );
add_action( 'storefront_header', 'storefront_skip_links', 5 );
add_action( 'storefront_header', 'storefront_site_branding', 20 );
add_action( 'storefront_header', 'storefront_secondary_navigation', 30 );
add_action( 'storefront_header', 'storefront_header_container_close', 41 );
add_action( 'storefront_header', 'storefront_primary_navigation_wrapper', 42 );
add_action( 'storefront_header', 'storefront_primary_navigation', 50 );
add_action( 'storefront_header', 'storefront_primary_navigation_wrapper_close', 68 );
2014-08-17 16:55:38 +01:00
/**
* Footer
2016-02-19 16:57:56 +00:00
*
2014-08-17 16:55:38 +01:00
* @see storefront_footer_widgets()
* @see storefront_credit()
*/
2016-02-19 16:57:56 +00:00
add_action( 'storefront_footer', 'storefront_footer_widgets', 10 );
add_action( 'storefront_footer', 'storefront_credit', 20 );
2014-08-17 16:55:38 +01:00
/**
* Homepage
2016-02-19 16:57:56 +00:00
*
2014-08-18 13:10:56 +01:00
* @see storefront_homepage_content()
2014-08-17 16:55:38 +01:00
*/
2018-06-04 22:26:17 +01:00
add_action( 'homepage', 'storefront_homepage_content', 10 );
2014-08-18 09:33:18 +01:00
/**
2014-08-18 12:44:54 +01:00
* Posts
2016-02-19 16:57:56 +00:00
*
2014-08-18 12:44:54 +01:00
* @see storefront_post_header()
* @see storefront_post_meta()
* @see storefront_post_content()
2014-08-18 09:33:18 +01:00
* @see storefront_paging_nav()
2014-08-18 12:44:54 +01:00
* @see storefront_single_post_header()
2014-08-18 13:23:00 +01:00
* @see storefront_post_nav()
* @see storefront_display_comments()
2014-08-18 09:33:18 +01:00
*/
2018-06-04 22:26:17 +01:00
add_action( 'storefront_loop_post', 'storefront_post_header', 10 );
add_action( 'storefront_loop_post', 'storefront_post_meta', 20 );
add_action( 'storefront_loop_post', 'storefront_post_content', 30 );
add_action( 'storefront_loop_after', 'storefront_paging_nav', 10 );
add_action( 'storefront_single_post', 'storefront_post_header', 10 );
add_action( 'storefront_single_post', 'storefront_post_meta', 20 );
add_action( 'storefront_single_post', 'storefront_post_content', 30 );
add_action( 'storefront_single_post_bottom', 'storefront_post_nav', 10 );
add_action( 'storefront_single_post_bottom', 'storefront_display_comments', 20 );
add_action( 'storefront_post_content_before', 'storefront_post_thumbnail', 10 );
2014-08-18 13:23:00 +01:00
2014-08-18 13:10:56 +01:00
/**
* Pages
2016-02-19 16:57:56 +00:00
*
2014-08-18 13:10:56 +01:00
* @see storefront_page_header()
* @see storefront_page_content()
2014-08-18 13:23:00 +01:00
* @see storefront_display_comments()
2014-08-18 13:10:56 +01:00
*/
2018-06-04 22:26:17 +01:00
add_action( 'storefront_page', 'storefront_page_header', 10 );
add_action( 'storefront_page', 'storefront_page_content', 20 );
add_action( 'storefront_page_after', 'storefront_display_comments', 10 );
2018-06-04 22:26:17 +01:00
/**
* Homepage Page Template
*
* @see storefront_homepage_header()
* @see storefront_page_content()
*/
add_action( 'storefront_homepage', 'storefront_homepage_header', 10 );
add_action( 'storefront_homepage', 'storefront_page_content', 20 );