grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026
preloader
max_num_pages; $pagination = woodmart_get_opt( 'blog_pagination' ); $blog_design = woodmart_get_opt( 'blog_design' ); $blog_spacing = woodmart_get_opt( 'blog_spacing' ); $id = uniqid(); // fix bug with wrong escaped url generated by next_posts() call if ( is_search() ) { $pagination = 'pagination'; } $classes = 'blog-pagination-' . $pagination; if ( $blog_design == 'masonry' || $blog_design == 'mask' ) { $classes .= ' masonry-container'; $classes .= ' woodmart-spacing-' . $blog_spacing; $classes .= ' row'; woodmart_enqueue_script( 'isotope' ); woodmart_enqueue_script( 'woodmart-packery-mode' ); } $is_ajax = woodmart_is_woo_ajax(); if ( ! $paged ) { $paged = 1; } ?>
1 && $pagination ) : ?> $output, 'status' => ( $max_page > $paged ) ? 'have-posts' : 'no-more-posts', 'nextPage' => add_query_arg( 'woo_ajax', '1', next_posts( $max_page, false ) ), ); echo json_encode( $output ); } } } /** * ------------------------------------------------------------------------------------------------ * Footer woodmart extra action * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'woodmart_extra_footer_action' ) ) { function woodmart_extra_footer_action() { if ( woodmart_needs_footer() && ! woodmart_is_compare_iframe() ) { do_action( 'woodmart_after_footer' ); } } add_action( 'wp_footer', 'woodmart_extra_footer_action', 500 ); } /** * ------------------------------------------------------------------------------------------------ * Read more button * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'woodmart_modify_read_more_link' ) ) { function woodmart_modify_read_more_link() { return '

' . woodmart_read_more_tag(); } } add_filter( 'the_content_more_link', 'woodmart_modify_read_more_link' ); if ( ! function_exists( 'woodmart_read_more_tag' ) ) { function woodmart_read_more_tag() { return '' . esc_html__( 'Continue reading', 'woodmart' ) . ''; } } /** * ------------------------------------------------------------------------------------------------ * Get post image * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'woodmart_get_post_thumbnail' ) ) { function woodmart_get_post_thumbnail( $size = 'medium', $attach_id = false ) { global $post; if ( has_post_thumbnail() ) { if ( woodmart_is_elementor_installed() ) { if ( ! $attach_id ) { $attach_id = get_post_thumbnail_id(); } if ( woodmart_loop_prop( 'img_size' ) ) { $size = woodmart_loop_prop( 'img_size' ); } $custom_sizes = woodmart_loop_prop( 'img_size_custom' ); if ( is_array( $size ) ) { $custom_sizes['width'] = $size[0]; $custom_sizes['height'] = $size[1]; $size = 'custom'; } $img = woodmart_get_image_html( // phpcs:ignore array( 'image_size' => $size, 'image_custom_dimension' => $custom_sizes, 'image' => array( 'id' => $attach_id, ), ), 'image' ); } elseif ( function_exists( 'wpb_getImageBySize' ) ) { if ( ! $attach_id ) { $attach_id = get_post_thumbnail_id(); } if ( woodmart_loop_prop( 'img_size' ) ) { $size = woodmart_loop_prop( 'img_size' ); } $img = wpb_getImageBySize( array( 'attach_id' => $attach_id, 'thumb_size' => $size, 'class' => 'attachment-large wp-post-image', ) ); $img = $img['thumbnail']; } else { $img = get_the_post_thumbnail( $post->ID, $size ); } return $img; } } } /** * ------------------------------------------------------------------------------------------------ * Get post content * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'woodmart_get_content' ) ) { function woodmart_get_content( $btn = true, $force_full = false ) { global $post; $type = woodmart_get_opt( 'blog_excerpt' ); if ( $force_full ) { $type = 'full'; } if ( $type == 'full' ) { woodmart_get_full_content( $btn ); } elseif ( $type == 'excerpt' ) { if ( ! empty( $post->post_excerpt ) ) { the_excerpt(); } else { $excerpt_length = apply_filters( 'woodmart_get_excerpt_length', woodmart_get_opt( 'blog_excerpt_length' ) ); echo woodmart_excerpt_from_content( $post->post_content, intval( $excerpt_length ) ); } if ( $btn ) { echo '

' . woodmart_read_more_tag() . '

'; } } } } if ( ! function_exists( 'woodmart_get_full_content' ) ) { function woodmart_get_full_content( $btn = false ) { $strip_gallery = apply_filters( 'woodmart_strip_gallery', true ); if ( get_post_format() == 'gallery' && $strip_gallery ) { if ( $btn ) { $content = woodmart_strip_shortcode_gallery( get_the_content() ); } else { $content = woodmart_strip_shortcode_gallery( get_the_content( '' ) ); } echo str_replace( ']]>', ']]>', apply_filters( 'the_content', $content ) ); } else { if ( $btn ) { the_content(); } else { the_content( '' ); } } } } /** * ------------------------------------------------------------------------------------------------ * Display meta information for a specific post * ------------------------------------------------------------------------------------------------ */ if ( ! function_exists( 'woodmart_post_meta' ) ) { function woodmart_post_meta( $atts = array() ) { extract( shortcode_atts( array( 'author' => 1, 'author_ava' => 0, 'date' => 1, 'cats' => 0, 'tags' => 0, 'labels' => 0, 'short_labels' => false, 'edit' => 1, 'comments' => 1, 'limit_cats' => 0, ), $atts ) ); ?>
max_num_pages; if ( ! $pages ) { $pages = 1; } } if ( 1 != $pages ) { echo "
"; if ( $paged > 2 && $paged > $range + 1 && $showitems < $pages ) { echo "«"; } if ( $paged > 1 && $showitems < $pages ) { echo "‹"; } for ( $i = 1; $i <= $pages; $i++ ) { if ( 1 != $pages && ( ! ( $i >= $paged + $range + 1 || $i <= $paged - $range - 1 ) || $pages <= $showitems ) ) { if ( $paged == $i ) { echo "" . $i . ''; } else { echo "" . $i . ''; } } } if ( $paged < $pages && $showitems < $pages ) { echo "›"; } if ( $paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages ) { echo "»"; } echo "
\n"; } } } // **********************************************************************// // ! Add favicon // **********************************************************************// if ( ! function_exists( 'woodmart_favicon' ) ) { function woodmart_favicon() { if ( function_exists( 'has_site_icon' ) && has_site_icon() ) { return ''; } // Get the favicon. $favicon = WOODMART_IMAGES . '/icons/favicon.png'; // Get the custom touch icon. $touch_icon = WOODMART_IMAGES . '/icons/apple-touch-icon-152x152-precomposed.png'; $fav_uploaded = woodmart_get_opt( 'favicon' ); if ( isset( $fav_uploaded['url'] ) && $fav_uploaded['url'] != '' ) { $favicon = $fav_uploaded['url']; } $fav_uploaded_retina = woodmart_get_opt( 'favicon_retina' ); if ( isset( $fav_uploaded_retina['url'] ) && $fav_uploaded_retina['url'] != '' ) { $touch_icon = $fav_uploaded_retina['url']; } ?>
jQuery( document ).ready(function( $ ) { var owl = $("# .owl-carousel"); $( window ).bind( "vc_js", function() { owl.trigger('refresh.owl.carousel'); } ); var options = { rtl: $('body').hasClass('rtl'), items: , responsive: { 1025: { items: }, 769: { items: }, 577: { items: }, 0: { items: } }, autoplay: , autoplayHoverPause: , autoplayTimeout: , dots: , nav: , autoHeight: , slideBy: , navText:false, center: , loop: , dragEndSpeed: , onRefreshed: function() { $(window).resize(); } ,smartSpeed: , dragEndSpeed: ,animateOut: '' ,mouseDrag: false ,onTranslated: determinePseudoActive }; owl.owlCarousel(options); owl.imagesLoaded(function(){ owl.trigger('refresh.owl.carousel'); }); determinePseudoActive(); function determinePseudoActive() { var id = owl.find('.owl-item.active').find('.woodmart-slide').attr('id'); owl.find('.owl-item.pseudo-active').removeClass('pseudo-active'); var els = owl.find('[id="' + id + '"]'); els.each(function() { if( ! $(this).parent().hasClass('active') ) { $(this).parent().addClass('pseudo-active'); } }); } }); ' . $func_name() . ''; } } if ( ! function_exists( 'woodmart_get_owl_atts' ) ) { function woodmart_get_owl_atts() { return array( 'carousel_id' => '5000', 'speed' => '5000', 'slides_per_view' => '1', 'wrap' => '', 'loop' => false, 'autoplay' => 'no', 'autoheight' => 'no', 'hide_pagination_control' => '', 'hide_prev_next_buttons' => '', 'carousel_js_inline' => 'no', 'scroll_per_page' => 'yes', 'dragEndSpeed' => 200, 'center_mode' => 'no', 'custom_sizes' => '', 'sliding_speed' => false, 'animation' => false, 'content_animation' => false, 'post_type' => '', ); } } if ( ! function_exists( 'woodmart_get_owl_attributes' ) ) { function woodmart_get_owl_attributes( $atts = array(), $witout_init = false ) { $default_atts = woodmart_get_owl_atts(); $atts = shortcode_atts( $default_atts, $atts ); $output = $witout_init ? array() : array( 'data-owl-carousel' ); foreach ( $atts as $key => $value ) { if ( isset( $default_atts[ $key ] ) && $default_atts[ $key ] == $value ) { unset( $atts[ $key ] ); } } $slides_per_view = isset( $atts['slides_per_view'] ) ? $atts['slides_per_view'] : $default_atts['slides_per_view']; $post_type = isset( $atts['post_type'] ) ? $atts['post_type'] : $default_atts['post_type']; $custom_sizes = isset( $atts['custom_sizes'] ) ? $atts['custom_sizes'] : false; $items = woodmart_get_owl_items_numbers( $slides_per_view, $post_type, $custom_sizes ); $excerpt = array( 'slides_per_view', 'post_type', 'custom_sizes', 'loop', 'carousel_id', 'carousel_js_inline', ); foreach ( $atts as $key => $value ) { if ( in_array( $key, $excerpt ) ) { continue; } $output[] = 'data-' . $key . '="' . $value . '"'; } foreach ( $items as $key => $value ) { $output[] = 'data-' . $key . '="' . $value . '"'; } return implode( ' ', $output ); } } // **********************************************************************// // ! Page title function // **********************************************************************// if ( ! function_exists( 'woodmart_page_title' ) ) { add_action( 'woodmart_after_header', 'woodmart_page_title', 10 ); function woodmart_page_title() { global $wp_query, $post; // Remove page title for dokan store list page if ( function_exists( 'dokan_is_store_page' ) && dokan_is_store_page() ) { return ''; } $page_id = 0; $disable = false; $page_title = true; $breadcrumbs = woodmart_get_opt( 'breadcrumbs' ); $image = ''; $style = ''; $page_for_posts = get_option( 'page_for_posts' ); $page_for_shop = get_option( 'woocommerce_shop_page_id' ); $page_for_projects = woodmart_tpl2id( 'portfolio.php' ); $title_class = 'page-title-'; $title_color = $title_type = $title_size = 'default'; // Get default styles from Options Panel $title_design = woodmart_get_opt( 'page-title-design' ); $title_size = woodmart_get_opt( 'page-title-size' ); $title_color = woodmart_get_opt( 'page-title-color' ); $shop_title = woodmart_get_opt( 'shop_title' ); $shop_categories = woodmart_get_opt( 'shop_categories' ); $single_post_design = woodmart_get_opt( 'single_post_design' ); // Set here page ID. Will be used to get custom value from metabox of specific PAGE | BLOG PAGE | SHOP PAGE. $page_id = woodmart_page_ID(); if ( $page_id != 0 ) { // Get meta value for specific page id $disable = get_post_meta( $page_id, '_woodmart_title_off', true ); $image = get_post_meta( $page_id, '_woodmart_title_image', true ); $custom_title_color = get_post_meta( $page_id, '_woodmart_title_color', true ); $custom_title_bg_color = get_post_meta( $page_id, '_woodmart_title_bg_color', true ); if ( $image != '' ) { $style .= 'background-image: url(' . $image . ');'; } if ( $custom_title_bg_color != '' ) { $style .= 'background-color: ' . $custom_title_bg_color . ';'; } if ( $custom_title_color != '' && $custom_title_color != 'default' ) { $title_color = $custom_title_color; } } if ( $title_design == 'disable' ) { $page_title = false; } if ( ! $page_title && ! $breadcrumbs ) { $disable = true; } if ( is_single() && $single_post_design == 'large_image' ) { $disable = false; } if ( $disable ) { return; } $title_class .= $title_type; $title_class .= ' title-size-' . $title_size; $title_class .= ' title-design-' . $title_design; if ( $single_post_design == 'large_image' && is_single() ) { $title_class .= ' color-scheme-light'; } else { $title_class .= ' color-scheme-' . $title_color; } if ( $single_post_design == 'large_image' && is_singular( 'post' ) ) { $image_url = get_the_post_thumbnail_url( $page_id ); if ( $image_url && ! $style ) { $style .= 'background-image: url(' . $image_url . ');'; } $title_class .= ' post-title-large-image'; ?>

' . single_cat_title( '', false ) . ''; } if ( is_date() ) { if ( is_day() ) : $title = esc_html__( 'Daily Archives: ', 'woodmart' ) . get_the_date(); elseif ( is_month() ) : $title = esc_html__( 'Monthly Archives: ', 'woodmart' ) . get_the_date( _x( 'F Y', 'monthly archives date format', 'woodmart' ) ); elseif ( is_year() ) : $title = esc_html__( 'Yearly Archives: ', 'woodmart' ) . get_the_date( _x( 'Y', 'yearly archives date format', 'woodmart' ) ); else : $title = esc_html__( 'Archives', 'woodmart' ); endif; } if ( is_author() ) { /* * Queue the first post, that way we know what author * we're dealing with (if that is the case). * * We reset this later so we can run the loop * properly with a call to rewind_posts(). */ the_post(); $title = esc_html__( 'Posts by ', 'woodmart' ) . '' . get_the_author() . ''; /* * Since we called the_post() above, we need to * rewind the loop back to the beginning that way * we can run the loop properly, in full. */ rewind_posts(); } if ( is_search() ) { $title = esc_html__( 'Search Results for: ', 'woodmart' ) . get_search_query(); } ?>

get_queried_object(); $cat_image = woodmart_get_category_page_title_image( $cat ); if ( $cat_image != '' ) { $style = 'background-image: url(' . $cat_image . ')'; } } if ( is_product_category() || is_product_tag() ) { $title_class .= ' with-back-btn'; } if ( ! $shop_title ) { $title_class .= ' without-title'; } ?>
term_id, $meta_key, true ); if ( $cat_image != '' ) { return $cat_image; } elseif ( ! empty( $cat->parent ) ) { $parent = get_term_by( 'term_id', $cat->parent, $taxonomy ); return woodmart_get_category_page_title_image( $parent ); } else { return ''; } } } // **********************************************************************// // ! Breacdrumbs function // ! Snippet from http://dimox.net/wordpress-breadcrumbs-without-a-plugin/ // **********************************************************************// if ( ! function_exists( 'woodmart_breadcrumbs' ) ) { function woodmart_breadcrumbs() { /* === OPTIONS === */ $text['home'] = esc_html__( 'Home', 'woodmart' ); // text for the 'Home' link $text['category'] = esc_html__( 'Archive by Category "%s"', 'woodmart' ); // text for a category page $text['search'] = esc_html__( 'Search Results for "%s" Query', 'woodmart' ); // text for a search results page $text['tag'] = esc_html__( 'Posts Tagged "%s"', 'woodmart' ); // text for a tag page $text['author'] = esc_html__( 'Articles Posted by %s', 'woodmart' ); // text for an author page $text['404'] = esc_html__( 'Error 404', 'woodmart' ); // text for the 404 page $show_current_post = 0; // 1 - show current post $show_current = 1; // 1 - show current post/page/category title in breadcrumbs, 0 - don't show $show_on_home = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show $show_home_link = 1; // 1 - show the 'Home' link, 0 - don't show $show_title = 1; // 1 - show the title for the links, 0 - don't show $delimiter = ' » '; // delimiter between crumbs $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb /* === END OF OPTIONS === */ global $post; $home_link = home_url( '/' ); $link_before = ''; $link_after = ''; $link_attr = ' rel="v:url" property="v:title"'; $link = $link_before . '%2$s' . $link_after; $parent_id = $parent_id_2 = ( ! empty( $post ) && is_a( $post, 'WP_Post' ) ) ? $post->post_parent : 0; $frontpage_id = get_option( 'page_on_front' ); $projects_id = woodmart_tpl2id( 'portfolio.php' ); if ( is_home() || is_front_page() ) { if ( $show_on_home == 1 ) { echo ''; } } else { echo ''; } } } // **********************************************************************// // ! Promo popup // **********************************************************************// if ( ! function_exists( 'woodmart_promo_popup' ) ) { add_action( 'woodmart_after_footer', 'woodmart_promo_popup', 200 ); function woodmart_promo_popup() { if ( ! woodmart_get_opt( 'promo_popup' ) ) { return; } ?>
name ), $category ); // Don't generate an element if the category name is empty. if ( ! $cat_name ) { return; } $link = 'description ) ) { /** * Filters the category description for display. * * @since 1.2.0 * * @param string $description Category description. * @param object $category Category object. */ $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"'; } $link .= '>'; $link .= $cat_name . ''; if ( ! empty( $args['feed_image'] ) || ! empty( $args['feed'] ) ) { $link .= ' '; if ( empty( $args['feed_image'] ) ) { $link .= '('; } $link .= ''; } $link .= ''; if ( empty( $args['feed_image'] ) ) { $link .= ')'; } } if ( ! empty( $args['show_count'] ) ) { $link .= ' (' . number_format_i18n( $category->count ) . ')'; } if ( 'list' == $args['style'] ) { $output .= "\tterm_id, ); if ( ! empty( $args['current_category'] ) ) { // 'current_category' can be an array, so we use `get_terms()`. $_current_terms = get_terms( $category->taxonomy, array( 'include' => $args['current_category'], 'hide_empty' => false, ) ); foreach ( $_current_terms as $_current_term ) { if ( $category->term_id == $_current_term->term_id ) { $css_classes[] = 'current-cat pf-active'; } elseif ( $category->term_id == $_current_term->parent ) { $css_classes[] = 'current-cat-parent'; } while ( $_current_term->parent ) { if ( $category->term_id == $_current_term->parent ) { $css_classes[] = 'current-cat-ancestor'; break; } $_current_term = get_term( $_current_term->parent, $category->taxonomy ); } } } /** * Filters the list of CSS classes to include with each category in the list. * * @since 4.2.0 * * @see wp_list_categories() * * @param array $css_classes An array of CSS classes to be applied to each list item. * @param object $category Category data object. * @param int $depth Depth of page, used for padding. * @param array $args An array of wp_list_categories() arguments. */ $css_classes = implode( ' ', apply_filters( 'category_css_class', $css_classes, $category, $depth, $args ) ); $output .= ' class="' . $css_classes . '"'; $output .= ">$link\n"; } elseif ( isset( $args['separator'] ) ) { $output .= "\t$link" . $args['separator'] . "\n"; } else { $output .= "\t$link
\n"; } } } if ( ! function_exists( 'woodmart_mobile_menu' ) ) { function woodmart_mobile_menu() { $menu_locations = get_nav_menu_locations(); $location = apply_filters( 'woodmart_main_menu_location', 'main-menu' ); $menu_link = get_admin_url( null, 'nav-menus.php' ); $search_args = array(); $nav_classes = ''; $search_form = true; $settings = whb_get_settings(); $toolbar_fields = woodmart_get_opt( 'sticky_toolbar_fields' ); if ( isset( $settings['search'] ) ) { $search_args['post_type'] = $settings['search']['post_type']; $search_args['ajax'] = $settings['search']['ajax']; } if ( isset( $settings['burger'] ) || in_array( 'mobile', $toolbar_fields ) || in_array( 'search_args', $toolbar_fields ) ) { $mobile_categories = isset( $settings['burger']['categories_menu'] ) ? $settings['burger']['categories_menu'] : false; $search_form = isset( $settings['burger']['search_form'] ) ? $settings['burger']['search_form'] : true; $position = isset( $settings['burger']['position'] ) ? $settings['burger']['position'] : 'left'; $mobile_categories_menu = ( $mobile_categories ) ? $settings['burger']['menu_id'] : ''; } else { return ''; } $nav_classes .= ' slide-from-' . $position; $pages_active = 'active'; $categories_active = ''; if ( isset( $settings['burger']['tabs_swap'] ) && $settings['burger']['tabs_swap'] ) { $pages_active = ''; $categories_active = 'active'; $nav_classes .= ' wd-mobile-tabs-swap'; } echo '
'; if ( $search_form ) { woodmart_search_form( $search_args ); } if ( $mobile_categories ) { ?>
'; if ( ! empty( $mobile_categories_menu ) ) { wp_nav_menu( array( 'menu' => $mobile_categories_menu, 'menu_class' => 'site-mobile-menu', 'walker' => new WOODMART_Mega_Menu_Walker(), ) ); } else { ?> Header -> Menu -> Mobile menu (categories)', 'woodmart' ); ?> '; } echo '
'; if ( isset( $menu_locations['mobile-menu'] ) && $menu_locations['mobile-menu'] != 0 ) { $location = 'mobile-menu'; } if ( has_nav_menu( $location ) ) { wp_nav_menu( array( 'theme_location' => $location, 'menu_class' => 'site-mobile-menu', 'walker' => new WOODMART_Mega_Menu_Walker(), ) ); } else { ?> navigation menu here', 'woodmart' ), array( 'a' => array( 'href' => array(), ), ) ), $menu_link ); ?> '; ?>
'; } add_action( 'wp_footer', 'woodmart_mobile_menu', 130 ); } // **********************************************************************// // Header banner // **********************************************************************// if ( ! function_exists( 'woodmart_header_banner' ) ) { function woodmart_header_banner() { if ( ! woodmart_get_opt( 'header_banner' ) ) { return; } $banner_link = woodmart_get_opt( 'header_banner_link' ); ?>
' . esc_html( $rating ) . '', '5' ); ?>
You must correctly enter the twitter access keys

'; } if ( ! isset( $args['name'] ) ) { $args['name'] = 'Twitter'; } if ( ! isset( $args['num_tweets'] ) ) { $args['num_tweets'] = 5; } if ( ! isset( $args['consumer_key'] ) ) { $args['consumer_key'] = ''; } if ( ! isset( $args['consumer_secret'] ) ) { $args['consumer_secret'] = ''; } if ( ! isset( $args['access_token'] ) ) { $args['access_token'] = ''; } if ( ! isset( $args['accesstoken_secret'] ) ) { $args['accesstoken_secret'] = ''; } if ( ! isset( $args['exclude_replies'] ) ) { $args['exclude_replies'] = ''; } $connection = new TwitterOAuth( $args['consumer_key'], // Consumer key $args['consumer_secret'], // Consumer secret $args['access_token'], // Access token $args['accesstoken_secret'] // Access token secret ); $posts_data_transient_name = 'wood-twitter-posts-data-' . sanitize_title_with_dashes( $args['name'] . $args['num_tweets'] . $args['exclude_replies'] ); $fetchedTweets = maybe_unserialize( base64_decode( get_transient( $posts_data_transient_name ) ) ); if ( ! $fetchedTweets ) { $fetchedTweets = $connection->get( 'statuses/user_timeline', array( 'screen_name' => $args['name'], 'count' => $args['num_tweets'], 'exclude_replies' => ( isset( $args['exclude_replies'] ) ) ? $args['exclude_replies'] : '', ) ); if ( $connection->http_code != 200 ) { echo esc_html__( 'Twitter not return 200', 'woodmart' ); return; } $encode_posts = base64_encode( maybe_serialize( $fetchedTweets ) ); set_transient( $posts_data_transient_name, $encode_posts, apply_filters( 'wood_twitter_cache_time', HOUR_IN_SECONDS * 2 ) ); } if ( ! $fetchedTweets ) { echo esc_html__( 'Twitter not return any data', 'woodmart' ); } $limitToDisplay = min( $args['num_tweets'], count( $fetchedTweets ) ); for ( $i = 0; $i < $limitToDisplay; $i++ ) { $tweet = $fetchedTweets[ $i ]; // Core info. $name = $tweet->user->name; // COMMUNITY REQUEST !!!!!! (2) $screen_name = $tweet->user->screen_name; $permalink = 'https://twitter.com/' . $screen_name . '/status/' . $tweet->id_str; $tweet_id = $tweet->id_str; // Check for SSL via protocol https then display relevant image - thanks SO - this should do if ( is_ssl() ) { $image = $tweet->user->profile_image_url_https; } else { $image = $tweet->user->profile_image_url; } // Process Tweets - Use Twitter entities for correct URL, hash and mentions $text = woodmart_twitter_process_links( $tweet ); // lets strip 4-byte emojis $text = preg_replace( '/[\xF0-\xF7][\x80-\xBF]{3}/', '', $text ); // Need to get time in Unix format. $time = $tweet->created_at; $time = date_parse( $time ); $uTime = mktime( $time['hour'], $time['minute'], $time['second'], $time['month'], $time['day'], $time['year'] ); // Now make the new array. $tweets[] = array( 'text' => $text, 'name' => $name, 'permalink' => $permalink, 'image' => $image, 'time' => $uTime, 'tweet_id' => $tweet_id, ); } // Now display the tweets, if we can. if ( isset( $tweets ) ) { ?>
woodmart_get_opt( 'sticky_social_type' ), 'el_class' => $classes, 'style' => 'colored', 'size' => 'custom', 'form' => 'square', ); echo woodmart_shortcode_social( $atts ); } add_action( 'woodmart_after_footer', 'woodmart_get_sticky_social', 200 ); } // **********************************************************************// // Get current breadcrumbs // **********************************************************************// if ( ! function_exists( 'woodmart_current_breadcrumbs' ) ) { function woodmart_current_breadcrumbs( $type ) { $function = ( $type == 'shop' ) ? 'woocommerce_breadcrumb' : 'woodmart_breadcrumbs'; if ( woodmart_get_opt( 'yoast_' . $type . '_breadcrumbs' ) && function_exists( 'yoast_breadcrumb' ) ) { echo '
'; echo yoast_breadcrumb(); echo '
'; } else { $function(); } } } // **********************************************************************// // Display icon // **********************************************************************// if ( ! function_exists( 'woodmart_display_icon' ) ) { function woodmart_display_icon( $img_id, $img_size, $default_size ) { $icon = wpb_getImageBySize( array( 'attach_id' => $img_id, 'thumb_size' => $img_size, ) ); $icon_src = $icon['p_img_large'][0]; $icon_id = rand( 999, 9999 ); $sizes = woodmart_get_explode_size( $img_size, $default_size ); if ( woodmart_is_svg( $icon_src ) ) { return '' . woodmart_get_any_svg( $icon_src, $icon_id ) . ''; } else { return '' . $icon['thumbnail'] . ''; } } }