| @@ -586,9 +586,12 @@ | ||
| 586 | 586 | $stats[$scope] = $this->wpdb->get_var( $this->wpdb->prepare( "SELECT COUNT( * ) FROM $this->table_name WHERE scope = %s", $scope ) ); |
| 587 | 587 | } |
| 588 | 588 | $stats['all'] += $stats[$scope]; |
| 589 | 589 | } |
| 590 | - | |
| 590 | + | |
| 591 | + // Combined count for the "Content" filter (PHP + JS). Not added to 'all', already counted above. | |
| 592 | + $stats['content'] = (int) $stats['content_php'] + (int) $stats['content_js']; | |
| 593 | + | |
| 591 | 594 | return $stats; |
| 592 | 595 | } |
| 593 | 596 | |
| 594 | 597 | public function import( ) |
| @@ -668,8 +671,11 @@ | ||
| 668 | 671 | $freshFilters[] = [ 'accessor' => 'tags', 'value' => $filter['value'] ]; |
| 669 | 672 | } |
| 670 | 673 | else if ( $filter['accessor'] === 'scope' && $filter['value'] === 'global' ) { |
| 671 | 674 | $freshFilters[] = [ 'accessor' => 'scope', 'value' => ['backend', 'frontend', 'persistent'] ]; |
| 675 | + } | |
| 676 | + else if ( $filter['accessor'] === 'scope' && $filter['value'] === 'content' ) { | |
| 677 | + $freshFilters[] = [ 'accessor' => 'scope', 'value' => ['content_php', 'content_js'] ]; | |
| 672 | 678 | } |
| 673 | 679 | else { |
| 674 | 680 | $freshFilters[] = $filter; |
| 675 | 681 | } |