Changeset 10111
- Timestamp:
- 08/03/2020 05:12:17 PM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-block-plugin-checker.php
r10110 r10111 826 826 827 827 /** 828 * File size check for downloads. 829 */ 830 function check_total_size() { 831 $files = Filesystem::list_files( $this->path_to_plugin, true ); 832 $total_size = 0; 833 foreach ( $files as $file ) { 834 $total_size += filesize( $file ); 835 } 836 if ( $total_size > 1 * MB_IN_BYTES ) { 837 $this->record_result( 838 __FUNCTION__, 839 'warning', 840 // translators: %s is the file size. 841 sprintf( __( 'Plugin size is %s.', 'wporg-plugins' ), size_format( $total_size ) ), 842 $total_size 843 ); 844 } 845 } 846 847 /** 828 848 * Check that the plugin uses `wp_set_script_translations`. 829 849 */ -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php
r10110 r10111 324 324 'https://developer.wordpress.org/block-editor/developers/internationalization/' 325 325 ); 326 case 'check_total_size': 327 return __( 'Larger plugins will take longer to install. This is more noticeable in the Block Directory, where the user expects blocks to be added immediately. Try reducing your file size by optimizing images & SVGs, only including the assets you need (images, fonts, etc), and using core-provided JavaScript libraries.', 'wporg-plugins' ); 326 328 // This is a special case, since multiple values may be collapsed. 327 329 case 'check_block_json_is_valid':
Note: See TracChangeset
for help on using the changeset viewer.