media_upload_max_image_resize

Displays the checkbox to scale images.

Description

media_upload_max_image_resize(); 

Usage

  1. if ( !function_exists( 'media_upload_max_image_resize' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/media.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = media_upload_max_image_resize(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/media.php  
  1. function media_upload_max_image_resize() { 
  2. $checked = get_user_setting('upload_resize') ? ' checked="true"' : ''; 
  3. $a = $end = ''; 
  4.  
  5. if ( current_user_can( 'manage_options' ) ) { 
  6. $a = '<a href="' . esc_url( admin_url( 'options-media.php' ) ) . '" target="_blank">'; 
  7. $end = '</a>'; 
  8. ?> 
  9. <p class="hide-if-no-js"><label> 
  10. <input name="image_resize" type="checkbox" id="image_resize" value="true"<?php echo $checked; ?> /> 
  11. <?php 
  12. /** translators: %1$s is link start tag, %2$s is link end tag, %3$d is width, %4$d is height*/ 
  13. printf( __( 'Scale images to match the large size selected in %1$simage options%2$s (%3$d × %4$d).' ), $a, $end, (int) get_option( 'large_size_w', '1024' ), (int) get_option( 'large_size_h', '1024' ) ); 
  14. ?> 
  15. </label></p> 
  16. <?php