ID, 'blogarise-meta-content-alignment', true); if (!empty($post_options)) { $page_layout = $post_options; } else { $page_layout = $global_alignment; } } return $classes; } add_filter('body_class', 'blogarise_body_classes'); /** * Add a pingback url auto-discovery header for singularly identifiable articles. */ function blogarise_pingback_header() { if (is_singular() && pings_open()) { echo ''; } } add_action('wp_head', 'blogarise_pingback_header'); /** * Returns posts. * * @since blogarise 1.0.0 */ if (!function_exists('blogarise_get_posts')): function blogarise_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('blogarise_get_block')) : /** * * @param null * * @return null * * @since blogarise 1.0.0 * */ function blogarise_get_block($block = 'grid', $section = 'post') { get_template_part('inc/ansar/hooks/blocks/block-' . $section, $block); } endif; if (!function_exists('blogarise_archive_title')) : /** * * @param null * * @return null * * @since blogarise 1.0.0 * */ function blogarise_archive_title($title) { if (is_category()) { $title = single_cat_title('', false); } elseif (is_tag()) { $title = single_tag_title('', false); } elseif (is_author()) { $title = '' . get_the_author() . ''; } elseif (is_post_type_archive()) { $title = post_type_archive_title('', false); } elseif (is_tax()) { $title = single_term_title('', false); } return $title; } endif; add_filter('get_the_archive_title', 'blogarise_archive_title'); /* Display Breadcrumbs */ if (!function_exists('blogarise_excerpt_length')) : /** * Simple excerpt length. * * @since 1.0.0 */ function blogarise_excerpt_length($length) { if (is_admin()) { return $length; } return 15; } endif; add_filter('excerpt_length', 'blogarise_excerpt_length', 999); /* Display Breadcrumbs */ if (!function_exists('blogarise_excerpt_more')) : /** * Simple excerpt more. * * @since 1.0.0 */ function blogarise_excerpt_more($more) { return '...'; } endif; add_filter('excerpt_more', 'blogarise_excerpt_more'); /** * @param $post_id * @param string $size * * @return mixed|string */ function blogarise_get_freatured_image_url($post_id, $size = 'blogarise-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('blogarise_categories_show')): function blogarise_categories_show() { ?>
%s', 'blogarise'), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; add_filter( 'woocommerce_show_page_title', 'blogarise_hide_shop_page_title' ); function blogarise_hide_shop_page_title( $title ) { if ( is_shop() ) $title = false; return $title; } function blogarise_footer_logo_size() { $blogarise_footer_logo_width = get_theme_mod('blogarise_footer_logo_width','210'); $blogarise_footer_logo_height = get_theme_mod('blogarise_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('url' => $post_link, 'title' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ) ), 'https://api.whatsapp.com/send?text=' ); ?>
" class="link " target="_blank" > " class="link " target="_blank" > " target="_blank" > " target="_blank" > " target="_blank" >
ID, 'blogarise-medium'); if($url) { ?>
$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('url' => $post_link, 'title' => rawurlencode( html_entity_decode( wp_strip_all_tags( $post_title ), ENT_COMPAT, 'UTF-8' ) ) ), 'https://api.whatsapp.com/send?text=' ); ?>
" class="link " target="_blank" > " class="link " target="_blank"> " class="link " target="_blank" > " class="link " target="_blank" > " class="link " target="_blank" > " class="link " target="_blank" > " class="link " target="_blank" >