Version Description
- Fix - Incorrect description
- Fix - Selected filters area Attribute name
- Fix - Selected filters with Filters Conditions
- Fix - Tags cloud
Download this release
Release Info
Developer | RazyRx |
Plugin | Advanced AJAX Product Filters |
Version | 1.3.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.3.2.3 to 1.3.2.4
- berocket/assets/css/admin.css +2 -0
- berocket/assets/js/admin.js +1 -0
- berocket/framework.php +7 -2
- berocket/includes/custom_post.php +57 -0
- includes/custom_post.php +1 -1
- includes/widget.php +60 -8
- js/widget.min.js +10 -6
- readme.txt +8 -2
- templates/checkbox.php +2 -3
- templates/color.php +2 -3
- templates/disabled/checkbox.php +2 -3
- templates/disabled/color.php +1 -2
- templates/disabled/radio.php +2 -3
- templates/disabled/select.php +1 -2
- templates/radio.php +2 -3
- templates/select.php +1 -2
- templates/tag_cloud.php +2 -2
- woocommerce-filters.php +2 -2
berocket/assets/css/admin.css
CHANGED
@@ -1429,6 +1429,7 @@
|
|
1429 |
position: absolute;
|
1430 |
top: -30px;
|
1431 |
font-size: 30px;
|
|
|
1432 |
}
|
1433 |
.br_conditions .br_html_condition:first-child:before {
|
1434 |
display: none;
|
@@ -1446,6 +1447,7 @@
|
|
1446 |
position: absolute;
|
1447 |
top: -30px;
|
1448 |
font-size: 30px;
|
|
|
1449 |
}
|
1450 |
.br_html_condition .br_cond_select:first-child:before {
|
1451 |
display: none;
|
1429 |
position: absolute;
|
1430 |
top: -30px;
|
1431 |
font-size: 30px;
|
1432 |
+
line-height: 18px;
|
1433 |
}
|
1434 |
.br_conditions .br_html_condition:first-child:before {
|
1435 |
display: none;
|
1447 |
position: absolute;
|
1448 |
top: -30px;
|
1449 |
font-size: 30px;
|
1450 |
+
line-height: 18px;
|
1451 |
}
|
1452 |
.br_html_condition .br_cond_select:first-child:before {
|
1453 |
display: none;
|
berocket/assets/js/admin.js
CHANGED
@@ -555,6 +555,7 @@ jQuery(document).on('click', function() {
|
|
555 |
var $html = jQuery(html);
|
556 |
var $tbody = $html.find('.berocket_post_set_new_sortable').first().parents('tbody').first();
|
557 |
$('.berocket_post_set_new_sortable').first().parents('tbody').first().replaceWith($tbody);
|
|
|
558 |
});
|
559 |
});
|
560 |
});
|
555 |
var $html = jQuery(html);
|
556 |
var $tbody = $html.find('.berocket_post_set_new_sortable').first().parents('tbody').first();
|
557 |
$('.berocket_post_set_new_sortable').first().parents('tbody').first().replaceWith($tbody);
|
558 |
+
jQuery(document).trigger('BRsortable_loaded_html');
|
559 |
});
|
560 |
});
|
561 |
});
|
berocket/framework.php
CHANGED
@@ -537,6 +537,11 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
537 |
}
|
538 |
|
539 |
foreach ( $tabs_info as $tab_name => $tab_info ) {
|
|
|
|
|
|
|
|
|
|
|
540 |
$page_menu .= '<li>';
|
541 |
|
542 |
$page_menu .= '<a href="' . ( empty($tab_info['link']) ? add_query_arg('tab', sanitize_title( $tab_name ), $setup_style['settings_url']) : $tab_info['link'] ) .
|
@@ -547,7 +552,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
547 |
if ( $tab_info['icon'] ) {
|
548 |
$page_menu .= '<span class="fa fa-' . $tab_info['icon'] . '"></span>';
|
549 |
}
|
550 |
-
$page_menu .= $
|
551 |
|
552 |
$page_menu .= '</li>';
|
553 |
|
@@ -555,7 +560,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
555 |
if ( $tab_info['icon'] ) {
|
556 |
$title .= '<span class="fa fa-' . $tab_info['icon'] . '"></span>';
|
557 |
}
|
558 |
-
$title .= $
|
559 |
}
|
560 |
|
561 |
$is_first = false;
|
537 |
}
|
538 |
|
539 |
foreach ( $tabs_info as $tab_name => $tab_info ) {
|
540 |
+
if( isset($tab_info['name']) ) {
|
541 |
+
$display_name = $tab_info['name'];
|
542 |
+
} else {
|
543 |
+
$display_name = $tab_name;
|
544 |
+
}
|
545 |
$page_menu .= '<li>';
|
546 |
|
547 |
$page_menu .= '<a href="' . ( empty($tab_info['link']) ? add_query_arg('tab', sanitize_title( $tab_name ), $setup_style['settings_url']) : $tab_info['link'] ) .
|
552 |
if ( $tab_info['icon'] ) {
|
553 |
$page_menu .= '<span class="fa fa-' . $tab_info['icon'] . '"></span>';
|
554 |
}
|
555 |
+
$page_menu .= $display_name . '</a>';
|
556 |
|
557 |
$page_menu .= '</li>';
|
558 |
|
560 |
if ( $tab_info['icon'] ) {
|
561 |
$title .= '<span class="fa fa-' . $tab_info['icon'] . '"></span>';
|
562 |
}
|
563 |
+
$title .= $display_name;
|
564 |
}
|
565 |
|
566 |
$is_first = false;
|
berocket/includes/custom_post.php
CHANGED
@@ -64,6 +64,7 @@ if ( ! class_exists('BeRocket_custom_post_class') ) {
|
|
64 |
add_filter('berocket_custom_post_'.$this->post_name.'_manage_edit_columns', array($this, 'sortable_manage_edit_columns'));
|
65 |
}
|
66 |
add_filter('berocket_custom_post_'.$this->post_name.'_get_custom_posts_args_default', array($this, 'sortable_get_custom_post'));
|
|
|
67 |
}
|
68 |
if( ! empty($this->post_settings['capability_type']) && $this->post_settings['capability_type'] != 'product' ) {
|
69 |
add_filter('BeRocket_admin_init_user_capabilities', array($this, 'init_user_capabilities'));
|
@@ -110,6 +111,7 @@ if ( ! class_exists('BeRocket_custom_post_class') ) {
|
|
110 |
if( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && $_GET['post_type'] == $this->post_name ){
|
111 |
wp_enqueue_script( 'berocket_framework_admin' );
|
112 |
wp_enqueue_style( 'berocket_framework_admin_style' );
|
|
|
113 |
}
|
114 |
add_filter( 'bulk_actions-edit-'.$this->post_name, array( $this, 'bulk_actions_edit' ) );
|
115 |
add_filter( 'views_edit-'.$this->post_name, array( $this, 'views_edit' ) );
|
@@ -373,6 +375,21 @@ if ( ! class_exists('BeRocket_custom_post_class') ) {
|
|
373 |
update_post_meta($BRsortable_id, 'berocket_post_order', $BRorder);
|
374 |
}
|
375 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
}
|
377 |
public function sortable_get_posts( $query ){
|
378 |
global $pagenow;
|
@@ -433,6 +450,46 @@ if ( ! class_exists('BeRocket_custom_post_class') ) {
|
|
433 |
$columns["berocket_sortable"] = __( "Order", 'BeRocket_domain' );
|
434 |
return $columns;
|
435 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
public function init_user_capabilities($user_caps) {
|
437 |
$cap_settings = $this->post_settings;
|
438 |
$cap_settings['capabilities'] = array();
|
64 |
add_filter('berocket_custom_post_'.$this->post_name.'_manage_edit_columns', array($this, 'sortable_manage_edit_columns'));
|
65 |
}
|
66 |
add_filter('berocket_custom_post_'.$this->post_name.'_get_custom_posts_args_default', array($this, 'sortable_get_custom_post'));
|
67 |
+
add_action('berocket_custom_post_'.$this->post_name.'_admin_init_only', array($this, 'jquery_sortable_for_posts'));
|
68 |
}
|
69 |
if( ! empty($this->post_settings['capability_type']) && $this->post_settings['capability_type'] != 'product' ) {
|
70 |
add_filter('BeRocket_admin_init_user_capabilities', array($this, 'init_user_capabilities'));
|
111 |
if( 'edit.php' == $pagenow && isset( $_GET['post_type'] ) && $_GET['post_type'] == $this->post_name ){
|
112 |
wp_enqueue_script( 'berocket_framework_admin' );
|
113 |
wp_enqueue_style( 'berocket_framework_admin_style' );
|
114 |
+
do_action('berocket_custom_post_'.$this->post_name.'_admin_init_only', $this->post_type_parameters);
|
115 |
}
|
116 |
add_filter( 'bulk_actions-edit-'.$this->post_name, array( $this, 'bulk_actions_edit' ) );
|
117 |
add_filter( 'views_edit-'.$this->post_name, array( $this, 'views_edit' ) );
|
375 |
update_post_meta($BRsortable_id, 'berocket_post_order', $BRorder);
|
376 |
}
|
377 |
}
|
378 |
+
if( ! empty($_POST['BRsortable']) ) {
|
379 |
+
$BRsortable = $_POST['BRsortable'];
|
380 |
+
if( ! is_array($BRsortable) ) {
|
381 |
+
$BRsortable = array();
|
382 |
+
}
|
383 |
+
foreach($BRsortable as $BRsortable_post) {
|
384 |
+
$BRsortable_id = sanitize_key($BRsortable_post['id']);
|
385 |
+
$BRorder = sanitize_key($BRsortable_post['order']);
|
386 |
+
$BRsortable_id = intval($BRsortable_id);
|
387 |
+
$BRorder = intval($BRorder);
|
388 |
+
if( current_user_can('edit_post', $BRsortable_id) ) {
|
389 |
+
update_post_meta($BRsortable_id, 'berocket_post_order', $BRorder);
|
390 |
+
}
|
391 |
+
}
|
392 |
+
}
|
393 |
}
|
394 |
public function sortable_get_posts( $query ){
|
395 |
global $pagenow;
|
450 |
$columns["berocket_sortable"] = __( "Order", 'BeRocket_domain' );
|
451 |
return $columns;
|
452 |
}
|
453 |
+
public function jquery_sortable_for_posts() {
|
454 |
+
wp_enqueue_script('jquery-ui-sortable');
|
455 |
+
add_action('in_admin_footer', array($this, 'sortable_in_admin_footer'));
|
456 |
+
}
|
457 |
+
public function sortable_in_admin_footer() {
|
458 |
+
global $wp_query;
|
459 |
+
if( $wp_query->is_main_query() && $wp_query->max_num_pages == 1 ) {
|
460 |
+
?>
|
461 |
+
<script>
|
462 |
+
jQuery(document).ready(function() {
|
463 |
+
var BRsortable_jquery_ui = function() {
|
464 |
+
if( ! jQuery("#the-list").is(".ui-sortable") ) {
|
465 |
+
jQuery("#the-list .column-name").prepend(jQuery("<i class='fa fa-bars'></i>"));
|
466 |
+
jQuery("#the-list").sortable({
|
467 |
+
handle:".fa-bars",
|
468 |
+
stop: function() {
|
469 |
+
jQuery("#the-list .berocket_post_set_new_sortable_input input").each(function(i, o) {
|
470 |
+
jQuery(o).val(i);
|
471 |
+
});
|
472 |
+
var BRsortable = [];
|
473 |
+
jQuery("#the-list .berocket_post_set_new_sortable_input").each(function() {
|
474 |
+
BRsortable.push({id:jQuery(this).find(".berocket_post_set_new_sortable_set").data('post_id'), order:jQuery(this).find("input").val()});
|
475 |
+
});
|
476 |
+
jQuery.post(location.href, {braction:'berocket_custom_post_sortable', BRsortable:BRsortable}, function(html) {
|
477 |
+
var $html = jQuery(html);
|
478 |
+
var $tbody = $html.find('.berocket_post_set_new_sortable').first().parents('tbody').first();
|
479 |
+
jQuery('.berocket_post_set_new_sortable').first().parents('tbody').first().replaceWith($tbody);
|
480 |
+
jQuery(document).trigger('BRsortable_loaded_html');
|
481 |
+
});
|
482 |
+
}
|
483 |
+
});
|
484 |
+
}
|
485 |
+
}
|
486 |
+
BRsortable_jquery_ui();
|
487 |
+
jQuery(document).on("BRsortable_loaded_html", BRsortable_jquery_ui);
|
488 |
+
});
|
489 |
+
</script>
|
490 |
+
<?php
|
491 |
+
}
|
492 |
+
}
|
493 |
public function init_user_capabilities($user_caps) {
|
494 |
$cap_settings = $this->post_settings;
|
495 |
$cap_settings['capabilities'] = array();
|
includes/custom_post.php
CHANGED
@@ -289,7 +289,7 @@ class BeRocket_AAPF_single_filter extends BeRocket_custom_post_class {
|
|
289 |
<div>
|
290 |
<table>
|
291 |
<tr>
|
292 |
-
<th><?php _e('Hide this
|
293 |
<td>
|
294 |
<label>
|
295 |
<input type="checkbox" value="1" name="<?php echo $this->post_name; ?>[is_hide_mobile]"<?php if( ! empty($options['is_hide_mobile']) ) echo ' checked'; ?>>
|
289 |
<div>
|
290 |
<table>
|
291 |
<tr>
|
292 |
+
<th><?php _e('Hide this filter on:', 'BeRocket_AJAX_domain'); ?></th>
|
293 |
<td>
|
294 |
<label>
|
295 |
<input type="checkbox" value="1" name="<?php echo $this->post_name; ?>[is_hide_mobile]"<?php if( ! empty($options['is_hide_mobile']) ) echo ' checked'; ?>>
|
includes/widget.php
CHANGED
@@ -754,11 +754,13 @@ class BeRocket_AAPF_Widget extends WP_Widget {
|
|
754 |
$terms = br_get_cache ( $custom_taxonomy.$order_values_by, $filter_type.$wp_check_product_cat );
|
755 |
if( br_is_filtered() || $terms === false || ( ! empty($child_parent) && ( $child_parent == 'parent' || $child_parent == 'child' ) ) ) {
|
756 |
if ( $custom_taxonomy == 'product_cat' ) {
|
757 |
-
$
|
758 |
-
|
759 |
-
|
760 |
-
$terms = self::
|
761 |
}
|
|
|
|
|
762 |
} else {
|
763 |
$terms = self::get_terms_child_parent ( $child_parent, $custom_taxonomy, FALSE, ( isset($child_parent_depth) ? $child_parent_depth : 0 ) );
|
764 |
$terms = BeRocket_AAPF_Widget::get_attribute_values( $custom_taxonomy, 'id', ( empty($br_options['show_all_values']) ), ( ! empty($br_options['recount_products']) ), $terms, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
|
@@ -1868,6 +1870,32 @@ if( BeRocket_AAPF::$debug_mode ) {
|
|
1868 |
$terms2 = $input_terms;
|
1869 |
unset( $input_terms );
|
1870 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1871 |
|
1872 |
$re = array();
|
1873 |
if( is_array($terms2) ) {
|
@@ -1918,6 +1946,32 @@ if( BeRocket_AAPF::$debug_mode ) {
|
|
1918 |
}
|
1919 |
return $re;
|
1920 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1921 |
|
1922 |
if ( $count_filtering ) {
|
1923 |
if ( class_exists('WP_Meta_Query') && class_exists('WP_Tax_Query') ) {
|
@@ -2232,8 +2286,7 @@ if( BeRocket_AAPF::$debug_mode ) {
|
|
2232 |
if( ! $is_child && $input_term->term_id == 'R__term_id__R' ) {
|
2233 |
$re2[0] = $input_term;
|
2234 |
$is_child = true;
|
2235 |
-
}
|
2236 |
-
if( $input_term->term_id == $re_term->term_id ) {
|
2237 |
$remove = false;
|
2238 |
if( $is_child ) {
|
2239 |
$re2[$re_id] = $re_term;
|
@@ -3194,7 +3247,7 @@ if( BeRocket_AAPF::$debug_mode ) {
|
|
3194 |
'parent' => 0,
|
3195 |
);
|
3196 |
if( $attribute == 'product_cat' ) {
|
3197 |
-
$current_terms =
|
3198 |
} else {
|
3199 |
$current_terms = get_terms( $attribute, $args_terms );
|
3200 |
}
|
@@ -3247,5 +3300,4 @@ if( BeRocket_AAPF::$debug_mode ) {
|
|
3247 |
public static function old_wc_compatible( $query, $new = false ) {
|
3248 |
return br_filters_old_wc_compatible( $query, $new );
|
3249 |
}
|
3250 |
-
|
3251 |
}
|
754 |
$terms = br_get_cache ( $custom_taxonomy.$order_values_by, $filter_type.$wp_check_product_cat );
|
755 |
if( br_is_filtered() || $terms === false || ( ! empty($child_parent) && ( $child_parent == 'parent' || $child_parent == 'child' ) ) ) {
|
756 |
if ( $custom_taxonomy == 'product_cat' ) {
|
757 |
+
if( empty($child_parent) || ( $child_parent != 'parent' && $child_parent != 'child' ) ) {
|
758 |
+
$terms = br_get_cat_hierarchy(array());
|
759 |
+
} else {
|
760 |
+
$terms = self::get_terms_child_parent ( ( empty($child_parent) ? '' : $child_parent ), $custom_taxonomy, FALSE, ( isset($child_parent_depth) ? $child_parent_depth : null ) );
|
761 |
}
|
762 |
+
|
763 |
+
$terms = self::set_terms_on_same_level( $terms, array(), ($type != 'checkbox' && $type != 'radio') );
|
764 |
} else {
|
765 |
$terms = self::get_terms_child_parent ( $child_parent, $custom_taxonomy, FALSE, ( isset($child_parent_depth) ? $child_parent_depth : 0 ) );
|
766 |
$terms = BeRocket_AAPF_Widget::get_attribute_values( $custom_taxonomy, 'id', ( empty($br_options['show_all_values']) ), ( ! empty($br_options['recount_products']) ), $terms, ( isset($cat_value_limit) ? $cat_value_limit : null ), $operator );
|
1870 |
$terms2 = $input_terms;
|
1871 |
unset( $input_terms );
|
1872 |
}
|
1873 |
+
if( $input_terms !== FALSE && is_array($input_terms) && is_array($re) ) {
|
1874 |
+
$re2 = array();
|
1875 |
+
$is_child = false;
|
1876 |
+
foreach($re as $re_id => $re_term) {
|
1877 |
+
$remove = true;
|
1878 |
+
foreach($input_terms as $input_term) {
|
1879 |
+
if( ! $is_child && $input_term->term_id == 'R__term_id__R' ) {
|
1880 |
+
$re2[0] = $input_term;
|
1881 |
+
$is_child = true;
|
1882 |
+
}
|
1883 |
+
if( $input_term->term_id == $re_term->term_id ) {
|
1884 |
+
$remove = false;
|
1885 |
+
if( $is_child ) {
|
1886 |
+
$re2[$re_id] = $re_term;
|
1887 |
+
}
|
1888 |
+
break;
|
1889 |
+
}
|
1890 |
+
}
|
1891 |
+
if( $remove ) {
|
1892 |
+
unset($re[$re_id]);
|
1893 |
+
}
|
1894 |
+
}
|
1895 |
+
if( $is_child ) {
|
1896 |
+
$re = $re2;
|
1897 |
+
}
|
1898 |
+
}
|
1899 |
|
1900 |
$re = array();
|
1901 |
if( is_array($terms2) ) {
|
1946 |
}
|
1947 |
return $re;
|
1948 |
}
|
1949 |
+
if( $input_terms !== FALSE && is_array($input_terms) && is_array($re) ) {
|
1950 |
+
$re2 = array();
|
1951 |
+
$is_child = false;
|
1952 |
+
foreach($re as $re_id => $re_term) {
|
1953 |
+
$remove = true;
|
1954 |
+
foreach($input_terms as $input_term) {
|
1955 |
+
if( ! $is_child && $input_term->term_id == 'R__term_id__R' ) {
|
1956 |
+
$re2[0] = $input_term;
|
1957 |
+
$is_child = true;
|
1958 |
+
}
|
1959 |
+
if( $input_term->term_id == $re_term->term_id ) {
|
1960 |
+
$remove = false;
|
1961 |
+
if( $is_child ) {
|
1962 |
+
$re2[$re_id] = $re_term;
|
1963 |
+
}
|
1964 |
+
break;
|
1965 |
+
}
|
1966 |
+
}
|
1967 |
+
if( $remove ) {
|
1968 |
+
unset($re[$re_id]);
|
1969 |
+
}
|
1970 |
+
}
|
1971 |
+
if( $is_child ) {
|
1972 |
+
$re = $re2;
|
1973 |
+
}
|
1974 |
+
}
|
1975 |
|
1976 |
if ( $count_filtering ) {
|
1977 |
if ( class_exists('WP_Meta_Query') && class_exists('WP_Tax_Query') ) {
|
2286 |
if( ! $is_child && $input_term->term_id == 'R__term_id__R' ) {
|
2287 |
$re2[0] = $input_term;
|
2288 |
$is_child = true;
|
2289 |
+
} elseif( $input_term->term_id == $re_term->term_id ) {
|
|
|
2290 |
$remove = false;
|
2291 |
if( $is_child ) {
|
2292 |
$re2[$re_id] = $re_term;
|
3247 |
'parent' => 0,
|
3248 |
);
|
3249 |
if( $attribute == 'product_cat' ) {
|
3250 |
+
$current_terms = br_get_taxonomy_hierarchy(array(), 0, 1);
|
3251 |
} else {
|
3252 |
$current_terms = get_terms( $attribute, $args_terms );
|
3253 |
}
|
3300 |
public static function old_wc_compatible( $query, $new = false ) {
|
3301 |
return br_filters_old_wc_compatible( $query, $new );
|
3302 |
}
|
|
|
3303 |
}
|
js/widget.min.js
CHANGED
@@ -440,6 +440,7 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
440 |
attributes: [],
|
441 |
cat_limit: [],
|
442 |
};
|
|
|
443 |
|
444 |
if ( ! $force && berocket_aapf_widget_wait_for_button && the_ajax_script.ub_product_count ) {
|
445 |
t_args = args;
|
@@ -653,12 +654,15 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
653 |
berocket_aapf_widget_first_page_jump = true;
|
654 |
berocket_aapf_404_jump_fail = false;
|
655 |
berocket_aapf_404_jump = false;
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
|
|
|
|
|
|
662 |
}, return_type).fail(function() {
|
663 |
if ( berocket_last_ajax_request_id == berocket_this_ajax_request_id ) {
|
664 |
if( ! berocket_aapf_404_jump_fail ) {
|
440 |
attributes: [],
|
441 |
cat_limit: [],
|
442 |
};
|
443 |
+
var attribute_selected_count_start = get_widget_selected_filters().length;
|
444 |
|
445 |
if ( ! $force && berocket_aapf_widget_wait_for_button && the_ajax_script.ub_product_count ) {
|
446 |
t_args = args;
|
654 |
berocket_aapf_widget_first_page_jump = true;
|
655 |
berocket_aapf_404_jump_fail = false;
|
656 |
berocket_aapf_404_jump = false;
|
657 |
+
if( attribute_selected_count_start != get_widget_selected_filters().length ) {
|
658 |
+
updateProducts();
|
659 |
+
} else {
|
660 |
+
// call user func after_update
|
661 |
+
$(document).trigger('berocket_ajax_products_loaded');
|
662 |
+
$(document).trigger('berocket_ajax_filtering_end');
|
663 |
+
if( the_ajax_script.user_func != null )
|
664 |
+
berocket_fire( the_ajax_script.user_func.after_update );
|
665 |
+
}
|
666 |
}, return_type).fail(function() {
|
667 |
if ( berocket_last_ajax_request_id == berocket_this_ajax_request_id ) {
|
668 |
if( ! berocket_aapf_404_jump_fail ) {
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://berocket.com/product/woocommerce-ajax-products-filter
|
|
5 |
Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
-
Stable tag: 1.3.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -187,7 +187,13 @@ You can try this plugin's admin side [here](http://berocket.com/product/woocomme
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
-
= 1.3.2.
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
* Fix - Variation limitation with custom database prefix
|
192 |
* Fix - Scrollbar update
|
193 |
|
5 |
Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
+
Stable tag: 1.3.2.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 1.3.2.4 =
|
191 |
+
* Fix - Incorrect description
|
192 |
+
* Fix - Selected filters area Attribute name
|
193 |
+
* Fix - Selected filters with Filters Conditions
|
194 |
+
* Fix - Tags cloud
|
195 |
+
|
196 |
+
= 1.3.2.3 =
|
197 |
* Fix - Variation limitation with custom database prefix
|
198 |
* Fix - Scrollbar update
|
199 |
|
templates/checkbox.php
CHANGED
@@ -22,11 +22,11 @@ $child_parent_depth = berocket_isset($child_parent_depth, false, 0);
|
|
22 |
if ( $child_parent == 'parent' ) {
|
23 |
$child_parent_depth = 0;
|
24 |
}
|
25 |
-
$is_first = true;
|
26 |
$added_categories = array();
|
27 |
$item_i = 0;
|
28 |
if ( ! empty($terms) ):
|
29 |
foreach( $terms as $term ):
|
|
|
30 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
31 |
if( empty($term_taxonomy_echo) ) {
|
32 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
@@ -70,7 +70,7 @@ if ( ! empty($terms) ):
|
|
70 |
type='<?php echo ( ! empty( $disable_multiple_ranges ) ? 'radio' : 'checkbox' )?>'
|
71 |
autocomplete="off"
|
72 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] )?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
73 |
-
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
74 |
data-filter_type='<?php echo berocket_isset($filter_type) ?>' <?php if( ! empty($term->term_id) ) { ?>data-term_id='<?php echo $term->term_id ?>'<?php } ?> data-operator='<?php echo $operator ?>'
|
75 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
76 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
@@ -102,7 +102,6 @@ if ( ! empty($terms) ):
|
|
102 |
}
|
103 |
if ( $is_child_parent && $is_first ) {
|
104 |
?></ul></li><?php
|
105 |
-
$is_first = false;
|
106 |
}
|
107 |
endforeach;?>
|
108 |
<?php
|
22 |
if ( $child_parent == 'parent' ) {
|
23 |
$child_parent_depth = 0;
|
24 |
}
|
|
|
25 |
$added_categories = array();
|
26 |
$item_i = 0;
|
27 |
if ( ! empty($terms) ):
|
28 |
foreach( $terms as $term ):
|
29 |
+
$is_first = ($term->term_id == 'R__term_id__R');
|
30 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
31 |
if( empty($term_taxonomy_echo) ) {
|
32 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
70 |
type='<?php echo ( ! empty( $disable_multiple_ranges ) ? 'radio' : 'checkbox' )?>'
|
71 |
autocomplete="off"
|
72 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] )?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
73 |
+
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . htmlentities(berocket_isset($term, 'name'), ENT_QUOTES) . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
74 |
data-filter_type='<?php echo berocket_isset($filter_type) ?>' <?php if( ! empty($term->term_id) ) { ?>data-term_id='<?php echo $term->term_id ?>'<?php } ?> data-operator='<?php echo $operator ?>'
|
75 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
76 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
102 |
}
|
103 |
if ( $is_child_parent && $is_first ) {
|
104 |
?></ul></li><?php
|
|
|
105 |
}
|
106 |
endforeach;?>
|
107 |
<?php
|
templates/color.php
CHANGED
@@ -11,7 +11,6 @@ $child_parent_depth = berocket_isset($child_parent_depth, false, 0);
|
|
11 |
if ( $child_parent == 'parent' ) {
|
12 |
$child_parent_depth = 0;
|
13 |
}
|
14 |
-
$is_first = true;
|
15 |
$item_i = 0;
|
16 |
if ( is_array(berocket_isset($terms)) ) {
|
17 |
if( berocket_isset($color_image_checked) == 'brchecked_custom' ) {
|
@@ -55,6 +54,7 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
55 |
echo '</style>';
|
56 |
}
|
57 |
foreach ( $terms as $term ) {
|
|
|
58 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
59 |
if( empty($term_taxonomy_echo) ) {
|
60 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
@@ -148,7 +148,7 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
148 |
type='<?php echo ( ! empty( $disable_multiple ) ? 'radio' : 'checkbox' )?>'
|
149 |
autocomplete="off"
|
150 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] ) ?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
151 |
-
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
152 |
data-filter_type='<?php echo berocket_isset($filter_type) ?>' <?php if( ! empty($term->term_id) ) { ?>data-term_id='<?php echo $term->term_id ?>'<?php } ?> data-operator='<?php echo $operator ?>'
|
153 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
154 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
@@ -171,7 +171,6 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
171 |
?>
|
172 |
</ul></li>
|
173 |
<?php
|
174 |
-
$is_first = false;
|
175 |
}
|
176 |
} ?>
|
177 |
<?php if( $is_child_parent && is_array(berocket_isset($terms)) && count($terms) == 1 ) {
|
11 |
if ( $child_parent == 'parent' ) {
|
12 |
$child_parent_depth = 0;
|
13 |
}
|
|
|
14 |
$item_i = 0;
|
15 |
if ( is_array(berocket_isset($terms)) ) {
|
16 |
if( berocket_isset($color_image_checked) == 'brchecked_custom' ) {
|
54 |
echo '</style>';
|
55 |
}
|
56 |
foreach ( $terms as $term ) {
|
57 |
+
$is_first = ($term->term_id == 'R__term_id__R');
|
58 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
59 |
if( empty($term_taxonomy_echo) ) {
|
60 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
148 |
type='<?php echo ( ! empty( $disable_multiple ) ? 'radio' : 'checkbox' )?>'
|
149 |
autocomplete="off"
|
150 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] ) ?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
151 |
+
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . htmlentities(berocket_isset($term, 'name'), ENT_QUOTES) . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
152 |
data-filter_type='<?php echo berocket_isset($filter_type) ?>' <?php if( ! empty($term->term_id) ) { ?>data-term_id='<?php echo $term->term_id ?>'<?php } ?> data-operator='<?php echo $operator ?>'
|
153 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
154 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
171 |
?>
|
172 |
</ul></li>
|
173 |
<?php
|
|
|
174 |
}
|
175 |
} ?>
|
176 |
<?php if( $is_child_parent && is_array(berocket_isset($terms)) && count($terms) == 1 ) {
|
templates/disabled/checkbox.php
CHANGED
@@ -22,11 +22,11 @@ $child_parent_depth = berocket_isset($child_parent_depth, false, 0);
|
|
22 |
if ( $child_parent == 'parent' ) {
|
23 |
$child_parent_depth = 0;
|
24 |
}
|
25 |
-
$is_first = true;
|
26 |
$added_categories = array();
|
27 |
$item_i = 0;
|
28 |
if ( ! empty($terms) ):
|
29 |
foreach( $terms as $term ):
|
|
|
30 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
31 |
if( empty($term_taxonomy_echo) ) {
|
32 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
@@ -76,7 +76,7 @@ if ( ! empty($terms) ):
|
|
76 |
class="berocket_label_widgets<?php if( br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '') echo ' berocket_checked'; ?>">
|
77 |
<?php
|
78 |
echo apply_filters( 'berocket_check_radio_color_filter_term_text_disabled', ( ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) .
|
79 |
-
apply_filters('berocket_radio_filter_term_name', berocket_isset($term, 'name'), $term) .
|
80 |
( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' ) ), $term, $operator, FALSE );
|
81 |
?>
|
82 |
</label>
|
@@ -97,7 +97,6 @@ if ( ! empty($terms) ):
|
|
97 |
}
|
98 |
if ( $is_child_parent && $is_first ) {
|
99 |
?></ul></li><?php
|
100 |
-
$is_first = false;
|
101 |
}
|
102 |
endforeach;?>
|
103 |
<?php if( $is_child_parent && is_array(berocket_isset($terms)) && count($terms) == 1 ) {
|
22 |
if ( $child_parent == 'parent' ) {
|
23 |
$child_parent_depth = 0;
|
24 |
}
|
|
|
25 |
$added_categories = array();
|
26 |
$item_i = 0;
|
27 |
if ( ! empty($terms) ):
|
28 |
foreach( $terms as $term ):
|
29 |
+
$is_first = ($term->term_id == 'R__term_id__R');
|
30 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
31 |
if( empty($term_taxonomy_echo) ) {
|
32 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
76 |
class="berocket_label_widgets<?php if( br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '') echo ' berocket_checked'; ?>">
|
77 |
<?php
|
78 |
echo apply_filters( 'berocket_check_radio_color_filter_term_text_disabled', ( ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) .
|
79 |
+
apply_filters('berocket_radio_filter_term_name', htmlentities(berocket_isset($term, 'name'), ENT_QUOTES), $term) .
|
80 |
( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' ) ), $term, $operator, FALSE );
|
81 |
?>
|
82 |
</label>
|
97 |
}
|
98 |
if ( $is_child_parent && $is_first ) {
|
99 |
?></ul></li><?php
|
|
|
100 |
}
|
101 |
endforeach;?>
|
102 |
<?php if( $is_child_parent && is_array(berocket_isset($terms)) && count($terms) == 1 ) {
|
templates/disabled/color.php
CHANGED
@@ -11,7 +11,6 @@ $child_parent_depth = berocket_isset($child_parent_depth, false, 0);
|
|
11 |
if ( $child_parent == 'parent' ) {
|
12 |
$child_parent_depth = 0;
|
13 |
}
|
14 |
-
$is_first = true;
|
15 |
$item_i = 0;
|
16 |
if ( is_array(berocket_isset($terms)) ) {
|
17 |
if( berocket_isset($color_image_checked) == 'brchecked_custom' ) {
|
@@ -55,6 +54,7 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
55 |
echo '</style>';
|
56 |
}
|
57 |
foreach ( $terms as $term ) {
|
|
|
58 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
59 |
if( empty($term_taxonomy_echo) ) {
|
60 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
@@ -164,7 +164,6 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
164 |
?>
|
165 |
</ul></li>
|
166 |
<?php
|
167 |
-
$is_first = false;
|
168 |
}
|
169 |
} ?>
|
170 |
<?php if( $is_child_parent && is_array(berocket_isset($terms)) && count($terms) == 1 ) {
|
11 |
if ( $child_parent == 'parent' ) {
|
12 |
$child_parent_depth = 0;
|
13 |
}
|
|
|
14 |
$item_i = 0;
|
15 |
if ( is_array(berocket_isset($terms)) ) {
|
16 |
if( berocket_isset($color_image_checked) == 'brchecked_custom' ) {
|
54 |
echo '</style>';
|
55 |
}
|
56 |
foreach ( $terms as $term ) {
|
57 |
+
$is_first = ($term->term_id == 'R__term_id__R');
|
58 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
59 |
if( empty($term_taxonomy_echo) ) {
|
60 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
164 |
?>
|
165 |
</ul></li>
|
166 |
<?php
|
|
|
167 |
}
|
168 |
} ?>
|
169 |
<?php if( $is_child_parent && is_array(berocket_isset($terms)) && count($terms) == 1 ) {
|
templates/disabled/radio.php
CHANGED
@@ -9,11 +9,11 @@ $is_child_parent_or = ( $child_parent == 'child' || $child_parent == 'parent' );
|
|
9 |
if ( ! $child_parent_depth || $child_parent == 'parent' ) {
|
10 |
$child_parent_depth = 0;
|
11 |
}
|
12 |
-
$is_first = true;
|
13 |
$added_categories = array();
|
14 |
$item_i = 0;
|
15 |
if ( is_array(berocket_isset($terms)) ) {
|
16 |
foreach ( $terms as $term ) {
|
|
|
17 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
18 |
if( empty($term_taxonomy_echo) ) {
|
19 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
@@ -62,7 +62,7 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
62 |
?>">
|
63 |
<?php
|
64 |
echo apply_filters( 'berocket_check_radio_color_filter_term_text_disabled', ( ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) .
|
65 |
-
apply_filters('berocket_radio_filter_term_name', berocket_isset($term, 'name'), $term) .
|
66 |
( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' ) ), $term, $operator, TRUE );
|
67 |
?></label>
|
68 |
<?php if( ! empty($hide_child_attributes) ) { ?>
|
@@ -82,7 +82,6 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
82 |
}
|
83 |
if ( $is_child_parent && $is_first ) {
|
84 |
?></ul></li><?php
|
85 |
-
$is_first = false;
|
86 |
}
|
87 |
} ?>
|
88 |
<?php if( $is_child_parent && isset($terms) && is_array($terms) && count($terms) == 1 ) {
|
9 |
if ( ! $child_parent_depth || $child_parent == 'parent' ) {
|
10 |
$child_parent_depth = 0;
|
11 |
}
|
|
|
12 |
$added_categories = array();
|
13 |
$item_i = 0;
|
14 |
if ( is_array(berocket_isset($terms)) ) {
|
15 |
foreach ( $terms as $term ) {
|
16 |
+
$is_first = ($term->term_id == 'R__term_id__R');
|
17 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
18 |
if( empty($term_taxonomy_echo) ) {
|
19 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
62 |
?>">
|
63 |
<?php
|
64 |
echo apply_filters( 'berocket_check_radio_color_filter_term_text_disabled', ( ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) .
|
65 |
+
apply_filters('berocket_radio_filter_term_name', htmlentities(berocket_isset($term, 'name'), ENT_QUOTES), $term) .
|
66 |
( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' ) ), $term, $operator, TRUE );
|
67 |
?></label>
|
68 |
<?php if( ! empty($hide_child_attributes) ) { ?>
|
82 |
}
|
83 |
if ( $is_child_parent && $is_first ) {
|
84 |
?></ul></li><?php
|
|
|
85 |
}
|
86 |
} ?>
|
87 |
<?php if( $is_child_parent && isset($terms) && is_array($terms) && count($terms) == 1 ) {
|
templates/disabled/select.php
CHANGED
@@ -19,7 +19,6 @@ $child_parent_depth = berocket_isset($child_parent_depth, false, 0);
|
|
19 |
if ( $child_parent == 'parent' ) {
|
20 |
$child_parent_depth = 0;
|
21 |
}
|
22 |
-
$is_first = true;
|
23 |
if ( $is_child_parent ) {
|
24 |
?>
|
25 |
<li class="berocket_child_parent_sample select<?php if( ! empty($select_multiple) ) echo ' multiple'; ?>"><ul>
|
@@ -89,7 +88,7 @@ if( empty($term_taxonomy_echo) ) {
|
|
89 |
$parent_count = $term->depth;
|
90 |
}
|
91 |
?>
|
92 |
-
<option value='
|
93 |
selected
|
94 |
<?php if( ! $is_child_parent_or && ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 ) { echo ' hidden disabled'; $hiden_value = true; } ?>
|
95 |
><?php for($i=0;$i<$parent_count;$i++){echo apply_filters('berocket_aapf_select_term_child_prefix', '- ');}echo apply_filters('berocket_select_filter_term_name', berocket_isset($term, 'name'), $term) ?></option>
|
19 |
if ( $child_parent == 'parent' ) {
|
20 |
$child_parent_depth = 0;
|
21 |
}
|
|
|
22 |
if ( $is_child_parent ) {
|
23 |
?>
|
24 |
<li class="berocket_child_parent_sample select<?php if( ! empty($select_multiple) ) echo ' multiple'; ?>"><ul>
|
88 |
$parent_count = $term->depth;
|
89 |
}
|
90 |
?>
|
91 |
+
<option value=''
|
92 |
selected
|
93 |
<?php if( ! $is_child_parent_or && ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 ) { echo ' hidden disabled'; $hiden_value = true; } ?>
|
94 |
><?php for($i=0;$i<$parent_count;$i++){echo apply_filters('berocket_aapf_select_term_child_prefix', '- ');}echo apply_filters('berocket_select_filter_term_name', berocket_isset($term, 'name'), $term) ?></option>
|
templates/radio.php
CHANGED
@@ -9,11 +9,11 @@ $is_child_parent_or = ( $child_parent == 'child' || $child_parent == 'parent' );
|
|
9 |
if ( ! $child_parent_depth || $child_parent == 'parent' ) {
|
10 |
$child_parent_depth = 0;
|
11 |
}
|
12 |
-
$is_first = true;
|
13 |
$added_categories = array();
|
14 |
$item_i = 0;
|
15 |
if ( is_array(berocket_isset($terms)) ) {
|
16 |
foreach ( $terms as $term ) {
|
|
|
17 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
18 |
if( empty($term_taxonomy_echo) ) {
|
19 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
@@ -56,7 +56,7 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
56 |
<input class="<?php echo br_get_value_from_array($uo, array('class', 'checkbox_radio')); ?> radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $term_taxonomy_echo; ?>"
|
57 |
type='radio' id='radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $random_name ?>'
|
58 |
style="<?php echo br_get_value_from_array($uo, array('style', 'checkbox_radio')) ?>"
|
59 |
-
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . $term
|
60 |
data-term_slug='<?php echo urldecode($term->slug) ?>' data-filter_type='<?php echo $filter_type ?>'
|
61 |
name='radio_<?php echo $term_taxonomy_echo ?>_<?php echo $x ?>_<?php echo $random_name ?>'
|
62 |
<?php if( ! empty($term->term_id)) { ?>data-term_id='<?php echo berocket_isset($term, 'term_id') ?>'<?php } ?> data-operator='<?php echo $operator ?>'
|
@@ -89,7 +89,6 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
89 |
}
|
90 |
if ( $is_child_parent && $is_first ) {
|
91 |
?></ul></li><?php
|
92 |
-
$is_first = false;
|
93 |
}
|
94 |
} ?>
|
95 |
<?php if( $is_child_parent && isset($terms) && is_array($terms) && count($terms) == 1 ) {
|
9 |
if ( ! $child_parent_depth || $child_parent == 'parent' ) {
|
10 |
$child_parent_depth = 0;
|
11 |
}
|
|
|
12 |
$added_categories = array();
|
13 |
$item_i = 0;
|
14 |
if ( is_array(berocket_isset($terms)) ) {
|
15 |
foreach ( $terms as $term ) {
|
16 |
+
$is_first = ($term->term_id == 'R__term_id__R');
|
17 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
18 |
if( empty($term_taxonomy_echo) ) {
|
19 |
$term_taxonomy_echo = berocket_isset($term, 'taxonomy');
|
56 |
<input class="<?php echo br_get_value_from_array($uo, array('class', 'checkbox_radio')); ?> radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $term_taxonomy_echo; ?>"
|
57 |
type='radio' id='radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $random_name ?>'
|
58 |
style="<?php echo br_get_value_from_array($uo, array('style', 'checkbox_radio')) ?>"
|
59 |
+
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . htmlentities(berocket_isset($term, 'name'), ENT_QUOTES) . ( ( ! empty($icon_after_value) ) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' ) ?>'
|
60 |
data-term_slug='<?php echo urldecode($term->slug) ?>' data-filter_type='<?php echo $filter_type ?>'
|
61 |
name='radio_<?php echo $term_taxonomy_echo ?>_<?php echo $x ?>_<?php echo $random_name ?>'
|
62 |
<?php if( ! empty($term->term_id)) { ?>data-term_id='<?php echo berocket_isset($term, 'term_id') ?>'<?php } ?> data-operator='<?php echo $operator ?>'
|
89 |
}
|
90 |
if ( $is_child_parent && $is_first ) {
|
91 |
?></ul></li><?php
|
|
|
92 |
}
|
93 |
} ?>
|
94 |
<?php if( $is_child_parent && isset($terms) && is_array($terms) && count($terms) == 1 ) {
|
templates/select.php
CHANGED
@@ -19,7 +19,6 @@ $child_parent_depth = berocket_isset($child_parent_depth, false, 0);
|
|
19 |
if ( $child_parent == 'parent' ) {
|
20 |
$child_parent_depth = 0;
|
21 |
}
|
22 |
-
$is_first = true;
|
23 |
if ( $is_child_parent ) {
|
24 |
?>
|
25 |
<li class="berocket_child_parent_sample select<?php if( ! empty($select_multiple) ) echo ' multiple'; ?>"><ul>
|
@@ -39,7 +38,7 @@ if ( $is_child_parent ) {
|
|
39 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
40 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
41 |
data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>' data-filter_type='<?php echo berocket_isset($filter_type) ?>'
|
42 |
-
data-term_name='<?php echo berocket_isset($term, 'name') ?>' class="select_<?php echo berocket_isset($term, 'term_id') ?>"
|
43 |
data-operator='<?php echo berocket_isset($operator) ?>'
|
44 |
<?php echo br_is_term_selected( $term, false, $is_child_parent_or, $child_parent_depth ); ?>
|
45 |
><?php echo apply_filters('berocket_radio_filter_term_name', berocket_isset($term, 'name'), $term) ?></li>
|
19 |
if ( $child_parent == 'parent' ) {
|
20 |
$child_parent_depth = 0;
|
21 |
}
|
|
|
22 |
if ( $is_child_parent ) {
|
23 |
?>
|
24 |
<li class="berocket_child_parent_sample select<?php if( ! empty($select_multiple) ) echo ' multiple'; ?>"><ul>
|
38 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
39 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
40 |
data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>' data-filter_type='<?php echo berocket_isset($filter_type) ?>'
|
41 |
+
data-term_name='<?php echo htmlentities(berocket_isset($term, 'name'), ENT_QUOTES) ?>' class="select_<?php echo berocket_isset($term, 'term_id') ?>"
|
42 |
data-operator='<?php echo berocket_isset($operator) ?>'
|
43 |
<?php echo br_is_term_selected( $term, false, $is_child_parent_or, $child_parent_depth ); ?>
|
44 |
><?php echo apply_filters('berocket_radio_filter_term_name', berocket_isset($term, 'name'), $term) ?></li>
|
templates/tag_cloud.php
CHANGED
@@ -16,7 +16,7 @@ foreach ( $terms as $term ) { ?>
|
|
16 |
<input class="checkbox_<?php echo berocket_isset($term, 'term_id') ?>" autocomplete="off"
|
17 |
type='checkbox' id='checkbox_<?php echo berocket_isset($term, 'term_id') ?>' data-term_id='<?php echo berocket_isset($term, 'term_id') ?>'
|
18 |
data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>' data-filter_type='<?php echo berocket_isset($filter_type) ?>'
|
19 |
-
data-term_name='<?php echo berocket_isset($term, 'name'); ?>'
|
20 |
data-taxonomy='<?php echo berocket_isset($term, 'taxonomy') ?>' data-operator='<?php echo berocket_isset($operator) ?>'
|
21 |
<?php echo br_is_term_selected( $term, true ); ?>/>
|
22 |
<label data-for='checkbox_<?php echo berocket_isset($term, 'term_id') ?>' for='checkbox_<?php echo berocket_isset($term, 'term_id') ?>'<?php if( br_is_term_selected( $term, true ) != '') echo ' class="berocket_checked"'; ?>><?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' ) ?></label>
|
@@ -26,7 +26,7 @@ foreach ( $terms as $term ) { ?>
|
|
26 |
$term_i++;
|
27 |
}
|
28 |
|
29 |
-
if( br_get_value_from_array($tag_script_var, 'tags_type') != 'doe' ) {
|
30 |
wp_enqueue_script( 'berocket_aapf_widget-tag_cloud2'); ?>
|
31 |
<script>
|
32 |
jQuery(document).ready(function () {
|
16 |
<input class="checkbox_<?php echo berocket_isset($term, 'term_id') ?>" autocomplete="off"
|
17 |
type='checkbox' id='checkbox_<?php echo berocket_isset($term, 'term_id') ?>' data-term_id='<?php echo berocket_isset($term, 'term_id') ?>'
|
18 |
data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>' data-filter_type='<?php echo berocket_isset($filter_type) ?>'
|
19 |
+
data-term_name='<?php echo htmlentities(berocket_isset($term, 'name'), ENT_QUOTES); ?>'
|
20 |
data-taxonomy='<?php echo berocket_isset($term, 'taxonomy') ?>' data-operator='<?php echo berocket_isset($operator) ?>'
|
21 |
<?php echo br_is_term_selected( $term, true ); ?>/>
|
22 |
<label data-for='checkbox_<?php echo berocket_isset($term, 'term_id') ?>' for='checkbox_<?php echo berocket_isset($term, 'term_id') ?>'<?php if( br_is_term_selected( $term, true ) != '') echo ' class="berocket_checked"'; ?>><?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' ) ?></label>
|
26 |
$term_i++;
|
27 |
}
|
28 |
|
29 |
+
if( br_get_value_from_array($tag_script_var, 'tags_type') != 'doe' && false ) {
|
30 |
wp_enqueue_script( 'berocket_aapf_widget-tag_cloud2'); ?>
|
31 |
<script>
|
32 |
jQuery(document).ready(function () {
|
woocommerce-filters.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Advanced AJAX Product Filters for WooCommerce
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
|
5 |
* Description: Unlimited AJAX products filters to make your shop perfect
|
6 |
-
* Version: 1.3.2.
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
@@ -13,6 +13,6 @@
|
|
13 |
* Domain Path: /languages/
|
14 |
* WC tested up to: 3.6.2
|
15 |
*/
|
16 |
-
define( "BeRocket_AJAX_filters_version", '1.3.2.
|
17 |
define( "BeRocket_AJAX_filters_file", __FILE__ );
|
18 |
include_once('main.php');
|
3 |
* Plugin Name: Advanced AJAX Product Filters for WooCommerce
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
|
5 |
* Description: Unlimited AJAX products filters to make your shop perfect
|
6 |
+
* Version: 1.3.2.4
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
13 |
* Domain Path: /languages/
|
14 |
* WC tested up to: 3.6.2
|
15 |
*/
|
16 |
+
define( "BeRocket_AJAX_filters_version", '1.3.2.4' );
|
17 |
define( "BeRocket_AJAX_filters_file", __FILE__ );
|
18 |
include_once('main.php');
|