Insert from URL: Make sure the link text is actually used.

Turns out there were more pieces to renaming the field.

props iseulde.
fixes #29476.


git-svn-id: https://develop.svn.wordpress.org/trunk@32055 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi
2015-04-06 18:24:53 +00:00
parent d8f439c335
commit 2f368bf396
3 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -880,7 +880,7 @@
if ( 'link' === type ) {
_.defaults( embed, {
title: embed.url,
linkText: embed.linkText,
linkUrl: embed.url
});
@@ -1034,11 +1034,11 @@
*/
link: function( embed ) {
return wp.media.post( 'send-link-to-editor', {
nonce: wp.media.view.settings.nonce.sendToEditor,
src: embed.linkUrl,
title: embed.title,
html: wp.media.string.link( embed ),
post_id: wp.media.view.settings.post.id
nonce: wp.media.view.settings.nonce.sendToEditor,
src: embed.linkUrl,
link_text: embed.linkText,
html: wp.media.string.link( embed ),
post_id: wp.media.view.settings.post.id
});
}
},
+1 -1
View File
@@ -814,7 +814,7 @@ function wp_print_media_templates() {
<script type="text/html" id="tmpl-embed-link-settings">
<label class="setting link-text">
<span><?php _e( 'Link Text' ); ?></span>
<input type="text" class="alignment" data-setting="link-text" />
<input type="text" class="alignment" data-setting="linkText" />
</label>
<div class="embed-container" style="display: none;">
<div class="embed-preview"></div>