settings = $settings; $this->location_rules = $location_rules; } public function applies( \WP_Post $post ): bool { return $this->location_rules->get( $post->post_type )->matches( $post ); } /** * Schema output additionally requires the post type's "Generuj * schema.org dla tego typu treści" toggle. */ public function applies_to_schema( \WP_Post $post ): bool { if ( ! (bool) $this->settings->get( $post->post_type )['schema_enabled'] ) { return false; } return $this->applies( $post ); } }