Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\TypeSafePostTypeRepository::is_post_type_active_and_query_based PHP Method

is_post_type_active_and_query_based() public method

Checks if the given post type is active and set to be query-based.
Since: 3.0.0
public is_post_type_active_and_query_based ( string $post_type ) : boolean
$post_type string Post type.
return boolean Whether or not the given post type is active and set to be query-based.
    public function is_post_type_active_and_query_based($post_type)
    {
        $settings = $this->get_settings();
        if (empty($settings[PostTypeRepository::SETTINGS_KEY][$post_type])) {
            return false;
        }
        return PostTypeRepository::CPT_QUERY_BASED === $settings[PostTypeRepository::SETTINGS_KEY][$post_type];
    }