', esc_url(get_bloginfo('pingback_url')));
}
}
add_action('wp_head', 'biznol_pingback_header');
/**
* Get the_content with limited characters
*/
if (!function_exists('biznol_getContent')) {
function biznol_getContent() {
$theContent = apply_filters('the_content', get_the_content());
$theContentStripTags = wp_strip_all_tags($theContent);
return wp_trim_words($theContentStripTags, get_theme_mod('biznol_characters_length', 35));
}
}
/**
* Get the_excerpt with limited characters
*/
if (!function_exists('biznol_getExcerpt')) {
function biznol_getExcerpt() {
$theExcerpt = apply_filters('the_excerpt', get_the_excerpt());
$theExcerptStripTags = wp_strip_all_tags($theExcerpt);
return wp_trim_words($theExcerptStripTags, get_theme_mod('biznol_characters_length', 35));
}
}
if (!function_exists('biznol_ExcerptOrContent')) {
function biznol_ExcerptOrContent() {
if (get_theme_mod('biznol_excerpt_or_content', 'excerpt') == 'excerpt') {
if (get_theme_mod('biznol_characters_option_length', 'custom') == 'custom') {
if (has_excerpt()) {
echo esc_html(biznol_getExcerpt());
} else {
echo esc_html(biznol_getContent());
}
?>
array(),
'em' => array(),
'strong' => array(),
'i' => array(
'class' => array(),
),
'span' => array(),
);
echo '';
if (class_exists('WooCommerce')){
if (is_home() || is_front_page()) :
echo '- '.esc_html__('Home','biznol').'
';
echo '- '.esc_html(get_bloginfo( 'name' )).'
';
elseif(class_exists('is_woocommerce')):
woocommerce_breadcrumb();
else:
echo '- '.esc_html__('Home','biznol').'
';
// Blog Category
if ( is_category() ) {
echo '- ' . esc_html__('Archive by category','biznol').' "' . single_cat_title('', false) . '"
';
// Blog Day
} elseif ( is_day() ) {
echo '- '. esc_html(get_the_time( __( 'Y', 'biznol' ) )) .'';
echo '
- '. esc_html(get_the_time( __( 'F', 'biznol' ) ) ) .'';
echo '
- '. esc_html(get_the_time( __( 'd', 'biznol' ) )) .'
';
// Blog Month
} elseif ( is_month() ) {
echo '- ' . esc_html(get_the_time( __( 'Y', 'biznol' ) )) . '';
echo '
- '. esc_html(get_the_time( __( 'F', 'biznol' ) )) .'
';
// Blog Year
} elseif ( is_year() ) {
echo '- '. esc_html(get_the_time( __( 'Y', 'biznol' ) )) .'
';
// Single Post
} elseif ( is_single() && !is_attachment() && is_page('single-product') ) {
// Custom post type
if ( get_post_type() != 'post' ) {
$biznol_cat = get_the_category();
$biznol_cat = $biznol_cat[0];
echo '- ';
echo get_category_parents($biznol_cat, TRUE, '');
echo '
';
echo '- '. esc_html(get_the_title()) .'
';
} }
elseif ( is_page() && $post->post_parent ) {
$post_array = get_post_ancestors($post);
/**
* Sorts in descending order
*/
krsort($post_array);
/**
* Iterate for each post Id
*/
foreach($post_array as $key=>$postid){
/**
* @return object
*/
$post_ids = get_post($postid);
/**
* @return string title
*/
$title = $post_ids->post_title;
echo '- ' . esc_html($title) . '
';
}
echo '- '.esc_html(get_the_title()).'
';
}
elseif( is_search() )
{
echo '- '. get_search_query() .'
';
}
elseif( is_404() )
{
echo '- '.esc_html__('Error 404','biznol').'
';
}
else {
// Default
echo '- '. esc_html(get_the_title(), $allowed_html ) .'
';
}
endif;
}
else{
if (is_home() || is_front_page()) :
echo '- '.esc_html__('Home','biznol').'
';
echo '- '.esc_html(get_bloginfo( 'name' )).'
';
else:
echo '- '.esc_html__('Home','biznol').'
';
// Blog Category
if ( is_category() ) {
echo '- ' . esc_html__('Archive by category','biznol').' "' . single_cat_title('', false) . '"
';
// Blog Day
} elseif ( is_day() ) {
echo '- '. esc_html(get_the_time( __( 'Y', 'biznol' ) )) .'';
echo '
- '. esc_html(get_the_time( __( 'F', 'biznol' ) ) ) .'';
echo '
- '. esc_html(get_the_time( __( 'd', 'biznol' ) )) .'
';
// Blog Month
} elseif ( is_month() ) {
echo '- ' . esc_html(get_the_time( __( 'Y', 'biznol' ) )) . '';
echo '
- '. esc_html(get_the_time( __( 'F', 'biznol' ) )) .'
';
// Blog Year
} elseif ( is_year() ) {
echo '- '. esc_html(get_the_time( __( 'Y', 'biznol' ) )) .'
';
// Single Post
} elseif ( is_single() && !is_attachment() && is_page('single-product') ) {
// Custom post type
if ( get_post_type() != 'post' ) {
$biznol_cat = get_the_category();
$biznol_cat = $biznol_cat[0];
echo '- ';
echo get_category_parents($biznol_cat, TRUE, '');
echo '
';
echo '- '. esc_html(get_the_title()) .'
';
} }
elseif ( is_page() && $post->post_parent ) {
$post_array = get_post_ancestors($post);
/**
* Sorts in descending order
*/
krsort($post_array);
/**
* Iterate for each post Id
*/
foreach($post_array as $key=>$postid){
/**
* @return object
*/
$post_ids = get_post($postid);
/**
* @return string title
*/
$title = $post_ids->post_title;
/* permalink */
echo '- ' . esc_html($title) . '
';
}
echo '- '.esc_html(get_the_title()).'
';
}
elseif( is_search() )
{
echo '- '. get_search_query() .'
';
}
elseif( is_404() )
{
echo '- '.esc_html__('Error 404','biznol').'
';
}
else {
// Default
echo '- '. esc_html(get_the_title(), $allowed_html ) .'
';
}
endif;
}
echo '
';
}
}
if (!function_exists('biznol_page_title')) {
function biznol_page_title() {
if (is_archive()) {
$biznol_archive = get_theme_mod('biznol_archive_prefix', esc_html__('Archive:', 'biznol'));
if (is_day()) :
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_archive), esc_html(get_the_date()));
elseif (is_month()) :
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_archive), esc_html(get_the_date()));
elseif (is_year()) :
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_archive), esc_html(get_the_date()));
elseif (is_category()):
$biznol_category = get_theme_mod('biznol_category_prefix', esc_html__('Category:', 'biznol'));
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_category), single_cat_title('', false));
elseif (is_tag()):
$biznol_tag_text = get_theme_mod('biznol_tag_prefix', esc_html__('Tag:', 'biznol'));
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_tag_text), single_tag_title('', false));
elseif (is_author()):
$biznol_author = get_theme_mod('biznol_author_prefix', esc_html__('All posts by:', 'biznol'));
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_author), esc_html(get_the_author()));
elseif (class_exists('WooCommerce') && is_shop()):
$biznol_shop = get_theme_mod('biznol_shop_prefix', esc_html__('Shop', 'biznol'));
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_shop), single_tag_title('', false));
elseif (is_archive()):
the_archive_title('', '
');
endif;
} elseif (is_search()) {
$biznol_search = get_theme_mod('search_prefix', __('Search results for:', 'biznol'));
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_search), get_search_query());
} elseif (is_404()) {
$biznol_404 = get_theme_mod('404_prefix', __('404: Page not found', 'biznol'));
printf(esc_html__('%1$s %2$s', 'biznol'), esc_html($biznol_404), '');
} else {
the_title();
}
}
}