Media: Remove unused link-formatting function from media-editor.js. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c95bd0198a
commit
bc66935dc6
|
@ -49,22 +49,7 @@ function send_to_editor(h) {
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
(function($){
|
(function($){
|
||||||
// Stores the editors' `wp.media.controller.Frame` instances.
|
// Stores the editors' `wp.media.controller.Frame` instances.
|
||||||
var workflows = {},
|
var workflows = {};
|
||||||
linkToUrl;
|
|
||||||
|
|
||||||
linkToUrl = function( props, attachment ) {
|
|
||||||
var link = props.link || getUserSetting( 'urlbutton', 'post' ),
|
|
||||||
url;
|
|
||||||
|
|
||||||
if ( 'file' === link )
|
|
||||||
url = attachment.url;
|
|
||||||
else if ( 'post' === link )
|
|
||||||
url = attachment.link;
|
|
||||||
else if ( 'custom' === link )
|
|
||||||
url = props.linkUrl;
|
|
||||||
|
|
||||||
return url || '';
|
|
||||||
};
|
|
||||||
|
|
||||||
wp.media.string = {
|
wp.media.string = {
|
||||||
// Joins the `props` and `attachment` objects,
|
// Joins the `props` and `attachment` objects,
|
||||||
|
|
Loading…
Reference in New Issue