diff --git a/assets/js/instant-results/components/common/checkbox-list.js b/assets/js/instant-results/components/common/checkbox-list.js index 9a0fbb8c17..2c9df1212f 100644 --- a/assets/js/instant-results/components/common/checkbox-list.js +++ b/assets/js/instant-results/components/common/checkbox-list.js @@ -9,6 +9,7 @@ import { __, _n, sprintf } from '@wordpress/i18n'; */ import Checkbox from './checkbox'; import SmallButton from './small-button'; +import { termCount } from '../../config'; /** * Checkbox list component. @@ -124,6 +125,10 @@ export default ({ disabled, label, options, onChange, selected, sortBy }) => { */ const displayOption = ({ count, id, label, value }) => { const children = childOptions[value]; + /** + * Check for term count option. + */ + const counter = termCount === '1' ? count : ''; if (!showAll && optionsShown >= optionsLimit) { return ; @@ -133,7 +138,7 @@ export default ({ disabled, label, options, onChange, selected, sortBy }) => {
  • 'mark', 'facets' => 'post_type,category,post_tag', 'match_type' => 'all', + 'term_count' => '1', ]; $settings = $this->get_settings() ? $this->get_settings() : array(); @@ -171,6 +172,18 @@ public function output_feature_box_settings() {

    +
    +
    +
    +
    + +

    +
    +
    $this->settings['match_type'], 'paramPrefix' => 'ep-', 'postTypeLabels' => $this->get_post_type_labels(), + 'termCount' => $this->settings['term_count'], ) ); } @@ -923,4 +937,5 @@ public function get_args_schema() { } return $args; } + }