X7ROOT File Manager
Current Path:
/home/notabjze/pyirates.net/wp-content/plugins/woocommerce/includes
home
/
notabjze
/
pyirates.net
/
wp-content
/
plugins
/
woocommerce
/
includes
/
ðŸ“
..
ðŸ“
abstracts
ðŸ“
admin
ðŸ“
blocks
📄
class-wc-ajax.php
(114.64 KB)
📄
class-wc-auth.php
(12.69 KB)
📄
class-wc-autoloader.php
(3.13 KB)
📄
class-wc-background-emailer.php
(4.58 KB)
📄
class-wc-background-updater.php
(3.45 KB)
📄
class-wc-breadcrumb.php
(9.49 KB)
📄
class-wc-cache-helper.php
(11.17 KB)
📄
class-wc-cart-fees.php
(3.37 KB)
📄
class-wc-cart-session.php
(17.81 KB)
📄
class-wc-cart-totals.php
(28.25 KB)
📄
class-wc-cart.php
(66.4 KB)
📄
class-wc-checkout.php
(46.93 KB)
📄
class-wc-cli.php
(2.57 KB)
📄
class-wc-comments.php
(15.86 KB)
📄
class-wc-countries.php
(48.92 KB)
📄
class-wc-coupon.php
(37.88 KB)
📄
class-wc-customer-download-log.php
(3.37 KB)
📄
class-wc-customer-download.php
(10.34 KB)
📄
class-wc-customer.php
(29.68 KB)
📄
class-wc-data-exception.php
(1.29 KB)
📄
class-wc-data-store.php
(6.59 KB)
📄
class-wc-datetime.php
(2.26 KB)
📄
class-wc-deprecated-action-hooks.php
(6.59 KB)
📄
class-wc-deprecated-filter-hooks.php
(7.34 KB)
📄
class-wc-discounts.php
(35.04 KB)
📄
class-wc-download-handler.php
(28.38 KB)
📄
class-wc-emails.php
(25.09 KB)
📄
class-wc-embed.php
(4.18 KB)
📄
class-wc-form-handler.php
(44.65 KB)
📄
class-wc-frontend-scripts.php
(27.03 KB)
📄
class-wc-geo-ip.php
(30.41 KB)
📄
class-wc-geolite-integration.php
(1.99 KB)
📄
class-wc-geolocation.php
(10.44 KB)
📄
class-wc-https.php
(4.33 KB)
📄
class-wc-install.php
(100.99 KB)
📄
class-wc-integrations.php
(1.28 KB)
📄
class-wc-log-levels.php
(3.9 KB)
📄
class-wc-logger.php
(9.29 KB)
📄
class-wc-meta-data.php
(2.21 KB)
📄
class-wc-order-factory.php
(8.52 KB)
📄
class-wc-order-item-coupon.php
(4.08 KB)
📄
class-wc-order-item-fee.php
(8.85 KB)
📄
class-wc-order-item-meta.php
(5.8 KB)
📄
class-wc-order-item-product.php
(13.7 KB)
📄
class-wc-order-item-shipping.php
(7.85 KB)
📄
class-wc-order-item-tax.php
(6.49 KB)
📄
class-wc-order-item.php
(11.65 KB)
📄
class-wc-order-query.php
(2.55 KB)
📄
class-wc-order-refund.php
(5.63 KB)
📄
class-wc-order.php
(69.28 KB)
📄
class-wc-payment-gateways.php
(11.36 KB)
📄
class-wc-payment-tokens.php
(6.24 KB)
📄
class-wc-post-data.php
(20.89 KB)
📄
class-wc-post-types.php
(31.84 KB)
📄
class-wc-privacy-background-process.php
(1.67 KB)
📄
class-wc-privacy-erasers.php
(13.61 KB)
📄
class-wc-privacy-exporters.php
(14.69 KB)
📄
class-wc-privacy.php
(15.82 KB)
📄
class-wc-product-attribute.php
(6.97 KB)
📄
class-wc-product-download.php
(12.25 KB)
📄
class-wc-product-external.php
(4.84 KB)
📄
class-wc-product-factory.php
(3.58 KB)
📄
class-wc-product-grouped.php
(5.22 KB)
📄
class-wc-product-query.php
(2.18 KB)
📄
class-wc-product-simple.php
(2.64 KB)
📄
class-wc-product-variable.php
(22.07 KB)
📄
class-wc-product-variation.php
(16.87 KB)
📄
class-wc-query.php
(32.6 KB)
📄
class-wc-rate-limiter.php
(4 KB)
📄
class-wc-regenerate-images-request.php
(7.74 KB)
📄
class-wc-regenerate-images.php
(15.44 KB)
📄
class-wc-register-wp-admin-settings.php
(5.05 KB)
📄
class-wc-rest-authentication.php
(21.55 KB)
📄
class-wc-rest-exception.php
(276 B)
📄
class-wc-session-handler.php
(15.03 KB)
📄
class-wc-shipping-rate.php
(5.51 KB)
📄
class-wc-shipping-zone.php
(13.08 KB)
📄
class-wc-shipping-zones.php
(4.01 KB)
📄
class-wc-shipping.php
(11.57 KB)
📄
class-wc-shortcodes.php
(18.67 KB)
📄
class-wc-structured-data.php
(18.88 KB)
📄
class-wc-tax.php
(37.08 KB)
📄
class-wc-template-loader.php
(21.39 KB)
📄
class-wc-tracker.php
(37.42 KB)
📄
class-wc-validation.php
(5.79 KB)
📄
class-wc-webhook.php
(29.34 KB)
📄
class-woocommerce.php
(45.52 KB)
ðŸ“
cli
ðŸ“
customizer
ðŸ“
data-stores
ðŸ“
emails
ðŸ“
export
ðŸ“
gateways
ðŸ“
import
ðŸ“
integrations
ðŸ“
interfaces
ðŸ“
legacy
ðŸ“
libraries
ðŸ“
log-handlers
ðŸ“
payment-tokens
ðŸ“
product-usage
ðŸ“
queue
ðŸ“
react-admin
ðŸ“
rest-api
ðŸ“
shipping
ðŸ“
shortcodes
ðŸ“
theme-support
ðŸ“
tracks
ðŸ“
traits
ðŸ“
walkers
📄
wc-account-functions.php
(13.23 KB)
📄
wc-attribute-functions.php
(21.12 KB)
📄
wc-cart-functions.php
(19.9 KB)
📄
wc-conditional-functions.php
(13.92 KB)
📄
wc-core-functions.php
(80.68 KB)
📄
wc-coupon-functions.php
(2.75 KB)
📄
wc-deprecated-functions.php
(34.08 KB)
📄
wc-formatting-functions.php
(45.5 KB)
📄
wc-notice-functions.php
(8.02 KB)
📄
wc-order-functions.php
(38.93 KB)
📄
wc-order-item-functions.php
(5.03 KB)
📄
wc-page-functions.php
(8.3 KB)
📄
wc-product-functions.php
(53.13 KB)
📄
wc-rest-functions.php
(12.62 KB)
📄
wc-stock-functions.php
(16.64 KB)
📄
wc-template-functions.php
(123.9 KB)
📄
wc-template-hooks.php
(12.67 KB)
📄
wc-term-functions.php
(20.66 KB)
📄
wc-update-functions.php
(86.64 KB)
📄
wc-user-functions.php
(28.67 KB)
📄
wc-webhook-functions.php
(5.77 KB)
📄
wc-widget-functions.php
(2.01 KB)
ðŸ“
wccom-site
ðŸ“
widgets
Editing: class-wc-breadcrumb.php
<?php /** * WC_Breadcrumb class. * * @package WooCommerce\Classes * @version 2.3.0 */ defined( 'ABSPATH' ) || exit; /** * Breadcrumb class. */ class WC_Breadcrumb { /** * Breadcrumb trail. * * @var array */ protected $crumbs = array(); /** * Add a crumb so we don't get lost. * * @param string $name Name. * @param string $link Link. */ public function add_crumb( $name, $link = '' ) { $this->crumbs[] = array( wp_strip_all_tags( $name ), $link, ); } /** * Reset crumbs. */ public function reset() { $this->crumbs = array(); } /** * Get the breadcrumb. * * @return array */ public function get_breadcrumb() { return apply_filters( 'woocommerce_get_breadcrumb', $this->crumbs, $this ); } /** * Generate breadcrumb trail. * * @return array of breadcrumbs */ public function generate() { $conditionals = array( 'is_home', 'is_404', 'is_attachment', 'is_single', 'is_product_category', 'is_product_tag', 'is_shop', 'is_page', 'is_post_type_archive', 'is_category', 'is_tag', 'is_author', 'is_date', 'is_tax', ); if ( ( ! is_front_page() && ! ( is_post_type_archive() && intval( get_option( 'page_on_front' ) ) === wc_get_page_id( 'shop' ) ) ) || is_paged() ) { foreach ( $conditionals as $conditional ) { if ( call_user_func( $conditional ) ) { call_user_func( array( $this, 'add_crumbs_' . substr( $conditional, 3 ) ) ); break; } } $this->search_trail(); $this->paged_trail(); return $this->get_breadcrumb(); } return array(); } /** * Prepend the shop page to shop breadcrumbs. */ protected function prepend_shop_page() { $permalinks = wc_get_permalink_structure(); $shop_page_id = wc_get_page_id( 'shop' ); $shop_page = get_post( $shop_page_id ); // If permalinks contain the shop page in the URI prepend the breadcrumb with shop. if ( $shop_page_id && $shop_page && isset( $permalinks['product_base'] ) && strstr( $permalinks['product_base'], '/' . $shop_page->post_name ) && intval( get_option( 'page_on_front' ) ) !== $shop_page_id ) { $this->add_crumb( get_the_title( $shop_page ), get_permalink( $shop_page ) ); } } /** * Is home trail.. */ protected function add_crumbs_home() { $this->add_crumb( single_post_title( '', false ) ); } /** * 404 trail. */ protected function add_crumbs_404() { $this->add_crumb( __( 'Error 404', 'woocommerce' ) ); } /** * Attachment trail. */ protected function add_crumbs_attachment() { global $post; $this->add_crumbs_single( $post->post_parent, get_permalink( $post->post_parent ) ); $this->add_crumb( get_the_title(), get_permalink() ); } /** * Single post trail. * * @param int $post_id Post ID. * @param string $permalink Post permalink. */ protected function add_crumbs_single( $post_id = 0, $permalink = '' ) { if ( ! $post_id ) { global $post; } else { $post = get_post( $post_id ); // WPCS: override ok. } if ( ! $permalink ) { $permalink = get_permalink( $post ); } if ( 'product' === get_post_type( $post ) ) { $this->prepend_shop_page(); $terms = wc_get_product_terms( $post->ID, 'product_cat', apply_filters( 'woocommerce_breadcrumb_product_terms_args', array( 'orderby' => 'parent', 'order' => 'DESC', ) ) ); if ( $terms ) { $main_term = apply_filters( 'woocommerce_breadcrumb_main_term', $terms[0], $terms ); $this->term_ancestors( $main_term->term_id, 'product_cat' ); $this->add_crumb( $main_term->name, get_term_link( $main_term ) ); } } elseif ( 'post' !== get_post_type( $post ) ) { $post_type = get_post_type_object( get_post_type( $post ) ); if ( ! empty( $post_type->has_archive ) ) { $this->add_crumb( $post_type->labels->singular_name, get_post_type_archive_link( get_post_type( $post ) ) ); } } else { $cat = current( get_the_category( $post ) ); if ( $cat ) { $this->term_ancestors( $cat->term_id, 'category' ); $this->add_crumb( $cat->name, get_term_link( $cat ) ); } } $this->add_crumb( get_the_title( $post ), $permalink ); } /** * Page trail. */ protected function add_crumbs_page() { global $post; if ( $post->post_parent ) { $parent_crumbs = array(); $parent_id = $post->post_parent; while ( $parent_id ) { $page = get_post( $parent_id ); $parent_id = $page->post_parent; $parent_crumbs[] = array( get_the_title( $page->ID ), get_permalink( $page->ID ) ); } $parent_crumbs = array_reverse( $parent_crumbs ); foreach ( $parent_crumbs as $crumb ) { $this->add_crumb( $crumb[0], $crumb[1] ); } } $this->add_crumb( get_the_title(), get_permalink() ); $this->endpoint_trail(); } /** * Product category trail. */ protected function add_crumbs_product_category() { $current_term = $GLOBALS['wp_query']->get_queried_object(); $this->prepend_shop_page(); $this->term_ancestors( $current_term->term_id, 'product_cat' ); $this->add_crumb( $current_term->name, get_term_link( $current_term, 'product_cat' ) ); } /** * Product tag trail. */ protected function add_crumbs_product_tag() { $current_term = $GLOBALS['wp_query']->get_queried_object(); $this->prepend_shop_page(); /* translators: %s: product tag */ $this->add_crumb( sprintf( __( 'Products tagged “%s”', 'woocommerce' ), $current_term->name ), get_term_link( $current_term, 'product_tag' ) ); } /** * Shop breadcrumb. */ protected function add_crumbs_shop() { if ( intval( get_option( 'page_on_front' ) ) === wc_get_page_id( 'shop' ) ) { return; } $_name = wc_get_page_id( 'shop' ) ? get_the_title( wc_get_page_id( 'shop' ) ) : ''; if ( ! $_name ) { $product_post_type = get_post_type_object( 'product' ); $_name = $product_post_type->labels->name; } $this->add_crumb( $_name, get_post_type_archive_link( 'product' ) ); } /** * Post type archive trail. */ protected function add_crumbs_post_type_archive() { $post_type = get_post_type_object( get_post_type() ); if ( $post_type ) { $this->add_crumb( $post_type->labels->name, get_post_type_archive_link( get_post_type() ) ); } } /** * Category trail. */ protected function add_crumbs_category() { $this_category = get_category( $GLOBALS['wp_query']->get_queried_object() ); if ( 0 !== intval( $this_category->parent ) ) { $this->term_ancestors( $this_category->term_id, 'category' ); } $this->add_crumb( single_cat_title( '', false ), get_category_link( $this_category->term_id ) ); } /** * Tag trail. */ protected function add_crumbs_tag() { $queried_object = $GLOBALS['wp_query']->get_queried_object(); /* translators: %s: tag name */ $this->add_crumb( sprintf( __( 'Posts tagged “%s”', 'woocommerce' ), single_tag_title( '', false ) ), get_tag_link( $queried_object->term_id ) ); } /** * Add crumbs for date based archives. */ protected function add_crumbs_date() { if ( is_year() || is_month() || is_day() ) { $this->add_crumb( get_the_time( 'Y' ), get_year_link( get_the_time( 'Y' ) ) ); } if ( is_month() || is_day() ) { $this->add_crumb( get_the_time( 'F' ), get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ); } if ( is_day() ) { $this->add_crumb( get_the_time( 'd' ) ); } } /** * Add crumbs for taxonomies */ protected function add_crumbs_tax() { $this_term = $GLOBALS['wp_query']->get_queried_object(); $taxonomy = get_taxonomy( $this_term->taxonomy ); $this->add_crumb( $taxonomy->labels->name ); if ( 0 !== intval( $this_term->parent ) ) { $this->term_ancestors( $this_term->term_id, $this_term->taxonomy ); } $this->add_crumb( single_term_title( '', false ), get_term_link( $this_term->term_id, $this_term->taxonomy ) ); } /** * Add a breadcrumb for author archives. */ protected function add_crumbs_author() { global $author; $userdata = get_userdata( $author ); /* translators: %s: author name */ $this->add_crumb( sprintf( __( 'Author: %s', 'woocommerce' ), $userdata->display_name ) ); } /** * Add crumbs for a term. * * @param int $term_id Term ID. * @param string $taxonomy Taxonomy. */ protected function term_ancestors( $term_id, $taxonomy ) { $ancestors = get_ancestors( $term_id, $taxonomy ); $ancestors = array_reverse( $ancestors ); foreach ( $ancestors as $ancestor ) { $ancestor = get_term( $ancestor, $taxonomy ); if ( ! is_wp_error( $ancestor ) && $ancestor ) { $this->add_crumb( $ancestor->name, get_term_link( $ancestor ) ); } } } /** * Endpoints. */ protected function endpoint_trail() { $action = isset( $_GET['action'] ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; $endpoint = is_wc_endpoint_url() ? WC()->query->get_current_endpoint() : ''; $endpoint_title = $endpoint ? WC()->query->get_endpoint_title( $endpoint, $action ) : ''; if ( $endpoint_title ) { $this->add_crumb( $endpoint_title ); } } /** * Add a breadcrumb for search results. */ protected function search_trail() { if ( is_search() ) { /* translators: %s: search term */ $this->add_crumb( sprintf( __( 'Search results for “%s”', 'woocommerce' ), get_search_query() ), remove_query_arg( 'paged' ) ); } } /** * Add a breadcrumb for pagination. */ protected function paged_trail() { if ( get_query_var( 'paged' ) && 'subcategories' !== woocommerce_get_loop_display_mode() ) { /* translators: %d: page number */ $this->add_crumb( sprintf( __( 'Page %d', 'woocommerce' ), get_query_var( 'paged' ) ) ); } } }
Upload File
Create Folder