13 wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); |
13 wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); |
14 |
14 |
15 $title = __('Media Settings'); |
15 $title = __('Media Settings'); |
16 $parent_file = 'options-general.php'; |
16 $parent_file = 'options-general.php'; |
17 |
17 |
18 $media_options_help = '<p>' . __('You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.') . '</p>' . |
18 $media_options_help = '<p>' . __('You can set maximum sizes for images inserted into your written content; you can also insert an image as Full Size.') . '</p>'; |
19 '<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.'); |
|
20 |
19 |
21 if ( ! empty( $content_width ) ) |
20 if ( ! is_multisite() && ( get_option('upload_url_path') || ( get_option('upload_path') != 'wp-content/uploads' && get_option('upload_path') ) ) ) { |
22 $media_options_help .= ' ' . __( 'If you do not set the maximum embed size, it will be automatically sized to fit into your content area.' ); |
|
23 |
|
24 $media_options_help .= '</p>'; |
|
25 |
|
26 if ( ! is_multisite() ) { |
|
27 $media_options_help .= '<p>' . __('Uploading Files allows you to choose the folder and path for storing your uploaded files.') . '</p>'; |
21 $media_options_help .= '<p>' . __('Uploading Files allows you to choose the folder and path for storing your uploaded files.') . '</p>'; |
28 } |
22 } |
29 |
23 |
30 $media_options_help .= '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>'; |
24 $media_options_help .= '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>'; |
31 |
25 |
89 </tr> |
83 </tr> |
90 |
84 |
91 <?php do_settings_fields('media', 'default'); ?> |
85 <?php do_settings_fields('media', 'default'); ?> |
92 </table> |
86 </table> |
93 |
87 |
|
88 <?php if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?> |
94 <h3><?php _e('Embeds') ?></h3> |
89 <h3><?php _e('Embeds') ?></h3> |
95 |
|
96 <table class="form-table"> |
90 <table class="form-table"> |
97 |
91 <?php do_settings_fields( 'media', 'embeds' ); ?> |
98 <tr valign="top"> |
|
99 <th scope="row"><?php _e('Auto-embeds'); ?></th> |
|
100 <td><fieldset><legend class="screen-reader-text"><span><?php _e('When possible, embed the media content from a URL directly onto the page. For example: links to Flickr and YouTube.'); ?></span></legend> |
|
101 <label for="embed_autourls"><input name="embed_autourls" type="checkbox" id="embed_autourls" value="1" <?php checked( '1', get_option('embed_autourls') ); ?>/> <?php _e('When possible, embed the media content from a URL directly onto the page. For example: links to Flickr and YouTube.'); ?></label> |
|
102 </fieldset></td> |
|
103 </tr> |
|
104 |
|
105 <tr valign="top"> |
|
106 <th scope="row"><?php _e('Maximum embed size') ?></th> |
|
107 <td> |
|
108 <label for="embed_size_w"><?php _e('Width'); ?></label> |
|
109 <input name="embed_size_w" type="number" step="1" min="0" id="embed_size_w" value="<?php form_option('embed_size_w'); ?>" class="small-text" /> |
|
110 <label for="embed_size_h"><?php _e('Height'); ?></label> |
|
111 <input name="embed_size_h" type="number" step="1" min="0" id="embed_size_h" value="<?php form_option('embed_size_h'); ?>" class="small-text" /> |
|
112 <?php if ( ! empty( $content_width ) ) |
|
113 echo '<p class="description">' . __( 'If the width value is left blank, embeds will default to the max width of your theme.' ) . '</p>'; |
|
114 ?> |
|
115 </td> |
|
116 </tr> |
|
117 |
|
118 <?php do_settings_fields('media', 'embeds'); ?> |
|
119 </table> |
92 </table> |
|
93 <?php endif; ?> |
120 |
94 |
121 <?php if ( !is_multisite() ) : ?> |
95 <?php if ( !is_multisite() ) : ?> |
122 <h3><?php _e('Uploading Files'); ?></h3> |
96 <h3><?php _e('Uploading Files'); ?></h3> |
123 <table class="form-table"> |
97 <table class="form-table"> |
|
98 <?php |
|
99 // 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') ) ) : |
|
101 ?> |
124 <tr valign="top"> |
102 <tr valign="top"> |
125 <th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th> |
103 <th scope="row"><label for="upload_path"><?php _e('Store uploads in this folder'); ?></label></th> |
126 <td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr(get_option('upload_path')); ?>" class="regular-text code" /> |
104 <td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr(get_option('upload_path')); ?>" class="regular-text code" /> |
127 <p class="description"><?php _e('Default is <code>wp-content/uploads</code>'); ?></p> |
105 <p class="description"><?php _e('Default is <code>wp-content/uploads</code>'); ?></p> |
128 </td> |
106 </td> |
132 <th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th> |
110 <th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th> |
133 <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" /> |
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" /> |
134 <p class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></p> |
112 <p class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></p> |
135 </td> |
113 </td> |
136 </tr> |
114 </tr> |
137 |
115 <?php endif; ?> |
138 <tr> |
116 <tr> |
139 <th scope="row" colspan="2" class="th-full"> |
117 <th scope="row" colspan="2" class="th-full"> |
140 <label for="uploads_use_yearmonth_folders"> |
118 <label for="uploads_use_yearmonth_folders"> |
141 <input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> /> |
119 <input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked('1', get_option('uploads_use_yearmonth_folders')); ?> /> |
142 <?php _e('Organize my uploads into month- and year-based folders'); ?> |
120 <?php _e('Organize my uploads into month- and year-based folders'); ?> |