Media: Remove unused link-formatting function from media-editor.js. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22773 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
682afd8c19
commit
815ad62697
|
@ -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