Making WordPress.org

Changeset 8893


Ignore:
Timestamp:
05/30/2019 03:03:00 AM (5 years ago)
Author:
tellyworth
Message:

Plugin dir: make sure the importer sees all of the plugin source tree.

Also make sure we recurse through it all when looking for blocks. This should pick up additional blocks that were not detected earlier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php

    r8868 r8893  
    311311                array(
    312312                    'ignore-externals',
    313                     'depth' => 'files',
    314313                )
    315314            );
     
    322321                    array(
    323322                        'ignore-externals',
    324                         'depth' => 'files',
    325323                    )
    326324                );
     
    346344                array(
    347345                    'ignore-externals',
    348                     'depth' => 'files', // Only export the root files, we don't need the rest to read the plugin headers/screenshots
    349346                )
    350347            );
     
    410407        // Find blocks
    411408        $blocks = array();
    412         foreach ( Filesystem::list_files( "$tmp_dir/export/", false, '!\.(?:php|js|jsx|json)$!i' ) as $filename ) {
     409        foreach ( Filesystem::list_files( "$tmp_dir/export/", true /* recursive */, '!\.(?:php|js|jsx|json)$!i' ) as $filename ) {
    413410            $file_blocks = $this->find_blocks_in_file( $filename );
    414411            if ( $file_blocks ) {
Note: See TracChangeset for help on using the changeset viewer.