Skip to content

Commit

Permalink
Camel case underscore as well (#1082)
Browse files Browse the repository at this point in the history
Fixed the issue where the Archive helper camel cases post_type to Post_type, different to the customizer that camel cases it to PostType.
  • Loading branch information
michaelclaesson authored Oct 22, 2024
1 parent 2270ac7 commit 958573a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Helper/Archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function getArchiveProperties(string $postType, object $customize)
*/
public static function camelCasePostTypeName($postType)
{
return str_replace(' ', '', ucwords(str_replace('-', ' ', $postType)));
return str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $postType)));
}

/**
Expand Down

0 comments on commit 958573a

Please sign in to comment.