Filters

templates/filters/global/reset-filters.php

Copied!
Copy

Filters "Reset filters" button classes

Params
 string $classes Button classes. Default: "btn btn-primary yith-wcan-reset-filters reset-filters"

Return string

Copied!
Copy

Filters "Reset filters" button label

Params
 string $label Button label. Default: "Reset filters".

Return string

templates/filters/global/apply-filters.php

Copied!
Copy

Filters "Apply filters" button classes

Params
 string $classes Button classes. Default: "btn btn-primary apply-filters"

Return string

Copied!
Copy

Filters "Apply filters" button label

Params
 string $label Button label. Default: "Apply filters".

Return string

templates/filters/filter-tax/items/label.php

Copied!
Copy

Filters size of the attachment used for the label design in tax filters

Params
 string           $size   Default: "thumbnail"
 YITH_WCAN_Filter $filter Filter object.

Return string

templates/filters/filter-tax/items/color.php

Copied!
Copy

Filters size of the attachment used for the color design in tax filters

Params
 string           $size   Default: "thumbnail"
 YITH_WCAN_Filter $filter Filter object.

Return string

plugin-options/seo-options.php

Copied!
Copy

Filters Seo panel options

Params
 array $options Panel options.

Return array

plugin-options/preset-options.php

Copied!
Copy

Filters Preset options

Params
 array $options Preset options.

Return array

plugin-options/general-options.php

Copied!
Copy

Filters General panel options

Params
 array $options Panel options.

Return array

plugin-options/filter-preset-options.php

Copied!
Copy

Filters "Filter Preset" options

Params
 array $options "Filter Preset" options.

Return array

plugin-options/filter-options.php

Copied!
Copy

Filters flag representing whether taxonomy supports images or not

Params
 bool   $supports_images Whether taxonomy supports images.
 string $taxonomy_slug   Taxonomy slug.

Return bool

Copied!
Copy

Filters "Filter" options

Params
 array $options Filter options.

Return array

plugin-options/customization-options.php

Copied!
Copy

Filters the default color used in the color picker

Params
 string $default_color Default value: '#A7144C'.

Return string

Copied!
Copy

Filters Customization panel options

Params
 array $options Panel options.

Return array

includes/functions-yith-wcan.php

Copied!
Copy

Allow third party code to hijack plugin behaviour
If someone use this filter, plugin will use returned value instead of calling
get_terms to query database and retrieve matching terms

Params
 array|bool $result Default value: false;
 array      $args   Query args.

Return array|bool

Copied!
Copy

Filters flag representing whether brand plugin is active or not

Params
 bool $active Whether brands plugin is enabled.

Return bool

Copied!
Copy

Filters path where plugin searches for internal templates

Params
 string $path     Template path.
 string $template Searched template.
 array  $atts     Attributes to use in the template.
 bool   $echo     Whether template should be included or printed.

Return string

Copied!
Copy

Filters label used in review filter, for a specific rating value

Params
 string $label Label to filter: %s represents specific rating value.

Return string

includes/class-yith-wcan.php

Copied!
Copy

List of required files

Params
 array $files List of required files.

Return array

Copied!
Copy

Params
 array $compatibilities List of compatible plugins.

Return array

includes/class-yith-wcan-widgets.php

Copied!
Copy

Params
 array $widgets List of available widgets.

Return array

includes/class-yith-wcan-shortcodes.php

Copied!
Copy

Params
 array $shortcodes List of available shortcodes.

Return array

includes/class-yith-wcan-session.php

Copied!
Copy

Filters base url used for sessions

Params
 string $url Base url.

Return string

Copied!
Copy

Filters default query vars used for sessions

Params
 array $query_vars Default: empty array.

Return array

Copied!
Copy

Filters session share url

Params
 string $url Share url.

Return string

Copied!
Copy

Number of seconds of life for any giver session

Params
 int               $ttl        Session ttl.
 int               $session_id Id of current session.
 YITH_WCAN_Session $session    Current session.

Return int

Copied!
Copy

Filters number of seconds that should be added to a session expiration time

Params
 int               $increment  Number of seconds.
 int               $session_id Current session id.
 YITH_WCAN_Session $session    Current session.

Return int

includes/class-yith-wcan-session-factory.php

Copied!
Copy

Params
 string $param Filter session param.

Return string

includes/class-yith-wcan-query.php

Copied!
Copy

Filters query string parameter used to determine if filtering is taking place

Params
 string $query_param Parameter used as flag.

Return string

Copied!
Copy

Params
 array $labels List of filters' labels

Return array

Copied!
Copy

Allow third party code to filter list of supported taxonomies for filtering action

Params
 array $supported List of supported taxonomies.

Return array

Copied!
Copy

Filters the list of query string parameters supported as "filtering query params"

Params
 array $params Supported parameters.

Return array

Copied!
Copy

Allow third party code to filter list of "filtering query vars", as were retrieved by the plugin

Params
 array           $query List of query params.
 YITH_WCAN_Query $this  Query object.

Return array

Copied!
Copy

By default plugin removes term from active filters list if we're on that term archive page.
This filter allows third party code to change this behaviour

Params
 bool   $remove    Whether to remove current term.
 string $term_slug Current term.
 mixed  $qo        Queried object.
 string $taxonomy  Taxonomy.

Return bool

Copied!
Copy

Allow third party code to filter list of active filters

Params
 array $active_filter List of active filters.
 array $query_vars    List of supported query vars found in query string.
 array $labels        Lust of supported labels.

Return array

Copied!
Copy

Allow third party code to filter list of labels for currently active filters

Params
 array $active_filters List of active filters.
 array $query_vars     List of query vars found in query string.

Return array

Copied!
Copy

Allow third party code to filter default parameters used to build filtered query

Params
 array $query_args Default query arguments.

Return array

Copied!
Copy

Filters flag used by the plugin to choose whether to apply filters to current query or not

Params
 bool            $should_filter Whether plugin should apply filters.
 YITH_WCAN_Query $this          Query object.

Return bool

Copied!
Copy

Filters flag used by the plugin to choose whether to alter a specific query or not

Params
 bool            $should_process Whether plugin should apply changes or not.
 WP_Query        $query          Query being tested.
 YITH_WCAN_Query $this           Query object.

Return bool

Copied!
Copy

Filters list of query vars to add to the query

Params
 array $query_vars List of query vars

Return array

Copied!
Copy

Filter tax query parameters in the filtered query

Params
 array           $tax_query Tax query parameter.
 YITH_WCAN_Query $this      Current query.

Return array

Copied!
Copy

Params
 array $post_id List of product ids.

Return array

Copied!
Copy

Params
 bool $suppress Whether to remove existing query vars from the query.

Return bool

Copied!
Copy

Params
 bool $suppress Whether to remove existing conditional tags from the query.

Return bool

Copied!
Copy

Params
 bool $process Whether to process intersection.

Return bool

Copied!
Copy

Params
 string $url        Filter url.
 array  $query_vars List of url query vars.
 string $merge_mode AND or OR.

Return string

Copied!
Copy

Filters url used as base for filtering url

Params
 string $base_url Filter url.

Return string

Copied!
Copy

Filters flag used to determine if current view is filtered or not

Params
 bool $filter Is current view filtered?

Return bool

Copied!
Copy

Params
 bool $process Whether to process intersection.

Return bool

Copied!
Copy

Params
 bool $process Whether to process intersection.

Return bool

Copied!
Copy

Params
 array $args Query args.

Return array

Copied!
Copy

Params
 array|bool $result      Optimized list.
 array      $tax_queries List to optimize.

Return array|bool

includes/class-yith-wcan-query-extended.php

Copied!
Copy

Filters the list of query string parameters supported as "filtering query params"

Params
 array $params Supported parameters.

Return array

Copied!
Copy

Allow third party code to filter list of "filtering query vars", as were retrieved by the plugin

Params
 array           $query List of query params.
 YITH_WCAN_Query $this  Query object.

Return array

Copied!
Copy

Filters flag used by the plugin to choose whether to apply filters to current query or not

Params
 bool            $should_filter Whether plugin should apply filters.
 YITH_WCAN_Query $this          Query object.

Return bool

Copied!
Copy

Params
 array $post_id List of product ids.

Return array

Copied!
Copy

Params
 bool $enabled Whether filter by session is enabled or not

Return bool

Copied!
Copy

Params
 bool $enabled Whether filter by session is enabled or not

Return bool

includes/class-yith-wcan-presets.php

Copied!
Copy

Filters preset post type

Params
 string $string Post type.

Return string

Copied!
Copy

Filters number of terms to include when upgrading from old widget to new preset.
Default is 0, to include all

Params
 int $limit Number of terms to include.

Return int

includes/class-yith-wcan-preset.php

Copied!
Copy

Filters default preset title

Params
 string $title Default title.

Return string

Copied!
Copy

Filters default preset slug

Params
 string $slug Default slug.

Return string

Copied!
Copy

List of classes added to preset HTML wrapper

Params
 array            $classes List of preset classes.
 YITH_WCAN_Preset $this    Preset object.

Return array

Copied!
Copy

Filters the list of preset's filters

Params
 array $filters Presets filters.

Return array

Copied!
Copy

Params
 bool             $can     Whether user has required cap over current preset.
 int              $user_id Id of the user to test.
 string           $cap     Capability to test.
 YITH_WCAN_Preset $this    Preset object.

Return bool

Copied!
Copy

Params
 bool             $can     Whether current user has required cap over current preset.
 string           $cap     Capability to test.
 YITH_WCAN_Preset $this    Preset object.

Return bool

includes/class-yith-wcan-preset-factory.php

Copied!
Copy

Filters arguments of the query used to count presets

Params
 array $args Default arguments.

Return array

Copied!
Copy

Filters presets count

Params
 int   $count Number of presets matching the query.
 array $args  Arguments of the query.

Return int

Copied!
Copy

Filters arguments of the query used to retrieve presets

Params
 array $args Default arguments.

Return array

Copied!
Copy

Filters presets set

Params
 array $results Presets matching the query.
 array $args    Arguments of the query.

Return array

Copied!
Copy

Filters presets list

Params
 array $results Presets list.

Return array

Copied!
Copy

Filters presets supported layouts

Params
 array $layouts Supported layouts.

Return array

includes/class-yith-wcan-install.php

Copied!
Copy

List of filters added to example preset

Params
 array $filters Default filters.

Return array

Copied!
Copy

Maximum number of terms added to filters in example preset

Params
 int $terms_count Maximum number of terms.

Return int

includes/class-yith-wcan-install-extended.php

Copied!
Copy

Filters places bitmap used when registering rewrite endpoint

Params
 int $places_bitmap Bitmap of endpoint "places".

Return int

includes/class-yith-wcan-frontend.php

Copied!
Copy

Whether plugin should use global query or current query

Params
 bool $use_wp_the_query Whether to use global query.

Return bool

Copied!
Copy

Params
 bool $is_search Whether to we're currently in the search page.

Return bool

Copied!
Copy

Whether to hide out of stock products

Params
 bool $hide Whether to hide out of stock products.

Return bool

Copied!
Copy

Used to filter query args before retrieving products (legacy)

Params
 array $args Array of query arguments.

Return array

Copied!
Copy

Used to filter products ids matching filters selection (legacy)

Params
 array $product_ids Array of product ids.

Return array

Copied!
Copy

Whether to skip processing of layered nav attributes in query creation (legacy)

Params
 array $skip Array of query arguments.

Return array

Copied!
Copy

Used to filter list of product ids matching one of the attributes currently set in layered nav (legacy)

Params
 array  $post_ids  Array of product ids.
 array  $args      Query args.
 array  $attribute Current attribute.
 string $value     Attribute value.

Return array

Copied!
Copy

Used to filter list of product ids matching one of the attributes currently set in layered nav (legacy)

Params
 array  $post_ids  Array of product ids.
 array  $args      Query args.
 array  $attribute Current attribute.
 string $value     Attribute value.

Return array

Copied!
Copy

Params
 string $class Body class to add.

Return string

Copied!
Copy

Filters localized data from plugin's frontend script

Params
 array $data Localized data.

Return array

Copied!
Copy

Filters selectors used by plugin's script at frontend

Params
 array $selectors Array of elements selectors.

Return array

Copied!
Copy

Filters supports for vaoiurs third party themes

Params
 array $theme_support Array of theme support flags.

Return array

Copied!
Copy

Filters selector used by identify page content

Params
 string $selector Content selector.

Return string

Copied!
Copy

Filters how many items to show per page in the dropdown

Params
 int $items_per_page Number of items per page.

Return int

Copied!
Copy

Filters currency format used by scripts at frontend

Params
 array $currency_format Array describing currency format.

Return int

Copied!
Copy

Filters labels used at frontend by plugin's scripts

Params
 array $labels Array of plugin's labels.

Return array

Copied!
Copy

Parameters used to localize shortcodes script

Params
 array $param Script params.

Return array

Copied!
Copy

Filters the default color used in the color picker

Params
 string $default_color Default value: '#A7144C'.

Return string

Copied!
Copy

Filters custom css added by the plugin to the page

Params
 string $custom_css Custom css.

Return string

Copied!
Copy

Filters the base url used for filtering

Params
 string $base_url Base filtering url.

Return string

Copied!
Copy

List of hooks and priorities that represents various locations before the list of products

Params
 array $locations Array of hooks and priorities.

Return array

includes/class-yith-wcan-frontend-extended.php

Copied!
Copy

Filters list of parameters used for script localization

Params
 array $script_args List of script parameters.

Return array

includes/class-yith-wcan-filter.php

Copied!
Copy

Filters default parameters used for filter object initialization

Params
 array $defaults Default filter data.

Return array

Copied!
Copy

Filters bool representing whether current filter is active or not

Params
 bool             $is_active Is filter active?
 YITH_WCAN_Filter $this      Filter object.

Return bool

Copied!
Copy

Filters bool representing whether current filter is relevant for current product selection or not

Params
 bool             $is_relevant Is filter relevant?
 YITH_WCAN_Filter $this        Filter object.

Return bool

Copied!
Copy

Filters bool representing whether current filter should use custom term options or not

Params
 bool             $customize_terms Should use custom terms options?
 YITH_WCAN_Filter $this            Filter object.

Return bool

Copied!
Copy

Filters list of additional classes for the filter

Params
 array            $classes List of additional classes
 YITH_WCAN_Filter $this    Filter object.

Return array

Copied!
Copy

Filters list of classes used for items container

Params
 array            $classes List of classes
 YITH_WCAN_Filter $this    Filter object.

Return array

Copied!
Copy

Filters data of current filter

Params
 array            $data Filter's data
 YITH_WCAN_Filter $this Filter object.

Return array

Copied!
Copy

Filters any property of the filter, when retrieved with "view" context.
$prop is replaced with property name

Params
 mixed            $value Property value.
 YITH_WCAN_Filter $this  Filter object.

Return mixed

Copied!
Copy

Filters tag used to render filter's title

Params
 string           $title_tag Title tag.
 YITH_WCAN_Filter $this      Filter object.

Return string

Copied!
Copy

Filters list of classes for the filter title

Params
 array            $classes List of filter's title classes
 YITH_WCAN_Filter $this    Filter object.

Return array

Copied!
Copy

Filters raw HTML for the filter title

Params
 string           $title_html Raw html for filter title.
 string           $title      Filter title.
 YITH_WCAN_Filter $this       Filter object.

Return array

includes/class-yith-wcan-filter-factory.php

Copied!
Copy

Filters name of the class this factory will use when creating object for current filter

Params
 string $classname   Class name for filter object.
 string $filter_type Filter type.
 array  $fliter_data Filter data.

Return string

Copied!
Copy

Filters list of supported filters type

Params
 array $supported_types Filter types.

Return array

Copied!
Copy

Filters list of supported filters designs

Params
 array $supported_design Filter designs.

Return array

includes/class-yith-wcan-cron.php

Copied!
Copy

Filters array of crons available for the plugin

Params
 array $crons Array of existing crons.

Return array

includes/class-yith-wcan-cache-helper.php

Copied!
Copy

Allow third party code to suppress cache handling

Params
 bool $suppress_cache Default value: false.

Return bool

Copied!
Copy

Allow third party code to filter values stored in plugin's cache

Params
 mixed  $value     Cached value.
 string $transient Name of the transient to access.
 string $index     Optional name of the index to access inside transient.

Return mixed

Copied!
Copy

Allow third party code to suppress cache handling

Params
 bool $suppress_cache Default value: false.

Return bool

Copied!
Copy

Allow third party code to suppress cache handling

Params
 bool $suppress_cache Default value: false.

Return bool

Copied!
Copy

Allow third party code to suppress cache handling

Params
 bool $suppress_cache Default value: false.

Return bool

Copied!
Copy

Allow third party code to filter option name for builtin transients.
$transient will be replaced with the id of the cache transient

Params
 string $default_name Default transient name.

Return string

Copied!
Copy

Allow third party code to filter duration for builtin transients.
$transient will be replaced with the id of the cache transient

Params
 int $transient_duration Default transient duration.

Return int

Copied!
Copy

Allow third party code to filter plugin's cached values

Params
 array $transient_array Array of cached values.

Return array

includes/class-yith-wcan-admin.php

Copied!
Copy

Capability needed to access admin panel

Params
 string $panel_capability Default value: '#manage_woocommerce'.

Return string

Copied!
Copy

Filters the array of admin tabs available in admin panel

Params
 array $panel_tabs Default value.

Return array

Copied!
Copy

Filters the default parameters used for admin panel initialization

Params
 array $default_args Default value.

Return array

Copied!
Copy

Filters the terms returned by the ajax search function

Params
 array  $result   Array of results.
 string $term     Searched term.
 string $taxonomy Taxonomy of the terms.

Return string

includes/tables/class-yith-wcan-filter-presets-table.php

Copied!
Copy

Allow to filter the number of presets to show for each page

Params
 int $count Number of items per page.

Return int

includes/filters/class-yith-wcan-filter-tax.php

Copied!
Copy

Filters bool representing whether current filter is active or not

Params
 bool             $is_active Is filter active?
 YITH_WCAN_Filter $this      Filter object.

Return bool

Copied!
Copy

Filters bool representing whether current filter is relevant for current product selection or not

Params
 bool             $is_relevant Is filter relevant?
 YITH_WCAN_Filter $this        Filter object.

Return bool

Copied!
Copy

Filters label shown when no term is selected for current filter

Params
 string $label "All" terms label.

Return string

Copied!
Copy

Filters term meta key where plugins searches for term image (attachment id)

Params
 string $meta_key Image meta key.

Return string

Copied!
Copy

Filters array with options set for a specific term in the filter

Params
 array            $term_options Array of term options.
 int              $term_id      Id of current term.
 YITH_WCAN_Filter $this         Current filter.

Return array

Copied!
Copy

Filters array with options set for a specific attribute in the filter

Params
 array            $term_options Array of term options.
 int              $term_id      Id of current term.
 YITH_WCAN_Filter $this         Current filter.

Return array

Copied!
Copy

Params
 array            $classes Array of additional classes.
 YITH_WCAN_Filter $this    Current filter.

Return array

Copied!
Copy

Used to allow third party code to provide template for a custom design.
$design will be replaced with the design name

Params
 string      $template     Item template.
 int|WP_Term $term_object  Term object or id.
 array       $term_options Term params.

Return string

Copied!
Copy

Filters count shown beside each term in the filter

Params
 int     $count Term's posts count.
 WP_Term $term  Term object.

Return int

Copied!
Copy

Whether current filter has terms relevant to current product selection

Params
 bool $has_relevant_terms Whether filter has relevant terms.

Return bool

Copied!
Copy

Limit applied when retrieving filter's terms.
0 used as default, to enforce no specific limit

Params
 int $limit Term limit.

Return int

Copied!
Copy

Filters the array of formatted terms for a specific taxonomy
$taxonomy will be replaced with taxonomy slug

Params
 array            $formatted_terms List of formatted terms.
 YITH_WCAN_Filter $this            Current filter.

Return array

Copied!
Copy

Params
 bool $process Whether to process intersection.

Return bool

Copied!
Copy

Allow to filter whether a specific term should be hidden

Params
 bool  $hidden       Whether term is hidden.
 array $term_options Term options.

Return bool

includes/data-stores/class-yith-wcan-session-data-store.php

Copied!
Copy

Filter triggered immediately after creating a new session.
It allow to filter id of the session just created

Params
 int $session_id Id of the brand new session.

Return int

Copied!
Copy

Params
 int $ttl Default ttl: 7 days.

Return int

includes/data-stores/class-yith-wcan-preset-data-store.php

Copied!
Copy

Filters list of default post parameters used when crating a new preset post

Params
 array $params Post parameters.

Return array

Copied!
Copy

Filters the result set of presets query

Params
 array $presets Result set.

Return array

Copied!
Copy

Filters the slug => title list of existing presets

Params
 array $presets List of existing presets.

Return array