WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/25/2012 07:10:09 AM (7 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-media.php

    r21852 r21998  
    1616$parent_file = 'options-general.php';
    1717
    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 
    21 if ( ! empty( $content_width ) )
    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>';
     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>';
    2519
    2620if ( ! is_multisite() ) {
     
    9286</table>
    9387
     88<?php if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?>
    9489<h3><?php _e('Embeds') ?></h3>
    95 
    9690<table class="form-table">
    97 
    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'); ?>
     91<?php do_settings_fields( 'media', 'embeds' ); ?>
    11992</table>
     93<?php endif; ?>
    12094
    12195<?php if ( !is_multisite() ) : ?>
Note: See TracChangeset for help on using the changeset viewer.