$add_below,
'depth' => $depth,
'max_depth' => $args['max_depth'],
) ) ); ?>
';
}
add_action( 'comment_form_after_fields', 'bfastmag_after_comment_fields' );
/**
* Creates a closing div for a bootstrap row.
*
* @global int $comment_open_div
* @return type
*/
function bfastmag_after_comment_fields() {
global $comment_open_div;
if ( $comment_open_div == 0 ) {
return;
}
echo '';
}
/**
* Jetpack Compatibility File.
*
* Jetpack setup function.
*
* See: https://jetpack.me/support/infinite-scroll/
* See: https://jetpack.me/support/responsive-videos/
* @link https://jetpack.me/
*
* @package bfastmag
*/
function bfastmag_jetpack_setup() {
// Add theme support for Infinite Scroll.
add_theme_support( 'infinite-scroll', array(
'container' => 'main',
'render' => 'bfastmag_infinite_scroll_render',
'footer' => 'page',
) );
// Add theme support for Responsive Videos.
add_theme_support( 'jetpack-responsive-videos' );
} // end function bfastmag_jetpack_setup
add_action( 'after_setup_theme', 'bfastmag_jetpack_setup' );
/**
* Custom render function for Infinite Scroll.
*/
function bfastmag_infinite_scroll_render() {
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', get_post_format() );
}
}
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function bfastmag_body_classes( $classes ) {
// Adds a class of group-blog to blogs with more than 1 published author.
if ( is_multi_author() ) {
$classes[] = 'group-blog';
}
if ( bfastmag_isprevdem() ) {
$classes[] = 'prevpac';
}
return $classes;
}
add_filter( 'body_class', 'bfastmag_body_classes' );