tag = $tag; } public function matches( \WP_Post $post ): bool { switch ( $this->tag ) { case 'is_front_page': return is_front_page(); case 'has_post_thumbnail': return has_post_thumbnail( $post ); case 'comments_open': return comments_open( $post ); default: /** * Filters the match result for a conditional tag not handled * by the built-in switch above — lets the `acez_seo_conditional_tags` * filter register genuinely new tags without touching this class. * * @param bool $matches * @param string $tag * @param \WP_Post $post */ return (bool) apply_filters( 'acez_seo_match_conditional_tag', false, $this->tag, $post ); } } }