PHP Interface Inpsyde\MultilingualPress\Module\CustomPostTypeSupport\PostTypeRepository

Since: 3.0.0
Show file Open project: inpsyde/multilingual-press Interface Usage Examples

Public Methods

Method Description
get_custom_post_types ( )
get_supported_post_types ( ) : string[] Returns the slugs of all currently supported post types.
is_post_type_active_and_query_based ( string $post_type ) : boolean Checks if the given post type is active and set to be query-based.
set_supported_post_types ( array $post_types ) : boolean Sets post type support to the given post types.
unsupport_all_post_types ( ) : boolean Removes the support for all post types.

Method Details

get_custom_post_types() public method

Since: 3.0.0

get_supported_post_types() public method

Returns the slugs of all currently supported post types.
Since: 3.0.0
public get_supported_post_types ( ) : string[]
return string[] The slugs of all currently supported post types.

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.

set_supported_post_types() public method

Sets post type support to the given post types.
Since: 3.0.0
public set_supported_post_types ( array $post_types ) : boolean
$post_types array Post type slugs.
return boolean Whether the support for all given post types was set successfully.

unsupport_all_post_types() public method

Removes the support for all post types.
Since: 3.0.0
public unsupport_all_post_types ( ) : boolean
return boolean Whether the support for all post types was removed successfully.