do_action();
creates an action hook
which we can use to hook our function
in function.php
file.
in the above code, 4 action hooks are defined
cherry_footer_before
cherry_footer
cherry_footer_after
cherry_body_end
if you go to theme-folder/lib/structure.php
you wil see three action hooks.
add_action( 'cherry_footer_before', 'cherry_footer_wrap', 999 );
add_action( 'cherry_footer_after', 'cherry_footer_wrap', 0 );
add_action( 'cherry_footer', 'cherry_footer_load_template' );
and you can see these function
on the same file.
function cherry_footer_wrap() {
if ( ! did_action( 'cherry_footer' ) ) {
printf( '<footer %s>', cherry_get_attr( 'footer' ) );
} else {
echo '</footer>';
}
}
function cherry_footer_load_template() {
get_template_part( 'templates/wrapper-footer', cherry_template_base() );
}
now you can see in the above function
, template part is called. which is inside theme-folder/templates/wrapper-footer.php
.