function widget($args, $instance)
 {
     ob_start();
     parent::widget($args, $instance);
     $output = ob_get_clean();
     echo Everything::woocommerceWidgetParseNav($output);
 }
Пример #2
0
 /**
  * "Start" the application:
  * Analyze the URL elements and calls the according controller/method or the fallback
  */
 public function __construct()
 {
     // create array with URL parts in $url
     $this->splitUrl();
     // check for controller: no controller given ? then load start-page
     if (!$this->url_controller) {
         require APP . 'controller/everything.php';
         $page = new Everything();
         $page->index();
     } elseif (file_exists(APP . 'controller/' . $this->url_controller . '.php')) {
         // here we did check for controller: does such a controller exist ?
         // if so, then load this file and create this controller
         // example: if controller would be "car", then this line would translate into: $this->car = new car();
         require APP . 'controller/' . $this->url_controller . '.php';
         $this->url_controller = new $this->url_controller();
         // check for method: does such a method exist in the controller ?
         if (method_exists($this->url_controller, $this->url_action)) {
             if (!empty($this->url_params)) {
                 // Call the method and pass arguments to it
                 call_user_func_array(array($this->url_controller, $this->url_action), $this->url_params);
             } else {
                 // If no parameters are given, just call the method without parameters, like $this->home->method();
                 $this->url_controller->{$this->url_action}();
             }
         } else {
             if (strlen($this->url_action) == 0) {
                 // no action defined: call the default index() method of a selected controller
                 $this->url_controller->index();
             } else {
                 header('location: ' . URL . 'error');
             }
         }
     } else {
         header('location: ' . URL . 'error');
     }
 }
Пример #3
0
function woocommerce_subcategory_thumbnail($category)
{
    // Figure
    $figure = \Drone\HTML::figure()->class('featured full-width');
    // Hyperlink
    $a = $figure->addNew('a')->attr(Everything::getImageAttrs('a', array('fancybox' => false)))->href(get_term_link($category->slug, 'product_cat'));
    // Thumbnail
    $thumbnail_id = get_woocommerce_term_meta($category->term_id, 'thumbnail_id', true);
    $thumbnail_size = apply_filters('single_product_small_thumbnail_size', 'shop_catalog');
    if ($thumbnail_id) {
        $a->add(wp_get_attachment_image($thumbnail_id, $thumbnail_size));
    } elseif (woocommerce_placeholder_img_src()) {
        $a->add(woocommerce_placeholder_img($thumbnail_size));
    }
    echo $figure->html();
}
Пример #4
0
    foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {
        $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
        $product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key);
        if ($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_widget_cart_item_visible', true, $cart_item, $cart_item_key)) {
            $product_name = apply_filters('woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key);
            $thumbnail = apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image('post-thumbnail-mini'), $cart_item, $cart_item_key);
            $product_price = apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key);
            ?>

			<li>
				<figure class="alignright fixed">
					<a href="<?php 
            echo get_permalink($product_id);
            ?>
" <?php 
            Everything::imageAttrs('a', array('border' => true, 'hover' => '', 'fanbcybox' => false));
            ?>
>
						<?php 
            echo $thumbnail;
            ?>
					</a>
				</figure>
				<h3>
					<a href="<?php 
            echo get_permalink($product_id);
            ?>
">
						<?php 
            echo $product_name;
            ?>
Пример #5
0
<?php

/**
 * @package    WooCommerce/Templates
 * @subpackage Everything
 * @since      1.0
 */
// -----------------------------------------------------------------------------
if (!defined('ABSPATH')) {
    exit;
}
// -----------------------------------------------------------------------------
global $woocommerce;
if ($thumbnail) {
    ?>
		<figure class="full-width featured">
			<div <?php 
    Everything::imageAttrs('div', array('border' => false));
    ?>
>
				<img src="<?php 
    echo $thumbnail;
    ?>
" />
			</div>
		</figure>
	<?php 
}
echo wpautop(wptexturize(term_description()));
Пример #6
0
    ?>

	<?php 
    while (have_posts()) {
        the_post();
        ?>
		<section class="section">
			<?php 
        get_template_part('parts/post');
        ?>
		</section>
	<?php 
    }
    ?>
	<?php 
    if ($pagination = Everything::getPaginateLinks('blog')) {
        ?>
		<div class="section"><?php 
        echo $pagination;
        ?>
</div>
	<?php 
    }
    ?>

<?php 
} else {
    ?>

	<?php 
    get_template_part('parts/no-posts');
Пример #7
0
    exit;
}
// -----------------------------------------------------------------------------
if (!Everything::to('woocommerce/product/meta/visible') || count(Everything::to_('woocommerce/product/meta/items')->values()) == 0) {
    return;
}
global $post, $product;
?>

<hr />

<p class="product_meta">

	<?php 
do_action('woocommerce_product_meta_start');
foreach (Everything::to('woocommerce/product/meta/items') as $item) {
    switch ($item) {
        case 'sku':
            if ($product->is_type(array('simple', 'variable')) && get_option('woocommerce_enable_sku') == 'yes' && $product->get_sku()) {
                printf('<span itemprop="productID" class="sku_wrapper">%s <span class="sku">%s</span>.</span>', __('SKU:', 'woocommerce'), $product->get_sku());
            }
            break;
        case 'categories':
            $size = sizeof(get_the_terms($post->ID, 'product_cat'));
            echo $product->get_categories(', ', '<span class="posted_in">' . _n('Category:', 'Categories:', $size, 'woocommerce') . ' ', '.</span>');
            break;
        case 'tags':
            $size = sizeof(get_the_terms($post->ID, 'product_tag'));
            echo $product->get_tags(', ', '<span class="tagged_as">' . _n('Tag:', 'Tags:', $size, 'woocommerce') . ' ', '.</span>');
            break;
        case 'brands':
Пример #8
0
			<?php 
    Everything::title();
    ?>
			<?php 
    the_content(null, Everything::to('portfolio/strip_teaser'));
    ?>
			<?php 
    echo Everything::getPaginateLinks('page');
    ?>
		</article>
	</section>

	<?php 
    get_template_part('parts/author-bio');
    ?>
	<?php 
    Everything::socialButtons();
    ?>
	<?php 
    Everything::meta();
    ?>
	<?php 
    comments_template();
    ?>

<?php 
}
?>

<?php 
get_footer();
Пример #9
0
if (have_comments()) {
    ?>

	<section id="comments" class="section">
		<ul class="comments">
			<?php 
    wp_list_comments(array('style' => 'div', 'callback' => function ($comment, $args, $depth) {
        $GLOBALS['comment'] = $comment;
        require get_template_directory() . '/comment.php';
    }, 'end-callback' => function () {
        echo '</ul></li>';
    }));
    ?>
		</ul>
		<?php 
    echo Everything::getPaginateLinks('comments');
    ?>
	</section>

<?php 
}
?>

<?php 
if (comments_open()) {
    ?>
	<section class="section">
		<?php 
    comment_form();
    ?>
	</section>
Пример #10
0
<?php

/**
 * @package    WooCommerce/Templates
 * @subpackage Everything
 * @since      1.0
 * @version    1.6.4
 */
// -----------------------------------------------------------------------------
if (!defined('ABSPATH')) {
    exit;
}
// -----------------------------------------------------------------------------
if (!$messages) {
    return;
}
foreach ($messages as $message) {
    Everything::shortcodeOutput('message', array('color' => 'green'), '<i class="icon-check"></i> ' . wp_kses_post($message));
}
Пример #11
0
 public function __construct($name, $default, $properties = array())
 {
     parent::__construct($name, $default, $properties);
     $type_options = array('' => __('None', 'everything'), 'empty' => __('Empty space', 'everything'), 'image' => __('Image', 'everything'), 'thumbnail' => __('Featured image', 'everything'), 'slider' => __('Slider', 'everything'), 'map' => __('Map', 'everything'), 'page' => __('Page', 'everything'), 'embed' => __('Embeding code', 'everything'), 'custom' => __('Custom HTML', 'everything'));
     if (!isset($this->slider)) {
         unset($type_options['slider']);
     }
     if (!isset($this->map)) {
         unset($type_options['map']);
     }
     $this->type->options = $type_options;
     $this->height->unit = 'px';
     $this->height->min = 0;
     $this->height->indent = true;
     $this->height->owner = $this->type;
     $this->height->owner_value = 'empty';
     $this->image->indent = true;
     $this->image->owner = $this->type;
     $this->image->owner_value = 'image';
     if (isset($this->slider)) {
         $this->slider->required = false;
         $this->slider->options = function ($option) {
             $options = array();
             if (\Everything::isPluginActive('layerslider')) {
                 foreach (\lsSliders() as $slider) {
                     $options['layerslider-' . $slider['id']] = $slider['name'];
                     $option->groups['LayerSlider WP'][] = 'layerslider-' . $slider['id'];
                 }
             }
             if (\Everything::isPluginActive('masterslider')) {
                 foreach (get_masterslider_names() as $id => $name) {
                     $options['masterslider-' . $id] = $name;
                     $option->groups['Master Slider WP'][] = 'masterslider-' . $id;
                 }
             }
             if (\Everything::isPluginActive('revslider')) {
                 $revslider = new \RevSlider();
                 foreach ($revslider->getArrSliders() as $slider) {
                     $options['revslider-' . $slider->getID()] = $slider->getTitle();
                     $option->groups['Revolution Slider'][] = 'revslider-' . $slider->getID();
                 }
             }
             return $options;
         };
         $this->slider->indent = true;
         $this->slider->owner = $this->type;
         $this->slider->owner_value = 'slider';
     }
     if (isset($this->map)) {
         $this->map->required = false;
         $this->map->options = function ($option) {
             $options = array();
             if (\Everything::isPluginActive('wild-googlemap')) {
                 $maps = \WiLD_BackendGooglemapManager::getInstance()->get_maps();
                 foreach ($maps as $map) {
                     $options['wild-googlemap-' . $map->id] = $map->name;
                     $option->groups['WiLD Googlemap'][] = 'wild-googlemap-' . $map->id;
                 }
             }
             if (\Everything::isPluginActive('wp-google-map-plugin')) {
                 $maps = $GLOBALS['wpdb']->get_results("SELECT map_id, map_title FROM {$GLOBALS['wpdb']->prefix}create_map ORDER BY map_id ASC", ARRAY_A);
                 foreach ($maps as $map) {
                     $options['wp-google-map-plugin-' . $map['map_id']] = $map['map_title'];
                     $option->groups['WP Google Map Plugin'][] = 'wp-google-map-plugin-' . $map['map_id'];
                 }
             }
             return $options;
         };
         $this->map->indent = true;
         $this->map->owner = $this->type;
         $this->map->owner_value = 'map';
     }
     $this->page->required = false;
     $this->page->options = function () {
         return \Drone\Func::wpPostsList(array('numberposts' => -1, 'post_type' => 'page'));
     };
     $this->page->indent = true;
     $this->page->owner = $this->type;
     $this->page->owner_value = 'page';
     $this->embed->description = __('Embeding code from YouTube, Vimeo, Google Maps or other.', 'everything');
     $this->embed->indent = true;
     $this->embed->owner = $this->type;
     $this->embed->owner_value = 'embed';
     $this->custom->indent = true;
     $this->custom->owner = $this->type;
     $this->custom->owner_value = 'custom';
 }
Пример #12
0
<?php

/**
 * @package    WooCommerce/Templates
 * @subpackage Everything
 * @since      1.0
 * @version    2.0.14
 */
// -----------------------------------------------------------------------------
if (!defined('ABSPATH')) {
    exit;
}
// -----------------------------------------------------------------------------
global $post, $woocommerce, $product;
?>

<div class="images"><?php 
if (has_post_thumbnail()) {
    $image_title = esc_attr(Everything::woocommerceGetThumbnailCaption(get_post_thumbnail_id()));
    $image_link = wp_get_attachment_url(get_post_thumbnail_id());
    $image = get_the_post_thumbnail($post->ID, apply_filters('single_product_large_thumbnail_size', 'auto'), array('title' => $image_title));
    echo apply_filters('woocommerce_single_product_image_html', sprintf('<figure class="full-width"><a href="%s" itemprop="image" data-fancybox-title="%s" data-fancybox-group="product-gallery" ' . str_replace('class="', 'class="zoom ', Everything::getImageAttrs('a', array(), 'html')) . '>%s</a></figure>', $image_link, $image_title, $image), $post->ID);
} else {
    echo apply_filters('woocommerce_single_product_image_html', sprintf('<figure class="full-width"><div ' . Everything::getImageAttrs('div', array(), 'html') . '><img src="%s" alt="Placeholder" /></div></figure>', woocommerce_placeholder_img_src()), $post->ID);
}
do_action('woocommerce_product_thumbnails');
?>
</div>
Пример #13
0
if (Everything::isPluginActive('bbpress') && Everything::to('bbpress/breadcrumbs') && is_bbpress()) {
    $breadcrumbs_html = bbp_get_breadcrumb(array('before' => '', 'after' => '', 'sep' => $separator, 'sep_before' => '', 'sep_after' => '', 'current_before' => '', 'current_after' => ''));
} else {
    if (Everything::isPluginActive('woocommerce') && Everything::to('woocommerce/breadcrumbs') && (is_shop() || is_product_taxonomy() || is_product())) {
        //  || is_cart() || is_checkout() || is_order_received_page() || is_account_page()
        $breadcrumbs_html = \Drone\Func::functionGetOutputBuffer('woocommerce_breadcrumb', array('delimiter' => $separator, 'wrap_before' => '', 'wrap_after' => ''));
    } else {
        if (Everything::isPluginActive('breadcrumb-navxt')) {
            $options = get_option('bcn_options');
            $separator = $options['hseparator'];
            $breadcrumbs_html = bcn_display(true);
        } else {
            if (Everything::isPluginActive('breadcrumb-trail')) {
                $breadcrumbs_html = breadcrumb_trail(array('separator' => $separator, 'show_browse' => false, 'echo' => false));
            } else {
                if (Everything::isPluginActive('wordpress-seo')) {
                    $options = get_option('wpseo_internallinks');
                    $separator = $options['breadcrumbs-sep'] ? $options['breadcrumbs-sep'] : '&raquo;';
                    $breadcrumbs_html = yoast_breadcrumb('', '', false);
                } else {
                    return;
                }
            }
        }
    }
}
// No breadcrumbs
if (!$breadcrumbs_html) {
    return;
}
// Processing breadcrumbs
Пример #14
0
$layout = Everything::to_('footer/layout')->option();
if (!$layout->value) {
    return;
}
?>

<div id="footer">

	<div class="container">

		<section class="section">

			<div class="columns alt-mobile">
				<ul>
					<?php 
foreach (Everything::stringToColumns($layout->value) as $i => $column) {
    ?>
						<li class="<?php 
    echo $column['class'];
    ?>
">
							<?php 
    dynamic_sidebar(apply_filters('everything_sidebar', "footer-{$layout->name}-{$i}", 'footer'));
    ?>
						</li>
					<?php 
}
?>
				</ul>
			</div><!-- // .columns -->
Пример #15
0
<?php

/**
 * @package    WordPress
 * @subpackage Everything
 * @since      1.0
 */
if (!apply_filters('everything_author_bio_display', (bool) Everything::io('layout/page/author_bio/author_bio', array(get_post_type() . '/author_bio', 'page/author_bio'), '__hidden'))) {
    return;
}
?>

<section class="section">
	<figure class="alignleft fixed inset-border">
		<?php 
echo get_avatar(get_the_author_meta('ID'), 64);
?>
	</figure>
	<h3><?php 
the_author();
?>
</h3>
	<p class="author-description"><?php 
echo nl2br(get_the_author_meta('description'));
?>
</p>
</section>
Пример #16
0
        }
        ?>
				<div<?php 
        if ($filter) {
            echo " data-bricks-terms=\"{$terms}\"";
        }
        ?>
>
					<?php 
        get_template_part('parts/post');
        ?>
				</div>
			<?php 
    }
    ?>
		</div>
		<?php 
    echo Everything::getPaginateLinks('blog');
    ?>
	</section>

<?php 
} else {
    ?>

	<?php 
    get_template_part('parts/no-posts');
    ?>

<?php 
}
Пример #17
0
    ?>
						<?php 
}
?>

					</div>

				</div><!-- // .container -->

			</header><!-- // #header -->

			<?php 
get_template_part('parts/banner');
?>

			<?php 
get_template_part('parts/nav-secondary', 'upper');
?>

			/*<?php 
get_template_part('parts/headline');
?>
.

			<div id="content" class="outer-container detached-background">

				<div class="container">

					<?php 
Everything::beginContent();
Пример #18
0
 * @since      1.0
 * @version    1.6.4
 */
// -----------------------------------------------------------------------------
if (!defined('ABSPATH')) {
    exit;
}
// -----------------------------------------------------------------------------
global $product, $woocommerce_loop;
// Store loop count we're currently on
if (empty($woocommerce_loop['loop'])) {
    $woocommerce_loop['loop'] = 0;
}
// Store column count for displaying the grid
if (empty($woocommerce_loop['columns'])) {
    $woocommerce_loop['columns'] = apply_filters('loop_shop_columns', Everything::to('woocommerce/shop/columns'));
}
// Ensure visibility
if (!$product || !$product->is_visible()) {
    return;
}
// Increase loop count
$woocommerce_loop['loop']++;
?>

<li <?php 
post_class('col-1-' . $woocommerce_loop['columns']);
?>
>

	<article class="product">
Пример #19
0
<?php

/**
 * @package    WordPress
 * @subpackage Everything
 * @since      1.0
 */
get_header();
get_template_part('parts/blog', Everything::to('site/blog/style'));
get_footer();
Пример #20
0
    ?>

	<?php 
} elseif ($banner['type'] == 'map' && preg_match('/^(?P<type>wild-googlemap|wp-google-map-plugin)-(?P<id>[0-9]+)$/', $banner['map'], $m)) {
    // Map
    ?>

		<?php 
    switch ($m['type']) {
        case 'wild-googlemap':
            if (Everything::isPluginActive('wild-googlemap')) {
                echo WiLD_GooglemapManager::getInstance()->render(array('id' => $m['id']));
            }
            break;
        case 'wp-google-map-plugin':
            if (Everything::isPluginActive('wp-google-map-plugin')) {
                echo wpgmp_show_location_in_map(array('id' => $m['id']));
            }
            break;
    }
    ?>

	<?php 
} elseif ($banner['type'] == 'page' && !is_null($page = get_post((int) $banner['page']))) {
    // Page
    ?>

		<div class="container"><?php 
    echo \Drone\Func::wpProcessContent($page->post_content);
    ?>
</div>
Пример #21
0
<?php

/**
 * @package    WordPress
 * @subpackage Everything
 * @since      1.0
 */
$nav = Everything::po('layout/nav_secondary/upper/upper', '__hidden_ns', Everything::to_('nav/secondary/upper')->value());
if (!(\Drone\Func::wpAssignedMenu('secondary-upper') || is_numeric($nav)) || !apply_filters('everything_nav_secondary_upper_display', (bool) $nav)) {
    return;
}
?>

<div class="outer-container">
	<nav class="nav-menu secondary upper">
		<div class="container">
			<div class="section">
				<?php 
Everything::navMenu('secondary-upper', is_numeric($nav) ? $nav : null);
?>
			</div>
		</div>
	</nav>
</div><!-- // .outer-container -->
Пример #22
0
<?php 
do_action('woocommerce_before_single_product');
?>

<div itemscope itemtype="http://schema.org/Product" id="product-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>

	<div class="columns">
		<?php 
$columns = Everything::stringToColumns(Everything::to('woocommerce/product/image_size'));
?>
		<ul>
			<li class="<?php 
echo $columns[0]['class'];
?>
">
				<?php 
do_action('woocommerce_before_single_product_summary');
?>
			</li>
			<li class="<?php 
echo $columns[1]['class'];
?>
">
				<div class="summary entry-summary">
Пример #23
0
 /**
  * Get thumbnail caption for WooCommerce product image
  *
  * @since 1.0
  *
  * @param  int|object $thumbnail
  * @return string
  */
 public static function woocommerceGetThumbnailCaption($thumbnail)
 {
     if (!Everything::to('woocommerce/product/captions')) {
         return '';
     }
     if (!is_object($thumbnail)) {
         $thumbnail = get_post($thumbnail);
     }
     switch (Everything::to('woocommerce/product/captions')) {
         case 'title':
             return trim($thumbnail->post_title);
         case 'caption':
             return trim($thumbnail->post_excerpt);
         case 'caption_title':
             $caption = trim($thumbnail->post_excerpt) or $caption = trim($thumbnail->post_title);
             return $caption;
     }
 }
Пример #24
0
// Advanced
$advanced = $theme_options->addGroup('advanced', __('Advanced', 'everything'));
$this->addThemeFeature('option-custom-css');
$this->addThemeFeature('option-custom-js');
$advanced->addOption('boolean', 'chrome_fonts_fix', false, __('Google Fonts', 'everything'), __('This option is not recommended since Chrome version 37 and Opera version 25 were released.', 'everything'), array('caption' => __('Enhance fonts in Chrome and Opera browsers', 'everything')));
// -----------------------------------------------------------------------------
// Other
$other = $theme_options->addGroup('other', __('Other', 'everything'));
$this->addThemeFeature('option-tracking-code');
$this->addThemeFeature('option-feed-url');
$this->addThemeFeature('option-ogp');
// -----------------------------------------------------------------------------
// Layout post options
$nav_menus = \Drone\Func::wpTermsList('nav_menu');
$this->foreachPostOptions(array('post', 'page', 'gallery', 'portfolio', 'product'), function ($post_type, $post_options) use($breadcrumbs, $nav_menus, $sidebar_options) {
    $layout = $post_options->addGroup('layout', __('Layout', 'everything'));
    $layout->addEnabledOption('background', 'background', false, Everything::to_('general/background/background')->default, __('Background', 'everything'), __('Custom', 'everything'));
    $layout->addEnabledOption('banner', 'banner', false, Everything::to_('banner/content')->default, __('Banner', 'everything'), __('Custom', 'everything'));
    $nav = $layout->addGroup('nav_secondary', __('Secondary menu', 'everything'));
    $nav->addEnabledOption('select', 'upper', false, 'true', __('Upper', 'everything'), __('Custom', 'everything'), '', array('options' => array('true' => __('Show', 'everything'), '' => __('Hide', 'everything')) + $nav_menus, 'groups' => array(__('Custom menu', 'everything') => array_keys($nav_menus))));
    $nav->addEnabledOption('select', 'lower', false, 'true', __('Lower', 'everything'), __('Custom', 'everything'), '', array('options' => array('true' => __('Show', 'everything'), '' => __('Hide', 'everything')) + $nav_menus, 'groups' => array(__('Custom menu', 'everything') => array_keys($nav_menus))));
    $layout->addEnabledOption('group', 'headline', false, Everything::to_('nav/headline')->default, __('Headline', 'everything'), __('Custom', 'everything'), '', array('options' => array('' => __('Hide', 'everything'), 'none' => __('None (title only)', 'everything'), 'breadcrumbs' => __('Breadcrumbs', 'everything'), 'navigation' => __('Navigation (if possible)', 'everything')), 'disabled' => !$breadcrumbs ? array('breadcrumbs') : array()));
    $layout->addEnabledOption('layout', 'layout', false, Everything::to_('sidebar/layout')->default, __('Sidebar', 'everything'), __('Custom', 'everything'), '', array('options' => $sidebar_options));
    if ($post_type != 'product') {
        $page = $layout->addGroup('page', __('Page', 'everything'));
        $page->addEnabledOption('group', 'hide_title', false, '', __('Title', 'everything'), __('Custom', 'everything'), '', array('options' => array('' => __('Show', 'everything'), 'true' => __('Hide', 'everything'))));
        $page->addEnabledOption('group', 'author_bio', false, 'true', __('Author details', 'everything'), __('Custom', 'everything'), '', array('options' => array('true' => __('Show', 'everything'), '' => __('Hide', 'everything'))));
        $page->addEnabledOption('group', 'meta', false, 'true', __('Meta', 'everything'), __('Custom', 'everything'), '', array('options' => array('true' => __('Show', 'everything'), '' => __('Hide', 'everything'))));
        $page->addEnabledOption('group', 'social_buttons', false, 'true', __('Social buttons', 'everything'), __('Custom', 'everything'), '', array('options' => array('true' => __('Show', 'everything'), '' => __('Hide', 'everything'))));
    }
});
Пример #25
0
 */
// -----------------------------------------------------------------------------
if (!defined('ABSPATH')) {
    exit;
}
// -----------------------------------------------------------------------------
global $product;
if (get_option('woocommerce_enable_review_rating') == 'no') {
    return;
}
$count = $product->get_rating_count();
$average = $product->get_average_rating();
?>

<?php 
if ($count > 0) {
    ?>
	<p title="<?php 
    printf(__('Rated %s out of 5', 'woocommerce'), $average);
    ?>
" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
		<?php 
    Everything::shortcodeOutput('rating', array('rate' => $average . '/5', 'advanced_tag' => 'span'));
    ?>
		<a href="#reviews" rel="nofollow">(<?php 
    printf(_n('%s customer review', '%s customer reviews', $count, 'woocommerce'), '<span itemprop="ratingCount" class="count">' . $count . '</span>');
    ?>
)</a>
	</p>
<?php 
}
Пример #26
0
			<?php 
}
?>
			<strong><?php 
comment_author();
?>
</strong>
			<?php 
if (Everything::to('site/comments/date_format')) {
    ?>
				, <time class="small" datetime="<?php 
    printf('%sT%sZ', get_comment_date('Y-m-d'), get_comment_time('H:i'));
    ?>
" itemprop="datePublished">
					<?php 
    switch (Everything::to('site/comments/date_format')) {
        case 'relative':
            printf(__('%s ago', 'everything'), human_time_diff(get_comment_time('U', true)));
            break;
        case 'absolute':
            printf(__('%1$s at %2$s', 'everything'), get_comment_date(), get_comment_time());
            break;
    }
    ?>
				</time>
			<?php 
}
?>
		</p>
		<article class="text" itemprop="description">
			<?php 
Пример #27
0
    ?>
	<div class="columns">
		<ul>
			<?php 
    foreach ($brands as $brand) {
        ?>
				<li class="col-1-<?php 
        echo $columns;
        ?>
">
					<figure class="full-width">
						<a href="<?php 
        echo get_term_link($brand->slug, 'product_brand');
        ?>
" <?php 
        Everything::imageAttrs('a', array('border' => false, 'hover' => ''));
        ?>
>
							<?php 
        if ($thumbnail_id = get_woocommerce_term_meta($brand->term_id, 'thumbnail_id', true)) {
            echo wp_get_attachment_image($thumbnail_id, $size);
        } else {
            echo woocommerce_placeholder_img();
        }
        ?>
						</a>
					</figure>
				</li>
			<?php 
    }
    ?>
Пример #28
0
switch ($headline) {
    case 'mixed':
        $headline = is_single() ? 'navigation' : 'breadcrumbs';
        break;
    case 'navigation':
        if (!is_single()) {
            $headline = 'none';
        }
        break;
}
if ($headline != 'none') {
    get_template_part('parts/' . $headline);
}
?>
			<h1><?php 
if (Everything::isPluginActive('woocommerce') && (is_shop() || is_product_taxonomy()) && !is_product()) {
    woocommerce_page_title();
} else {
    if (is_home()) {
        is_front_page() ? _e('Blog', 'everything') : single_post_title();
    } else {
        if (is_day()) {
            echo get_the_date();
        } else {
            if (is_month()) {
                echo get_the_date('F Y');
            } else {
                if (is_year()) {
                    echo get_the_date('Y');
                } else {
                    if (is_category() || is_tax('portfolio-category')) {
Пример #29
0
<?php

/**
 * @package    WooCommerce/Templates
 * @subpackage Everything
 * @since      1.0
 * @version    1.6.4
 */
// -----------------------------------------------------------------------------
if (!defined('ABSPATH')) {
    exit;
}
// -----------------------------------------------------------------------------
if (!$messages) {
    return;
}
foreach ($messages as $message) {
    Everything::shortcodeOutput('message', array(), '<i class="icon-info-circled"></i> ' . wp_kses_post($message));
}
Пример #30
0
<?php

/**
 * @package    WooCommerce/Templates
 * @subpackage Everything
 * @since      1.0
 * @version    2.0.0
 */
// -----------------------------------------------------------------------------
if (!defined('ABSPATH')) {
    exit;
}
// -----------------------------------------------------------------------------
Everything::shortcodeOutput('message', array(), '<i class="icon-info-circled"></i> ' . __('No products found which match your selection.', 'woocommerce'));