Media:
When inserting an image into a post, the values in `wp.media.controller.Library` should not default to linking the image when no user settings are present. The default display setting value for `link` is now `none`. User settings persist and will override or confirm this value based on user actions. Props liljimmi, janhenckens, eherman24, wonderboymusic. Fixes #31467. Built from https://develop.svn.wordpress.org/trunk@33729 git-svn-id: http://core.svn.wordpress.org/trunk@33697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
25b0eedf2b
commit
767dd35a47
|
@ -467,7 +467,7 @@ function populate_options() {
|
|||
// 2.7
|
||||
'large_size_w' => 1024,
|
||||
'large_size_h' => 1024,
|
||||
'image_default_link_type' => 'file',
|
||||
'image_default_link_type' => 'none',
|
||||
'image_default_size' => '',
|
||||
'image_default_align' => '',
|
||||
'close_comments_for_old_posts' => 0,
|
||||
|
|
|
@ -1182,9 +1182,9 @@ Library = wp.media.controller.State.extend({
|
|||
var defaultProps = wp.media.view.settings.defaultProps;
|
||||
this._displays = [];
|
||||
this._defaultDisplaySettings = {
|
||||
align: defaultProps.align || getUserSetting( 'align', 'none' ),
|
||||
size: defaultProps.size || getUserSetting( 'imgsize', 'medium' ),
|
||||
link: defaultProps.link || getUserSetting( 'urlbutton', 'file' )
|
||||
align: getUserSetting( 'align', defaultProps.align ) || 'none',
|
||||
size: getUserSetting( 'imgsize', defaultProps.size ) || 'medium',
|
||||
link: getUserSetting( 'urlbutton', defaultProps.link ) || 'none'
|
||||
};
|
||||
},
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -652,7 +652,10 @@ function wp_print_media_templates() {
|
|||
</option>
|
||||
<option value="file">
|
||||
<# } else { #>
|
||||
<option value="file" selected>
|
||||
<option value="none" selected>
|
||||
<?php esc_attr_e('None'); ?>
|
||||
</option>
|
||||
<option value="file">
|
||||
<# } #>
|
||||
<# if ( data.model.canEmbed ) { #>
|
||||
<?php esc_attr_e('Link to Media File'); ?>
|
||||
|
@ -671,9 +674,6 @@ function wp_print_media_templates() {
|
|||
<option value="custom">
|
||||
<?php esc_attr_e('Custom URL'); ?>
|
||||
</option>
|
||||
<option value="none">
|
||||
<?php esc_attr_e('None'); ?>
|
||||
</option>
|
||||
<# } #>
|
||||
</select>
|
||||
</label>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-33728';
|
||||
$wp_version = '4.4-alpha-33729';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue