Changeset 46066
- Timestamp:
- 09/05/2019 10:26:50 PM (5 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-filters.php
r45901 r46066 520 520 add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' ); 521 521 add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' ); 522 add_action( 'plugins_loaded', '_wp_add_additional_image_sizes', 0 ); 522 523 523 524 // Nav menu -
trunk/src/wp-includes/media.php
r45932 r46066 1201 1201 * @since 4.4.0 1202 1202 * 1203 * @param int $max_width The maximum image width to be included in the 'srcset'. Default ' 1600'.1203 * @param int $max_width The maximum image width to be included in the 'srcset'. Default '2048'. 1204 1204 * @param array $size_array Array of width and height values in pixels (in that order). 1205 1205 */ 1206 $max_srcset_image_width = apply_filters( 'max_srcset_image_width', 1600, $size_array );1206 $max_srcset_image_width = apply_filters( 'max_srcset_image_width', 2048, $size_array ); 1207 1207 1208 1208 // Array to hold URL candidates. … … 4330 4330 ); 4331 4331 } 4332 4333 /** 4334 * Add additional default image sub-sizes. 4335 * 4336 * These sizes are meant to enhance the way WordPress displays images on the front-end on larger, 4337 * high-density devices. They make it possible to generate more suitable `srcset` and `sizes` attributes 4338 * when the users upload large images. 4339 * 4340 * The sizes can be changed or removed by themes and plugins but that is not recommended. 4341 * The size "names" reflect the image dimensions, so changing the sizes would be quite misleading. 4342 * 4343 * @since 5.3.0 4344 * @access private 4345 */ 4346 function _wp_add_additional_image_sizes() { 4347 // 2x medium_large size 4348 add_image_size( '1536x1536', 1536, 1536 ); 4349 // 2x large size 4350 add_image_size( '2048x2048', 2048, 2048 ); 4351 }
Note: See TracChangeset
for help on using the changeset viewer.