| @@ -147,8 +147,22 @@ | ||
| 147 | 147 | |
| 148 | 148 | return $this->getService('tabrenderer'); |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | + /** | |
| 152 | + * Per-request filter state (parsed request, relevant sets, JSON payload). | |
| 153 | + * @since 1.9.7 | |
| 154 | + * @return FilterContext | |
| 155 | + */ | |
| 156 | + public function getFilterContext() | |
| 157 | + { | |
| 158 | + if ( ! isset( $this->services['filtercontext'] ) ) { | |
| 159 | + $this->addService( 'filtercontext', new FilterContext() ); | |
| 160 | + } | |
| 161 | + | |
| 162 | + return $this->getService( 'filtercontext' ); | |
| 163 | + } | |
| 164 | + | |
| 151 | 165 | public function getSwatches() |
| 152 | 166 | { |
| 153 | 167 | if ( !isset( $this->services['swatches'] ) ) { |
| 154 | 168 | $this->addService('swatches', new Swatches() ); |