$ticker_category, 'posts_per_page' => -1 )); if($loop->have_posts()) { ?>
1 ){ $i=0; $e_title .= "

".$arr[$i++]; if($count>=2){$e_title .= " ".$arr[$i++];} if($count>=3){$e_title .= " ".$arr[$i++];} $e_title .= "

"; $e_title .= "

"; for ($j=$i; $j < $count; $j++) { $e_title .= $arr[$j]." "; } $e_title .= "

"; echo apply_filters('the_title', $e_title); }else{ echo apply_filters('the_title', $title); } } //homepage slider configuration settings function eightstore_lite_homepage_slider_config(){ $display_slider = get_theme_mod('display_slider','1'); $display_pager = (get_theme_mod('display_pager','1')=="0") ? "false" : "true"; $display_controls = (get_theme_mod('display_controls','1') == "0") ? "false" : "true"; $auto_transition = (get_theme_mod('enable_auto_transition','1') == "0") ? "false" : "true"; $transition_type = get_theme_mod('transition_type','true'); $transition_speed = (!get_theme_mod('transition_speed')) ? "1000" : get_theme_mod('transition_speed'); if( $display_slider != "0") : ?>
$slider_category, 'posts_per_page' => -1 )); if($loop->have_posts()) : while($loop->have_posts()) : $loop-> the_post(); $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full', false ); ?>
<?php _e('Partner Logo 1', 'eightstore-lite') ?> <?php _e('Partner Logo 2', 'eightstore-lite') ?> <?php _e('Partner Logo 3', 'eightstore-lite') ?> <?php _e('Partner Logo 4', 'eightstore-lite') ?> <?php _e('SSL Seal', 'eightstore-lite') ?> <?php _e('Other Seal 1', 'eightstore-lite') ?> <?php _e('Other Seal 2', 'eightstore-lite') ?>
ID, $size ); } elseif ( wc_placeholder_img_src() ) { $placeholder = eightstore_lite_wc_placeholder_img_src(); $alt = get_the_title(); $placeholder_img = ''.$alt.''; return $placeholder_img; } } function eightstore_lite_wc_placeholder_img_src(){ $placeholder = ""; $custom_placeholder = get_theme_mod('wc_custom_placeholder'); if($custom_placeholder!='') { $placeholder = $custom_placeholder; } else { $placeholder = get_template_directory_uri()."/images/noimage.png";//wc_placeholder_img_src(); } return $placeholder; } add_filter('loop_shop_columns', 'eightstore_lite_loop_columns'); if (!function_exists('eightstore_lite_loop_columns')) { function eightstore_lite_loop_columns() { // Change number or products per row to $x if(get_theme_mod('wc_product_number_rows') && get_theme_mod('wc_product_number_rows')>0){ $xr = get_theme_mod('wc_product_number_rows'); } else { $xr = 4; } return $xr; } } global $num_products; // Display $num_products products per page. if(get_theme_mod('wc_product_number_total') && get_theme_mod('wc_product_number_total')>0){ $num_products = get_theme_mod('wc_product_number_total'); } else { $num_products = 12; } add_filter( 'loop_shop_per_page', create_function( '$cols', 'return '.$num_products.';' ), 20 ); endif; //Declare Woocommerce support add_action( 'after_setup_theme', 'eightstore_lite_woocommerce_support' ); function eightstore_lite_woocommerce_support() { add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); add_action('woocommerce_before_main_content', 'eightstore_lite_wrapper_start', 10); add_action('woocommerce_after_main_content', 'eightstore_lite_wrapper_end', 10); function eightstore_lite_wrapper_start() { echo '
'; } function eightstore_lite_wrapper_end() { echo '
'; } /** * Truncates text without breaking HTML Code */ function eightstore_lite_excerpt($eightstore_lite_text, $eightstore_lite_length = 100, $eightstore_lite_ending = '...', $eightstore_lite_exact = true, $eightstore_lite_considerHtml = true) { if ($eightstore_lite_considerHtml) { // if the plain text is shorter than the maximum length, return the whole text if (strlen(preg_replace('/<.*?>/', '', $eightstore_lite_text)) <= $eightstore_lite_length) { return $eightstore_lite_text; } // splits all html-tags to scanable lines preg_match_all('/(<.+?>)?([^<>]*)/s', $eightstore_lite_text, $eightstore_lite_lines, PREG_SET_ORDER); $eightstore_lite_total_length = strlen($eightstore_lite_ending); $eightstore_lite_open_tags = array(); $eightstore_lite_truncate = ''; foreach ($eightstore_lite_lines as $eightstore_lite_line_matchings) { // if there is any html-tag in this line, handle it and add it (uncounted) to the output if (!empty($eightstore_lite_line_matchings[1])) { // if it’s an “empty element” with or without xhtml-conform closing slash (f.e.) if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $eightstore_lite_line_matchings[1])) { // do nothing // if tag is a closing tag (f.e.) } else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $eightstore_lite_line_matchings[1], $eightstore_lite_tag_matchings)) { // delete tag from $open_tags list $eightstore_lite_pos = array_search($eightstore_lite_tag_matchings[1], $eightstore_lite_open_tags); if ($eightstore_lite_pos !== false) { unset($eightstore_lite_open_tags[$eightstore_lite_pos]); } // if tag is an opening tag (f.e. ) } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $eightstore_lite_line_matchings[1], $eightstore_lite_tag_matchings)) { // add tag to the beginning of $open_tags list array_unshift($eightstore_lite_open_tags, strtolower($eightstore_lite_tag_matchings[1])); } // add html-tag to $truncate’d text $eightstore_lite_truncate .= $eightstore_lite_line_matchings[1]; } // calculate the length of the plain text part of the line; handle entities as one character $eightstore_lite_content_length = strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $eightstore_lite_line_matchings[2])); if ($eightstore_lite_total_length+$eightstore_lite_content_length > $eightstore_lite_length) { // the number of characters which are left $eightstore_lite_left = $eightstore_lite_length - $eightstore_lite_total_length; $eightstore_lite_entities_length = 0; // search for html entities if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', $eightstore_lite_line_matchings[2], $eightstore_lite_entities, PREG_OFFSET_CAPTURE)) { // calculate the real length of all entities in the legal range foreach ($eightstore_lite_entities[0] as $eightstore_lite_entity) { if ($eightstore_lite_entity[1]+1-$eightstore_lite_entities_length <= $eightstore_lite_left) { $eightstore_lite_left--; $eightstore_lite_entities_length += strlen($eightstore_lite_entity[0]); } else { // no more characters left break; } } } $eightstore_lite_truncate .= substr($eightstore_lite_line_matchings[2], 0, $eightstore_lite_left+$eightstore_lite_entities_length); // maximum lenght is reached, so get off the loop break; } else { $eightstore_lite_truncate .= $eightstore_lite_line_matchings[2]; $eightstore_lite_total_length += $eightstore_lite_content_length; } // if the maximum length is reached, get off the loop if($eightstore_lite_total_length >= $eightstore_lite_length) { break; } } } else { if (strlen($eightstore_lite_text) <= $eightstore_lite_length) { return $eightstore_lite_text; } else { $eightstore_lite_truncate = substr($eightstore_lite_text, 0, $eightstore_lite_length - strlen($eightstore_lite_ending)); } } // if the words shouldn't be cut in the middle... if (!$eightstore_lite_exact) { // ...search the last occurance of a space... $eightstore_lite_spacepos = strrpos($eightstore_lite_truncate, ' '); if (isset($eightstore_lite_spacepos)) { // ...and cut the text in this position $eightstore_lite_truncate = substr($eightstore_lite_truncate, 0, $eightstore_lite_spacepos); } } // add the defined ending to the text $eightstore_lite_truncate .= $eightstore_lite_ending; if($eightstore_lite_considerHtml) { // close all unclosed html-tags foreach ($eightstore_lite_open_tags as $eightstore_lite_tag) { $eightstore_lite_truncate .= ''; } } return $eightstore_lite_truncate; } function eightstore_lite_fonts_cb(){ echo ""; } add_action('wp_footer', 'eightstore_lite_fonts_cb');