]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/options-media.php
Wordpress 3.0.5-scripts
[autoinstalls/wordpress.git] / wp-admin / options-media.php
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 if ( ! current_user_can( 'manage_options' ) )
13         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
14
15 $title = __('Media Settings');
16 $parent_file = 'options-general.php';
17
18 add_contextual_help($current_screen,
19         '<p>' . __('You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.') . '</p>' .
20         '<p>' . __('The Embed option allows you embed a video, image, or other media content into your content automatically by typing the URL (of the web page where the file lives) on its own line when you create your content.') . '</p>' .
21         '<p>' . __('Uploading Options gives you folder and path choices for storing your files in your installation&#8217;s directory.') . '</p>' .
22         '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' .
23         '<p><strong>' . __('For more information:') . '</strong></p>' .
24         '<p>' . __('<a href="http://codex.wordpress.org/Settings_Media_SubPanel" target="_blank">Documentation on Media Settings</a>') . '</p>' .
25         '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
26 );
27
28 include('./admin-header.php');
29
30 ?>
31
32 <div class="wrap">
33 <?php screen_icon(); ?>
34 <h2><?php echo esc_html( $title ); ?></h2>
35
36 <form action="options.php" method="post">
37 <?php settings_fields('media'); ?>
38
39 <h3><?php _e('Image sizes') ?></h3>
40 <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>
41
42 <table class="form-table">
43 <tr valign="top">
44 <th scope="row"><?php _e('Thumbnail size') ?></th>
45 <td>
46 <label for="thumbnail_size_w"><?php _e('Width'); ?></label>
47 <input name="thumbnail_size_w" type="text" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" class="small-text" />
48 <label for="thumbnail_size_h"><?php _e('Height'); ?></label>
49 <input name="thumbnail_size_h" type="text" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" class="small-text" /><br />
50 <input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
51 <label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label>
52 </td>
53 </tr>
54
55 <tr valign="top">
56 <th scope="row"><?php _e('Medium size') ?></th>
57 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size'); ?></span></legend>
58 <label for="medium_size_w"><?php _e('Max Width'); ?></label>
59 <input name="medium_size_w" type="text" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" class="small-text" />
60 <label for="medium_size_h"><?php _e('Max Height'); ?></label>
61 <input name="medium_size_h" type="text" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" class="small-text" />
62 </fieldset></td>
63 </tr>
64
65 <tr valign="top">
66 <th scope="row"><?php _e('Large size') ?></th>
67 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Large size'); ?></span></legend>
68 <label for="large_size_w"><?php _e('Max Width'); ?></label>
69 <input name="large_size_w" type="text" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
70 <label for="large_size_h"><?php _e('Max Height'); ?></label>
71 <input name="large_size_h" type="text" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
72 </fieldset></td>
73 </tr>
74
75 <?php do_settings_fields('media', 'default'); ?>
76 </table>
77
78 <h3><?php _e('Embeds') ?></h3>
79
80 <table class="form-table">
81
82 <tr valign="top">
83 <th scope="row"><?php _e('Auto-embeds'); ?></th>
84 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Attempt to automatically embed all plain text URLs'); ?></span></legend>
85 <label for="embed_autourls"><input name="embed_autourls" type="checkbox" id="embed_autourls" value="1" <?php checked( '1', get_option('embed_autourls') ); ?>/> <?php _e('Attempt to automatically embed all plain text URLs'); ?></label>
86 </fieldset></td>
87 </tr>
88
89 <tr valign="top">
90 <th scope="row"><?php _e('Maximum embed size') ?></th>
91 <td>
92 <label for="embed_size_w"><?php _e('Width'); ?></label>
93 <input name="embed_size_w" type="text" id="embed_size_w" value="<?php form_option('embed_size_w'); ?>" class="small-text" />
94 <label for="embed_size_h"><?php _e('Height'); ?></label>
95 <input name="embed_size_h" type="text" id="embed_size_h" value="<?php form_option('embed_size_h'); ?>" class="small-text" />
96 <?php if ( !empty($content_width) ) echo '<br />' . __("If the width value is left blank, embeds will default to the max width of your theme."); ?>
97 </td>
98 </tr>
99
100 <?php do_settings_fields('media', 'embeds'); ?>
101 </table>
102
103 <?php if ( !is_multisite() ) : ?>
104 <h3><?php _e('Uploading Files'); ?></h3>
105 <table class="form-table">
106 <tr valign="top">
107 <th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th>
108 <td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr(get_option('upload_path')); ?>" class="regular-text code" />
109 <span class="description"><?php _e('Default is <code>wp-content/uploads</code>'); ?></span>
110 </td>
111 </tr>
112
113 <tr valign="top">
114 <th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th>
115 <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" />
116 <span class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></span>
117 </td>
118 </tr>
119
120 <tr>
121 <th scope="row" colspan="2" class="th-full">
122 <label for="uploads_use_yearmonth_folders">
123 <input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> />
124 <?php _e('Organize my uploads into month- and year-based folders'); ?>
125 </label>
126 </th>
127 </tr>
128
129 <?php do_settings_fields('media', 'uploads'); ?>
130 </table>
131 <?php endif; ?>
132
133 <?php do_settings_sections('media'); ?>
134
135 <p class="submit">
136         <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
137 </p>
138
139 </form>
140
141 </div>
142
143 <?php include('./admin-footer.php'); ?>