Changeset 44260 for trunk/src/wp-admin/edit-form-blocks.php
- Timestamp:
- 12/17/2018 03:51:08 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43861,43863
- Property svn:mergeinfo changed
-
trunk/src/wp-admin/edit-form-blocks.php
r44251 r44260 203 203 } 204 204 205 // Image sizes. 206 $image_sizes = get_intermediate_image_sizes(); 207 $image_sizes[] = 'full'; 208 209 /** This filter is documented in wp-admin/includes/media.php */ 210 $image_size_names = apply_filters( 211 'image_size_names_choose', 212 array( 213 'thumbnail' => __( 'Thumbnail' ), 214 'medium' => __( 'Medium' ), 215 'large' => __( 'Large' ), 216 'full' => __( 'Full Size' ), 217 ) 218 ); 219 220 $available_image_sizes = array(); 221 foreach ( $image_sizes as $image_size_slug ) { 222 $available_image_sizes[] = array( 223 'slug' => $image_size_slug, 224 'name' => isset( $image_size_names[ $image_size_slug ] ) ? $image_size_names[ $image_size_slug ] : $image_size_slug, 225 ); 226 } 227 205 228 // Lock settings. 206 229 $user_id = wp_check_post_lock( $post->ID ); … … 258 281 'allowedMimeTypes' => get_allowed_mime_types(), 259 282 'styles' => $styles, 283 'availableImageSizes' => $available_image_sizes, 260 284 'postLock' => $lock_details, 261 285 'postLockUtils' => array( … … 264 288 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 265 289 ), 290 291 // Whether or not to load the 'postcustom' meta box is stored as a user meta 292 // field so that we're not always loading its assets. 293 'enableCustomFields' => (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ), 266 294 ); 267 295
Note: See TracChangeset
for help on using the changeset viewer.