Changeset 10058 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php
- Timestamp:
- 07/10/2020 09:28:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php
r10057 r10058 240 240 return false; 241 241 case 'check_block_tag': 242 return __( 'The readme.txt file must contain the tag "block" for this to be added to the block directory.', 'wporg-plugins' );242 return __( 'The readme.txt file must contain the tag "block" (singular) for this to be added to the block directory.', 'wporg-plugins' ); 243 243 case 'check_for_duplicate_block_name': 244 244 return [ … … 254 254 case 'check_for_block_json': 255 255 return __( 'Your plugin should contain at least one <code>block.json</code> file. This file contains metadata describing the block and its JavaScript and CSS assets. Make sure you include at least one <code>script</code> or <code>editorScript</code> item.', 'wporg-plugins' ); 256 case 'check_for_block_scripts':257 return 'TODO';258 256 case 'check_for_block_script_files': 259 return 'TODO'; 257 return [ 258 __( 'The value of <code>script</code>, <code>style</code>, <code>editorScript</code>, <code>editorStyle</code> must be a valid file path. This value was detected, but there is no file at this location in your plugin.', 'wporg-plugins' ), 259 __( 'Unlike regular blocks, plugins in the block directory cannot use a script handle for these values.', 'wporg-plugins' ), 260 ]; 260 261 case 'check_for_register_block_type': 261 262 return __( 'At least one of your JavaScript files must explicitly call registerBlockType(). Without that call, your block will not work in the editor.', 'wporg-plugins' ); … … 263 264 return __( 'This block.json file is invalid. The Block Directory needs to be able to read this file.', 'wporg-plugins' ); 264 265 case 'check_asset_php_file': 265 return 'TODO'; // Is this really an issue?266 return __( '', 'wporg-plugins' ); // @todo 266 267 case 'check_php_size': 267 268 return __( 'Block plugins should keep the PHP code to a mimmum. If you need a lot of PHP code, your plugin probably belongs in the main Plugin Directory rather than the Block Directory.', 'wporg-plugins' );
Note: See TracChangeset
for help on using the changeset viewer.