Commit Graph

25387 Commits

Author SHA1 Message Date
Drew Jaynes
0b8798684b Inline documentation for hooks in wp-admin/includes/dashboard.php.
Props mauryaratan. Props kpdesign for some minor cleanup.
Fixes #25752.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 02:21:15 +00:00
Andrew Nacin
60676ee282 Introduce HTML5 caption support.
When a theme supports HTML5 captions via add_theme_support( 'html5', 'caption' ), figure and figcaption will be used instead of div and p.

There's a bonus. But first, some history: Captions were introduced with an inline style set for the container. This remains, as it is there to force captions to wrap. But this inline style included an extra 10 pixels, which have vexxed theme developers for years. While these pixels were designed to ensure padding around floated images, modern themes handle this with grace. The additional pixels thus feel encumbering.

As the new HTML5 gallery support avoids outputting default gallery styles (again, irking theme developers for years; see #26697), the new HTML5 caption support will also ditch these 10 pixels of unwanted hand-holding. 

The 10 pixels are also removed entirely in the visual editor (and more styles may also disappear here; see #26642), giving themes the power necessary to match the frontend styles.

The filter img_caption_shortcode_width added in 3.7 to work around this madness (see #14380) is skipped entirely when the theme supports HTML5 captions.

props obenland, azaozz.
see #26642. also fixes #9066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 02:05:14 +00:00
Drew Jaynes
155746131f Inline documentation for hooks in wp-admin/includes/post.php.
Also moves the primary PHPDoc for the `edit_posts_per_page` hook to wp-admin/includes/post.php.

Props kpdesign for some cleanup.
Fixes #27431.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 01:49:14 +00:00
Drew Jaynes
3f494e00a3 Inline documentation for hooks in wp-includes/category-template.php.
Props kpdesign for the cleanup.
Fixes #27432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 01:35:15 +00:00
Andrew Nacin
64f7d4168f Use wp_cache_add() instead of wp_cache_set() when we don't want an unconditional set.
props jeremyfelt.
see #27003.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 01:03:14 +00:00
Andrew Nacin
e14237a109 Multisite load: Cache the main site lookup query.
props jeremyfelt.
see #27003.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 01:01:15 +00:00
Andrew Nacin
1bacefa353 Introduce a ms_site_not_found filter to replace NOBLOGREDIRECT.
Move some processing down below the point where we bail if there's no site. Add more documentation.

props jeremyfelt.
fixes #21143, see #27003.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 00:14:15 +00:00
Andrew Ozz
69b74a75cd Plupload: switch to urlstream upload method when the 'flash' runtime is used in non IE browsers. This ensures cookies are sent but limits the maximum file size that flash can handle.
By default only IE9 and older use flash so this change is mostly for completeness. It would affect only the (extremely rare) cases where a plugin disables the html5 runtime.
Built from https://develop.svn.wordpress.org/trunk@27662


git-svn-id: http://core.svn.wordpress.org/trunk@27505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 23:45:19 +00:00
Sergey Biryukov
a1c478586b Twenty Fourteen: Fix typo in contextual help.
props vanillalounge.
fixes #27493.
Built from https://develop.svn.wordpress.org/trunk@27661


git-svn-id: http://core.svn.wordpress.org/trunk@27504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 12:42:14 +00:00
Andrew Ozz
33faa15a11 TinyMCE:
- Fix PressThis styling when the popup is resized.
- Don't force loading of the media JS.
- Add the 'image' plugin as fallback when no media button(s).
- Add back the link icon tooltip/menu item string for translation.
See #24067, see #24409

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


git-svn-id: http://core.svn.wordpress.org/trunk@27503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 07:10:14 +00:00
Scott Taylor
16f93f3952 When inserting a video shortcode into the editor, set the poster attribute automatically if the video has a featured image attached to it.
See #27460.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 03:36:15 +00:00
Scott Taylor
86f4061b26 When an HTML5 fallback button is pressed in the Audio or Video Details state, filter the library by that specific mime-type when the Add Audio|Video Source is activated.
See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 03:16:14 +00:00
Scott Taylor
38d1fb971f Turn on thumbnail support for attachment:audio and attachment:video. Change conditionals to check for theme OR post type support when determining whether to turn on the Featured Image UI pieces in the admin.
Fixes #27460.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 02:35:14 +00:00
Andrew Ozz
960b8f86ef Move the styling of drag/drop on the editor uploading to media-views.css, see #27465
Built from https://develop.svn.wordpress.org/trunk@27656


git-svn-id: http://core.svn.wordpress.org/trunk@27499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 01:42:15 +00:00
Scott Taylor
410646fc52 General code cleanup and improving video sizing in the admin:
* Abstract the setting of a primary button and its callback in `wp.media.view.MediaFrame.MediaDetails`
* Account for the existence or non-existence of `$content_width` in the TinyMCE views for video
* Make sure video models always have dimensions, even if they are the defaults
* For browsers that are not Firefox, don't use a timeout when setting the `MediaElementPlayer` instance in TinyMCE views

See #27320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-22 23:26:17 +00:00
Dominik Schilling
290e5e5271 Widget Customizer: Use Underscores indexOf for IE8 compatibility.
props adamsilverstein.
see #27485.
Built from https://develop.svn.wordpress.org/trunk@27654


git-svn-id: http://core.svn.wordpress.org/trunk@27497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-22 21:22:13 +00:00
Dominik Schilling
21158f33f7 Widget Customizer: Fix 'WidgetCustomizerPreview' is undefined error in IE8/9.
* Move `WidgetCustomizerPreview` to `wp.customize.WidgetCustomizerPreview`
* Move `WidgetCustomizerPreview_exports` to export_preview_data()
* Use `_wpWidgetCustomizerPreviewSettings` to transfer settings to `wp.customize.WidgetCustomizerPreview`

see #27485.
Built from https://develop.svn.wordpress.org/trunk@27653


git-svn-id: http://core.svn.wordpress.org/trunk@27496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-22 21:04:15 +00:00
Dominik Schilling
9b0ec406d1 Widget Customizer: Improve error handling. First pass.
* Replace Widget_Customizer_Exception with WP_Error
* Call Previewer.cheatin() to show the cheating message if a user can't change widgets
* Call Previewer.login() to show the login form if a user is logged out
* Show a generic error message on failures

see #27419.
Built from https://develop.svn.wordpress.org/trunk@27652


git-svn-id: http://core.svn.wordpress.org/trunk@27495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-22 20:55:18 +00:00
Dominik Schilling
04cb00c9e1 Customizer: Use the _.now() function from Undescore.js for the current timestamp. Date.now() isn't supported in IE8.
fixes #27477.
Built from https://develop.svn.wordpress.org/trunk@27651


git-svn-id: http://core.svn.wordpress.org/trunk@27494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-22 10:54:14 +00:00
Dominik Schilling
3da04163cf Widget Customizer: Improve widget search.
* Removes jQuery.liveFilter dependency
* Filters widget collection directly
* Widget's name, ID and description will be searched

fixes #27451.
Built from https://develop.svn.wordpress.org/trunk@27650


git-svn-id: http://core.svn.wordpress.org/trunk@27493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-21 21:13:15 +00:00
Dominik Schilling
1b2bb74f76 Themes: Improve RegExp pattern for search.
* The replacement of spaces is now done globally.
* The search term is now escaped for RegExp meta characters.

props westonruter for the hint.
fixes #27479.
Built from https://develop.svn.wordpress.org/trunk@27649


git-svn-id: http://core.svn.wordpress.org/trunk@27492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-21 21:04:15 +00:00
Sergey Biryukov
18a26bf513 Fix a copy/paste error in WP_Date_Query parameter description.
props jdgrimes.
fixes #27472.
Built from https://develop.svn.wordpress.org/trunk@27648


git-svn-id: http://core.svn.wordpress.org/trunk@27491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-21 17:53:16 +00:00
Andrew Nacin
0e36651b36 Add context to 'Browse' (themes). see #27055, #27453.
Built from https://develop.svn.wordpress.org/trunk@27646


git-svn-id: http://core.svn.wordpress.org/trunk@27489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-21 00:20:15 +00:00
Andrew Nacin
aef7cdd59a Merge two strings. see #27320, #27453.
Built from https://develop.svn.wordpress.org/trunk@27645


git-svn-id: http://core.svn.wordpress.org/trunk@27488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-21 00:19:16 +00:00
Andrew Ozz
4e30461545 Editing image file: properly refresh the view after restoring the original image or rescaling the image. Props gcorne, see #21811
Built from https://develop.svn.wordpress.org/trunk@27644


git-svn-id: http://core.svn.wordpress.org/trunk@27487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 23:25:14 +00:00
Scott Taylor
4ad3972f74 Fixes for jshint
Built from https://develop.svn.wordpress.org/trunk@27643


git-svn-id: http://core.svn.wordpress.org/trunk@27486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 22:27:15 +00:00
Scott Taylor
00924f6275 Add JSDoc blocks to media-audiovideo.js.
See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 22:23:15 +00:00
Lance Willett
33d61b07f8 Twenty Fourteen: improved gallery styles in visual editor, props celloexpressions. Fixes #27462.
Built from https://develop.svn.wordpress.org/trunk@27641


git-svn-id: http://core.svn.wordpress.org/trunk@27484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 17:21:14 +00:00
Scott Taylor
615dd5331b Unifying media controls and supporting playlists in the editor:
* Support a `caption` attribute for audio and video shortcodes
* In `wp.media.audio|video`, rename `update` to `shortcode` to allow these models to share the same mixins as `wp.media.collection` subclasses
* When sending an audio or video shortcode to the editor, create a default caption if the user hasn't entered one. This currently only displays in the editor, not on the front end. Captions aren't tied to a specific attachment here because external sources are supported.
* In the `wp.mce.media` mixin, in the `edit` method, read `attr` instead of `data` when attempting to parse the encoded shortcode. `data` does not automatically update when the attribute changes. This was a blessing to debug.
* Add `wp.mce.media.PlaylistView` to support playlist views in TinyMCE
* Expose `WPPlaylistView` to global scope and suppress auto-parsing of playlist nodes when in the admin. Allow `WPPlaylistView` to be passed `metadata` on creation instead of requiring a JSON blob to be parsed.
* Remove all of the playlist logic from the `wpgallery` TinyMCE plugin.
* In `wp_prepare_attachment_for_js()` return more data for audio/video so that playlists can have parity in the admin/front end.

See #27320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 13:33:14 +00:00
Andrew Nacin
17eec3fbd6 3.9-beta2
Built from https://develop.svn.wordpress.org/trunk@27639


git-svn-id: http://core.svn.wordpress.org/trunk@27482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 04:43:15 +00:00
Lance Willett
753ea17e53 Twenty Thirteen: add Audio, Video, and Gallery Styles to editor styles. Props celloexpressions, see #27462.
Built from https://develop.svn.wordpress.org/trunk@27638


git-svn-id: http://core.svn.wordpress.org/trunk@27481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 04:41:14 +00:00
Lance Willett
989fd79bd9 Twenty Fourteen: add Audio, Video, and Gallery Styles to editor styles. Props celloexpressions, see #27462.
Built from https://develop.svn.wordpress.org/trunk@27637


git-svn-id: http://core.svn.wordpress.org/trunk@27480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 04:27:16 +00:00
Andrew Nacin
3c15a9c9f2 Theme installer:
* Restore the feature filter.
 * Improve responsiveness.
 * Router updates, fixes.
 * Make "Upload Theme" button more consistent with the admin.
 * Avoid theme-count causing filters to jump.

props matveb.
see #27055.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 04:20:15 +00:00
Andrew Nacin
413207be6d Fix various issues with WP_Adjacent_Post:
* Performance / number of queries.
 * Incorrect results caused by sticky posts.
 * Back compat for filters, which had used "WHERE" while WP_Query does not; and fixing table references.

props ethitter.
fixes #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:59:15 +00:00
Andrew Nacin
2061a3aa5f Return a bool from wp_using_ext_object_cache(), never a null.
see #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:55:14 +00:00
Andrew Nacin
f75e5a023c WP_Query: allow split_the_query = false to avoid a split.
see #26937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:54:15 +00:00
Andrew Ozz
e05fa407bf wpView: select/deselect views when moving the caret with the arrow keys, don't move the caret after deselect(), props gcorne, see #26959
Built from https://develop.svn.wordpress.org/trunk@27632


git-svn-id: http://core.svn.wordpress.org/trunk@27475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:48:14 +00:00
Scott Taylor
bcb54794ff Move wp.media.view.MediaDetails to media-audiovideo.js. This should have moved over with the rest.
See [27608].


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


git-svn-id: http://core.svn.wordpress.org/trunk@27474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:45:15 +00:00
Helen Hou-Sandí
593bd2a495 Avoid an undefined function due to /wp-admin/includes/dashboard.php being included too late. props obenland. fixes #27457.
Built from https://develop.svn.wordpress.org/trunk@27630


git-svn-id: http://core.svn.wordpress.org/trunk@27473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 01:31:15 +00:00
Helen Hou-Sandí
6a1f7ca4fe Add the version string to wp-content.css to avoid tenacious caching woes. see #27320.
Built from https://develop.svn.wordpress.org/trunk@27629


git-svn-id: http://core.svn.wordpress.org/trunk@27472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 01:08:13 +00:00
Helen Hou-Sandí
bef7f9e75e Further unify and refine media and view control styling. see #27320.
Built from https://develop.svn.wordpress.org/trunk@27628


git-svn-id: http://core.svn.wordpress.org/trunk@27471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 00:48:15 +00:00
Lance Willett
a40a36e539 Twenty Fourteen: load Masonry after window load event to give more time for widget content to load before drawing the layout. Closes #27051.
Built from https://develop.svn.wordpress.org/trunk@27627


git-svn-id: http://core.svn.wordpress.org/trunk@27470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 23:08:14 +00:00
Dominik Schilling
d1f3abe55c Remove "Show" prefix from filter dropdowns, see #26743.
Built from https://develop.svn.wordpress.org/trunk@27626


git-svn-id: http://core.svn.wordpress.org/trunk@27469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 22:13:14 +00:00
Andrew Nacin
30fd56b3dc Only enqueue the image editor in the media modal in the admin.
props gcorne.
see #21811.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 21:16:14 +00:00
Lance Willett
4aacf01403 Twenty Fourteen: revert r27623 post_class filter removal since it will visually break pre-WP 3.9 installs. See #18804.
Built from https://develop.svn.wordpress.org/trunk@27624


git-svn-id: http://core.svn.wordpress.org/trunk@27467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 20:49:15 +00:00
Lance Willett
561ab7b840 Twenty Fourteen: remove post_class filter for has-post-thumbnail now that it's added in core for every theme. See #18804.
Built from https://develop.svn.wordpress.org/trunk@27623


git-svn-id: http://core.svn.wordpress.org/trunk@27466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 19:13:15 +00:00
Scott Taylor
b836d650bd On attachment pages for audio and video, display players. Currently, only a link is displayed. Add minimal CSS rules for compatibility with 2011, 2012, and 2013 themes.
In `prepend_attachment`, add logic to support attachment types that are not `image`.

In `get_post_class()`, don't add the `has-post-thumbnail` class for attachment pages.

Fixes #27243.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 19:00:14 +00:00
Helen Hou-Sandí
7ede169d47 Ensure the media library spinner hides when displaying a cached result set. props kovshenin. see #24859.
Built from https://develop.svn.wordpress.org/trunk@27621


git-svn-id: http://core.svn.wordpress.org/trunk@27464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 18:27:15 +00:00
Andrew Nacin
deb8779af5 More translation cleanups.
Affects widgets (see #27112), custom headers (see #21785), theme installer (see #27055, reverts [27614]), and some media stuff. Untranslates some complicated strings that need additional study.

see #27453.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 08:18:14 +00:00
Scott Taylor
8a50510c0a JSHint fix for [27608].
Built from https://develop.svn.wordpress.org/trunk@27619


git-svn-id: http://core.svn.wordpress.org/trunk@27462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 07:24:16 +00:00