| 55 | | <h2 class="title"><?php _e( 'Image sizes' ); ?></h2> |
| 56 | | <p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p> |
| 57 | | |
| 58 | | <table class="form-table" role="presentation"> |
| 59 | | <tr> |
| 60 | | <th scope="row"><?php _e( 'Thumbnail size' ); ?></th> |
| 61 | | <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Thumbnail size' ); ?></span></legend> |
| 62 | | <label for="thumbnail_size_w"><?php _e( 'Width' ); ?></label> |
| 63 | | <input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option( 'thumbnail_size_w' ); ?>" class="small-text" /> |
| 64 | | <br /> |
| 65 | | <label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label> |
| 66 | | <input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" /> |
| 67 | | </fieldset> |
| 68 | | <input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/> |
| 69 | | <label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label> |
| 70 | | </td> |
| 71 | | </tr> |
| 72 | | |
| 73 | | <tr> |
| 74 | | <th scope="row"><?php _e( 'Medium size' ); ?></th> |
| 75 | | <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Medium size' ); ?></span></legend> |
| 76 | | <label for="medium_size_w"><?php _e( 'Max Width' ); ?></label> |
| 77 | | <input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option( 'medium_size_w' ); ?>" class="small-text" /> |
| 78 | | <br /> |
| 79 | | <label for="medium_size_h"><?php _e( 'Max Height' ); ?></label> |
| 80 | | <input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option( 'medium_size_h' ); ?>" class="small-text" /> |
| 81 | | </fieldset></td> |
| 82 | | </tr> |
| 83 | | |
| 84 | | <tr> |
| 85 | | <th scope="row"><?php _e( 'Large size' ); ?></th> |
| 86 | | <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Large size' ); ?></span></legend> |
| 87 | | <label for="large_size_w"><?php _e( 'Max Width' ); ?></label> |
| 88 | | <input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option( 'large_size_w' ); ?>" class="small-text" /> |
| 89 | | <br /> |
| 90 | | <label for="large_size_h"><?php _e( 'Max Height' ); ?></label> |
| 91 | | <input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option( 'large_size_h' ); ?>" class="small-text" /> |
| 92 | | </fieldset></td> |
| 93 | | </tr> |
| 94 | | |
| 95 | | <?php do_settings_fields( 'media', 'default' ); ?> |
| 96 | | </table> |
| | 55 | <?php if ( true === wp_media_options_should_display_image_size_settings() ) : ?> |
| | 56 | <h2 class="title"><?php _e( 'Image sizes' ); ?></h2> |
| | 57 | <p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p> |
| | 58 | |
| | 59 | <table class="form-table" role="presentation"> |
| | 60 | <tr> |
| | 61 | <th scope="row"><?php _e( 'Thumbnail size' ); ?></th> |
| | 62 | <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Thumbnail size' ); ?></span></legend> |
| | 63 | <label for="thumbnail_size_w"><?php _e( 'Width' ); ?></label> |
| | 64 | <input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option( 'thumbnail_size_w' ); ?>" class="small-text" /> |
| | 65 | <br /> |
| | 66 | <label for="thumbnail_size_h"><?php _e( 'Height' ); ?></label> |
| | 67 | <input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option( 'thumbnail_size_h' ); ?>" class="small-text" /> |
| | 68 | </fieldset> |
| | 69 | <input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked( '1', get_option( 'thumbnail_crop' ) ); ?>/> |
| | 70 | <label for="thumbnail_crop"><?php _e( 'Crop thumbnail to exact dimensions (normally thumbnails are proportional)' ); ?></label> |
| | 71 | </td> |
| | 72 | </tr> |
| | 73 | |
| | 74 | <tr> |
| | 75 | <th scope="row"><?php _e( 'Medium size' ); ?></th> |
| | 76 | <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Medium size' ); ?></span></legend> |
| | 77 | <label for="medium_size_w"><?php _e( 'Max Width' ); ?></label> |
| | 78 | <input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option( 'medium_size_w' ); ?>" class="small-text" /> |
| | 79 | <br /> |
| | 80 | <label for="medium_size_h"><?php _e( 'Max Height' ); ?></label> |
| | 81 | <input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option( 'medium_size_h' ); ?>" class="small-text" /> |
| | 82 | </fieldset></td> |
| | 83 | </tr> |
| | 84 | |
| | 85 | <tr> |
| | 86 | <th scope="row"><?php _e( 'Large size' ); ?></th> |
| | 87 | <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Large size' ); ?></span></legend> |
| | 88 | <label for="large_size_w"><?php _e( 'Max Width' ); ?></label> |
| | 89 | <input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option( 'large_size_w' ); ?>" class="small-text" /> |
| | 90 | <br /> |
| | 91 | <label for="large_size_h"><?php _e( 'Max Height' ); ?></label> |
| | 92 | <input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option( 'large_size_h' ); ?>" class="small-text" /> |
| | 93 | </fieldset></td> |
| | 94 | </tr> |
| | 95 | </table> |
| | 96 | <?php else : ?> |
| | 97 | <table class="form-table" role="presentation"> |
| | 98 | <?php do_settings_fields( 'media', 'default' ); ?> |
| | 99 | </table> |
| | 100 | <?php endif; ?> |