adding hooks & actions
This commit is contained in:
34
inc/roots-actions.php
Normal file
34
inc/roots-actions.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
add_action('roots_header_before', 'roots_1140_header_before');
|
||||
add_action('roots_header_after', 'roots_1140_header_after');
|
||||
add_action('roots_footer_before', 'roots_1140_footer_before');
|
||||
add_action('roots_footer_after', 'roots_1140_footer_after');
|
||||
|
||||
function roots_1140_header_before() {
|
||||
if (get_option('roots_css_framework') === '1140') {
|
||||
echo "<div class=\"row\">";
|
||||
}
|
||||
}
|
||||
|
||||
function roots_1140_header_after() {
|
||||
if (get_option('roots_css_framework') === '1140') {
|
||||
echo "</div><!-- /.row -->";
|
||||
echo "<div class=\"row\">";
|
||||
}
|
||||
}
|
||||
|
||||
function roots_1140_footer_before() {
|
||||
if (get_option('roots_css_framework') === '1140') {
|
||||
echo "</div><!-- /.row -->";
|
||||
echo "<div class=\"row\">";
|
||||
}
|
||||
}
|
||||
|
||||
function roots_1140_footer_after() {
|
||||
if (get_option('roots_css_framework') === '1140') {
|
||||
echo "</div><!-- /.row -->";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
33
inc/roots-hooks.php
Normal file
33
inc/roots-hooks.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// header.php
|
||||
function roots_head() { do_action( 'roots_head' ); }
|
||||
function roots_wrap_before() { do_action( 'roots_wrap_before' ); }
|
||||
function roots_header_before() { do_action( 'roots_header_before' ); }
|
||||
function roots_header_inside() { do_action( 'roots_header_inside' ); }
|
||||
function roots_header_after() { do_action( 'roots_header_after' ); }
|
||||
|
||||
// 404.php, archive.php, front-page.php, index.php, loop-page.php, loop-search.php, loop-single.php, loop.php
|
||||
// page-custom.php, page-full.php, page-sitemap.php, page-subpages.php, page.php, search.php, single.php
|
||||
function roots_content_before() { do_action( 'roots_content_before' ); }
|
||||
function roots_content_after() { do_action( 'roots_content_after' ); }
|
||||
function roots_main_before() { do_action( 'roots_main_before' ); }
|
||||
function roots_main_after() { do_action( 'roots_main_after' ); }
|
||||
function roots_post_before() { do_action( 'roots_post_before' ); }
|
||||
function roots_post_after() { do_action( 'roots_post_after' ); }
|
||||
function roots_post_inside_before() { do_action( 'roots_post_inside_before' ); }
|
||||
function roots_post_inside_after() { do_action( 'roots_post_inside_after' ); }
|
||||
function roots_loop_before() { do_action( 'roots_loop_before' ); }
|
||||
function roots_loop_after() { do_action( 'roots_loop_after' ); }
|
||||
function roots_sidebar_before() { do_action( 'roots_sidebar_before' ); }
|
||||
function roots_sidebar_inside_before() { do_action( 'roots_sidebar_inside_before' ); }
|
||||
function roots_sidebar_inside_after() { do_action( 'roots_sidebar_inside_after' ); }
|
||||
function roots_sidebar_after() { do_action( 'roots_sidebar_after' ); }
|
||||
|
||||
// footer.php
|
||||
function roots_footer_before() { do_action( 'roots_footer_before' ); }
|
||||
function roots_footer_inside() { do_action( 'roots_footer_inside' ); }
|
||||
function roots_footer_after() { do_action( 'roots_footer_after' ); }
|
||||
function roots_footer() { do_action( 'roots_footer' ); }
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user