Media: Declare wp.media.string methods in a single object. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22569 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f684d6abc2
commit
902b910bea
|
@ -108,9 +108,8 @@ var tb_position;
|
|||
return url || '';
|
||||
};
|
||||
|
||||
wp.media.string = {};
|
||||
|
||||
wp.media.string.link = function( attachment, props ) {
|
||||
wp.media.string = {
|
||||
link: function( attachment, props ) {
|
||||
var linkTo = getUserSetting( 'urlbutton', 'post' ),
|
||||
options = {
|
||||
tag: 'a',
|
||||
|
@ -123,9 +122,9 @@ var tb_position;
|
|||
options.attrs.href = linkToUrl( attachment, props );
|
||||
|
||||
return wp.html.string( options );
|
||||
};
|
||||
},
|
||||
|
||||
wp.media.string.image = function( attachment, props ) {
|
||||
image: function( attachment, props ) {
|
||||
var classes, img, options, size, shortcode, html;
|
||||
|
||||
props = _.defaults( props || {}, {
|
||||
|
@ -206,6 +205,7 @@ var tb_position;
|
|||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
};
|
||||
|
||||
wp.media.gallery = (function() {
|
||||
|
|
Loading…
Reference in New Issue