Changeset 13714
- Timestamp:
- 05/16/2024 05:33:32 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r13713 r13714 1011 1011 // Note that this only works with literal strings for the block name and title, and assumes that order. 1012 1012 $contents = file_get_contents( $filename ); 1013 if ( $contents && preg_match_all( "#registerBlockType[^{}]{0,500}[(]\s*[\"']([-\w]+/[-\w]+)[\"']\s*,\s*[{]\s*title\s*:[\s\w(]*[\"']([^\"']*)[\"'] #ms", $contents, $matches, PREG_SET_ORDER ) ) {1013 if ( $contents && preg_match_all( "#registerBlockType[^{}]{0,500}[(]\s*[\"']([-\w]+/[-\w]+)[\"']\s*,\s*[{]\s*title\s*:[\s\w(]*[\"']([^\"']*)[\"'](?!\s*[+])#ms", $contents, $matches, PREG_SET_ORDER ) ) { 1014 1014 foreach ( $matches as $match ) { 1015 1015 $blocks[] = (object) [
Note: See TracChangeset
for help on using the changeset viewer.