| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/woocommerce.php.tar |
home/xbodynamge/lebauwcentre/wp-content/themes/customify/woocommerce.php 0000644 00000001067 15113150262 0022746 0 ustar 00 <?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package customify
*/
get_header(); ?>
<div class="content-inner">
<?php
do_action( 'customify/content/before' );
woocommerce_content();
do_action( 'customify/content/after' );
?>
</div><!-- #.content-inner -->
<?php
get_footer();
home/xbodynamge/www/wp-content/themes/zerif-lite/woocommerce.php 0000644 00000001122 15113216443 0021136 0 ustar 00 <?php
/**
* The template for displaying all WooCommerce pages.
*
* @package zerif-lite
*/
get_header(); ?>
<div class="clear"></div>
</header> <!-- / END HOME SECTION -->
<?php zerif_after_header_trigger(); ?>
<div id="content" class="site-content">
<div class="container">
<div class="content-left-wrap col-md-12">
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php woocommerce_content(); ?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .content-left-wrap -->
</div><!-- .container -->
<?php get_footer(); ?>
home/xbodynamge/lebauwcentre/wp-content/themes/integral/inc/woocommerce.php 0000644 00000000256 15113227156 0023310 0 ustar 00 <?php
/**
* Add WooCommerce support
*/
add_action( 'after_setup_theme', 'woocommerce_support' );
function woocommerce_support() {
add_theme_support( 'woocommerce' );
} home/xbodynamge/crosstraining/wp-content/themes/zerif-lite/woocommerce.php 0000604 00000001122 15113377034 0023177 0 ustar 00 <?php
/**
* The template for displaying all WooCommerce pages.
*
* @package zerif-lite
*/
get_header(); ?>
<div class="clear"></div>
</header> <!-- / END HOME SECTION -->
<?php zerif_after_header_trigger(); ?>
<div id="content" class="site-content">
<div class="container">
<div class="content-left-wrap col-md-12">
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php woocommerce_content(); ?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .content-left-wrap -->
</div><!-- .container -->
<?php get_footer(); ?>
home/xbodynamge/dev/wp-content/themes/zerif-lite/woocommerce.php 0000644 00000001122 15113561022 0021064 0 ustar 00 <?php
/**
* The template for displaying all WooCommerce pages.
*
* @package zerif-lite
*/
get_header(); ?>
<div class="clear"></div>
</header> <!-- / END HOME SECTION -->
<?php zerif_after_header_trigger(); ?>
<div id="content" class="site-content">
<div class="container">
<div class="content-left-wrap col-md-12">
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php woocommerce_content(); ?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .content-left-wrap -->
</div><!-- .container -->
<?php get_footer(); ?>
home/xbodynamge/lebauwcentre/wp-content/themes/zerif-lite/woocommerce.php 0000644 00000001122 15114113006 0022762 0 ustar 00 <?php
/**
* The template for displaying all WooCommerce pages.
*
* @package zerif-lite
*/
get_header(); ?>
<div class="clear"></div>
</header> <!-- / END HOME SECTION -->
<?php zerif_after_header_trigger(); ?>
<div id="content" class="site-content">
<div class="container">
<div class="content-left-wrap col-md-12">
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php woocommerce_content(); ?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .content-left-wrap -->
</div><!-- .container -->
<?php get_footer(); ?>
home/xbodynamge/crosstraining/wp-content/plugins/wordpress-seo/src/initializers/woocommerce.php 0000644 00000001357 15114231657 0027451 0 ustar 00 <?php
namespace Yoast\WP\SEO\Initializers;
use Yoast\WP\SEO\Conditionals\No_Conditionals;
/**
* Declares compatibility with the WooCommerce HPOS feature.
*/
class Woocommerce implements Initializer_Interface {
use No_Conditionals;
/**
* Hooks into WooCommerce.
*/
public function initialize() {
\add_action( 'before_woocommerce_init', [ $this, 'declare_custom_order_tables_compatibility' ] );
}
/**
* Declares compatibility with the WooCommerce HPOS feature.
*/
public function declare_custom_order_tables_compatibility() {
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', WPSEO_FILE, true );
}
}
}
home/xbodynamge/lebauwcentre/wp-content/plugins/wordpress-seo/src/initializers/woocommerce.php 0000644 00000001357 15114332203 0027231 0 ustar 00 <?php
namespace Yoast\WP\SEO\Initializers;
use Yoast\WP\SEO\Conditionals\No_Conditionals;
/**
* Declares compatibility with the WooCommerce HPOS feature.
*/
class Woocommerce implements Initializer_Interface {
use No_Conditionals;
/**
* Hooks into WooCommerce.
*/
public function initialize() {
\add_action( 'before_woocommerce_init', [ $this, 'declare_custom_order_tables_compatibility' ] );
}
/**
* Declares compatibility with the WooCommerce HPOS feature.
*/
public function declare_custom_order_tables_compatibility() {
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', WPSEO_FILE, true );
}
}
}
home/xbodynamge/lebauwcentre/wp-content/themes/onepress/woocommerce.php 0000644 00000002435 15114373227 0022573 0 ustar 00 <?php
/**
* The template for displaying all pages WooCommerce page.
*
* @package OnePress
*/
get_header();
$is_active_sidebar = is_active_sidebar( 'sidebar-shop' );
$layout = onepress_get_layout();
$hide_breadcrumb = get_post_meta( wc_get_page_id('shop'), '_hide_breadcrumb', true);
/**
* @since 2.0.0
* @see onepress_display_page_title
*/
do_action( 'onepress_page_before_content' );
?>
<div id="content" class="site-content">
<?php
if ( ! $hide_breadcrumb ) {
onepress_breadcrumb( wc_get_page_id('shop') );
}
?>
<div id="content-inside" class="container <?php echo ( $is_active_sidebar ) ? esc_attr( $layout ) : 'no-sidebar'; ?>">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php woocommerce_content(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php if ( $is_active_sidebar ) { ?>
<?php if ( $layout != 'no-sidebar' ) { ?>
<div id="secondary" class="widget-area sidebar" role="complementary">
<?php dynamic_sidebar( 'sidebar-shop' ); ?>
</div><!-- #secondary -->
<?php } ?>
<?php } ?>
</div><!--#content-inside -->
</div><!-- #content -->
<?php get_footer(); ?>
crosstraining/wp-content/plugins/wordpress-seo/src/integrations/third-party/woocommerce.php 0000644 00000022515 15114416502 0031632 0 ustar 00 home/xbodynamge <?php
namespace Yoast\WP\SEO\Integrations\Third_Party;
use WPSEO_Replace_Vars;
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
use Yoast\WP\SEO\Conditionals\WooCommerce_Conditional;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Pagination_Helper;
use Yoast\WP\SEO\Helpers\Woocommerce_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
use Yoast\WP\SEO\Models\Indexable;
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
use Yoast\WP\SEO\Repositories\Indexable_Repository;
/**
* WooCommerce integration.
*/
class WooCommerce implements Integration_Interface {
/**
* The options helper.
*
* @var Options_Helper
*/
private $options;
/**
* The WPSEO Replace Vars object.
*
* @var WPSEO_Replace_Vars
*/
private $replace_vars;
/**
* The memoizer for the meta tags context.
*
* @var Meta_Tags_Context_Memoizer
*/
protected $context_memoizer;
/**
* The indexable repository.
*
* @var Indexable_Repository
*/
private $repository;
/**
* The pagination helper.
*
* @var Pagination_Helper
*/
protected $pagination_helper;
/**
* The WooCommerce helper.
*
* @var Woocommerce_Helper
*/
private $woocommerce_helper;
/**
* Returns the conditionals based in which this loadable should be active.
*
* @return array
*/
public static function get_conditionals() {
return [ WooCommerce_Conditional::class, Front_End_Conditional::class ];
}
/**
* WooCommerce constructor.
*
* @param Options_Helper $options The options helper.
* @param WPSEO_Replace_Vars $replace_vars The replace vars helper.
* @param Meta_Tags_Context_Memoizer $context_memoizer The meta tags context memoizer.
* @param Indexable_Repository $repository The indexable repository.
* @param Pagination_Helper $pagination_helper The paginataion helper.
* @param Woocommerce_Helper $woocommerce_helper The WooCommerce helper.
*/
public function __construct(
Options_Helper $options,
WPSEO_Replace_Vars $replace_vars,
Meta_Tags_Context_Memoizer $context_memoizer,
Indexable_Repository $repository,
Pagination_Helper $pagination_helper,
Woocommerce_Helper $woocommerce_helper
) {
$this->options = $options;
$this->replace_vars = $replace_vars;
$this->context_memoizer = $context_memoizer;
$this->repository = $repository;
$this->pagination_helper = $pagination_helper;
$this->woocommerce_helper = $woocommerce_helper;
}
/**
* Initializes the integration.
*
* This is the place to register hooks and filters.
*
* @return void
*/
public function register_hooks() {
\add_filter( 'wpseo_frontend_page_type_simple_page_id', [ $this, 'get_page_id' ] );
\add_filter( 'wpseo_breadcrumb_indexables', [ $this, 'add_shop_to_breadcrumbs' ] );
\add_filter( 'wpseo_title', [ $this, 'title' ], 10, 2 );
\add_filter( 'wpseo_metadesc', [ $this, 'description' ], 10, 2 );
\add_filter( 'wpseo_canonical', [ $this, 'canonical' ], 10, 2 );
\add_filter( 'wpseo_adjacent_rel_url', [ $this, 'adjacent_rel_url' ], 10, 3 );
}
/**
* Returns the correct canonical when WooCommerce is enabled.
*
* @param string $canonical The current canonical.
* @param Indexable_Presentation|null $presentation The indexable presentation.
*
* @return string The correct canonical.
*/
public function canonical( $canonical, $presentation = null ) {
if ( ! $this->woocommerce_helper->is_shop_page() ) {
return $canonical;
}
$url = $this->get_shop_paginated_link( 'curr', $presentation );
if ( $url ) {
return $url;
}
return $canonical;
}
/**
* Returns correct adjacent pages when WooCommerce is enabled.
*
* @param string $link The current link.
* @param string $rel Link relationship, prev or next.
* @param Indexable_Presentation|null $presentation The indexable presentation.
*
* @return string The correct link.
*/
public function adjacent_rel_url( $link, $rel, $presentation = null ) {
if ( ! $this->woocommerce_helper->is_shop_page() ) {
return $link;
}
if ( $rel !== 'next' && $rel !== 'prev' ) {
return $link;
}
$url = $this->get_shop_paginated_link( $rel, $presentation );
if ( $url ) {
return $url;
}
return $link;
}
/**
* Adds a breadcrumb for the shop page.
*
* @param Indexable[] $indexables The array with indexables.
*
* @return Indexable[] The indexables to be shown in the breadcrumbs, with the shop page added.
*/
public function add_shop_to_breadcrumbs( $indexables ) {
$shop_page_id = $this->woocommerce_helper->get_shop_page_id();
if ( ! is_int( $shop_page_id ) || $shop_page_id < 1 ) {
return $indexables;
}
foreach ( $indexables as $index => $indexable ) {
if ( $indexable->object_type === 'post-type-archive' && $indexable->object_sub_type === 'product' ) {
$indexables[ $index ] = $this->repository->find_by_id_and_type( $shop_page_id, 'post' );
}
}
return $indexables;
}
/**
* Returns the ID of the WooCommerce shop page when the currently opened page is the shop page.
*
* @param int $page_id The page id.
*
* @return int The Page ID of the shop.
*/
public function get_page_id( $page_id ) {
if ( ! $this->woocommerce_helper->is_shop_page() ) {
return $page_id;
}
return $this->woocommerce_helper->get_shop_page_id();
}
/**
* Handles the title.
*
* @param string $title The title.
* @param Indexable_Presentation|null $presentation The indexable presentation.
*
* @return string The title to use.
*/
public function title( $title, $presentation = null ) {
$presentation = $this->ensure_presentation( $presentation );
if ( $presentation->model->title ) {
return $title;
}
if ( ! $this->woocommerce_helper->is_shop_page() ) {
return $title;
}
if ( ! \is_archive() ) {
return $title;
}
$shop_page_id = $this->woocommerce_helper->get_shop_page_id();
if ( $shop_page_id < 1 ) {
return $title;
}
$product_template_title = $this->get_product_template( 'title-product', $shop_page_id );
if ( $product_template_title ) {
return $product_template_title;
}
return $title;
}
/**
* Handles the meta description.
*
* @param string $description The title.
* @param Indexable_Presentation|null $presentation The indexable presentation.
*
* @return string The description to use.
*/
public function description( $description, $presentation = null ) {
$presentation = $this->ensure_presentation( $presentation );
if ( $presentation->model->description ) {
return $description;
}
if ( ! $this->woocommerce_helper->is_shop_page() ) {
return $description;
}
if ( ! \is_archive() ) {
return $description;
}
$shop_page_id = $this->woocommerce_helper->get_shop_page_id();
if ( $shop_page_id < 1 ) {
return $description;
}
$product_template_description = $this->get_product_template( 'metadesc-product', $shop_page_id );
if ( $product_template_description ) {
return $product_template_description;
}
return $description;
}
/**
* Uses template for the given option name and replace the replacement variables on it.
*
* @param string $option_name The option name to get the template for.
* @param string $shop_page_id The page id to retrieve template for.
*
* @return string The rendered value.
*/
protected function get_product_template( $option_name, $shop_page_id ) {
$template = $this->options->get( $option_name );
$page = \get_post( $shop_page_id );
return $this->replace_vars->replace( $template, $page );
}
/**
* Get paginated link for shop page.
*
* @param string $rel Link relationship, prev or next or curr.
* @param Indexable_Presentation|null $presentation The indexable presentation.
*
* @return string|null The link.
*/
protected function get_shop_paginated_link( $rel, $presentation = null ) {
$presentation = $this->ensure_presentation( $presentation );
$permalink = $presentation->permalink;
if ( ! $permalink ) {
return null;
}
$current_page = \max( 1, $this->pagination_helper->get_current_archive_page_number() );
if ( $rel === 'curr' && $current_page === 1 ) {
return $permalink;
}
if ( $rel === 'curr' && $current_page > 1 ) {
return $this->pagination_helper->get_paginated_url( $permalink, $current_page );
}
if ( $rel === 'prev' && $current_page === 2 ) {
return $permalink;
}
if ( $rel === 'prev' && $current_page > 2 ) {
return $this->pagination_helper->get_paginated_url( $permalink, ( $current_page - 1 ) );
}
if ( $rel === 'next' && $current_page < $this->pagination_helper->get_number_of_archive_pages() ) {
return $this->pagination_helper->get_paginated_url( $permalink, ( $current_page + 1 ) );
}
return null;
}
/**
* Ensures a presentation is available.
*
* @param Indexable_Presentation $presentation The indexable presentation.
*
* @return Indexable_Presentation The presentation, taken from the current page if the input was invalid.
*/
protected function ensure_presentation( $presentation ) {
if ( \is_a( $presentation, Indexable_Presentation::class ) ) {
return $presentation;
}
$context = $this->context_memoizer->for_current_page();
return $context->presentation;
}
}
home/xbodynamge/crosstraining/wp-content/themes/custom-file-5-1751661813/inc/woocommerce.php 0000644 00000007104 15114430741 0025361 0 ustar 00 <?php
/**
* WooCommerce Compatibility File
*
* @link https://woocommerce.com/
*
* @package PopularFX
*/
/**
* WooCommerce specific scripts & stylesheets.
*
* @return void
*/
function popularfx_woocommerce_scripts() {
$inline = '.popularfx-body.woocommerce-page main{
padding: 15px;
}';
wp_add_inline_style( 'popularfx-style', $inline );
}
add_action( 'wp_enqueue_scripts', 'popularfx_woocommerce_scripts' );
/**
* Disable the default WooCommerce stylesheet.
*
* Removing the default WooCommerce stylesheet and enqueing your own will
* protect you during WooCommerce core updates.
*
* @link https://docs.woocommerce.com/document/disable-the-default-stylesheet/
*/
//add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );
/**
* Add 'woocommerce-active' class to the body tag.
*
* @param array $classes CSS classes applied to the body tag.
* @return array $classes modified to include 'woocommerce-active' class.
*/
function popularfx_woocommerce_active_body_class( $classes ) {
$classes[] = 'woocommerce-active';
return $classes;
}
add_filter( 'body_class', 'popularfx_woocommerce_active_body_class' );
/**
* Related Products Args.
*
* @param array $args related products args.
* @return array $args related products args.
*/
function popularfx_woocommerce_related_products_args( $args ) {
$defaults = array(
'posts_per_page' => 3,
'columns' => 3,
);
$args = wp_parse_args( $defaults, $args );
return $args;
}
add_filter( 'woocommerce_output_related_products_args', 'popularfx_woocommerce_related_products_args' );
/**
* Remove default WooCommerce wrapper.
*/
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
if ( ! function_exists( 'popularfx_woocommerce_wrapper_before' ) ) {
/**
* Before Content.
*
* Wraps all WooCommerce content in wrappers which match the theme markup.
*
* @return void
*/
function popularfx_woocommerce_wrapper_before() {
?>
<main id="primary" class="site-main">
<?php
}
}
add_action( 'woocommerce_before_main_content', 'popularfx_woocommerce_wrapper_before' );
if ( ! function_exists( 'popularfx_woocommerce_wrapper_after' ) ) {
/**
* After Content.
*
* Closes the wrapping divs.
*
* @return void
*/
function popularfx_woocommerce_wrapper_after() {
?>
</main><!-- #main -->
<?php
}
}
add_action( 'woocommerce_after_main_content', 'popularfx_woocommerce_wrapper_after' );
// Show the star rating
add_action('woocommerce_after_shop_loop_item_title', 'popularfx_woocommerce_star_rating', 5);
function popularfx_woocommerce_star_rating() {
global $product;
$rating = $product->get_average_rating();
$rating_html = '</a><a href="' . get_the_permalink() . '#respond"><div class ="pfx-star-rating-container"><div class="star-rating pfx-star-rating"><span style="width:' . (( $rating / 5 ) * 100) . '%"></span></div></div></a>';
echo $rating_html;
}
/**
* Show cart contents / total Ajax
*/
add_filter( 'woocommerce_add_to_cart_fragments', 'popularfx_wc_header_add_to_cart_fragment' );
function popularfx_wc_header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();
?>
<li class="page-item pfx-menu-cart cart-customlocation menu-item menu-item-type-post_type menu-item-object-page"><a href="<?php echo esc_url(wc_get_cart_url()); ?>"><span class="dashicons dashicons-cart"></span><sup><?php echo WC()->cart->get_cart_contents_count();?></sup></a></li>
<?php
$fragments['li.cart-customlocation'] = ob_get_clean();
return $fragments;
}
home/xbodynamge/www/wp-content/plugins/wordpress-seo/src/initializers/woocommerce.php 0000644 00000001357 15114630131 0025376 0 ustar 00 <?php
namespace Yoast\WP\SEO\Initializers;
use Yoast\WP\SEO\Conditionals\No_Conditionals;
/**
* Declares compatibility with the WooCommerce HPOS feature.
*/
class Woocommerce implements Initializer_Interface {
use No_Conditionals;
/**
* Hooks into WooCommerce.
*/
public function initialize() {
\add_action( 'before_woocommerce_init', [ $this, 'declare_custom_order_tables_compatibility' ] );
}
/**
* Declares compatibility with the WooCommerce HPOS feature.
*/
public function declare_custom_order_tables_compatibility() {
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', WPSEO_FILE, true );
}
}
}
home/xbodynamge/lebauwcentre/wp-content/themes/integral/woocommerce.php 0000644 00000001063 15114750727 0022542 0 ustar 00 <?php
/*
* The template for displaying woocommerce content.
*
* This is the template that displays all woocommerce content.
*
*/
?>
<?php get_header(); ?>
<div class="spacer"></div>
<div class="container">
<div class="row">
<div class="<?php if ( is_active_sidebar( 'rightbar' ) ) : ?>col-sm-12 col-md-8<?php else : ?>col-md-12<?php endif; ?>">
<div class="content">
<?php woocommerce_content(); ?>
</div>
</div>
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>