Changeset 13722
- Timestamp:
- 05/17/2024 03:17:10 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r13718 r13722 850 850 // If the block duplicates the namespace, remove it. 'plugin-slug/plugin-slug-block-name' 851 851 $block->title = preg_replace( '#^([^/]+)/\\1-?#i', '$1/', $block->title ); 852 // If the namespace is the slug (w/ or w/o dashes..), remove it. 853 if ( 854 str_starts_with( $block->title, $plugin_slug . '/' ) || 855 str_starts_with( $block->title, str_replace( '-', '', $plugin_slug ) . '/' ) 856 ) { 857 $block->title = explode( '/', $block->title, 2 )[1]; 858 } 852 859 // Treat any non-wordy characters as spaces. 853 $block->title = preg_replace( '/[^a-z]+/', ' ', $block _name );860 $block->title = preg_replace( '/[^a-z]+/', ' ', $block->title ); 854 861 // Capitalise all words. 855 862 $block->title = ucwords( $block->title );
Note: See TracChangeset
for help on using the changeset viewer.