Changeset 9137
- Timestamp:
- 09/13/2019 03:57:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r9119 r9137 193 193 if ( $changed || count ( get_post_meta( $plugin->ID, 'block_name' ) ) !== count ( $blocks ) ) { 194 194 delete_post_meta( $plugin->ID, 'block_name' ); 195 delete_post_meta( $plugin->ID, 'block_title' ); 195 196 foreach ( $blocks as $block ) { 196 197 add_post_meta( $plugin->ID, 'block_name', $block->name, false ); 198 add_post_meta( $plugin->ID, 'block_title', ( $block->title ?: $plugin->post_title ), false ); 197 199 } 198 200 } … … 200 202 delete_post_meta( $plugin->ID, 'all_blocks' ); 201 203 delete_post_meta( $plugin->ID, 'block_name' ); 204 delete_post_meta( $plugin->ID, 'block_title' ); 202 205 } 203 206 … … 459 462 // Find blocks dist/build JS files 460 463 $block_files = array(); 461 $dist_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/ trunk/dist" ) ?: array();462 $build_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/ trunk/build" ) ?: array();464 $dist_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/{$stable_tag}/dist" ) ?: array(); 465 $build_files = SVN::ls( 'https://plugins.svn.wordpress.org' . "/{$plugin_slug}/{$stable_tag}/build" ) ?: array(); 463 466 464 467 foreach ( $dist_files as $file ) { 465 $block_files[] = '/trunk/dist/'. $file;468 $block_files[] = "/{$stable_tag}/dist/" . $file; 466 469 } 467 470 468 471 foreach ( $build_files as $file ) { 469 $block_files[] = '/trunk/build/'. $file;472 $block_files[] = "/{$stable_tag}/build/" . $file; 470 473 } 471 474 472 475 if ( empty( $block_files ) ) { 473 476 foreach ( $files_with_blocks as $file ) { 474 $block_files[] = '/trunk/'. $file;477 $block_files[] = "/{$stable_tag}/" . $file; 475 478 } 476 479 }
Note: See TracChangeset
for help on using the changeset viewer.