wp/wp-admin/options-media.php
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
    29 	'content' => $media_options_help,
    29 	'content' => $media_options_help,
    30 ) );
    30 ) );
    31 
    31 
    32 get_current_screen()->set_help_sidebar(
    32 get_current_screen()->set_help_sidebar(
    33 	'<p><strong>' . __('For more information:') . '</strong></p>' .
    33 	'<p><strong>' . __('For more information:') . '</strong></p>' .
    34 	'<p>' . __('<a href="http://codex.wordpress.org/Settings_Media_Screen" target="_blank">Documentation on Media Settings</a>') . '</p>' .
    34 	'<p>' . __('<a href="https://codex.wordpress.org/Settings_Media_Screen" target="_blank">Documentation on Media Settings</a>') . '</p>' .
    35 	'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    35 	'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    36 );
    36 );
    37 
    37 
    38 include( ABSPATH . 'wp-admin/admin-header.php' );
    38 include( ABSPATH . 'wp-admin/admin-header.php' );
    39 
    39 
    40 ?>
    40 ?>
    41 
    41 
    42 <div class="wrap">
    42 <div class="wrap">
    43 <?php screen_icon(); ?>
       
    44 <h2><?php echo esc_html( $title ); ?></h2>
    43 <h2><?php echo esc_html( $title ); ?></h2>
    45 
    44 
    46 <form action="options.php" method="post">
    45 <form action="options.php" method="post">
    47 <?php settings_fields('media'); ?>
    46 <?php settings_fields('media'); ?>
    48 
    47 
    49 <h3 class="title"><?php _e('Image sizes') ?></h3>
    48 <h3 class="title"><?php _e('Image sizes') ?></h3>
    50 <p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p>
    49 <p><?php _e( 'The sizes listed below determine the maximum dimensions in pixels to use when adding an image to the Media Library.' ); ?></p>
    51 
    50 
    52 <table class="form-table">
    51 <table class="form-table">
    53 <tr valign="top">
    52 <tr>
    54 <th scope="row"><?php _e('Thumbnail size') ?></th>
    53 <th scope="row"><?php _e('Thumbnail size') ?></th>
    55 <td>
    54 <td>
    56 <label for="thumbnail_size_w"><?php _e('Width'); ?></label>
    55 <label for="thumbnail_size_w"><?php _e('Width'); ?></label>
    57 <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" />
    56 <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" />
    58 <label for="thumbnail_size_h"><?php _e('Height'); ?></label>
    57 <label for="thumbnail_size_h"><?php _e('Height'); ?></label>
    60 <input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
    59 <input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
    61 <label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label>
    60 <label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label>
    62 </td>
    61 </td>
    63 </tr>
    62 </tr>
    64 
    63 
    65 <tr valign="top">
    64 <tr>
    66 <th scope="row"><?php _e('Medium size') ?></th>
    65 <th scope="row"><?php _e('Medium size') ?></th>
    67 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size'); ?></span></legend>
    66 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size'); ?></span></legend>
    68 <label for="medium_size_w"><?php _e('Max Width'); ?></label>
    67 <label for="medium_size_w"><?php _e('Max Width'); ?></label>
    69 <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" />
    68 <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" />
    70 <label for="medium_size_h"><?php _e('Max Height'); ?></label>
    69 <label for="medium_size_h"><?php _e('Max Height'); ?></label>
    71 <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" />
    70 <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" />
    72 </fieldset></td>
    71 </fieldset></td>
    73 </tr>
    72 </tr>
    74 
    73 
    75 <tr valign="top">
    74 <tr>
    76 <th scope="row"><?php _e('Large size') ?></th>
    75 <th scope="row"><?php _e('Large size') ?></th>
    77 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Large size'); ?></span></legend>
    76 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Large size'); ?></span></legend>
    78 <label for="large_size_w"><?php _e('Max Width'); ?></label>
    77 <label for="large_size_w"><?php _e('Max Width'); ?></label>
    79 <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" />
    78 <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" />
    80 <label for="large_size_h"><?php _e('Max Height'); ?></label>
    79 <label for="large_size_h"><?php _e('Max Height'); ?></label>
    97 <table class="form-table">
    96 <table class="form-table">
    98 <?php
    97 <?php
    99 // If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
    98 // If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
   100 if ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) :
    99 if ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) :
   101 ?>
   100 ?>
   102 <tr valign="top">
   101 <tr>
   103 <th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th>
   102 <th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th>
   104 <td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr(get_option('upload_path')); ?>" class="regular-text code" />
   103 <td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr(get_option('upload_path')); ?>" class="regular-text code" />
   105 <p class="description"><?php _e('Default is <code>wp-content/uploads</code>'); ?></p>
   104 <p class="description"><?php _e('Default is <code>wp-content/uploads</code>'); ?></p>
   106 </td>
   105 </td>
   107 </tr>
   106 </tr>
   108 
   107 
   109 <tr valign="top">
   108 <tr>
   110 <th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th>
   109 <th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th>
   111 <td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option('upload_url_path')); ?>" class="regular-text code" />
   110 <td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option('upload_url_path')); ?>" class="regular-text code" />
   112 <p class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></p>
   111 <p class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></p>
   113 </td>
   112 </td>
   114 </tr>
   113 </tr>