| @@ -1,10 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -// Exit if accessed directly | |
| 3 | -if (!defined('ABSPATH')) { | |
| 4 | - exit; | |
| 5 | -} | |
| 6 | - | |
| 7 | 2 | class PatternsWP_API_Section { |
| 8 | 3 | |
| 9 | 4 | public $api_url; |
| 10 | 5 | |
| @@ -241,12 +236,8 @@ | ||
| 241 | 236 | } |
| 242 | 237 | |
| 243 | 238 | // Return the patterns if not empty. |
| 244 | 239 | if (!empty($patterns)) { |
| 245 | - // Apply pattern visibility filter | |
| 246 | - // error_log('[PatternsWP API] Applying filter to ' . count($patterns) . ' patterns from API'); | |
| 247 | - $patterns = apply_filters('patternswp_patterns', $patterns); | |
| 248 | - // error_log('[PatternsWP API] Filter applied, now have ' . count($patterns) . ' patterns'); | |
| 249 | 240 | return $patterns; |
| 250 | 241 | } else { |
| 251 | 242 | // error_log('Received empty response for patterns.'); |
| 252 | 243 | return array(); |
| @@ -273,13 +264,8 @@ | ||
| 273 | 264 | /** |
| 274 | 265 | * Register patterns and categories |
| 275 | 266 | */ |
| 276 | 267 | private function register_patterns_and_categories( $patterns ) { |
| 277 | - // Apply pattern visibility filter before registering | |
| 278 | - // error_log('[PatternsWP API] Register patterns - applying filter to ' . count($patterns) . ' patterns'); | |
| 279 | - $patterns = apply_filters('patternswp_patterns', $patterns); | |
| 280 | - // error_log('[PatternsWP API] Register patterns - filter applied, now have ' . count($patterns) . ' patterns'); | |
| 281 | - | |
| 282 | 268 | $registered_categories = array(); |
| 283 | 269 | |
| 284 | 270 | foreach ($patterns as $pattern) { |
| 285 | 271 | $categories = $pattern['categories']; |