story_post_type = $story_post_type; } /** * Initializes all hooks. * * @since 1.16.0 */ public function register(): void { add_filter( 'cybocfi_enabled_for_post_type', [ $this, 'cybocfi_enabled_for_post_type' ], 99, 2 ); } /** * Filter the conditional-featured-image plugin. * * @since 1.16.0 * * @param mixed $enabled If enabled or not. * @param string $post_type Post type slug. * @return mixed Filter value. */ public function cybocfi_enabled_for_post_type( $enabled, string $post_type ) { if ( $this->story_post_type->get_slug() === $post_type ) { return false; } return $enabled; } }