mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 06:37:06 +00:00
Always attempt to embed URLs in content, removing the Auto-embeds (autoembed_urls) option.
Remove the UI for setting the default width and height for embeds. Width was confusing as it was blank by default (inheriting the content width from the theme, or 500px). The height is now calculated as 1.5x the content width, or 1000px, whichever is smaller. The [embed] shortcode can still receive manual height and width attributes. This just removes the global settings. props wonderboymusic. see #21719. git-svn-id: https://develop.svn.wordpress.org/trunk@21998 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -468,11 +468,6 @@ function populate_options() {
|
||||
// 2.8
|
||||
'timezone_string' => $timezone_string,
|
||||
|
||||
// 2.9
|
||||
'embed_autourls' => 1,
|
||||
'embed_size_w' => '',
|
||||
'embed_size_h' => 600,
|
||||
|
||||
// 3.0
|
||||
'page_for_posts' => 0,
|
||||
'page_on_front' => 0,
|
||||
@@ -542,6 +537,7 @@ function populate_options() {
|
||||
'can_compress_scripts', 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron',
|
||||
'random_seed', 'rss_excerpt_length', 'secret', 'use_linksupdate', 'default_comment_status_page',
|
||||
'wporg_popular_tags', 'what_to_show', 'rss_language', 'language', 'enable_xmlrpc', 'enable_app',
|
||||
'autoembed_urls',
|
||||
);
|
||||
foreach ( $unusedoptions as $option )
|
||||
delete_option($option);
|
||||
|
||||
@@ -15,13 +15,7 @@ if ( ! current_user_can( 'manage_options' ) )
|
||||
$title = __('Media Settings');
|
||||
$parent_file = 'options-general.php';
|
||||
|
||||
$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>' .
|
||||
'<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.');
|
||||
|
||||
if ( ! empty( $content_width ) )
|
||||
$media_options_help .= ' ' . __( 'If you do not set the maximum embed size, it will be automatically sized to fit into your content area.' );
|
||||
|
||||
$media_options_help .= '</p>';
|
||||
$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>';
|
||||
|
||||
if ( ! is_multisite() ) {
|
||||
$media_options_help .= '<p>' . __('Uploading Files allows you to choose the folder and path for storing your uploaded files.') . '</p>';
|
||||
@@ -91,32 +85,12 @@ include('./admin-header.php');
|
||||
<?php do_settings_fields('media', 'default'); ?>
|
||||
</table>
|
||||
|
||||
<?php if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?>
|
||||
<h3><?php _e('Embeds') ?></h3>
|
||||
|
||||
<table class="form-table">
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Auto-embeds'); ?></th>
|
||||
<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>
|
||||
<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>
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Maximum embed size') ?></th>
|
||||
<td>
|
||||
<label for="embed_size_w"><?php _e('Width'); ?></label>
|
||||
<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" />
|
||||
<label for="embed_size_h"><?php _e('Height'); ?></label>
|
||||
<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" />
|
||||
<?php if ( ! empty( $content_width ) )
|
||||
echo '<p class="description">' . __( 'If the width value is left blank, embeds will default to the max width of your theme.' ) . '</p>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php do_settings_fields('media', 'embeds'); ?>
|
||||
<?php do_settings_fields( 'media', 'embeds' ); ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( !is_multisite() ) : ?>
|
||||
<h3><?php _e('Uploading Files'); ?></h3>
|
||||
|
||||
@@ -61,7 +61,7 @@ if ( is_multisite() && !is_super_admin() && 'update' != $action )
|
||||
$whitelist_options = array(
|
||||
'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ),
|
||||
'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),
|
||||
'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ),
|
||||
'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
|
||||
'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ),
|
||||
'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format' )
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user