';
}
endif;
if ( ! function_exists( 'business_aarambha_page_section_end' ) ) :
/**
* Close custom wrapper div after content
*/
function business_aarambha_page_section_end() {
if ( is_404() ) {
return;
}
echo '';
}
endif;
if ( ! function_exists( 'business_aarambha_site_content_end' ) ) :
/**
* Close custom wrapper div after content
*/
function business_aarambha_site_content_end() {
echo '
';
}
endif;
/* ------------------------------ BLOG PAGE CONTENT ------------------------------ */
if ( ! function_exists( 'business_aarambha_posts_navigation' ) ) :
/**
* Blog Posts navigation
*/
function business_aarambha_posts_navigation() {
Business_Aarambha_Helper::post_pagination();
}
endif;
if ( ! function_exists( 'business_aarambha_blog_post_content' ) ) :
/**
* Blog post content
*/
function business_aarambha_blog_post_content() {
$posts_elements = get_theme_mod(
'business_aarambha_blog_posts_elements',
['categories','post-title','post-meta','post-excerpt']
);
if ( ! empty( $posts_elements ) ) :
echo '';
foreach ( $posts_elements as $post_element ) :
switch ( $post_element ) :
case 'post-title' :
Business_Aarambha_Helper::post_title();
break;
case 'post-excerpt' :
Business_Aarambha_Helper::post_content();
break;
case 'read-more' :
Business_Aarambha_Helper::read_more();
break;
case 'post-meta' :
Business_Aarambha_Helper::post_meta( get_the_ID() );
break;
case 'categories' :
Business_Aarambha_Helper::post_meta( get_the_ID(), ['categories'] );
break;
endswitch;
endforeach;
echo '
';
endif;
}
endif;
/* ------------------------------ POST CONTENT ------------------------------ */
if ( ! function_exists( 'business_aarambha_get_post_thumbnail' ) ) :
/**
* Post Thumbnail
*/
function business_aarambha_get_post_thumbnail() {
// Is Singular
if ( is_singular() ) {
$img_ratio = is_single() ? get_theme_mod('business_aarambha_single_post_featured_image_ratio',['desktop' => '16x9'] ) : get_theme_mod( 'business_aarambha_single_page_featured_image_ratio', ['desktop' => '16x9'] );
$img_size = is_single() ? get_theme_mod('business_aarambha_single_post_featured_image_size',['desktop' => 'medium_large'] ) : get_theme_mod( 'business_aarambha_single_page_featured_image_size', ['desktop' => 'medium_large'] );
$ratio = in_array( 'auto', $img_ratio ) ? '16x9' : $img_ratio['desktop'];
business_aarambha_singular_post_thumbnail( $img_size['desktop'],$ratio );
}
else {
$img_ratio = get_theme_mod( 'business_aarambha_blog_post_featured_image_ratio', ['desktop' => '16x9'] );
$img_size = get_theme_mod( 'business_aarambha_blog_post_featured_image_size', ['desktop' => 'medium_large'] );
$ratio = in_array( 'auto', $img_ratio ) ? '16x9' : $img_ratio['desktop'];
business_aarambha_post_thumbnail( $img_size['desktop'],$ratio );
}
}
endif;
if ( ! function_exists( 'business_aarambha_single_post_content_elements' ) ) :
/**
* Single post content
*/
function business_aarambha_single_post_content_elements() {
$posts_elements = get_theme_mod(
'business_aarambha_single_post_content_elements',
['categories','post-title','post-meta','post-content','tags']
);
if ( ! empty( $posts_elements ) ) :
echo '';
foreach ( $posts_elements as $post_element ) :
switch ( $post_element ) :
case 'post-title' :
$html_tag = get_theme_mod( 'business_aarambha_single_post_title_tag', ['desktop' => 'h1'] );
the_title( '<' . esc_attr( $html_tag['desktop'] ) . ' class="entry-title">', '' . esc_attr( $html_tag['desktop'] ) . '>' );
break;
case 'post-content' :
business_aarambha_single_post_entry_content();
break;
case 'post-meta' :
Business_Aarambha_Helper::post_meta( get_the_ID() );
break;
case 'categories' :
Business_Aarambha_Helper::post_meta( get_the_ID(), ['categories'] );
break;
case 'tags' :
Business_Aarambha_Helper::post_meta( get_the_ID(), ['tags'] );
break;
endswitch;
endforeach;
business_aarambha_entry_footer();
echo '
';
endif;
}
endif;
if ( ! function_exists( 'business_aarambha_single_post_entry_content' ) ) :
/**
* Entry Post Content
*/
function business_aarambha_single_post_entry_content() {
?>
"%s"', 'business-aarambha' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
);
?>
'
' . esc_html__( 'Pages:', 'business-aarambha' ),
'after' => '
',
)
);
?>
';
foreach ( $posts_elements as $post_element ) :
switch ( $post_element ) :
case 'post-title' :
$html_tag = get_theme_mod( 'business_aarambha_single_page_title_tag', ['desktop' => 'h1'] );
the_title( '<' . esc_attr( $html_tag['desktop'] ) . ' class="entry-title">', '' . esc_attr( $html_tag['desktop'] ) . '>' );
break;
case 'post-content' :
business_aarambha_single_page_entry_content();
break;
endswitch;
endforeach;
business_aarambha_entry_footer();
echo '
'; the_comments_navigation(); /** * Functions hooked into business_aarambha_comments_list_after action * */ do_action( 'business_aarambha_comments_list_after' ); } } endif; if ( ! function_exists( 'business_aarambha_comment_form' ) ) : /** * comment form */ function business_aarambha_comment_form() { // You can start editing here -- including this comment! if ( have_comments() ) : // If comments are closed and there are comments, let's leave a little note, shall we? if ( ! comments_open() ) : ?> 'true'] ); if ( $back_to_top && array_key_exists( 'desktop', $back_to_top ) ) : ?>
';
$output .= '';
$output .= ' ';
// @codingStandardsIgnoreStart
echo $output;
// @codingStandardsIgnoreEnd
}
endif;
'; $output .= wp_list_pages( array( 'echo' => false, 'title_li' => false, ) ); $output .= '
'; $output .= ''; // @codingStandardsIgnoreStart echo $output; // @codingStandardsIgnoreEnd } endif; if ( ! function_exists( 'business_aarambha_mobile_menu_fallback' ) ) : /** * Menu fallback for mobile menu. * * Contains wp_list_pages to display pages created, */ function business_aarambha_mobile_menu_fallback() { $output = ''; $output .= ''; $output .= wp_list_pages( array( 'echo' => false, 'title_li' => false, ) ); $output .= '
'; $output .= '