Allow inline editing of width and height parameters while previewing an embed in the media modal:

* Use `wp.shortcode()` instead of manually constructing a shortcode in `views/embed/link`
* Allow a URL to transition to a shortcode (and vice versa) when returning an embed to TinyMCE
* In `WP_Embed`, store the last URL and last set of attributes requested in class properties
* `wp_ajax_parse_embed()`, allow `[embed]`s to have attributes. Return `attr` in the response.

This is a first pass to allow broad testing with recent MCE view changes. 

See #31139.


git-svn-id: https://develop.svn.wordpress.org/trunk@31620 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-03-05 05:59:10 +00:00
parent 6c8322e8fa
commit 4726669b3f
7 changed files with 144 additions and 28 deletions
+24
View File
@@ -1944,6 +1944,29 @@
clear: both;
}
.embed-link-settings .setting {
display: none;
}
.embed-link-dimensions:after {
content: '';
display: block;
clear: both;
}
.embed-link-dimensions .width,
.embed-link-dimensions .height {
float: left;
width: 125px;
clear: none;
margin-right: 10px;
}
.embed-link-dimensions input {
width: auto;
max-width: 110px;
}
.image-details .embed-media-settings .setting {
float: none;
width: auto;
@@ -1990,6 +2013,7 @@
.media-embed .setting span {
display: block;
width: 200px;
max-width: 100%;
font-size: 13px;
line-height: 24px;
color: #666;