Changeset 12715 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
- Timestamp:
- 07/06/2023 06:23:02 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r12588 r12715 191 191 } 192 192 193 // Fallback to the plugin title if the readme didn't contain it. 194 $plugin->post_title = trim( $readme->name ) ?: strip_tags( $headers->Name ) ?: $plugin->post_title; 193 // Use the Readme name, as long as it's not the plugin slug. 194 if ( 195 $readme->name && 196 $readme->name !== $plugin->post_name 197 ) { 198 $plugin->post_title = $readme->name; 199 } elseif ( $headers->Name ) { 200 $plugin->post_title = strip_tags( $headers->Name ); 201 } 202 195 203 $plugin->post_content = trim( $content ) ?: $plugin->post_content; 196 204 $plugin->post_excerpt = trim( $readme->short_description ) ?: $headers->Description ?: $plugin->post_excerpt;
Note: See TracChangeset
for help on using the changeset viewer.