ID, 'blogus-meta-content-alignment', true);
if (!empty($post_options)) {
$page_layout = $post_options;
} else {
$page_layout = $global_alignment;
}
}
if ( isset( $_COOKIE["blogus-site-mode-cookie"] ) ) {
$classes[] = $_COOKIE["blogus-site-mode-cookie"];
} else {
$classes[] = get_theme_mod( 'blogus_skin_mode', 'defaultcolor' );
}
return $classes;
}
add_filter('body_class', 'blogus_body_classes');
/**
* Add a pingback url auto-discovery header for singularly identifiable articles.
*/
function blogus_pingback_header() {
if (is_singular() && pings_open()) {
echo '';
}
}
add_action('wp_head', 'blogus_pingback_header');
/**
* Returns posts.
*
* @since blogus 1.0.0
*/
if (!function_exists('blogus_get_posts')):
function blogus_get_posts($number_of_posts, $category = '0') {
$ins_args = array(
'post_type' => 'post',
'posts_per_page' => absint($number_of_posts),
'post_status' => 'publish',
'orderby' => 'date',
'order' => 'DESC',
'ignore_sticky_posts' => true
);
$category = isset($category) ? $category : '0';
if (absint($category) > 0) {
$ins_args['cat'] = absint($category);
}
$all_posts = new WP_Query($ins_args);
return $all_posts;
}
endif;
if (!function_exists('blogus_get_block')) :
/**
*
* @param null
*
* @return null
*
* @since Blogus 1.0.0
*
*/
function blogus_get_block($block = 'grid', $section = 'post') {
get_template_part('inc/ansar/hooks/blocks/block-' . $section, $block);
}
endif;
/**
* @param $post_id
* @param string $size
*
* @return mixed|string
*/
function blogus_get_freatured_image_url($post_id, $size = 'blogus-featured'){
if (has_post_thumbnail($post_id)) {
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), $size);
$url = $thumb !== false ? '' . $thumb[0] . '' : '""';
} else {
$url = '';
}
return $url;
}
if (!function_exists('blogus_categories_show')):
function blogus_categories_show() { ?>
%s', 'blogus'),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'',
''
);
}
endif;
add_filter( 'woocommerce_show_page_title', 'blogus_hide_shop_page_title' );
function blogus_hide_shop_page_title( $title ) {
if ( is_shop() ) $title = false;
return $title;
}
function blogus_footer_logo_size() {
$blogus_footer_logo_width = get_theme_mod('blogus_footer_logo_width','210');
$blogus_footer_logo_height = get_theme_mod('blogus_footer_logo_height','70'); ?>
$post_link,),'https://www.facebook.com/sharer.php' );
$twitter_url = add_query_arg( array('url' => $post_link,'text' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ), ),
'http://twitter.com/share'
);
$email_title = str_replace( '&', '%26', $post_title );
$email_url = add_query_arg( array('subject' => wp_strip_all_tags( $email_title ),'body' => $post_link, ), 'mailto:' );
$linkedin_url = add_query_arg( array('url' => $post_link, 'title' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ) ),
'https://www.linkedin.com/sharing/share-offsite/?url'
);
$pinterest_url = add_query_arg( array('url' => $post_link,'title' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ) ),
'http://pinterest.com/pin/create/link/?url='
);
$reddit_url = add_query_arg( array('url' => $post_link,'title' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ) ),
'https://www.reddit.com/submit'
);
$telegram_url = add_query_arg( array('url' => $post_link, 'title' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ) ),
'https://t.me/share/url?url='
);
$whatsapp_url = add_query_arg( array('text' => $post_link, 'title' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ) ),
'https://api.whatsapp.com/send?text='
);
?>
ID, 'blogus-medium');
if($url) {
if ( blogus_get_option('post_image_type') == 'post_fix_height' ) { ?>
'; the_post_thumbnail( '', array( 'class'=>'img-responsive img-fluid' ) ); echo ''; ?>