Commit Graph

25264 Commits

Author SHA1 Message Date
Scott Taylor
29e2d9f66a Since audio and video shortcodes don't point at actual attachments, don't persist the library's selection. Move the media instructions in the block that scrolls.
See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27480 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 06:23:18 +00:00
Scott Taylor
7361703264 Add wp.media.view.MediaFrame.MediaDetails, which wp.media.view.MediaFrame.AudioDetails and media.view.MediaFrame.VideoDetails extend. The subclasses subsequently only need to set createStates() and bindHandlers(), as well as any missing toolbar views.
See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27479 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 06:04:29 +00:00
Scott Taylor
3c8d2a99f2 Audio/Video shortcodes in the media modal:
* Make a generic model, `wp.media.model.PostMedia`, which replaces `wp.media.model.PostAudio` and `wp.media.model.PostVideo`
* Make a generic library, `wp.media.controller.MediaLibrary`, which replaces `wp.media.controller.ReplaceVideo` and `wp.media.controller.ReplaceAudio`
* `wp.media.controller.MediaLibrary` is used to create new states that want to load a library filtered by type, making it incredibly simple to add states to frames. See `wp.media.view.MediaFrame.VideoDetails` and `wp.media.view.MediaFrame.AudioDetails`.

UX changes:

* Add the ability to manage HTML5 fallbacks - add additional `<source>`s or remove specific `<source>`s
* In the Video Details state, add the ability to select a poster image

See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27478 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 05:24:10 +00:00
Scott Taylor
8064f5dbc4 In wp.media.model.PostAudio and wp.media.model.PostVideo, use Underscore's unset method when clearing out properties when the attachment changes.
See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27477 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 01:05:48 +00:00
Scott Taylor
67512aa18a Audio/Video shortcodes in the media modal:
* Add `embedMimes` to `_wpMediaViewsL10n`
* Use `escape` instead of `interpolate` when setting attributes in Underscore templates
* When creating the `<audio>` and `<video>` tags dynamically, set inner `<source>` nodes instead of the `src` attribute and properly set the mime-type per source as the `type` attribute. This is also drastically reduces the amount of code used to generate the tags.

See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27476 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 01:00:53 +00:00
Andrew Nacin
f6d9b60cd0 Add context to an internal HTTP API hook.
props kovshenin.
fixes #27021.


git-svn-id: https://develop.svn.wordpress.org/trunk@27475 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 21:53:51 +00:00
Andrew Nacin
036cb74d46 Add unit tests for searching by relevance.
props wonderboymusic.
see #7394, #20044.


git-svn-id: https://develop.svn.wordpress.org/trunk@27474 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 21:26:26 +00:00
Drew Jaynes
5fde82be76 Better standardize parameter value types in PHPDocs where both a post ID or WP_Post would be acceptable.
Covers cases where previously only `int` or `int|object` types were notated.

Props coffee2code for the original patch.
See #20495.


git-svn-id: https://develop.svn.wordpress.org/trunk@27473 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 19:31:51 +00:00
Andrew Nacin
f225973b62 Allow $crop in add_image_size() to receive crop anchors (top, left, right, bottom, center).
This also applies to set_post_thumbnail_size() and image_resize_dimensions().

props bradt, wonderboymusic, DH-Shredder.
fixes #19393.


git-svn-id: https://develop.svn.wordpress.org/trunk@27472 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 06:13:27 +00:00
Andrew Nacin
ab7960e009 I am having a bad day. see #13265.
git-svn-id: https://develop.svn.wordpress.org/trunk@27471 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 04:19:24 +00:00
Andrew Nacin
928a972fb5 Rename the new page_templates filter to theme_page_templates, and pass it a post object for proper context.
see #13265.


git-svn-id: https://develop.svn.wordpress.org/trunk@27470 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 04:18:30 +00:00
Andrew Nacin
4cf6fc1a99 Use SSL when linking to WordPress.org. see #27115.
git-svn-id: https://develop.svn.wordpress.org/trunk@27469 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 04:13:28 +00:00
Andrew Nacin
89241aee8d Widgets dashicons update.
props melchoyce, michael-arestad, empireoflight.
see #26936.


git-svn-id: https://develop.svn.wordpress.org/trunk@27468 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 03:37:10 +00:00
Andrew Nacin
5d48091e5d Remove lame debugging. see #23057.
git-svn-id: https://develop.svn.wordpress.org/trunk@27467 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 03:15:49 +00:00
Andrew Nacin
750fe42507 Normalize $reassign in wp_delete_user() to ensure the hooks receive consistent values.
fixes #23057.


git-svn-id: https://develop.svn.wordpress.org/trunk@27466 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 03:15:06 +00:00
Sergey Biryukov
ccebc9746a Use correct function name. see [27374].
props lpointet.
see #14424.

git-svn-id: https://develop.svn.wordpress.org/trunk@27465 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 02:44:58 +00:00
Andrew Ozz
53c76ed168 Limit the drag/drop upload only to newer browsers (IE10+), add a fullscreen dropzone in DFW mode, props kovshenin, see #19845
git-svn-id: https://develop.svn.wordpress.org/trunk@27464 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 01:34:04 +00:00
Sergey Biryukov
28b34b3811 Fix docblock formatting in [27462]. see #23057.
git-svn-id: https://develop.svn.wordpress.org/trunk@27463 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 01:25:28 +00:00
Sergey Biryukov
e925502c25 Pass $reassign parameter to 'delete_user' and 'deleted_user' actions.
props genkisan.
fixes #23057.

git-svn-id: https://develop.svn.wordpress.org/trunk@27462 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 01:22:51 +00:00
Andrew Ozz
65ac1e6f2d Adjust .find-box-inside responsive style, props avryl, see #26952
git-svn-id: https://develop.svn.wordpress.org/trunk@27461 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 00:46:03 +00:00
azaozz
c88f6ba1e9 Set minimum z-index for the TinyMCE modals and adjust the z-index in DFW, see #26952
git-svn-id: https://develop.svn.wordpress.org/trunk@27460 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 00:40:03 +00:00
Scott Taylor
613b28cc81 Remove a cache-busting hack from Tests_Term_getTerms::test_get_terms_exclude_tree(). It is no longer necessary after #14485 and #25711.
See [27300].
Props SergeyBiryukov.
Fixes #27313.



git-svn-id: https://develop.svn.wordpress.org/trunk@27459 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 19:35:55 +00:00
Scott Taylor
3010c5aa20 In get_terms(), leverage get_term_children() over _get_term_children() when making sure to show empty terms that have children in a hierarchical taxonomy while avoiding duplicates.
Adds unit test for `child_of` param. Adjusts unit tests for `get_terms()`.

See [27108] and [27125].
Props SergeyBiryukov.
Fixes #27123.



git-svn-id: https://develop.svn.wordpress.org/trunk@27458 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 19:29:01 +00:00
Scott Taylor
666cd37087 get_term_children() returns an array of IDs, not objects. The docs have been updated to reflect this.
Fixes #27312.



git-svn-id: https://develop.svn.wordpress.org/trunk@27457 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 19:15:11 +00:00
Scott Taylor
dfc11a170b On second thought, allow posts_per_rss to be set in pre_get_posts to override the posts_per_rss option. There are backwards compatibility concerns otherwise.
Props nacin.
Partially reverts [27455]. Updates the unit test. See #25380.



git-svn-id: https://develop.svn.wordpress.org/trunk@27456 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 18:58:33 +00:00
Scott Taylor
65932f71fd When setting posts_per_page in WP_Query::get_posts(), check for is_feed() in the same place where posts_per_page is set when it is not already set. Previously, when is_feed() was true, posts_per_page would be arbitrarily overwritten. This fix allows posts_per_page to be set during pre_get_posts when is_feed() is true and not be overwritten.
Adds unit test.

Props wokamoto.
Fixes #25380.



git-svn-id: https://develop.svn.wordpress.org/trunk@27455 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 18:32:40 +00:00
Scott Taylor
a8bc73c543 When MEDIA_TRASH is true, show the proper context in the attachment-details sidebar. Without this fix, it always showed "Delete Permanently."
Props toszcze.
Fixes #26783.



git-svn-id: https://develop.svn.wordpress.org/trunk@27454 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 16:41:49 +00:00
Scott Taylor
69cf45e4dd JSHint addendum to [27450].
See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27453 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 08:43:54 +00:00
Scott Taylor
0143c2d90a Videos in the media modal:
* Support rendering of chromeless YouTube when a video shortcode's `src` is a YouTube URL. 
* Don't instantiate an instance of `MediaElementPlayer` until after the view has been attached to the DOM and the view's `ready` event has fired.
* Don't set `poster` for videos when its value is empty. Much like `src` in the `img` tag - when empty, it will assume and load the current window's URL.
* When removing a player instance, don't call the `pause` method if the playback is not native.

See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27452 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 08:31:57 +00:00
Andrew Ozz
5e5caca113 TinyMCE editimage: show the toolbar on mouseup to avoid accidental clicks on the buttons, fixes #24409
git-svn-id: https://develop.svn.wordpress.org/trunk@27451 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 06:33:06 +00:00
Scott Taylor
43a8fb1bd2 Support the autoplay attribute, even when the plugin type for a MediaElement instance is Flash. In the media modal, wp.media.view.VideoDetails and wp.media.view.AudioDetails now extend a unified wp.media.view.MediaDetails class which contains all of the player creation and destruction logic. The remove() method mimics the mejs.MediaElementPlayer.remove() method, but does not re-add the audio/video tag to the DOM. The MEjs method is especially problematic when the tag has autoplay="true" and the view has been detached but not destroyed.
Fixes #25077.
See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27450 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 05:51:25 +00:00
Andrew Ozz
5a13b572cb TinyMCE: add Ctrl+K, the "de-facto standard" shortcut to open wpLink, fixes #27305
git-svn-id: https://develop.svn.wordpress.org/trunk@27449 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 03:09:00 +00:00
Scott Taylor
142b5208fa Remove the box-shadow from the separator in the right sidebar of the media modal.
Props avryl.
Fixes #27217. 



git-svn-id: https://develop.svn.wordpress.org/trunk@27448 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 02:45:18 +00:00
Andrew Ozz
bb00c66c6a TinyMCE:
- Restore the "link" button state to disabled by default and enabled when text or image is selected.
- Remove the (recently added) default `link` plugin, not needed for `wpLink`.
See #27309

git-svn-id: https://develop.svn.wordpress.org/trunk@27447 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-07 02:01:07 +00:00
Helen Hou-Sandi
207da4064a Be more specific about which themes we want to jshint. props jorbin. fixes #27308.
git-svn-id: https://develop.svn.wordpress.org/trunk@27446 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 23:41:18 +00:00
Helen Hou-Sandi
55e1b4c982 At long last, a first pass at bringing the image editor into the media modal. props gcorne, DH-Shredder, tomauger. see #21811.
git-svn-id: https://develop.svn.wordpress.org/trunk@27445 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 22:54:32 +00:00
Dominik Schilling (ocean90)
95b13bb758 Add missing Dashicons classes to Network Admin menu, see #26630.
git-svn-id: https://develop.svn.wordpress.org/trunk@27444 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 22:51:53 +00:00
Scott Taylor
ad3f6ef9d9 Call the correct remove() method on the MEjs instance when exiting the media modal.
See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27443 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 20:12:39 +00:00
Andrew Nacin
b727bef3f3 Twenty Fourteen: Add a .button class.
props celloexpressions.
fixes #27075.


git-svn-id: https://develop.svn.wordpress.org/trunk@27442 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 19:53:42 +00:00
Andrew Nacin
4bbd5ef1d6 maybe_regenerate_attachment_metadata() is now wp_maybe_generate_attachment_metadata().
props kovshenin.
fixes #26825.


git-svn-id: https://develop.svn.wordpress.org/trunk@27441 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 19:33:32 +00:00
Scott Taylor
e1773d3a18 Cleanup audio/video shortcodes in the media modal:
* On the controller's `update`, `replace`, and `close` events, call `detach()` on the frame
* Cleanup the HTML ouput of the Underscore templates.
* Move some logic from the Underscore template to the `VideoDetails` view class.

See #27016.



git-svn-id: https://develop.svn.wordpress.org/trunk@27440 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 19:05:11 +00:00
Andrew Nacin
ff3c96208a In get_site_by_path(), avoid passing $paths through prepare(). If a path contains a %, we end up with problems. see #27003.
git-svn-id: https://develop.svn.wordpress.org/trunk@27439 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 18:17:32 +00:00
Scott Taylor
15533d1d1f Add a loading indicator to the Media Library.
Props kadamwhite, gcorne, kovshenin.
Fixes #24859.



git-svn-id: https://develop.svn.wordpress.org/trunk@27438 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 17:45:26 +00:00
Dominik Schilling (ocean90)
00b00312b3 Revisions: Restore [24929] which was reverted in [26072].
props avryl.
fixes #27267.

git-svn-id: https://develop.svn.wordpress.org/trunk@27437 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 16:49:08 +00:00
Scott Taylor
2862cb85d8 Make widget customizer code pass JSHint.
Fixes #27298.



git-svn-id: https://develop.svn.wordpress.org/trunk@27436 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 16:44:56 +00:00
Scott Taylor
99e98b3e93 We shall pledge to run jshint before committing.
Props nacin for the nudge.



git-svn-id: https://develop.svn.wordpress.org/trunk@27435 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 16:05:48 +00:00
John Blackbourn
745f24b2d4 Use wp_get_attachment_url() instead of the GUID when getting header image URLs. Fixes #27222. Props Kopepasah.
git-svn-id: https://develop.svn.wordpress.org/trunk@27434 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 15:54:17 +00:00
Drew Jaynes
5a3f52fe39 Inline documentation for hooks in wp-includes/class-wp-customize-manager.php.
Props kpdesign for the typo fix.
Fixes #27296.


git-svn-id: https://develop.svn.wordpress.org/trunk@27433 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 14:10:04 +00:00
Drew Jaynes
ce4ed49390 Inline documentation for hooks in wp-includes/class-wp-customize-setting.php.
Props kpdesign for the cleanup.
Fixes #27295


git-svn-id: https://develop.svn.wordpress.org/trunk@27432 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 14:03:23 +00:00
Drew Jaynes
6ec45726ac Inline documentation for hooks in wp-includes/class-wp-customize-control.php.
Fixes #27294.


git-svn-id: https://develop.svn.wordpress.org/trunk@27431 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 13:50:32 +00:00