Changeset 48262
- Timestamp:
- 07/01/2020 12:27:10 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 61 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-settings.php
r48242 r48262 286 286 require ABSPATH . WPINC . '/class-wp-block-parser.php'; 287 287 require ABSPATH . WPINC . '/blocks.php'; 288 require ABSPATH . WPINC . '/blocks/archives.php'; 289 require ABSPATH . WPINC . '/blocks/block.php'; 290 require ABSPATH . WPINC . '/blocks/calendar.php'; 291 require ABSPATH . WPINC . '/blocks/categories.php'; 292 require ABSPATH . WPINC . '/blocks/latest-comments.php'; 293 require ABSPATH . WPINC . '/blocks/latest-posts.php'; 294 require ABSPATH . WPINC . '/blocks/rss.php'; 295 require ABSPATH . WPINC . '/blocks/search.php'; 296 require ABSPATH . WPINC . '/blocks/shortcode.php'; 297 require ABSPATH . WPINC . '/blocks/social-link.php'; 298 require ABSPATH . WPINC . '/blocks/tag-cloud.php'; 288 require ABSPATH . WPINC . '/blocks/index.php'; 299 289 300 290 $GLOBALS['wp_embed'] = new WP_Embed(); -
trunk/tools/webpack/packages.js
r47471 r48262 103 103 }; 104 104 105 const blockNames = [105 const dynamicBlockFolders = [ 106 106 'archives', 107 107 'block', … … 116 116 'tag-cloud', 117 117 ]; 118 const blockFolders = [ 119 'audio', 120 'button', 121 'buttons', 122 'classic', 123 'code', 124 'column', 125 'columns', 126 'file', 127 'gallery', 128 'group', 129 'heading', 130 'html', 131 'image', 132 'list', 133 'media-text', 134 'missing', 135 'more', 136 'nextpage', 137 'paragraph', 138 'preformatted', 139 'pullquote', 140 'quote', 141 'separator', 142 'social-links', 143 'spacer', 144 'subhead', 145 'table', 146 'text-columns', 147 'verse', 148 'video', 149 ...dynamicBlockFolders, 150 ]; 118 151 const phpFiles = { 119 152 'block-serialization-default-parser/parser.php': 'wp-includes/class-wp-block-parser.php', 120 ... blockNames.reduce( ( files, blockName ) => {153 ...dynamicBlockFolders.reduce( ( files, blockName ) => { 121 154 files[ `block-library/src/${ blockName }/index.php` ] = `wp-includes/blocks/${ blockName }.php`; 122 155 return files; 123 156 } , {} ), 124 157 }; 125 const blockMetadataCopies = { 126 from: join( baseDir, `node_modules/@wordpress/block-library/src/+(${ blockNames.join( '|' ) })/block.json` ), 127 test: new RegExp( `\/([^/]+)\/block\.json$` ), 128 to: join( baseDir, `${ buildTarget }/blocks/[1]/block.json` ), 158 const blockMetadataFiles = { 159 ...blockFolders.reduce( ( files, blockName ) => { 160 files[ `block-library/src/${ blockName }/block.json` ] = `wp-includes/blocks/${ blockName }/block.json`; 161 return files; 162 } , {} ), 129 163 }; 130 164 … … 171 205 from: join( baseDir, `node_modules/@wordpress/${ filename }` ), 172 206 to: join( baseDir, `src/${ phpFiles[ filename ] }` ), 207 } ) ); 208 209 const blockMetadataCopies = Object.keys( blockMetadataFiles ).map( ( filename ) => ( { 210 from: join( baseDir, `node_modules/@wordpress/${ filename }` ), 211 to: join( baseDir, `src/${ blockMetadataFiles[ filename ] }` ), 173 212 } ) ); 174 213 … … 255 294 ...cssCopies, 256 295 ...phpCopies, 257 blockMetadataCopies,296 ...blockMetadataCopies, 258 297 ], 259 298 ),
Note: See TracChangeset
for help on using the changeset viewer.