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:
Daryl Koopersmith 2012-11-14 09:31:53 +00:00
parent f684d6abc2
commit 902b910bea
1 changed files with 92 additions and 92 deletions

View File

@ -108,9 +108,8 @@ var tb_position;
return url || ''; return url || '';
}; };
wp.media.string = {}; wp.media.string = {
link: function( attachment, props ) {
wp.media.string.link = function( attachment, props ) {
var linkTo = getUserSetting( 'urlbutton', 'post' ), var linkTo = getUserSetting( 'urlbutton', 'post' ),
options = { options = {
tag: 'a', tag: 'a',
@ -123,9 +122,9 @@ var tb_position;
options.attrs.href = linkToUrl( attachment, props ); options.attrs.href = linkToUrl( attachment, props );
return wp.html.string( options ); return wp.html.string( options );
}; },
wp.media.string.image = function( attachment, props ) { image: function( attachment, props ) {
var classes, img, options, size, shortcode, html; var classes, img, options, size, shortcode, html;
props = _.defaults( props || {}, { props = _.defaults( props || {}, {
@ -206,6 +205,7 @@ var tb_position;
} }
return html; return html;
}
}; };
wp.media.gallery = (function() { wp.media.gallery = (function() {