/home/techb158/balacoffee.com/wp-content/plugins/woocommerce/includes
NameSizeModeActions
abstracts/-0755rm
admin/-0755rm
blocks/-0755rm
cli/-0755rm
customizer/-0755rm
data-stores/-0755rm
emails/-0755rm
export/-0755rm
gateways/-0755rm
import/-0755rm
integrations/-0755rm
interfaces/-0755rm
legacy/-0755rm
libraries/-0755rm
log-handlers/-0755rm
payment-tokens/-0755rm
product-usage/-0755rm
queue/-0755rm
react-admin/-0755rm
rest-api/-0755rm
shipping/-0755rm
shortcodes/-0755rm
theme-support/-0755rm
tracks/-0755rm
traits/-0755rm
walkers/-0755rm
wccom-site/-0755rm
widgets/-0755rm
class-wc-ajax.php1345980644editdlrm
class-wc-auth.php129950644editdlrm
class-wc-autoloader.php53940644editdlrm
class-wc-background-emailer.php46850644editdlrm
class-wc-background-updater.php35350644editdlrm
class-wc-brands-brand-settings-manager.php18260644editdlrm
class-wc-brands-coupons.php70590644editdlrm
class-wc-brands.php356350644editdlrm
class-wc-breadcrumb.php106600644editdlrm
class-wc-cache-helper.php129980644editdlrm
class-wc-cart-fees.php34480644editdlrm
class-wc-cart-session.php259750644editdlrm
class-wc-cart-totals.php291630644editdlrm
class-wc-cart.php773860644editdlrm
class-wc-checkout.php513490644editdlrm
class-wc-cli.php34190644editdlrm
class-wc-comments.php236310644editdlrm
class-wc-countries.php518810644editdlrm
class-wc-coupon.php449200644editdlrm
class-wc-customer-download-log.php34520644editdlrm
class-wc-customer-download.php105870644editdlrm
class-wc-customer.php340000644editdlrm
class-wc-data-exception.php13210644editdlrm
class-wc-data-store.php67520644editdlrm
class-wc-datetime.php23100644editdlrm
class-wc-deprecated-action-hooks.php67460644editdlrm
class-wc-deprecated-filter-hooks.php75180644editdlrm
class-wc-discounts.php375230644editdlrm
class-wc-download-handler.php290530644editdlrm
class-wc-emails.php402440644editdlrm
class-wc-embed.php43420644editdlrm
class-wc-form-handler.php493270644editdlrm
class-wc-frontend-scripts.php351850644editdlrm
class-wc-geo-ip.php311590644editdlrm
class-wc-geolite-integration.php20360644editdlrm
class-wc-geolocation.php116150644editdlrm
class-wc-https.php44390644editdlrm
class-wc-install.php1190170644editdlrm
class-wc-integrations.php13080644editdlrm
class-wc-log-levels.php39920644editdlrm
class-wc-logger.php96390644editdlrm
class-wc-meta-data.php22600644editdlrm
class-wc-order-factory.php89510644editdlrm
class-wc-order-item-coupon.php41750644editdlrm
class-wc-order-item-fee.php102280644editdlrm
class-wc-order-item-meta.php59420644editdlrm
class-wc-order-item-product.php179620644editdlrm
class-wc-order-item-shipping.php98150644editdlrm
class-wc-order-item-tax.php66440644editdlrm
class-wc-order-item.php219070644editdlrm
class-wc-order-query.php26130644editdlrm
class-wc-order-refund.php61350644editdlrm
class-wc-order.php794230644editdlrm
class-wc-payment-gateways.php146010644editdlrm
class-wc-payment-tokens.php63900644editdlrm
class-wc-post-data.php396170644editdlrm
class-wc-post-types.php336800644editdlrm
class-wc-privacy-background-process.php18330644editdlrm
class-wc-privacy-erasers.php139410644editdlrm
class-wc-privacy-exporters.php150440644editdlrm
class-wc-privacy.php176290644editdlrm
class-wc-product-attribute.php80570644editdlrm
class-wc-product-download.php134940644editdlrm
class-wc-product-external.php51040644editdlrm
class-wc-product-factory.php46980644editdlrm
class-wc-product-grouped.php69740644editdlrm
class-wc-product-query.php23280644editdlrm
class-wc-product-simple.php27650644editdlrm
class-wc-product-variable.php243340644editdlrm
class-wc-product-variation.php206610644editdlrm
class-wc-query.php342990644editdlrm
class-wc-rate-limiter.php41000644editdlrm
class-wc-regenerate-images-request.php79230644editdlrm
class-wc-regenerate-images.php158060644editdlrm
class-wc-register-wp-admin-settings.php51710644editdlrm
class-wc-rest-authentication.php220680644editdlrm
class-wc-rest-exception.php2760644editdlrm
class-wc-session-handler.php251620644editdlrm
class-wc-shipping-rate.php95660644editdlrm
class-wc-shipping-zone.php133920644editdlrm
class-wc-shipping-zones.php51150644editdlrm
class-wc-shipping.php133710644editdlrm
class-wc-shortcodes.php192740644editdlrm
class-wc-structured-data.php250110644editdlrm
class-wc-tax.php406940644editdlrm
class-wc-template-loader.php209110644editdlrm
class-wc-tracker.php527310644editdlrm
class-wc-validation.php59290644editdlrm
class-wc-webhook.php308070644editdlrm
class-woocommerce.php638140644editdlrm
wc-account-functions.php144850644editdlrm
wc-attribute-functions.php223770644editdlrm
wc-brands-functions.php42700644editdlrm
wc-cart-functions.php213080644editdlrm
wc-conditional-functions.php159020644editdlrm
wc-core-functions.php806030644editdlrm
wc-coupon-functions.php56980644editdlrm
wc-deprecated-functions.php407310644editdlrm
wc-formatting-functions.php510930644editdlrm
wc-interactivity-api-functions.php22190644editdlrm
wc-notice-functions.php86960644editdlrm
wc-order-functions.php450650644editdlrm
wc-order-item-functions.php51530644editdlrm
wc-order-step-logger-functions.php61140644editdlrm
wc-page-functions.php96570644editdlrm
wc-product-functions.php689920644editdlrm
wc-rest-functions.php142680644editdlrm
wc-stock-functions.php178510644editdlrm
wc-template-functions.php1454760644editdlrm
wc-template-hooks.php131510644editdlrm
wc-term-functions.php251580644editdlrm
wc-update-functions.php1048370644editdlrm
wc-user-functions.php361970644editdlrm
wc-webhook-functions.php59050644editdlrm
wc-widget-functions.php20630644editdlrm
Edit: /home/techb158/balacoffee.com/wp-content/plugins/woocommerce/includes/class-wc-breadcrumb.php (10660B)
crumbs[] = array( wp_strip_all_tags( $name ), $link, ); } /** * Reset crumbs. * * @return void */ 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. * * @return void */ 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.. * * @return void */ protected function add_crumbs_home() { $this->add_crumb( single_post_title( '', false ) ); } /** * 404 trail. * * @return void */ protected function add_crumbs_404() { $this->add_crumb( __( 'Error 404', 'woocommerce' ) ); } /** * Attachment trail. * * @return void */ 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. * @return void */ 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. * * @return void */ 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] ); } } // On WC endpoints, get_the_title() returns the endpoint title (via wc_page_endpoint_title filter). // Use post_title directly to avoid duplicates like "Orders / Orders" instead of "My Account / Orders". $permalink = get_permalink(); if ( is_wc_endpoint_url() ) { $this->add_crumb( $post->post_title, $permalink ? $permalink : '' ); } else { $this->add_crumb( get_the_title(), $permalink ? $permalink : '' ); } $this->endpoint_trail(); } /** * Product category trail. * * @return void */ 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. * * @return void */ 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. * * @return void */ 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. * * @return void */ 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. * * @return void */ protected function add_crumbs_category() { $this_category = get_category( $GLOBALS['wp_query']->get_queried_object() ); if ( is_wp_error( $this_category ) || ! $this_category ) { return; } 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. * * @return void */ 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. * * @return void */ 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. * * @return void */ protected function add_crumbs_tax() { $this_term = $GLOBALS['wp_query']->get_queried_object(); $taxonomy = get_taxonomy( $this_term->taxonomy ); if ( 'product_brand' !== $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. * * @return void */ 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. * @return void */ 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. * * @return void */ 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. * * @return void */ 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. * * @return void */ 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' ) ) ); } } }