Changeset 54769 for trunk/src/wp-includes/block-editor.php
- Timestamp:
- 11/09/2022 12:28:33 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-editor.php
r54291 r54769 154 154 function get_default_block_editor_settings() { 155 155 // Media settings. 156 $max_upload_size = wp_max_upload_size(); 157 if ( ! $max_upload_size ) { 158 $max_upload_size = 0; 156 157 // wp_max_upload_size() can be expensive, so only call it when relevant for the current user. 158 $max_upload_size = 0; 159 if ( current_user_can( 'upload_files' ) ) { 160 $max_upload_size = wp_max_upload_size(); 161 if ( ! $max_upload_size ) { 162 $max_upload_size = 0; 163 } 159 164 } 160 165
Note: See TracChangeset
for help on using the changeset viewer.