mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 18:08:09 +01:00
Media: Declare wp.media.string methods in a single object. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fd6b847330
commit
3cfbf3c4bb
@ -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
Block a user