Commit Graph

13284 Commits

Author SHA1 Message Date
Andrew Ozz
ee6d178f15 TinyMCE: update to 4.0.20, see #24067
Built from https://develop.svn.wordpress.org/trunk@27603


git-svn-id: http://core.svn.wordpress.org/trunk@27446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 04:46:15 +00:00
Andrew Ozz
4428dc3b7c TinyMCE show/hide toolbar row: fix the value for getUserSetting('hidetb'): 0 == hidden, 1 == visible, see #24067
Built from https://develop.svn.wordpress.org/trunk@27602


git-svn-id: http://core.svn.wordpress.org/trunk@27445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 02:30:15 +00:00
Andrew Ozz
c2a5748582 wpView: don't overlap floated elements, see #26959
Built from https://develop.svn.wordpress.org/trunk@27601


git-svn-id: http://core.svn.wordpress.org/trunk@27444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 01:16:15 +00:00
John Blackbourn
8f5e5941bb Introduce before_page_number and after_page_number arguments for paginate_links(). Fixes #24709. Props grahamarmfield.
Built from https://develop.svn.wordpress.org/trunk@27600


git-svn-id: http://core.svn.wordpress.org/trunk@27443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 23:31:14 +00:00
John Blackbourn
480fad1f82 Remove a redundant title attribute. See #26559. Props joedolson.
Built from https://develop.svn.wordpress.org/trunk@27593


git-svn-id: http://core.svn.wordpress.org/trunk@27436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 22:02:15 +00:00
Dominik Schilling
a96b9c80b5 Widget Customizer: Remove unused vars.
see #27112.
Built from https://develop.svn.wordpress.org/trunk@27588


git-svn-id: http://core.svn.wordpress.org/trunk@27431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 18:35:16 +00:00
Dominik Schilling
f056bd6f04 Widget Customizer: Remove special filter for Settings Revisions plugin.
see #27112.
Built from https://develop.svn.wordpress.org/trunk@27586


git-svn-id: http://core.svn.wordpress.org/trunk@27429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 16:48:14 +00:00
Dominik Schilling
aaf723a8a8 Widget Customizer: Move preview script to wp_default_scripts().
Built from https://develop.svn.wordpress.org/trunk@27585


git-svn-id: http://core.svn.wordpress.org/trunk@27428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 15:31:16 +00:00
Dominik Schilling
64af78ca43 Widget Customizer: Restore highlighting of widgets in preview.
props westonruter.
see #27358.
Built from https://develop.svn.wordpress.org/trunk@27584


git-svn-id: http://core.svn.wordpress.org/trunk@27427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 15:21:15 +00:00
Andrew Ozz
41c747f4c1 wpView:
- Makes sure that the editor is focused when clicking on a wpview.
- When a view is the first or last node in the editor and a click on the area around the view adds a new paragraph, deselect the wpview so that the new paragraph is properly focused.
- When navigating via keyboard, select or deselect wpviews as appropriate.
Props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27582


git-svn-id: http://core.svn.wordpress.org/trunk@27425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 04:57:14 +00:00
Andrew Ozz
c8ecc9f07a TinyMCE gallery preview: fix editing the same gallery multiple times. Instead of .data() use .attr('data-...'), jQuery caches the former. Props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27581


git-svn-id: http://core.svn.wordpress.org/trunk@27424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 03:48:15 +00:00
Andrew Ozz
46a471489e TinyMCE gallery preview: fix errors when an image doesn't have/is smaller than thumbnail size, props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27580


git-svn-id: http://core.svn.wordpress.org/trunk@27423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 03:25:14 +00:00
Andrew Ozz
a322a0cd3d TinyMCE: move the caption and gallery toolbars to the right, fix selected gallery border/outline, see #27320
Built from https://develop.svn.wordpress.org/trunk@27579


git-svn-id: http://core.svn.wordpress.org/trunk@27422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 02:30:15 +00:00
Andrew Ozz
402f48ca15 TinyMCE:
- Update the styling of the image caption and gallery toolbars.
- Fix issue where the hidden clipboard div in wpView.
- Switch to using the pencil dashicon for Edit.
- Add `max-width: 100%;` to images in the gallery preview and adjust column widths.
Props cramdesign, mattheu, gcorne, melchoyce, see #27320, fixes #27376, fixes #27354

Built from https://develop.svn.wordpress.org/trunk@27578


git-svn-id: http://core.svn.wordpress.org/trunk@27421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 00:20:15 +00:00
Andrew Nacin
e451a2def5 Clarify that unregister_default_headers() returns void in some situations. fixes #21876.
Built from https://develop.svn.wordpress.org/trunk@27575


git-svn-id: http://core.svn.wordpress.org/trunk@27418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 00:12:15 +00:00
Andrew Nacin
182de5881d Avoid notices in wp_notify_postauthor() when a post has no author.
props drozdz.
fixes #26659.

Built from https://develop.svn.wordpress.org/trunk@27568


git-svn-id: http://core.svn.wordpress.org/trunk@27411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-17 20:31:14 +00:00
Andrew Nacin
e7be7a0a8d Use get_comment_link() in wp_notify_postauthor().
Fixes pagination for the link directly to the moderated comment.

props eatingrules.
fixes #26133.

Built from https://develop.svn.wordpress.org/trunk@27567


git-svn-id: http://core.svn.wordpress.org/trunk@27410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-17 20:20:15 +00:00
Andrew Nacin
bba24b09ca In is_serialized(), use substr() rather than array access, for compatibility with multibyte overloading.
props SergeyBiryukov.
fixes #18007.

Built from https://develop.svn.wordpress.org/trunk@27565


git-svn-id: http://core.svn.wordpress.org/trunk@27408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-17 20:09:17 +00:00
Andrew Nacin
0e2a70e8f5 Return false from metadata_exists() if the get_$type_metadata filter returns a false value.
props xknown.
fixes #22746.

Built from https://develop.svn.wordpress.org/trunk@27562


git-svn-id: http://core.svn.wordpress.org/trunk@27405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-17 19:40:16 +00:00
Dominik Schilling
e1fde8d510 In Recent Posts widget set default number to 5.
props afercia.
fixes #27417.
Built from https://develop.svn.wordpress.org/trunk@27561


git-svn-id: http://core.svn.wordpress.org/trunk@27404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-17 17:01:14 +00:00
Andrew Ozz
513b6992e5 Restyle the plugin install details modal to match the rest of the admin. Props avryl and paulwilde for initial mockup, see #26952
Built from https://develop.svn.wordpress.org/trunk@27559


git-svn-id: http://core.svn.wordpress.org/trunk@27402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-16 18:28:17 +00:00
Andrew Nacin
a37d4609be Send a charset header when erroring out in wp_check_php_mysql_versions().
props rodrigosprimo.
fixes #26536.

Built from https://develop.svn.wordpress.org/trunk@27557


git-svn-id: http://core.svn.wordpress.org/trunk@27400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 06:17:14 +00:00
Andrew Nacin
08db3b53c5 Explicitly assign menu term relationship rather than piggybacking on wp_insert_post() with the tax_input argument.
That argument currently depends on user context (see #19373).

Adds unit test for properly updating orphaned menu items.

props danielbachhuber.
fixes #27113.

Built from https://develop.svn.wordpress.org/trunk@27556


git-svn-id: http://core.svn.wordpress.org/trunk@27399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 06:07:16 +00:00
Andrew Nacin
5d77f8a18a XML-RPC: In wp.editPost, Remove all terms in a taxonomy when an empty array is explicitly passed.
props jstraitiff, maxcutler.
fixes #26686.

Built from https://develop.svn.wordpress.org/trunk@27554


git-svn-id: http://core.svn.wordpress.org/trunk@27397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 05:09:14 +00:00
Andrew Nacin
a9e69869c9 XML-RPC: Include 'sticky' in the struct returned from metaWeblog.getRecentPosts.
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.

Built from https://develop.svn.wordpress.org/trunk@27553


git-svn-id: http://core.svn.wordpress.org/trunk@27396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 05:05:15 +00:00
Andrew Nacin
d86ff4adc4 Allow query strings for servers in IXR_Client and WP_HTTP_IXR_Client.
props cfinke.
fixes #26947.

Built from https://develop.svn.wordpress.org/trunk@27552


git-svn-id: http://core.svn.wordpress.org/trunk@27395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 05:01:14 +00:00
Andrew Nacin
eb19a09f5b Avoid saving slashed data in XML-RPC's wp.setOptions.
props danielbachhuber.
fixes #22936.

Built from https://develop.svn.wordpress.org/trunk@27551


git-svn-id: http://core.svn.wordpress.org/trunk@27394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 04:47:13 +00:00
Andrew Nacin
944151ec8e Pass feed_type arg in wp_list_authors() to get_author_feed_link().
Adds a slate of tests for wp_list_authors().

props MikeHansenMe.
fixes #26538.

Built from https://develop.svn.wordpress.org/trunk@27550


git-svn-id: http://core.svn.wordpress.org/trunk@27393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 04:43:15 +00:00
Andrew Ozz
08663710cb TinyMCE: add internal command and shortcut (Alt+Shift+X) for toggling <code>. Define a button that can be added to any toolbar as wp_code. See #6113
Built from https://develop.svn.wordpress.org/trunk@27545


git-svn-id: http://core.svn.wordpress.org/trunk@27388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 22:43:16 +00:00
Scott Taylor
e1fee3abc6 MCE Views: don't (re-)render views if the format of the content is "raw" to avoid adding additional undo levels on undo/redo.
Props gcorne.
Fixes #27416.


Built from https://develop.svn.wordpress.org/trunk@27544


git-svn-id: http://core.svn.wordpress.org/trunk@27387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 20:41:15 +00:00
Dominik Schilling
6b27155163 Widget Customizer: Make temp hooks final and add inline docs.
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.
Built from https://develop.svn.wordpress.org/trunk@27543


git-svn-id: http://core.svn.wordpress.org/trunk@27386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 20:31:14 +00:00
Scott Taylor
12034fcc59 In wp.media.mixin, add ua and a compat map to separate and clarify browser detection and support. Leverage Underscore list iterators in isCompatible().
See #27389.


Built from https://develop.svn.wordpress.org/trunk@27542


git-svn-id: http://core.svn.wordpress.org/trunk@27385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 20:26:15 +00:00
Dominik Schilling
ca892563a6 Widget Customizer: Move widget area sections to bottom.
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.
Built from https://develop.svn.wordpress.org/trunk@27541


git-svn-id: http://core.svn.wordpress.org/trunk@27384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 20:01:14 +00:00
Scott Taylor
bd4085fac3 The canPlayType property for audio and video in JS is so bad that the official valid responses are "probably" and "maybe". There are many cases where we might want to know if an audio|video tag is gonna blow up in our face before even attempting to make a MediaElementPlayer instance out of it.
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.


Built from https://develop.svn.wordpress.org/trunk@27539


git-svn-id: http://core.svn.wordpress.org/trunk@27382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 14:36:14 +00:00
Scott Taylor
117d1bd31e Move removePlayer() and unsetPlayer() to wp.media.mixin so that other classes can take advantage of them.
* `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.


Built from https://develop.svn.wordpress.org/trunk@27538


git-svn-id: http://core.svn.wordpress.org/trunk@27381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 13:48:15 +00:00
Scott Taylor
9432aaca82 Rather than extending wp.media.mixin, only borrow coerce when necessary in wp.media.audio|video|collection. wp.media.mixin will make sense to be mixed in for classes that expect to interact with the player. More universal methods can be added and inherited by all those who extend their prototype with it.
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.


Built from https://develop.svn.wordpress.org/trunk@27537


git-svn-id: http://core.svn.wordpress.org/trunk@27380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 13:17:16 +00:00
Scott Taylor
608177d39b In media.model.PostMedia, for these 2 scenarios:
* `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.


Built from https://develop.svn.wordpress.org/trunk@27536


git-svn-id: http://core.svn.wordpress.org/trunk@27379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 13:00:14 +00:00
Scott Taylor
56b919e651 Make media.view.VideoDetails.prepareSrc a static class method instead of an instance method. Properly pairs it with its incrementing instances property.
See #27389.


Built from https://develop.svn.wordpress.org/trunk@27535


git-svn-id: http://core.svn.wordpress.org/trunk@27378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 12:43:15 +00:00
Scott Taylor
e47bc77616 Load MediaElement's CSS when TinyMCE is loaded via $mce_css in editor_settings(). Add some baseline styles in wp-content.css for audio, video, and embed tags to ensure their max-width is 100%, regardless of whether MEjs is implemented in TinyMCE.
See #27389.


Built from https://develop.svn.wordpress.org/trunk@27534


git-svn-id: http://core.svn.wordpress.org/trunk@27377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 12:34:16 +00:00
Scott Taylor
ef6af221d7 When rendering Underscore templates for Audio/Video details, use 2 new PHP functions to render the markup for audio and video tags: wp_underscore_audio_template() and wp_underscore_video_template().
Future JS templates can follow the convention of expecting `data` to be passed to them containing a `model` property.

See #27389.


Built from https://develop.svn.wordpress.org/trunk@27533


git-svn-id: http://core.svn.wordpress.org/trunk@27376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 12:20:15 +00:00
Andrew Ozz
93ec80e732 Modals: darken all overlays, update all box-shadows and headings, correct thickbox styling, make the link modal narrower and bring back the animation (css transition). Props avryl, see #26952
Built from https://develop.svn.wordpress.org/trunk@27532


git-svn-id: http://core.svn.wordpress.org/trunk@27375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 05:55:16 +00:00
Andrew Ozz
1ebf6bc9ee Drag/drop upload: don't trigger on "local" dragging, hide the overlay on click. Props kovshenin, fixes #19845
Built from https://develop.svn.wordpress.org/trunk@27531


git-svn-id: http://core.svn.wordpress.org/trunk@27374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 00:42:14 +00:00
Scott Taylor
b4569b69dc Revert [27528] until Flash in Firefox behaves :(
See #27389.


Built from https://develop.svn.wordpress.org/trunk@27530


git-svn-id: http://core.svn.wordpress.org/trunk@27373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 23:39:16 +00:00
Scott Taylor
0b7ea83dea Version bump for TinyMCE stylesheet.
See #27389, [27528].


Built from https://develop.svn.wordpress.org/trunk@27529


git-svn-id: http://core.svn.wordpress.org/trunk@27372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 23:16:14 +00:00
Scott Taylor
ba84f57083 Add MCE Views for audio and video. Please clear your browser cache so that you get the latest TinyMCE stylesheet.
* 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.


Built from https://develop.svn.wordpress.org/trunk@27528


git-svn-id: http://core.svn.wordpress.org/trunk@27371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 23:10:14 +00:00
John Blackbourn
184dc2bc33 figcaption should not be treated as a block-level element by wpautop(). See #25646. Props oso96_2000.
Built from https://develop.svn.wordpress.org/trunk@27527


git-svn-id: http://core.svn.wordpress.org/trunk@27370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 21:51:16 +00:00
John Blackbourn
74bfbfaec2 Remove Qik from the oEmbed provider list as it's shutting down. Fixes #27302. Props JustinSainton.
Built from https://develop.svn.wordpress.org/trunk@27526


git-svn-id: http://core.svn.wordpress.org/trunk@27369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 21:28:14 +00:00
Dominik Schilling
f48e3f5719 Widget Customizer: Move style/script registration to script loader. Update Gruntfile.js.
fixes #27356.
Built from https://develop.svn.wordpress.org/trunk@27525


git-svn-id: http://core.svn.wordpress.org/trunk@27368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 19:41:14 +00:00
Dominik Schilling
f46a085f7c Widget Customizer: Use ?wp_customize=on.
Let _wp_customize_include() handle customizer initialisation.
Sets also the priority for the Add Widget and Reorder buttons and removes debug cruft.

props westonruter.
fixes #27291.
Built from https://develop.svn.wordpress.org/trunk@27524


git-svn-id: http://core.svn.wordpress.org/trunk@27367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 18:38:14 +00:00
John Blackbourn
3ec5d81f97 Improve paginate_links() performance by not calling number_format_i18n() unnecessarily. Fixes #25735 with tests. Props johnpbloch.
Built from https://develop.svn.wordpress.org/trunk@27523


git-svn-id: http://core.svn.wordpress.org/trunk@27366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 17:39:15 +00:00