Returns array of class names $base_class children with positive values for $base_class::$contant_name.
static public get_child_classes ( $base_class, $constant_name ) : string[] | ||
$base_class | ||
$constant_name | ||
return | string[] |
/** * @return string[] * * @future Enhance this to support multiple classes per post type * @future Rename to post_classes() and deprecate this name */ static function post_type_classes() { return WPLib::get_child_classes('WPLib_Post_Base', 'POST_TYPE'); }
/** * @return array|mixed */ static function role_classes() { return WPLib::get_child_classes('WPLib_User_Base', 'ROLE'); }
/** * @return string[] * * @future Enhance this to support multiple classes per term type * @future Rename to term_classes() and deprecate this name */ static function taxonomy_classes() { return WPLib::get_child_classes('WPLib_Term_Base', 'TAXONOMY'); }