Skip to content

Commit

Permalink
adds reference to new method and uses getter instead of static member
Browse files Browse the repository at this point in the history
  • Loading branch information
datengraben committed Feb 7, 2025
1 parent 0b7b837 commit dd5e584
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,17 @@ public static function addCustomUserRoles() {
* When defining a CustomPostType, you must also define a model for it, which extends the CustomPost class.
* The existence of a model is checked in the @see PluginTest::testGetCustomPostTypes() test.
*
* @since 2.10 only returns custom post type enum string
* @see Plugin::getCustomPostTypeClasses()
*
* @since 2.10.3 only returns custom post type enum string
*
* @return string[] enum array
*/
public static function getCustomPostTypes(): array {

return array_map(
function ( $type ) {
return ($type)::$postType;
return ( $type )::getPostType();
},
self::getCustomPostTypeClasses()
);
Expand Down

0 comments on commit dd5e584

Please sign in to comment.