Skip to content

Commit b92149a

Browse files
committed
fix(Icon): derive icon slugs with sanitize_title()
Align slug normalization with WP_Icons_Registry so underscores and mixed-case filenames are preserved instead of stripped or silently merged.
1 parent fc16a92 commit b92149a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎inc/Services/Icon.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private function register_icon_file( string $collection_slug, string $svg_file )
165165
}
166166

167167
$icon_slug = pathinfo( $real_file, PATHINFO_FILENAME );
168-
$icon_slug = preg_replace( '/[^a-z0-9-]/', '', strtolower( (string) $icon_slug ) );
168+
$icon_slug = sanitize_title( (string) $icon_slug );
169169

170170
if ( '' === $icon_slug ) {
171171
return;

0 commit comments

Comments
 (0)