[44] | 1 | <?php
|
---|
| 2 | /**
|
---|
| 3 | * Media settings administration panel.
|
---|
| 4 | *
|
---|
| 5 | * @package WordPress
|
---|
| 6 | * @subpackage Administration
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 | /** WordPress Administration Bootstrap */
|
---|
| 10 | require_once('admin.php');
|
---|
| 11 |
|
---|
| 12 | $title = __('Media Settings');
|
---|
| 13 | $parent_file = 'options-general.php';
|
---|
| 14 |
|
---|
| 15 | include('admin-header.php');
|
---|
| 16 |
|
---|
| 17 | ?>
|
---|
| 18 |
|
---|
| 19 | <div class="wrap">
|
---|
| 20 | <?php screen_icon(); ?>
|
---|
| 21 | <h2><?php echo esc_html( $title ); ?></h2>
|
---|
| 22 |
|
---|
| 23 | <form action="options.php" method="post">
|
---|
| 24 | <?php settings_fields('media'); ?>
|
---|
| 25 |
|
---|
| 26 | <h3><?php _e('Image sizes') ?></h3>
|
---|
| 27 | <p><?php _e('The sizes listed below determine the maximum dimensions in pixels to use when inserting an image into the body of a post.'); ?></p>
|
---|
| 28 |
|
---|
| 29 | <table class="form-table">
|
---|
| 30 | <tr valign="top">
|
---|
| 31 | <th scope="row"><?php _e('Thumbnail size') ?></th>
|
---|
| 32 | <td>
|
---|
| 33 | <label for="thumbnail_size_w"><?php _e('Width'); ?></label>
|
---|
| 34 | <input name="thumbnail_size_w" type="text" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" class="small-text" />
|
---|
| 35 | <label for="thumbnail_size_h"><?php _e('Height'); ?></label>
|
---|
| 36 | <input name="thumbnail_size_h" type="text" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" class="small-text" /><br />
|
---|
| 37 | <input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
|
---|
| 38 | <label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label>
|
---|
| 39 | </td>
|
---|
| 40 | </tr>
|
---|
| 41 |
|
---|
| 42 | <tr valign="top">
|
---|
| 43 | <th scope="row"><?php _e('Medium size') ?></th>
|
---|
| 44 | <td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size') ?></span></legend>
|
---|
| 45 | <label for="medium_size_w"><?php _e('Max Width'); ?></label>
|
---|
| 46 | <input name="medium_size_w" type="text" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" class="small-text" />
|
---|
| 47 | <label for="medium_size_h"><?php _e('Max Height'); ?></label>
|
---|
| 48 | <input name="medium_size_h" type="text" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" class="small-text" />
|
---|
| 49 | </fieldset></td>
|
---|
| 50 | </tr>
|
---|
| 51 |
|
---|
| 52 | <tr valign="top">
|
---|
| 53 | <th scope="row"><?php _e('Large size') ?></th>
|
---|
| 54 | <td><fieldset><legend class="screen-reader-text"><span><?php _e('Large size') ?></span></legend>
|
---|
| 55 | <label for="large_size_w"><?php _e('Max Width'); ?></label>
|
---|
| 56 | <input name="large_size_w" type="text" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
|
---|
| 57 | <label for="large_size_h"><?php _e('Max Height'); ?></label>
|
---|
| 58 | <input name="large_size_h" type="text" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
|
---|
| 59 | </fieldset></td>
|
---|
| 60 | </tr>
|
---|
| 61 |
|
---|
| 62 | <?php do_settings_fields('media', 'default'); ?>
|
---|
| 63 | </table>
|
---|
| 64 |
|
---|
| 65 | <?php do_settings_sections('media'); ?>
|
---|
| 66 |
|
---|
| 67 | <p class="submit">
|
---|
| 68 | <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
|
---|
| 69 | </p>
|
---|
| 70 |
|
---|
| 71 | </form>
|
---|
| 72 |
|
---|
| 73 | </div>
|
---|
| 74 |
|
---|
| 75 | <?php include('./admin-footer.php'); ?>
|
---|