Browse: Home / Classes / LDLMS_Post_Types /


LDLMS_Post_Types::get_post_type_slug( string|array $post_type_key = '',  string $return_type = '',  string $quote_char = '' )

Utility function to return the post type slug(s). This is to prevent hard-coding of the slug(s) throughout the code files.

Description #

Parameters #


(string|array) (Optional) Internal key used to identify the post_type.

Default value: ''


(string) (Optional) Used to designate the returned value. String or array.

Default value: ''


(string) (Optional) Wrap the return values in quote character. Only for return_type 'string'.

Default value: ''

Return #

(($post_type_key) is string ? string : array). Return type can be changed. See $return_type parameter.

Source #

File: includes/class-ldlms-post-types.php

Changelog #

Version Description
3.2.3 Added $return_type and $quote_char parameter.
2.6.0 Introduced.