Changeset 10111 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-block-plugin-checker.php
- Timestamp:
- 08/03/2020 05:12:17 PM (4 years ago)
- File:
-
- 1 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 */
Note: See TracChangeset
for help on using the changeset viewer.