This affects the privileged hooks; the unprivileged hooks already received unslashed data.
props johnbillion, TobiasBg.
fixes#27260.
git-svn-id: https://develop.svn.wordpress.org/trunk@27576 602fd350-edb4-49c9-b593-d223f7449a82
That argument currently depends on user context (see #19373).
Adds unit test for properly updating orphaned menu items.
props danielbachhuber.
fixes#27113.
git-svn-id: https://develop.svn.wordpress.org/trunk@27556 602fd350-edb4-49c9-b593-d223f7449a82
Using wp.getPosts is preferred and non-WP XML-RPC APIs are no longer actively maintained. This is simply for parity with existing MW methods.
props soulseekah.
fixes#26679.
git-svn-id: https://develop.svn.wordpress.org/trunk@27553 602fd350-edb4-49c9-b593-d223f7449a82
New hooks are `dynamic_sidebar_before`, `dynamic_sidebar_after`, `dynamic_sidebar_has_widgets ` and `is_active_sidebar`.
Remove obsolete use of hacky dynamic_sidebar hook.
props westonruter, DrewAPicture.
fixes#25368.
git-svn-id: https://develop.svn.wordpress.org/trunk@27543 602fd350-edb4-49c9-b593-d223f7449a82
Since a theme can have a lot of widget areas and we don't want to bury third-party sections, bump the widget sections to the bottom with a priority of 1000+. Fixes also the ordering.
props westonruter.
fixes#27401.
git-svn-id: https://develop.svn.wordpress.org/trunk@27541 602fd350-edb4-49c9-b593-d223f7449a82
The processing state will prevent a save when it doesn't return 0.
Widget Customizer will use the state to prevent a save while a widget is updating, which is an asynchronous process.
props westonruter.
fixes#27390.
git-svn-id: https://develop.svn.wordpress.org/trunk@27540 602fd350-edb4-49c9-b593-d223f7449a82
The best (and most cautious) way to tackle this is to whitelist types by browser. Imagine that one implemented MEjs in TinyMCE's rich editor mode, this would be very helpful.
Add `isCompatible( $media )` to `wp.media.mixin`. Future features will use this.
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27539 602fd350-edb4-49c9-b593-d223f7449a82
* `removePlayer()` is an alternative to MediaElement's player removal method that does not re-add the audio|video element back to the DOM.
* `unsetPlayer()` will check for an existing `player` property on the passed instance and pause all players before calling `unsetPlayer()`
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27538 602fd350-edb4-49c9-b593-d223f7449a82
Assuming someone had implemented players in the editor, pause all players when switching between editor tabs. A method, `pauseAllPlayers`, has been added to `wp.media.mixin`.
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27537 602fd350-edb4-49c9-b593-d223f7449a82
* `src` is set, and 'Add a Source' results in the same file (or a file with the same extension) being added
* `src` is set, and 'Replace Audio|Video' is used, which will add a model property named by the attachment's extension
... call `model.unset( 'src' )`.
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27536 602fd350-edb4-49c9-b593-d223f7449a82
Future JS templates can follow the convention of expecting `data` to be passed to them containing a `model` property.
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27533 602fd350-edb4-49c9-b593-d223f7449a82
* Move TinyMCE shortcode handling from `wpgallery` plugin to `mce-view.js`
* Force `preload="none"` when rendering media in the editor to ensure fast loading (I realize this sounds illogical)
* Move audio and video tag builder logic in `media-template.php` into PHP funcs that can be reused by any code passing `data.model` to an Underscore template
* Pause all players when moving between editor tabs and when moving from the editor to editing in the media modal.
* Rename `wp.media.audio|video.shortcode()` to the more appropriate `wp.media.audio|video.update()` that now returns a `wp.shortcode` object instead of a string.
* Add necessary MediaElement css files to `$mce_css`
* In `wp.mce.View.render()`, support multiple instances of the same shortcode
* When rendering `wp.mce.View`s, fire a ready event that passes the current MCE View root element as context
See #27389.
git-svn-id: https://develop.svn.wordpress.org/trunk@27528 602fd350-edb4-49c9-b593-d223f7449a82