';
echo wp_kses( $video[0], business_consultant_finder_alowed_tags() );
echo '
';
endif;
else:
do_action('business_consultant_finder_posts_formats_thumbnail');
endif;
}
endif;
add_action( 'business_consultant_finder_posts_formats_video', 'business_consultant_finder_posts_formats_video' );
if ( ! function_exists( 'business_consultant_finder_posts_formats_audio' ) ) :
/**
* Post Formats audio.
*
* @since 1.0.0
*/
function business_consultant_finder_posts_formats_audio() {
$content = apply_filters( 'the_content', get_the_content() );
$audio = false;
// Only get audio from the content if a playlist isn't present.
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
$audio = get_media_embedded_in_content( $content, array( 'audio' ) );
}
// If not a single post, highlight the audio file.
if ( ! empty( $audio ) ) :
foreach ( $audio as $audio_html ) {
if ( has_post_thumbnail() ) :
echo '';
$post_thumbnail_id = get_post_thumbnail_id( get_the_ID() );
$post_thumbnail_url = wp_get_attachment_url( $post_thumbnail_id );
echo '
';
echo ''. wp_kses( $audio_html, business_consultant_finder_alowed_tags() ).'';
echo '
';
echo '
';
else:
echo '';
echo wp_kses( $audio_html, business_consultant_finder_alowed_tags() );
echo '
';
endif;
}
else:
do_action('business_consultant_finder_posts_formats_video');
endif;
}
endif;
add_action( 'business_consultant_finder_posts_formats_audio', 'business_consultant_finder_posts_formats_audio' );
add_filter( 'use_default_gallery_style', '__return_false' );
if ( ! function_exists( 'business_consultant_finder_posts_formats_gallery' ) ) :
/**
* Post Formats gallery.
*
* @since 1.0.0
*/
function business_consultant_finder_posts_formats_gallery() {
global $post;
$post_thumbnail_url = '';
if( has_block('gallery', $post->post_content) ):
$post_blocks = parse_blocks( $post->post_content );
if( !empty( $post_blocks ) ):
echo '';
endif;
elseif( get_post_gallery( get_the_ID() ) ) :
echo '';
else:
do_action('business_consultant_finder_posts_formats_thumbnail');
endif;
}
endif;
add_action( 'business_consultant_finder_posts_formats_gallery', 'business_consultant_finder_posts_formats_gallery' );
if ( ! function_exists( 'business_consultant_finder_posts_formats_header' ) ) :
/**
* Post business_consultant_finder_posts_blog_media
*
* @since 1.0.0
*/
function business_consultant_finder_posts_blog_media() {
if( business_consultant_finder_get_option('index_hide_thumb') == true ) return false;
$formats = get_post_format(get_the_ID()) ;
switch ( $formats ) {
default:
do_action('business_consultant_finder_posts_formats_thumbnail');
break;
case 'gallery':
do_action('business_consultant_finder_posts_formats_gallery');
break;
case 'audio':
do_action('business_consultant_finder_posts_formats_audio');
break;
case 'video':
do_action('business_consultant_finder_posts_formats_video');
break;
}
}
endif;
add_action( 'business_consultant_finder_posts_blog_media', 'business_consultant_finder_posts_blog_media' );
if ( ! function_exists( 'business_consultant_finder_loop_navigation' ) ) :
/**
* Post Posts Loop Navigation
*
* @since 1.0.0
*/
function business_consultant_finder_loop_navigation() {
$type = get_theme_mod( 'loop_navigation_type', 'default' );
echo '';
if( $type == 'default' ):
the_posts_navigation(
array(
'prev_text' => '
'.esc_html__('Previous page', 'business-consultant-finder').'',
'next_text' => '
'.esc_html__('Next page', 'business-consultant-finder').'',
'screen_reader_text' => __('Posts navigation', 'business-consultant-finder')
)
);
echo '
';
else:
echo '';
endif;
echo '
';
}
endif;
add_action( 'business_consultant_finder_loop_navigation', 'business_consultant_finder_loop_navigation', 11 );
if ( ! function_exists( 'business_consultant_finder_single_post_navigation' ) ) :
/**
* Post Single Posts Navigation
*
* @since 1.0.0
*/
function business_consultant_finder_single_post_navigation( ) {
$prevPost = get_previous_post(true);
$nextPost = get_next_post(true);
if( $prevPost || $nextPost) :
echo '';
echo '
';
if( $prevPost ) :
$prevthumbnail = get_the_post_thumbnail($prevPost->ID, array(40,40) );
echo '
';
previous_post_link('%link',$prevthumbnail , TRUE);
echo '
';
echo '
'.esc_html__('Previous Article','business-consultant-finder').'
';
previous_post_link('%link',"%title", TRUE);
echo '';
endif;
echo '
';
echo '
';
if( $nextPost ) :
$nextthumbnail = get_the_post_thumbnail($nextPost->ID, array(40,40) );
echo '
'.esc_html__('Next Article','business-consultant-finder').'
';
next_post_link('%link',"%title", TRUE);
echo '';
echo '
';
next_post_link('%link',$nextthumbnail, TRUE);
echo '
';
endif;
echo '
';
echo '
';
endif;
}
endif;
add_action( 'business_consultant_finder_single_post_navigation', 'business_consultant_finder_single_post_navigation', 10 );
if ( ! function_exists( 'business_consultant_finder_posts_blog_heading_title' ) ) :
/**
* Post Posts Loop meta info
*
* @since 1.0.0
*/
function business_consultant_finder_posts_blog_heading_title() {
if ( is_singular() ) :
the_title( '', '
' );
else :
the_title( '' );
endif;
}
endif;
add_action( 'business_consultant_finder_posts_heading', 'business_consultant_finder_posts_blog_heading_title', 10 );
add_action( 'business_consultant_finder_blog_single_content', 'business_consultant_finder_posts_blog_heading_title', 10 );
if( ! function_exists( 'business_consultant_finder_blog_loop_content_type' ) && ! is_admin() ) :
/**
* @since 1.0.0
*
* @param $type
* @return html
*/
function business_consultant_finder_blog_loop_content_type( $type = '' ){
$type = apply_filters( 'business_consultant_finder_blog_loop_content_type', business_consultant_finder_get_option('blog_loop_content_type') );
if( ! is_single() && !is_page()):
if ( $type == 'content' ) {
the_content();
}else{
echo wp_kses_post( get_the_excerpt() );
}
else:
the_content();
endif;
}
endif;
add_action( 'business_consultant_finder_blog_loop_content', 'business_consultant_finder_blog_loop_content_type', 40 );
add_action( 'business_consultant_finder_blog_single_content', 'business_consultant_finder_blog_loop_content_type', 20 );
if( ! function_exists( 'business_consultant_finder_blog_loop_content_bottom' ) ) :
/**
* @since 1.0.0
*
* @return html
*/
function business_consultant_finder_blog_loop_content_bottom( ){
$read_more_text = business_consultant_finder_get_option('read_more_text');
if ( $read_more_text != "" && 'post' === get_post_type() && ! is_single() ) {
printf( '
',
esc_url( get_permalink( get_the_ID() ) ),
esc_html( $read_more_text )
);
}
if ( get_edit_post_link() && is_single() ) :
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit %s', 'business-consultant-finder' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'',
''
);
endif;
}
add_filter( 'the_content_more_link', '__return_empty_string' );
add_filter( 'excerpt_more', '__return_empty_string' );
add_action( 'business_consultant_finder_blog_loop_content', 'business_consultant_finder_blog_loop_content_bottom', 50 );
endif;
if ( ! function_exists( 'business_consultant_finder_walker_comment' ) ) :
/**
* Implement Custom Comment template.
*
* @since 1.0.0
*
* @param $comment, $args, $depth
* @return $html
*/
function business_consultant_finder_walker_comment($comment, $args, $depth) {
?>
id="comment-">