Commit Graph

21076 Commits

Author SHA1 Message Date
Dominik Schilling 34331fc574 Media: Fix broken delete/trash functionality in the library after [36546].
Props imath.
See #34350.
Built from https://develop.svn.wordpress.org/trunk@36681


git-svn-id: http://core.svn.wordpress.org/trunk@36648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 16:03:26 +00:00
Dominik Schilling d90a013437 External Libraries: Update jQuery to 1.12.1.
Release post: http://blog.jquery.com/2016/02/22/jquery-1-12-1-and-2-2-1-released/
Changelog: https://github.com/jquery/jquery/compare/1.12.0...1.12.1

Fixes #35380.
Built from https://develop.svn.wordpress.org/trunk@36680


git-svn-id: http://core.svn.wordpress.org/trunk@36647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 15:44:26 +00:00
Dominik Schilling 86690daf0b Multisite: Switch to a usermeta key for email confirmation.
To prevent inconsistent data across sites in a network the new email address is now stored in usermeta. Adds visual feedback for the case when an update has failed.
All existing options will be removed on a database upgrade.

Props MikeHansenMe, kovshenin, jeremyfelt, ocean90.
Fixes #23358.
Built from https://develop.svn.wordpress.org/trunk@36679


git-svn-id: http://core.svn.wordpress.org/trunk@36646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 15:34:28 +00:00
Ryan McCue 21b22c0fb6 REST API: Fix error in Request tests.
On the 21st of November, 2014, I committed tests for WP_REST_Request
to the API plugin. Although I didn't realise at the time, I was
causing my future self to go through hours of sufferring.

Unfortunately, I forgot to call parent::setUp() which would break
the tests in subtle ways in the future and would ruin the good part
of my day.

Let this be a warning to all of you who write future unit tests.

See f0396be17e
for the original commit.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 08:29:26 +00:00
Andrew Ozz 771cfe22ba TinyMCE, inline link dialog:
- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36677


git-svn-id: http://core.svn.wordpress.org/trunk@36644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 06:20:26 +00:00
Weston Ruter 061cbfadba Customize: Introduce `customize_nav_menu_searched_items` filter for modifying results of nav menu item searches.
This new filter can be used in conjunction with the `customize_nav_menu_available_items` and `customize_nav_menu_available_item_types` filters.

Props TimothyBlynJacobs, westonruter.
Fixes #34947.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 05:57:26 +00:00
Weston Ruter 5ed6b0d31c Customize: Fix nav menu item search after Backbone update.
Fixes regression introduced in [36546].

See #34350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 05:38:28 +00:00
Ryan McCue 937b0c3241 REST API: Use WP_REST_Request::from_url() when embedding.
See #35803.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 04:20:25 +00:00
Ryan McCue 0b7e133054 REST API: Add WP_REST_Request::from_url()
Allows converting a REST URL into a Request object.

Props danielbachhuber.
Fixes #35803.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 04:01:26 +00:00
Aaron Jorbin 5c9d92b7f8 Add Additional filters to Press This
3 new filters that aim to improve the extensibility of Press This:
1) `press_this_save_post_content` - Applied right after the side_load_images in order to allow potential side loads of other types of media.
Example use case: side load non-image media, such as audio or video.

2) `press_this_useful_html_elements`
Allows filtering of currently hard coded array of HTML elements allowed in fetch_source_html step for special cases where additional HTML elements need to be kept.
Example use case: HTML5 elements, such as amp-img, that someone wants to pull in.

3) `press_this_suggested_content`
A filter for the content right before it's passed to the editor and presented to the user.
Example use case is when someone stored posts in a different, non-HTML format, such as Markdown, this is essential.

Fixes #34455.
Props cadeyrn, kraftbj


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


git-svn-id: http://core.svn.wordpress.org/trunk@36639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 03:56:24 +00:00
Aaron Jorbin e4dc3d1232 Make Custom Taxonomy Feeds Auto-discoverable
This helps improve the parity between custom taxonomies and built in taxonomies. It is one small step to #makeCustomTaxonomyFeedsGreatAgain.

Fixes #23677
Props mdgl, stevenkword


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


git-svn-id: http://core.svn.wordpress.org/trunk@36638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 02:36:25 +00:00
Sergey Biryukov aff11cdc9f I18N: Remove `<code>` tag from translatable string in `wp-admin/includes/class-wp-filesystem-ssh2.php`.
Props ramiy.
Fixes #35741.
Built from https://develop.svn.wordpress.org/trunk@36670


git-svn-id: http://core.svn.wordpress.org/trunk@36637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 02:11:28 +00:00
Sergey Biryukov 4a2676ab8b I18N: Add translator comments and context to "New Site Created" email notification strings.
Props ramiy.
Fixes #35716.
Built from https://develop.svn.wordpress.org/trunk@36669


git-svn-id: http://core.svn.wordpress.org/trunk@36636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 02:04:28 +00:00
Sergey Biryukov 37d3add855 I18N: Replace hardcoded URL in a translatable string with a placeholder in `wp-admin/upload.php`.
Props ramiy.
Fixes #35743.
Built from https://develop.svn.wordpress.org/trunk@36668


git-svn-id: http://core.svn.wordpress.org/trunk@36635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 01:48:27 +00:00
Sergey Biryukov 54b8932923 Widgets: Avoid a PHP notice in `is_dynamic_sidebar()` is a sidebar is registered but does not yet have an index in the `sidebars_widgets` option.
Props dlh.
Fixes #35928.
Built from https://develop.svn.wordpress.org/trunk@36667


git-svn-id: http://core.svn.wordpress.org/trunk@36634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 01:37:26 +00:00
Sergey Biryukov d0863ec901 I18N: Remove `<code>` tag from translatable string in `wp-admin/theme-install.php`.
Props ramiy.
Fixes #35739.
Built from https://develop.svn.wordpress.org/trunk@36666


git-svn-id: http://core.svn.wordpress.org/trunk@36633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 01:30:25 +00:00
Sergey Biryukov 969ccec7d2 I18N: Remove `<code>` tags from translatable strings in `wp-admin/install.php`.
Props ramiy.
Fixes #35738.
Built from https://develop.svn.wordpress.org/trunk@36665


git-svn-id: http://core.svn.wordpress.org/trunk@36632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 01:22:26 +00:00
Sergey Biryukov f606d335f8 I18N: Add missing periods to two strings in `wp-admin/network/sites.php`
Props ramiy.
Fixes #35720.
Built from https://develop.svn.wordpress.org/trunk@36664


git-svn-id: http://core.svn.wordpress.org/trunk@36631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 01:09:25 +00:00
Sergey Biryukov 95bd9f37ca I18N: Remove `<em>` tag from translatable string in `wp-admin/includes/class-wp-ms-sites-list-table.php`.
Props ramiy.
Fixes #35676.
Built from https://develop.svn.wordpress.org/trunk@36663


git-svn-id: http://core.svn.wordpress.org/trunk@36630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 01:06:26 +00:00
Sergey Biryukov 519cde5a18 I18N: Remove HTML tags from translatable strings in `wp-admin/plugins.php`.
Props ramiy.
Fixes #35679.
Built from https://develop.svn.wordpress.org/trunk@36662


git-svn-id: http://core.svn.wordpress.org/trunk@36629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 01:02:25 +00:00
Sergey Biryukov 7c66e0648a Comments: In `wp_xmlrpc_server::pingback_ping()`:
* Rename `$linea` to `$remote_source` for clarity. 
* Add `remote_source` to comment data, so it's available to `preprocess_comment` and `comment_post` filters.
* Pass the original (unfiltered) response source to the filters too (as `remote_source_original` in comment data).

Props dshanske for the original patch.
Fixes #34141.
Built from https://develop.svn.wordpress.org/trunk@36661


git-svn-id: http://core.svn.wordpress.org/trunk@36628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 00:55:26 +00:00
Sergey Biryukov 74f707ff6b Comments: Pass comment data to the `comment_post` filter.
Props dshanske.
See #34141.
Built from https://develop.svn.wordpress.org/trunk@36660


git-svn-id: http://core.svn.wordpress.org/trunk@36627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 00:49:26 +00:00
Sergey Biryukov ab0eb71d21 Revisions: Clean up `_wp_post_revision_fields()`:
* Move the array processing to a new function, `_wp_post_revision_data()`.
* Make both functions accept a post array or a `WP_Post` object. 
* Always apply the `_wp_post_revision_fields` filter and pass the post data to it.

Fixes #13382.
Built from https://develop.svn.wordpress.org/trunk@36659


git-svn-id: http://core.svn.wordpress.org/trunk@36626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 00:44:59 +00:00
Sergey Biryukov f9a4120299 I18N: Remove `<strong>` tags from translatable strings in `wp-admin/custom-header.php`.
Add translator comments.

Props ramiy.
Fixes #35675.
Built from https://develop.svn.wordpress.org/trunk@36658


git-svn-id: http://core.svn.wordpress.org/trunk@36625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 23:43:26 +00:00
Sergey Biryukov 9cb7cab875 I18N: Remove `<a>` tags from translatable strings in `wp-admin/themes.php`.
Props ramiy.
Fixes #35745.
Built from https://develop.svn.wordpress.org/trunk@36657


git-svn-id: http://core.svn.wordpress.org/trunk@36624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 23:39:25 +00:00
Sergey Biryukov 5ca5900587 I18N: Remove `<a>` tag from translatable string in `wp-admin/options-general.php`.
Add translator comment.

Props ramiy.
Fixes #35673.
Built from https://develop.svn.wordpress.org/trunk@36656


git-svn-id: http://core.svn.wordpress.org/trunk@36623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 23:28:25 +00:00
Sergey Biryukov a7008072db I18N: Remove `<a>` tag from translatable string in `wp-admin/user-edit.php`.
Add translator comment.

Props ramiy.
Fixes #35672.
Built from https://develop.svn.wordpress.org/trunk@36655


git-svn-id: http://core.svn.wordpress.org/trunk@36622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 23:27:25 +00:00
Dominik Schilling cf5df5a7ce Schema: Add an index to `wp_users.user_email`.
Improves lookup of an email address on large user tables.

See #9568.
Fixes #33376.
Built from https://develop.svn.wordpress.org/trunk@36654


git-svn-id: http://core.svn.wordpress.org/trunk@36621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 23:21:26 +00:00
Sergey Biryukov f69045c9a6 I18N: Remove `<strong>` tag from translatable string in `wp-admin/import.php`.
Add translator comment.

Props ramiy.
Fixes #35671.
Built from https://develop.svn.wordpress.org/trunk@36653


git-svn-id: http://core.svn.wordpress.org/trunk@36620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 23:09:26 +00:00
Pascal Birchler 8725644d40 Posts: Introduce `get_post_types_by_support()`.
Similar to `get_post_types()`, this new function returns a list of post type names that support a specific feature.

Props wpsmith, barryceelen, swissspidy.
Fixes #34010.
Built from https://develop.svn.wordpress.org/trunk@36652


git-svn-id: http://core.svn.wordpress.org/trunk@36619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 22:50:26 +00:00
Pascal Birchler 9612c26db3 Users: Introduce `_wp_get_current_user()` for improved backward compatibility.
This new helper function is used by the pluggable functions `wp_get_current_user()` and `get_currentuserinfo()`, which was previously being called by the former before [36311]. Without it, infinite loops could be caused when plugins implement these functions, as they are now called the other way around.

Fixes #19615.
Built from https://develop.svn.wordpress.org/trunk@36651


git-svn-id: http://core.svn.wordpress.org/trunk@36618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 22:26:28 +00:00
Weston Ruter fa3032b076 Customize: Fix and extend broken ajax unit tests to account for partials being skipped from rendering.
Fixes regression introduced in [36643].

See #35914.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 21:46:27 +00:00
Dominik Schilling 57aec38add Styles: Clarify the allowed values for the `$media` parameter of `wp_register_style()`/`wp_enqueue_style()`.
Adds unit test.

Fixes #35921.
Built from https://develop.svn.wordpress.org/trunk@36649


git-svn-id: http://core.svn.wordpress.org/trunk@36616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 20:41:26 +00:00
Pascal Birchler 383c422527 Embeds: Only display an iframe when it was successfully loaded.
This prevents showing a blank iframe by first checking if a message was successfully received from it.

Fixes #35894.
Built from https://develop.svn.wordpress.org/trunk@36648


git-svn-id: http://core.svn.wordpress.org/trunk@36615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 20:23:25 +00:00
Boone Gorges 6d8a3f3612 Query: Search should match `post_excerpt` in addition to title and content.
When ordering search results, exact matches in the post excerpt are weighted
above those in post content, but below those in the post title.

Props swissspidy, sebastian.pisula.
FIxes #35762.
Built from https://develop.svn.wordpress.org/trunk@36647


git-svn-id: http://core.svn.wordpress.org/trunk@36614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 20:14:26 +00:00
Boone Gorges 8b786f3d1c Make `$taxonomy` parameter optional in `get_edit_term_link()`.
Props nicdford, sc0ttkclark.
Fixes #35922.
Built from https://develop.svn.wordpress.org/trunk@36646


git-svn-id: http://core.svn.wordpress.org/trunk@36613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 20:07:28 +00:00
Weston Ruter 87a9bf2b37 Docs: Use markdown instead of HTML for `code` formatting.
Fixes phpdoc usage in [36622], [36608], [35724], [35307].

See #35898.
See #35869.
See #34738.
See #33552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 19:18:27 +00:00
Sergey Biryukov 613cd1b020 Docs: Correct `$number` type in `number_format_i18n()`.
Props salcode.
Fixes #35893.
Built from https://develop.svn.wordpress.org/trunk@36644


git-svn-id: http://core.svn.wordpress.org/trunk@36611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 18:44:26 +00:00
Weston Ruter aa2db425d8 Customize: Skip exporting partials to client and handling rendering requests if user can't modify associated settings.
Introduces `WP_Customize_Partial::check_capabilities()` for parity with `WP_Customize_Control::check_capabilities()`.
 
See #27355.
Fixes #35914.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 18:14:26 +00:00
Drew Jaynes e66a510e0c Docs: Update the type for `$callback` parameters to `callable` in DocBlocks for `add_settings_section()` and `add_settings_field()`.
Props aidanlane.
Fixes #35772.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 18:05:27 +00:00
Dominik Schilling 410ed6d615 Customizer: Add visual feedback to reorder buttons.
Props coreymcollins, melchoyce.
Fixes #35041.
Built from https://develop.svn.wordpress.org/trunk@36641


git-svn-id: http://core.svn.wordpress.org/trunk@36608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 17:54:26 +00:00
Drew Jaynes 54ab5fa68c Users: Pass the array of user IDs being deleted to the `delete_user_form` action hook in two places.
Also updates documentation for the first parameter, `$current_user`, to clarify that it holds the `WP_User` object for the _current_ user, not the one being deleted.

Props usermrpapa.
Fixes #35063. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 17:42:27 +00:00
Dominik Schilling 0485352508 Customizer: Contain "No image set/selected" in dashed border.
Props Ankit K Gupta, chris_dev.
Fixes #35826.
Built from https://develop.svn.wordpress.org/trunk@36639


git-svn-id: http://core.svn.wordpress.org/trunk@36606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 17:27:26 +00:00
Pascal Birchler 81e9462ca3 Themes: Improve error messages for broken themes.
Props mayukojpn for initial patch.
Fixes #35286.
Built from https://develop.svn.wordpress.org/trunk@36638


git-svn-id: http://core.svn.wordpress.org/trunk@36605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 17:20:27 +00:00
Pascal Birchler 0c242d0666 Embeds: Make the click event handler work for dynamically added links.
Props JamesDiGioia.
Fixes #35630.
Built from https://develop.svn.wordpress.org/trunk@36637


git-svn-id: http://core.svn.wordpress.org/trunk@36604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 17:16:26 +00:00
Drew Jaynes a0aa608970 Docs: Improve documentation for `WP_REST_Request` to highlight a caveat of ArrayAccess when it comes to passing similar arguments for multiple request methods.
Props danielbachhuber, DrewAPicture.
Fixes #35799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:57:26 +00:00
Pascal Birchler 33048247c8 Embeds: Load the default site icon from the `wp-includes` directory.
Files inside the `wp-admin` directory may not be publicly available. This copies the blue WordPress logo to `wp-includes/images`.

Props thewanderingbrit.
Fixes #35322.
Built from https://develop.svn.wordpress.org/trunk@36635


git-svn-id: http://core.svn.wordpress.org/trunk@36602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:55:27 +00:00
Boone Gorges c5b77145a8 Docs: Improve description of `get_term()` return value.
Props sebastian.pisula.
Fixes #35919.
Built from https://develop.svn.wordpress.org/trunk@36634


git-svn-id: http://core.svn.wordpress.org/trunk@36601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:48:25 +00:00
Pascal Birchler b47a3831ee Script Loader: Introduce `wp_add_inline_script()`.
This new function can be used to add inline JavaScript before and after enqueued scripts, just like `wp_add_inline_style()` works for CSS.

Props atimmer, abiralneupane, ocean90, swissspidy.
Fixes #14853.
Built from https://develop.svn.wordpress.org/trunk@36633


git-svn-id: http://core.svn.wordpress.org/trunk@36600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:44:26 +00:00
Boone Gorges ba5cc4e776 Query: Allow a seed value to be passed when using 'rand' `$orderby`.
`WP_Query` allows random ordering; `'orderby' => 'rand'` translates to
`ORDER BY RAND()`. This syntax results in random ordering that is not
consistent from request to request. MySQL supports the passing of a seed value
to random sorts, such as `ORDER BY RAND(3)`, which will return the same
random value each time it's called. `WP_Query` now supports this syntax, by
passing `RAND(3)` (or whatever integer seed value you'd like) as the value
of `'orderby'`.

Props hlashbrooke.
Fixes #35692.
Built from https://develop.svn.wordpress.org/trunk@36632


git-svn-id: http://core.svn.wordpress.org/trunk@36599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:40:26 +00:00
Dominik Schilling 710be9d2ba L10n: Add test for `wp_dropdown_languages()`.
Props realloc.
Fixes #35294.
Built from https://develop.svn.wordpress.org/trunk@36631


git-svn-id: http://core.svn.wordpress.org/trunk@36598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:28:26 +00:00
Dominik Schilling f6b632983f Updates: Pass locales of all available languages to the themes/plugins update API.
This ensures that language packs for all languages in a Multisite install are updated.

Fixes #34937.
Built from https://develop.svn.wordpress.org/trunk@36630


git-svn-id: http://core.svn.wordpress.org/trunk@36597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:17:26 +00:00
Dominik Schilling 724ccb492f In `WP::handle_404()` introduce a filter `pre_handle_404` to short-circuit default header status handling.
This comes handy if you use WordPress without posts, means `$wp_query` contains no results.

Props prettyboymp, hakre, prettyboymp, Denis-de-Bernardy, ethitter, ocean90.
Fixes #10722.
Built from https://develop.svn.wordpress.org/trunk@36629


git-svn-id: http://core.svn.wordpress.org/trunk@36596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:08:25 +00:00
Andrew Ozz d7b56a13d9 In `wp_upload_dir()` do not cache error from `wp_mkdir_p()` when a directory cannot be created. Keep trying to create the dirs. This happens mostly in file upload context.
See #34359.
Built from https://develop.svn.wordpress.org/trunk@36628


git-svn-id: http://core.svn.wordpress.org/trunk@36595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 15:58:28 +00:00
Ella Iseulde Van Dorpe 3d68488ff6 TinyMCE: inline text patterns
First run.

See #33300.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 08:33:27 +00:00
Boone Gorges b23b89c8a9 Docs: Correct `param` types on some filters in `wp_filter_comment()`.
Introduced in [26491].

Props meitar, netweb.
Fixes #35908.
Built from https://develop.svn.wordpress.org/trunk@36626


git-svn-id: http://core.svn.wordpress.org/trunk@36593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 03:06:26 +00:00
Boone Gorges 072c791df0 Query: `is_*( $int )` should not falsely match strings starting with "$int".
Another chapter in the Storied Annals of Weird `in_array()` Behavior:
`in_array( 4, array( "4-cool-dudes" ) );` resolves to `true`, such that
`is_page( 4 )` was returning true for posts with the name `'4-cool-dudes'`.

We work around this behavior by ensuring that values passed to the `is_`
methods are cast to strings before the `in_array()` checks. ID checks still
work as expected; see #24674.

Props mikejolley, swissspidy, boonebgorges.
Fixes #35902.
Built from https://develop.svn.wordpress.org/trunk@36625


git-svn-id: http://core.svn.wordpress.org/trunk@36592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 02:21:25 +00:00
Weston Ruter 53e0315242 Customize: Let `WP_Customize_Selective_Refresh` class be `final` to match manager and other component classes.
This class is not intended to be extended.
 
See #27355.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 01:28:25 +00:00
Weston Ruter 49c7012a7e Customize: Ensure `dynamic_sidebar()` finishes with removing the sidebar ID from the `current_dynamic_sidebar_id_stack`.
This ensures that widgets appearing after a nested sidebar will continue to be selective refreshable.
 
See #27355.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 01:22:26 +00:00
Weston Ruter aa9ef96a52 Customize: Prevent dropping backslashes from input on general settings and settings for nav menus and some widgets.
Ensures that intentional backslashes (e.g. "\o/") can be used in:

* Site title
* Site description
* Nav menu name
* Custom Menu widget title
* Tag Cloud widget title
* Text widget body if can't `unfiltered_html`

The latter three are also fixed on the widgets admin page.

Fixes #35898.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 01:02:26 +00:00
Dominik Schilling e512f158df Add translators comments to wp-admin/users.php.
Props ramiy.
Fixes #35885.
Built from https://develop.svn.wordpress.org/trunk@36621


git-svn-id: http://core.svn.wordpress.org/trunk@36588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 00:05:28 +00:00
Dominik Schilling 13f76b11d1 Template: Update label for the username field in `wp_login_form()` after [36617].
See #9568.
Built from https://develop.svn.wordpress.org/trunk@36620


git-svn-id: http://core.svn.wordpress.org/trunk@36587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 23:38:27 +00:00
Andrea Fercia fcb3e5ec2f Accessibility: Improve the color contrast ratio for the input placeholders.
Also, cleans up a bit the CSS removing rules for elements that don't use
placeholders any more.

Fixes #35777.
Built from https://develop.svn.wordpress.org/trunk@36619


git-svn-id: http://core.svn.wordpress.org/trunk@36586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 23:29:26 +00:00
Andrea Fercia f96653c2b5 Accessibility: Remove title attributes from the Plugin details modal.
Also, improves accessibility of the star rating reviews links.

Fixes #35111.
Built from https://develop.svn.wordpress.org/trunk@36618


git-svn-id: http://core.svn.wordpress.org/trunk@36585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 23:18:29 +00:00
Dominik Schilling 7ebe2c1e7a Authentication: Allow users to log in using their email address.
Introduces `wp_authenticate_email_password()` which is hooked into `authenticate` after `wp_authenticate_username_password()`.

Props Denis-de-Bernardy, ericlewis, vhomenko, MikeHansenMe, swissspidy, ocean90.
Fixes #9568.
Built from https://develop.svn.wordpress.org/trunk@36617


git-svn-id: http://core.svn.wordpress.org/trunk@36584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 23:15:27 +00:00
Mike Schroder 83d147c29d Media: Update unit tests after change to default image quality.
Updates unit tests to reflect new default quality setting of '82' after [36615].

See #33642.
Built from https://develop.svn.wordpress.org/trunk@36616


git-svn-id: http://core.svn.wordpress.org/trunk@36583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 23:14:26 +00:00
Mike Schroder 55cc876141 Media: Reduce default image compression quality to '82'.
Changes default image compression quality from '90' to '82'.

This reduces generated image file sizes by ~25% while
keeping DSSIM < 0.0023, with both Imagick and GD.

Props @joemcgill, @dnewton.
See #33642.
Built from https://develop.svn.wordpress.org/trunk@36615


git-svn-id: http://core.svn.wordpress.org/trunk@36582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 22:19:26 +00:00
Boone Gorges 3f7441d674 Allow `get_terms()` to fetch terms regardless of taxonomy.
`get_terms()` has historically required that a taxonomy be specified when
querying terms. This requirement is related to the fact that terms could
formerly be shared between taxonomies, making `$taxonomies` critical for
disambiguation. Since terms can no longer be shared as of 4.4, it'
s desirable to be able to query for terms regardless of what taxonomy they're in.

Because it's now optional to pass taxonomies, it's no longer necessary to have
`$taxonomies` as the first (and required) parameter for `get_terms()`. The new
function signature is `get_terms( $args )`, where 'taxonomy' can (optionally) be
passed as part of the `$args` array. This syntax is more consistent with
functions like `get_users()` and `get_posts()`.

We've maintained backward compatibility by always giving precedence to the old
argument format. If a second parameter is detected, or if it's detected that
the first parameter is a list of taxonomy names rather than an `$args` array,
`get_terms()` will parse the function arguments in the legacy fashion.

Props flixos90, swissspidy, DrewAPicture, boonebgorges.
Fixes #35495.
Built from https://develop.svn.wordpress.org/trunk@36614


git-svn-id: http://core.svn.wordpress.org/trunk@36581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 22:17:26 +00:00
Eric Lewis 360a30d55e Menus: Ensure backslashes are saved in menu item fields.
This was a regression introduced in [36510] which caused menu item fields to not save field content with backslashes in them.

Props westonruter.
See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 19:55:28 +00:00
Andrea Fercia eba32e3b6f Accessibility: Remove the revisions limit warning from the Publish box.
After [36053] don't show a warning about something users can't change
because there's no control exposed in the UI for that. The Revisions
screen is probably a better place to show a more complete information.

Fixes #35029.
Built from https://develop.svn.wordpress.org/trunk@36612


git-svn-id: http://core.svn.wordpress.org/trunk@36579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 16:23:26 +00:00
Weston Ruter ae2657dd32 Customize: Prevent PHP notice and JS error caused by widgets and nav menus components if user only has `customize` capability.
Short-circuits components from initializing their hooks needlessly if current user lacks required capability.

Fixes #35895.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 05:31:27 +00:00
Weston Ruter 5228a99e97 Customize: Update unit test for `WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item()` to account for slashing if user can't `unfiltered_html`.
Fixes unit tests which broke under multisite config after [36608].

Fixes #35869.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 05:10:27 +00:00
Boone Gorges 68f3ee8f64 Docs: `WP_Meta_Query` accepts 'EXISTS' or 'NOT EXISTS' for `$compare`.
Props apaliku, jdgrimes.
Fixes #35891.
Built from https://develop.svn.wordpress.org/trunk@36609


git-svn-id: http://core.svn.wordpress.org/trunk@36576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 03:56:27 +00:00
Weston Ruter b206327acb Customize: Fix previewing and updating of nav menu items containing slashed/slashable characters.
Prevents slashes from being added when a user without `unfiltered_html` previews a nav menu item containing an apostrophe or some other slashable character, and prevents the loss of an intentional slash (e.g. "\o/") when saving a nav menu item, regardless of capability.

Fixes #35869.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-22 00:14:25 +00:00
Eric Lewis 04da8bb63a Posts: Non-trashed posts should take slug priority over trashed posts.
When determining a unique post slug, trashed posts are taken into account. Previously, new posts would add suffixes to their slugs (e.g. `about-2`) when a post in the trash had the desired slug (e.g. `about`). 

To avoid this behavior, when a post is trashed its slug (i.e. `post_name`) is now suffixed with `-%trashed%`. The post's pre-trash slug is stored as post meta, and if the post is restored from trash, its desired slug is reapplied. 

For existing trashed posts which don't have the `-%trashed%` suffix, the suffix is added when a post with its desired slug is created.

Props ocean90, boonebgorges, ryan, SergeyBiryukov, coffee2code, helen, williamsba1.
See #11863.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-21 21:45:28 +00:00
Weston Ruter b3d6f127eb Customize: Fix "Loading..." message from persisting in panel title when user does not have `manage_options` cap to edit `blogname`.
Reverts part of [36388].

Fixes #35579.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-21 06:15:28 +00:00
Dominik Schilling 141b4dbd91 JSHint for [36602].
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36605


git-svn-id: http://core.svn.wordpress.org/trunk@36572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 22:14:27 +00:00
Dominik Schilling 826e2d8ea1 Script Loader: Fix missing script output when the groups of dependencies are different.
Aka: Don't lose the grandchild.

Props gitlost, ocean90.
Fixes #35873.
Built from https://develop.svn.wordpress.org/trunk@36604


git-svn-id: http://core.svn.wordpress.org/trunk@36571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 22:11:25 +00:00
Dominik Schilling a40a04ef42 i18n-tools: Respect the coding standards when adding textdomains with add-textdomain.php.
Props GaryJ, groovecoder.
Fixes #21616.
Built from https://develop.svn.wordpress.org/trunk@36603


git-svn-id: http://core.svn.wordpress.org/trunk@36570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:44:25 +00:00
Andrew Ozz 30feff9c99 TinyMCE, inline link dialog:
- Fix passing values to the (old) modal on open when non-linked text is selected and Advanced is clicked before pasting an URL.
- When the user has selected text partially including a link and opens the editing dialog, auto-select the link only. Helps when a linked word is selected by double-clicking.
- Remove all placeholders on saving.
- Do not add undo level on inserting link placeholder.
- Remove the placeholder when canceling from the modal.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36602


git-svn-id: http://core.svn.wordpress.org/trunk@36569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:36:25 +00:00
Drew Jaynes f636747fa4 Docs: Fix two incorrect notations of the `$show_admin_bar` global to specify a boolean type, not `WP_Admin_Bar`.
See [36491]. Fixes #35686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:27:26 +00:00
Dominik Schilling 0307aadf0f i18n-tools: Add the ability to parse a whole directory with add-textdomain.php.
Props iamntz.
Fixes #35499.
Built from https://develop.svn.wordpress.org/trunk@36600


git-svn-id: http://core.svn.wordpress.org/trunk@36567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 21:03:25 +00:00
Dominik Schilling c57946c3f2 i18n-tools: Remove PHP4 constructor from add-textdomain.php.
`_deprecated_constructor()` isn't available in non-WordPress context.

See #31982.
Built from https://develop.svn.wordpress.org/trunk@36599


git-svn-id: http://core.svn.wordpress.org/trunk@36566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 20:34:25 +00:00
Boone Gorges fce93c4771 In `get_terms()`, assemble `WHERE` conditions in an array instead of concatenating.
This method is more reliable when adding new `WHERE` conditions.

See #35495.
Built from https://develop.svn.wordpress.org/trunk@36598


git-svn-id: http://core.svn.wordpress.org/trunk@36565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 20:04:26 +00:00
Andrew Ozz acb6cb1d74 TinyMCE: fix the regex that removes spaces from empty paragraphs. Was causing problems when wpautop is disabled and there are many U+00A0 chars between the opening `<p>` and an inline tag. These chars are inserted by the browsers to maintain consecutive spaces typed by the users in contentEditable.
Fixes #35890.
Built from https://develop.svn.wordpress.org/trunk@36597


git-svn-id: http://core.svn.wordpress.org/trunk@36564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 19:56:27 +00:00
Dominik Schilling 24cfa6a40a Tests: Test that jQuery can be moved into footer after [36550].
Props gitlost.
See #25247.
Built from https://develop.svn.wordpress.org/trunk@36596


git-svn-id: http://core.svn.wordpress.org/trunk@36563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 16:17:25 +00:00
Dominik Schilling 21b9965613 Theme Compat: Replace the custom comment form with `comment_form()` and reduce number of links.
`comment_form()` has nearly the same markup as the custom form but also includes the latest enhancements like improved a11y and more filters.

Add translators comments, props ramiy.

Fixes #35888.
Built from https://develop.svn.wordpress.org/trunk@36595


git-svn-id: http://core.svn.wordpress.org/trunk@36562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 14:41:27 +00:00
Boone Gorges 26955c8507 Tests: Add decorators to PHPMailer mock object.
The new `get_recipient()` and `get_sent()` methods greatly simplify the
syntax required when writing tests for `wp_mail()`.

Props welcher.
Fixes #34161.
Built from https://develop.svn.wordpress.org/trunk@36594


git-svn-id: http://core.svn.wordpress.org/trunk@36561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-20 03:41:27 +00:00
Rachel Baker 9fdb970ceb Docs: Add missing @since and @access tags to `get_curies` method and filter from r36533
See #34729, #32246.
Built from https://develop.svn.wordpress.org/trunk@36593


git-svn-id: http://core.svn.wordpress.org/trunk@36560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 23:42:27 +00:00
Dominik Schilling a04b869652 Styles: Pass the media attribute as an argument to the `style_loader_tag` filter.
Props sebastian.pisula.
Fixes #34765.
Built from https://develop.svn.wordpress.org/trunk@36592


git-svn-id: http://core.svn.wordpress.org/trunk@36559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 21:05:26 +00:00
Dominik Schilling 0285fd946d Script Loader: Don't parse `$src` if the current color scheme isn't registered.
Avoids a `parse_url()` call on each request if the default colors scheme is in use.

Fixes #35882.
Built from https://develop.svn.wordpress.org/trunk@36591


git-svn-id: http://core.svn.wordpress.org/trunk@36558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 20:44:26 +00:00
Dominik Schilling 9d8204467c Styles: Bail if `WP_Styles::_css_href()` returns an empty value.
The style `colors` gets registered with `true` as the source value which gets handled later by `wp_style_loader_src()`, a callback for the `style_loader_src` filter in `WP_Styles::_css_href()`. `wp_style_loader_src()` may return false, for example for the default color scheme.

This was removed in [36550].

See #35229.
Built from https://develop.svn.wordpress.org/trunk@36590


git-svn-id: http://core.svn.wordpress.org/trunk@36557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 20:34:26 +00:00
Andrew Ozz edceb0173c TinyMCE: update to 4.3.4. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #35876.
Built from https://develop.svn.wordpress.org/trunk@36589


git-svn-id: http://core.svn.wordpress.org/trunk@36556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 19:19:26 +00:00
Rachel Baker 06225cc394 Comments: Refresh the Moderate Comment screen for a friendlier experience with email moderation actions.
Brings some love to this neglected screen:
* format `comment_content`, instead of escaping in one massive block of text
* only wrap the comment date in a link if the comment permalink exists
* include link to the Edit Comment screen at the bottom of the comment_content
* update the message styles to match other screens
* append `#wpbody-content` to the comment email message links for accessibility

Props johnbillion, rachelbaker, afercia, melchoyce, karmatosed.

Fixes #34133
Built from https://develop.svn.wordpress.org/trunk@36588


git-svn-id: http://core.svn.wordpress.org/trunk@36555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 19:14:26 +00:00
Andrea Fercia 30866ceb5d Accessibility: Improve color contrast updating any `#999` gray used for text or icons to a darker gray.
Fixes #35660.
Built from https://develop.svn.wordpress.org/trunk@36587


git-svn-id: http://core.svn.wordpress.org/trunk@36554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 18:44:27 +00:00
Weston Ruter 6b775d4afe Customize: Add selective refresh framework with implementation for widgets and re-implementation for nav menus.
See https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/.

Props westonruter, valendesigns, DrewAPicture, ocean90.
Fixes #27355.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 18:41:28 +00:00
Andrea Fercia 0f88dbfee0 Accessibility: Fix displaying of Universal time and Local time info on the General Settings screen.
In [36263] they were mistakenly moved within a conditional check.

Fixes #35064.
Built from https://develop.svn.wordpress.org/trunk@36585


git-svn-id: http://core.svn.wordpress.org/trunk@36552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 16:09:26 +00:00
Andrea Fercia 08510d2e5d Accessibility: after [36000] conditionally print out the `aria-describedby` attribute on the Featured Image postbox.
Fixes #35076.
Built from https://develop.svn.wordpress.org/trunk@36584


git-svn-id: http://core.svn.wordpress.org/trunk@36551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 15:10:28 +00:00
Weston Ruter 34010353cc Customize: Prevent consecutive `refresh` requests from preview from causing JS error.
Fixes "Uncaught TypeError: this.targetWindow is not a function".

See #27355.
Fixes #35866.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-19 03:47:27 +00:00
Andrea Fercia 77dbab1e1b Accessibility: Reduce the WordPress shades of grey, Episode 2.
See #35783.
Built from https://develop.svn.wordpress.org/trunk@36582


git-svn-id: http://core.svn.wordpress.org/trunk@36549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 22:30:27 +00:00
Andrea Fercia ecdcae565e Plugins: Remove an unused variable after [35953].
Fixes #35050.
Built from https://develop.svn.wordpress.org/trunk@36581


git-svn-id: http://core.svn.wordpress.org/trunk@36548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 21:33:25 +00:00
Dominik Schilling 6f2a56bf3e Themes: After [36546] restore theme search functionality.
* Correct several incorrect uses of `_.union`. Since Underscore 1.7.0 `_.union` supports only arrays and not variadic args.
* Use a namespaced event `themes:update`. Backbone 1.2 added a built in `update` event that triggers after any amount of models are added or removed from a collection.

Props adamsilverstein.
See #34350.
Built from https://develop.svn.wordpress.org/trunk@36580


git-svn-id: http://core.svn.wordpress.org/trunk@36547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 21:21:26 +00:00
Dominik Schilling 284f88e35a Themes: Fix flickering of the theme screenshot on hover in WebKit browsers.
Props JoeFusco.
Fixes #35787.
Built from https://develop.svn.wordpress.org/trunk@36579


git-svn-id: http://core.svn.wordpress.org/trunk@36546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 21:11:27 +00:00
Dominik Schilling 529a53e903 Formatting: Avoid a PHP warning when `wptexturize()` is called with a trailing less-than symbol.
Props westonruter.
Fixes #35864.
Built from https://develop.svn.wordpress.org/trunk@36578


git-svn-id: http://core.svn.wordpress.org/trunk@36545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 20:31:27 +00:00
Drew Jaynes cc1261f7fd Docs: Add an explanation for the dynamic portion of the `{$taxonomy}_term_edit_form_top` hook, introduced in [36526].
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 18:19:26 +00:00
Drew Jaynes e020ccd081 Docs: Add formatting to a changelog entry in the hook doc for the `rest_dispatch_request` filter.
See [36534]. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 18:18:25 +00:00
Dominik Schilling 71b735974b Media Library: After [36546] restore the "Add new" functionality.
Rework handling of the `'toggle:upload:attachment'` event using `.on` vs `.listenTo` for better compatibility with the current version of Backbone.

Props adamsilverstein.
See #34350.
Fixes #35853.
Built from https://develop.svn.wordpress.org/trunk@36575


git-svn-id: http://core.svn.wordpress.org/trunk@36542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:50:26 +00:00
Dominik Schilling d499011145 Add missing test changes for [36573].
See #34755.
Built from https://develop.svn.wordpress.org/trunk@36574


git-svn-id: http://core.svn.wordpress.org/trunk@36541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:44:26 +00:00
Dominik Schilling 658d825ea9 Customizer: In nav menus show the location name instead of slug.
Props ryankienstra.
Fixes #34755.
Built from https://develop.svn.wordpress.org/trunk@36573


git-svn-id: http://core.svn.wordpress.org/trunk@36540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 17:16:27 +00:00
Jeremy Felt 7ee69ca8d1 Remove extra spaces between function names and brackets
These were introduced when making list table view modes sticky.

See #16774, #34365.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 16:51:27 +00:00
Dominik Schilling 956627ff83 Don't display errors during Ajax requests.
See #34915 for REST and #23811 for XML-RPC.

Props pento.
Fixes #26262.
Built from https://develop.svn.wordpress.org/trunk@36571


git-svn-id: http://core.svn.wordpress.org/trunk@36538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 16:43:27 +00:00
Dion Hulse 04ad9e674d HTTP API: Certificate bundle: Attempt to move a certificate lower in the file to allow older OpenSSL versions to parse it & communicate with WordPress.org securely again.
The OpenSSL version which was failing in this case was `OpenSSL 0.9.8e 23 Feb 2007`.

See #35637 #30434 #25007

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


git-svn-id: http://core.svn.wordpress.org/trunk@36537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 08:21:28 +00:00
Andrew Ozz 2d94e025a2 Replace `wp_upload_dir()` with the new `wp_get_upload_dir()` in all cases where a file is not being uploaded. Deprecate `_wp_upload_dir_baseurl()`, and replace it with `wp_get_upload_dir()`.
See #34359.
Built from https://develop.svn.wordpress.org/trunk@36569


git-svn-id: http://core.svn.wordpress.org/trunk@36536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 00:24:27 +00:00
Drew Jaynes c6ee6246ef Docs: Remove a duplicate `@static` tag from the `WP_Customize_Panel->instance_count` property DocBlock.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-18 00:14:26 +00:00
Boone Gorges d9945e5bd4 Reintroduce term meta unit test accidentally removed in [36566].
Built from https://develop.svn.wordpress.org/trunk@36567


git-svn-id: http://core.svn.wordpress.org/trunk@36534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 23:02:25 +00:00
Boone Gorges 571e14f897 More performance improvements to metadata lazyloading.
Comment and term meta lazyloading for `WP_Query` loops, introduced in 4.4,
depended on filter callback methods belonging to `WP_Query` objects. This meant
storing `WP_Query` objects in the `$wp_filter` global (via `add_filter()`),
requiring that PHP retain the objects in memory, even when the local variables
would typically be expunged during normal garbage collection. In cases where a
large number of `WP_Query` objects were instantiated on a single pageload,
and/or where the contents of the `WP_Query` objects were quite large, serious
performance issues could result.

We skirt this problem by moving metadata lazyloading out of `WP_Query`. The
new `WP_Metadata_Lazyloader` class acts as a lazyload queue. Query instances
register items whose metadata should be lazyloaded - such as post terms, or
comments - and a `WP_Metadata_Lazyloader` method will intercept comment and
term meta requests to perform the cache priming. Since `WP_Metadata_Lazyloader`
instances are far smaller than `WP_Query` (containing only object IDs), and
clean up after themselves far better than the previous `WP_Query` methods (bp
only running their callbacks a single time for a given set of queued objects),
the resource use is decreased dramatically.

See [36525] for an earlier step in this direction.

Props lpawlik, stevegrunwell, boonebgorges.
Fixes #35816.
Built from https://develop.svn.wordpress.org/trunk@36566


git-svn-id: http://core.svn.wordpress.org/trunk@36533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:58:26 +00:00
Andrew Ozz da5b3a55c4 Improve the performance of `wp_upload_dir()`:
- Cache the output in non-persistent cache.
- Cache the result from `wp_mkdir_p()` in persistent cache (when present).
- Introduce `wp_get_upload_dir()` for use when not uploading files. It is equivalent to `wp_upload_dir()` but does not check for the existence or create the upload directory.
- Change tests to use the non-cached `_wp_upload_dir()`. They change options on the fly (should never be used in production) to simulate different environments.
- Introduce `_upload_dir_no_subdir()` and `_upload_dir_https()` to facilitate testing. These use the proper `upload_dir` filter to simulate different environments.

Props kovshenin, azaozz.
See #34359.
Built from https://develop.svn.wordpress.org/trunk@36565


git-svn-id: http://core.svn.wordpress.org/trunk@36532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:51:26 +00:00
Boone Gorges 84350eb6b6 Add changelog entry for `publicly_queryable` argument in `register_taxonomy()`.
Missed in [36525].

Fixes #34491.
Built from https://develop.svn.wordpress.org/trunk@36564


git-svn-id: http://core.svn.wordpress.org/trunk@36531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:04:32 +00:00
Dominik Schilling ca6726f331 Tests: Add test for `wp_get_installed_translations()`.
Introduces language files in /tests/phpunit/data/language. Each file includes the header and 5 translations.

Props realloc for initial patch.
Fixes #35284.
Built from https://develop.svn.wordpress.org/trunk@36563


git-svn-id: http://core.svn.wordpress.org/trunk@36530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:02:26 +00:00
Jeremy Felt 3e14571132 Multisite: Make view mode sticky for network users and sites list tables.
Fixes #34365.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 22:00:27 +00:00
Jeremy Felt e7a7f08c8b Multisite: Avoid a PHP Notice when saving a site address without a path.
Props kjbenk.
Fixes #35631.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 20:50:27 +00:00
Dominik Schilling bffdae7b1d Plugins: Remove slashes from search terms and use `urldecode()` in non-URL contexts.
Fixes #35712.
Built from https://develop.svn.wordpress.org/trunk@36560


git-svn-id: http://core.svn.wordpress.org/trunk@36527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 20:15:26 +00:00
Dominik Schilling 10234c1907 Tests: Add a test for testing `wp_enqueue_script()` with an alias handle in the footer.
Props kovshenin.
See #35643.
Built from https://develop.svn.wordpress.org/trunk@36559


git-svn-id: http://core.svn.wordpress.org/trunk@36526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:53:26 +00:00
Dominik Schilling 8b781dfaa7 Updates: Prevent further actions if an update button is disabled.
Props adamsilverstein, afercia.
Fixes #35257.
Built from https://develop.svn.wordpress.org/trunk@36558


git-svn-id: http://core.svn.wordpress.org/trunk@36525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:42:26 +00:00
Dominik Schilling d1d90a3263 Make `$wp_local_package` explicitly global in wp-settings.php.
Props danielbachhuber.
Fixes #34975.
Built from https://develop.svn.wordpress.org/trunk@36557


git-svn-id: http://core.svn.wordpress.org/trunk@36524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:32:25 +00:00
Jeremy Felt 309ea2f138 Multisite: Add a hook to the end of the network's Add New User form.
The `network_user_new_form` action can be used to extend the new user form.

Props ptahdunbar.
Fixes #15389.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:15:26 +00:00
Jeremy Felt 39cd3583a4 Multisite: Add a hook to the end of the Add Site form.
The `network_site_new_form` action can be used to extend the new site form.

Props igmoweb, ocean90.
Fixes #34739.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:03:25 +00:00
Dominik Schilling 7e5a563876 Credits: Remove unused strings.
Props Ankit K Gupta.
Fixes #34909.
Built from https://develop.svn.wordpress.org/trunk@36554


git-svn-id: http://core.svn.wordpress.org/trunk@36521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 19:00:28 +00:00
Dominik Schilling de0e09983d Install: Enhance the language of the "Success" message.
Props ckoerner.
Fixes #34897.
Built from https://develop.svn.wordpress.org/trunk@36553


git-svn-id: http://core.svn.wordpress.org/trunk@36520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 18:58:26 +00:00
Dominik Schilling 442a637e1e Tests: Add `Tests_dbDelta::assertTableHasPrimaryKey()`.
Also fix a typo in the name for the compound key.

Props charlestonsw.
Fixes #34877.
Built from https://develop.svn.wordpress.org/trunk@36552


git-svn-id: http://core.svn.wordpress.org/trunk@36519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 18:55:27 +00:00
Andrew Ozz 27b3dddb2e Styles:
- Restore loading order for wp-admin: open-sans, dashicons, etc.
- Remove couple of redundant dependencies.

See #35229.
Built from https://develop.svn.wordpress.org/trunk@36551


git-svn-id: http://core.svn.wordpress.org/trunk@36518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 18:01:26 +00:00
Dominik Schilling bc5d22266d Script/Style Dependencies: Make sure that inline styles for handles without a source are printed.
This prevents breaking plugins which are adding inline styles to the `wp-admin` handle after [36341].

Props dd32, ocean90.
Fixes #35229.
Built from https://develop.svn.wordpress.org/trunk@36550


git-svn-id: http://core.svn.wordpress.org/trunk@36517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 17:11:26 +00:00
Dominik Schilling 0d89816985 Tests: Indent `test_wp_register_script()` with tabs.
Built from https://develop.svn.wordpress.org/trunk@36549


git-svn-id: http://core.svn.wordpress.org/trunk@36516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 16:07:26 +00:00
Dominik Schilling c673740166 Autoprefixer for [36532].
See #31195.
Built from https://develop.svn.wordpress.org/trunk@36548


git-svn-id: http://core.svn.wordpress.org/trunk@36515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:39:26 +00:00
Dominik Schilling a9afddcd20 Tests: Indent `test_wp_register_style()` with tabs.
Built from https://develop.svn.wordpress.org/trunk@36547


git-svn-id: http://core.svn.wordpress.org/trunk@36514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:37:26 +00:00
Dominik Schilling 4693b25171 Update Backbone and Underscore to the latest versions.
Backbone, from 1.1.2 to 1.2.3. Underscore, from 1.6.0 to 1.8.3.

The new versions of Backbone and Underscore offer numerous small bug fixes and some optimizations and other improvements. Check the [http://backbonejs.org/#changelog Backbone changelog] and [http://underscorejs.org/#changelog Underscore changelog] for the full details. 

The new versions include some significant changes that may break existing code. Plugins or themes that rely on the bundled Backbone and/or Underscore libraries should carefully check functionality with the latest versions and run any available unit tests to ensure compatibility.

Some changes of note that were addressed in core as part of this upgrade:

* `_.flatten` no longer works with objects since Underscore.js 1.7. `_.flatten()` working with objects was an unintended side-affect of the implementation, see [https://github.com/jashkenas/underscore/issues/1904#issuecomment-60241576 underscore#1904]. Check any `_flatten` usage and only flatten arrays.
* As of Backbone 1.2.0, you can no longer modify the `events` hash or your view's `el` property in `initialize`, so don't try to modify them there. 
* Since Underscore 1.7, Underscore templates no longer accept an initial data object. `_.template` always returns a function now so make sure you use it that way.

Props adamsilverstein.
Fixes #34350.
Built from https://develop.svn.wordpress.org/trunk@36546


git-svn-id: http://core.svn.wordpress.org/trunk@36513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:22:26 +00:00
Dominik Schilling 53245b1294 Setup: Improve wording on the page for the database connection details.
See #26879.
Built from https://develop.svn.wordpress.org/trunk@36545


git-svn-id: http://core.svn.wordpress.org/trunk@36512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:03:26 +00:00
Dominik Schilling 7482a4d4ac Setup: Use "Username" instead of "User Name".
Props thisisit.
Fixes #35850.
Built from https://develop.svn.wordpress.org/trunk@36544


git-svn-id: http://core.svn.wordpress.org/trunk@36511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 15:00:28 +00:00
Andrew Ozz 2413e41f8c Do not strip slashes from the whole &_POST when doing autosaves.
Props joehoyle.
Fixes #35408.
Built from https://develop.svn.wordpress.org/trunk@36543


git-svn-id: http://core.svn.wordpress.org/trunk@36510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-17 00:10:27 +00:00
Andrew Ozz 0ff58701e0 Comments: look for wp_error when checking whether `$wpdb->get_col_length()` has failed.
See #10377.
Built from https://develop.svn.wordpress.org/trunk@36542


git-svn-id: http://core.svn.wordpress.org/trunk@36509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 23:50:27 +00:00
Dominik Schilling 9e73dea03a Introduce a `$parent_class` parameter for `_deprecated_constructor()`.
Use the parameter for the deprecated constructor warning in `WP_Widget` to provide an indication to which widget is using the PHP4 style constructor.

Props sebastian.pisula.
Fixes #33440.
Built from https://develop.svn.wordpress.org/trunk@36541


git-svn-id: http://core.svn.wordpress.org/trunk@36508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 23:20:26 +00:00
Dominik Schilling 8a52014638 In `wp_title()` fix a 7 year old typo.
Props joelerr.
Fixes #34879.
Built from https://develop.svn.wordpress.org/trunk@36540


git-svn-id: http://core.svn.wordpress.org/trunk@36507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 22:28:26 +00:00
Dominik Schilling 3f3fe5a7ed Themes: Use the attachment ID as the key in `get_uploaded_header_images()`.
Prevents missing header images when an image has the same name as another header image.

Props sirbrillig.
Fixes #31786.
Built from https://develop.svn.wordpress.org/trunk@36539


git-svn-id: http://core.svn.wordpress.org/trunk@36506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 22:12:27 +00:00
Dominik Schilling 51473acfb3 i18n: Prevent `is_textdomain_loaded()` from returning true even if there are no translations for the domain.
In `get_translations_for_domain()` don't fill the global `$l10n` with `NOOP_Translations` instances, return a `NOOP_Translations` instance instead.

Props nacin, jrf.
Fixes #21319.
Built from https://develop.svn.wordpress.org/trunk@36538


git-svn-id: http://core.svn.wordpress.org/trunk@36505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 21:15:29 +00:00
Andrea Fercia 008cba0333 Accessibility: Reduce the WordPress shades of grey, first part.
See #35783.
Built from https://develop.svn.wordpress.org/trunk@36537


git-svn-id: http://core.svn.wordpress.org/trunk@36504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 16:09:29 +00:00
Ryan McCue 3e65236aa7 REST API: Apply rest_post_dispatch to embedded responses.
Fixes #35628.
Props @danielbachhuber.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 06:06:27 +00:00
Ryan McCue 03ba67a0b7 REST API: Allow explicit HEAD callbacks.
HEAD callbacks can now be registered independently, with the GET
callback still used as a fallback.

Fixes #34841.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 05:51:26 +00:00
Ryan McCue 0438795671 REST API: Add routing args to rest_dispatch_request filter.
This allows requests to be hijacked via the filter more easily.

Fixes #35507.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 04:40:26 +00:00
Ryan McCue 47bee5157b REST API: Add support for CURIEs.
CURIEs are Compact URIs, which provide a more usable way to use
custom relations in the API. The `wp` CURIE is registered by default
for `https://api.w.org/` URI relations.

Fixes #34729.
Props joehoyle.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 02:19:27 +00:00
Weston Ruter b5e18056e5 Customize: Add a user-friendly way to preview site responsiveness for desktop, tablet, and mobile.
Introduces `WP_Customize_Manager::get_previewable_devices()` with a `customize_previewable_devices` filter to change the default device and which devices are available for previewing. This is a feature that was first pioneered on WordPress.com.

Props celloexpressions, folletto, valendesigns, westonruter, welcher, adamsilverstein, michaelarestad, Fab1en.
Fixes #31195.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:57:26 +00:00
Ryan McCue a6b6adb45d REST API: Fix tests from r36529.
See #35329.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:51:25 +00:00
Rachel Baker 85e82cf571 REST API: Don’t display errors during REST API requests.
Uses `wp_debug_mode()` to prevent response from being broken by debug errors. Matches similar behavior of the XML-RPC API.

Props rockwell15.

Fixes #34915.
Built from https://develop.svn.wordpress.org/trunk@36530


git-svn-id: http://core.svn.wordpress.org/trunk@36497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:36:25 +00:00
Ryan McCue 796f0c844c REST API: Add helper function to get server instance.
This allows using rest_do_request() outside of the API itself easily.

Props danielbachhuber, swissspidy.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-16 01:12:26 +00:00
Andrea Fercia 4ac63be963 Accessibility: improve the color contrast ratio for the TinyMCE button icons.
Also, tries to use the new grays from the Design Handbook wherever applicable.

Props michaelarestad, afercia.
Fixes #35604.
Built from https://develop.svn.wordpress.org/trunk@36528


git-svn-id: http://core.svn.wordpress.org/trunk@36495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-15 21:11:28 +00:00
Drew Jaynes e41a0998e6 Docs: Add an internal note to the DocBlock for `comment_form_title()` explaining restoration of the `$comment` global.
See [36512]. See #35624.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 19:15:28 +00:00
Boone Gorges 9a178f2510 Introduce `{$taxonomy}_term_edit_form_top` action to edit-tag-form.php.
This new action gives developers a place to output content at the beginning
of the form element on edit-tags.php.

Props flixos90.
Fixes #35252.
Built from https://develop.svn.wordpress.org/trunk@36526


git-svn-id: http://core.svn.wordpress.org/trunk@36493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 04:01:26 +00:00
Boone Gorges 48b8ea78da Introduce `publicly_queryable` taxonomy argument.
Taxonomies registered as `publicly_queryable` can be queried as taxonomy
archives.

If not provided explicitly, the value of `publicly_queryable` is inherited
from `public`.

Props Chouby.
Fixes #34491.
Built from https://develop.svn.wordpress.org/trunk@36525


git-svn-id: http://core.svn.wordpress.org/trunk@36492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 03:51:26 +00:00
Boone Gorges 60cf073672 Improve `WP_Query` lazyloading logic, for better performance.
Lazyloading for comment meta and term meta, introduced into `WP_Query` in
4.4, used flags - `updated_term_meta_cache` and `updated_comment_meta_cache` -
in an attempt to prevent cache priming from happening more than once per query
object. This technique was mostly effective, but not entirely efficient, since
the flag didn't prevent the `lazyload_*_meta` callbacks from running. The
obvious solution - removing the filter callback after it'd be run once - was
dismissed for 4.4 because of concerns that `remove_filter()` could disable
lazyloading too generally in the context of nested queries, due to the way
`_wp_filter_build_unique_id()` doesn't always build sufficiently unique IDs for
similar objects. However, further testing shows that this concern is only valid
in a very small subset of cases, while the cost of keeping the query objects in
memory, via the `$wp_filter` global, is quite significant. As such, this
changeset removes the flags in favor of the `remove_filter()` technique.

See #35454, #35816.
Built from https://develop.svn.wordpress.org/trunk@36524


git-svn-id: http://core.svn.wordpress.org/trunk@36491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 03:05:27 +00:00
Weston Ruter 9343641855 Customize: Ensure that nav menu items can be shift-clicked to edit in secondary instances of the same nav menu.
When the same nav menu is shown multiple times on a page, only the first instance of the nav menu will include `id` attributes. Subsequent instances will have the `id` attributes omitted. However, in both cases the underlying nav menu item's post ID is available among the `class` names, so the post ID can be more reliably obtained from `class` instead of the `id` attribute.  

Amends [36383].
Fixes #32681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-13 00:12:25 +00:00
Weston Ruter 453ff22d7f Customize: Hide widgets re-order button when no re-ordering is possible.
Hide the re-order button if there are no widgets in the sidebar, or if there is there is only one sidebar and there is only one widget in the sidebar.

Props rabmalin, westonruter.
Fixes #35533.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 23:52:27 +00:00
Rachel Baker f99ec3db18 Comments: In the comments list table, only link rows inside the “Submitted On” column to the comment if it is publicly viewable.
The date within the comments list table “Submitted On” column will only be wrapped in `get_comment_link()` if the comment is approved and associated with a valid `comment_post_ID`.

Fixes #35279.
Built from https://develop.svn.wordpress.org/trunk@36521


git-svn-id: http://core.svn.wordpress.org/trunk@36488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 21:43:26 +00:00
Boone Gorges f846e08f2c Make sure fixtures have empty `post_content` in search test.
The generator sequence was causing false positives when the search terms
('1' and '0') happened to match the current sequence number (eg,
'Post content 190').

Introduced in [36278].

See #31025.
Built from https://develop.svn.wordpress.org/trunk@36520


git-svn-id: http://core.svn.wordpress.org/trunk@36487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 21:07:25 +00:00
Aaron Jorbin c521ca706f Improve Automated Feed Tests
Multiple improvements to the RSS2 automated tests along with the addition of Atom tests.
1. General whitespace cleanup (since the rss2 file serves as the base of the atom file).
2. Adds an author and category to the tests.
3. Since the content of the posts is the same, we don't need to test all of the post content.
4. Adds many posts so that the post count can be checked

Props stevenkword
Fixes #35160.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 19:03:26 +00:00
Andrea Fercia eee7f18225 Customizer: reduce the spinner re-painted area to the smallest possible one.
Also, changes the "customize container" and the theme installer preview
background from white to the default body `#f1f1f1` background.

Fixes #35649.
Built from https://develop.svn.wordpress.org/trunk@36518


git-svn-id: http://core.svn.wordpress.org/trunk@36485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 18:35:25 +00:00
Rachel Baker cf0288e291 Media: Fix inline docs typo inside `wp_calculate_image_srcset()` function.
mathces -> matches.

Props neoxx.

Fixes #35714.
Built from https://develop.svn.wordpress.org/trunk@36517


git-svn-id: http://core.svn.wordpress.org/trunk@36484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 18:15:30 +00:00
Boone Gorges 0e27fdcc47 Bail from `get_term()` if a filter returns an object that is not a `WP_Term`.
This prevents fatal errors in certain cases.

Props tmuikku.
Fixes #35808.
Built from https://develop.svn.wordpress.org/trunk@36516


git-svn-id: http://core.svn.wordpress.org/trunk@36483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 14:26:27 +00:00
Rachel Baker 58fe478fe1 Comments: Unit test for `wp_get_comment_fields_max_lengths().
This adds tests for the comment form field lengths returned by `wp_get_comment_fields_max_lengths()`. Replaces unit test removed in r36514. 

See #10377.
Built from https://develop.svn.wordpress.org/trunk@36515


git-svn-id: http://core.svn.wordpress.org/trunk@36482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 14:18:26 +00:00
Rachel Baker 8abd201a0b Comments: Change `wp_get_comment_column_max_length()` function to `wp_get_comment_fields_max_lengths()` for consolidation and better fallbacks.
Instead of returning a value for each of the related table column lengths, return an array of all of the column lengths used in the comment form.
Better fallback handling, where each field falls back to the expected max_length instead of an arbitrary number.

Props azaozz.

Fixes #10377.
Built from https://develop.svn.wordpress.org/trunk@36514


git-svn-id: http://core.svn.wordpress.org/trunk@36481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 13:55:28 +00:00
Andrew Ozz a2dddbf8f5 TinyMCE: fix removing a space before inline tags when applying formatting shortcuts.
Fixes #35798.
Built from https://develop.svn.wordpress.org/trunk@36513


git-svn-id: http://core.svn.wordpress.org/trunk@36480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 04:23:26 +00:00
Boone Gorges 1877b8c726 Set the `$comment` global in `comment_form_title()`.
In [33963], `comment_form_title()` was refactored so that it no longer made
reference to the `$comment` global. This broke some functionality within the
comment form, as certain template would no longer be able to access the
"current" comment.

Props d4z_c0nf, WisdmLabs, boonebgorges.
Fixes #35624.
Built from https://develop.svn.wordpress.org/trunk@36512


git-svn-id: http://core.svn.wordpress.org/trunk@36479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 04:10:25 +00:00
Boone Gorges 3e9c88d75a In `delete_metadata()`, only invalidate cache for affected objects.
The `$delete_all` flag in `delete_metadata()` triggers cache invalidation for
multiple objects. Previously, invalidation took place for all objects matching
the `$meta_key` parameter, regardless of whether `$meta_value` was also set.
This resulted in overly aggressive invalidation.

Props rahal.aboulfeth.
Fixes #35797.
Built from https://develop.svn.wordpress.org/trunk@36511


git-svn-id: http://core.svn.wordpress.org/trunk@36478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-12 02:47:26 +00:00
Eric Lewis 2bfc0f5218 Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

This was attempted previously in [36506] which was reverted in [36507]. Some form fields were not being slurped into the form's JSON representation, and it did not scale for a site with many posts. This approach fixes those problems.

Props ocean90, afercia.
See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-11 19:08:27 +00:00
Boone Gorges 1370d8b869 Don't double-unslash meta key when `update_metadata()` falls back on `add_metadata()`.
Props jdgrimes.
Fixes #35795.
Built from https://develop.svn.wordpress.org/trunk@36509


git-svn-id: http://core.svn.wordpress.org/trunk@36476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-11 17:35:28 +00:00
Boone Gorges dae31f7d95 Remove unused variable from `get_terms()`.
Unused since [31284].

Props TimothyBlynJacobs.
Fixes #35784.
Built from https://develop.svn.wordpress.org/trunk@36508


git-svn-id: http://core.svn.wordpress.org/trunk@36475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-11 04:33:29 +00:00
Eric Lewis a64dbc805b Menus: Revert larger menu support in Edit Menus screen in [36506].
JSON encoding the form as it exists on the page will not scale. 

See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-10 14:11:26 +00:00
Eric Lewis 48fdbf96de Menus: Allow larger menus to be created in the Edit Menu screen.
In the Edit Menu screen, each menu item creates 11 form input elements. In menus with more than 71 menu items, often items after the 71st weren't saved. This was because PHP's runtime configuration `max_input_vars` default value is 1000. Large menus exceed this, so PHP didn't populate the `$_POST` superglobal for the latter menu items.

The entire form is now JSON-encoded into a single input which populates `$_POST` manually on form submission.

See #14134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-10 03:32:25 +00:00
Dominik Schilling cbe5fc6fb8 Multisite: Don't show the database upgrade admin notice on the upgrade page itself.
Fixes #35782.
Built from https://develop.svn.wordpress.org/trunk@36505


git-svn-id: http://core.svn.wordpress.org/trunk@36472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-09 14:30:28 +00:00
Dominik Schilling d9a5894c2e Users: Display the new user email notice in user admin too.
Also, in `new_user_email_admin_notice()` use the global `$pagenow` and add a translators comment for the placeholder.

Fixes #35767.
Built from https://develop.svn.wordpress.org/trunk@36504


git-svn-id: http://core.svn.wordpress.org/trunk@36471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 13:54:25 +00:00
Dominik Schilling 0eb4f6ccfc Users: Use `self_admin_url()` for the email change confirmation link.
Prevents sending users to wp-admin/profile.php if they only have access to wp-admin/user/profile.php.

Fixes #35766.
Built from https://develop.svn.wordpress.org/trunk@36503


git-svn-id: http://core.svn.wordpress.org/trunk@36470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 13:26:27 +00:00
Drew Jaynes deeb5f1471 Themes: Pass information about the old theme in the form of a `WP_Theme` object when the `switch_theme` action is fired.
Props MikeHansenMe.
See #22401.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 08:26:25 +00:00
Drew Jaynes 12bdf5a6da Docs: Improove the DocBlock summary for `wp_signon()`.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 08:11:25 +00:00
Drew Jaynes 48988c505f Docs: Make a couple of minor improvements to the DocBlock for `wp_get_raw_referer()`, introduced in [36266].
* Uses a third-person singular verb in the summary
* Makes the return types more specific with `string|false` vs `string|bool`.

See #27152. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 08:09:25 +00:00
Drew Jaynes b45a6228d0 Docs: Add a changelog entry for the introduction of maxlength character limits for the 'author', 'email', and 'url' fields in `comment_form()`.
Introduced in [36272].

See #10377. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 08:05:27 +00:00
Drew Jaynes c55f447ad4 Docs: Revert unintended changes in wp-includes/post.php, mistakenly included in [36497].
See #34988. See #33701. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 02:46:25 +00:00
Drew Jaynes 3785385ea2 Docs: Add a missing version to the file header for wp-admin/term.php, introduced in [36308].
See #34988. See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 02:43:26 +00:00
Drew Jaynes f3aeb0def3 Docs: Update several function DocBlock summaries in wp-includes/nav-menu.php to use third-person singular verbs.
Also removes some unnecessary capitalizations.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 02:18:26 +00:00
Drew Jaynes e2cec35437 Docs: Make some minor improvements to inline docs for `WP_Site`, introduced in [36393].
* Uses third-person singular verbs in method summaries
* Adds an `@static` tag to the `WP_Site::get_instance()` DocBlock
* Adjusts return types for `WP_Site::get_instance()` to the more explicit `WP_Site|false`

See #32450. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 02:13:26 +00:00
Drew Jaynes 3e7db642a6 Docs: Slightly simplify the DocBlock summaries for `home_url()`, `get_home_url()`, `site_url()`, and `get_site_url()`.
See #35238. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 02:06:26 +00:00
Drew Jaynes b0ef4d14c5 Docs: Add an `@access` tag and fix a typo in the DocBlock for `wpdb::close()`.
See #34903. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 02:03:26 +00:00
Drew Jaynes 9daf7a88a3 Docs: Add a note to the DocBlock for `current_user_can()` to explain that it will always return true for super admins, unless specifically denied.
Props finnj.
Fixes #35551.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 01:27:26 +00:00
Drew Jaynes a06a5ecfe9 Docs: Fix two notations in the DocBlocks for `show_admin_bar()` and `is_admin_bar_showing()` to reflect use of the `$show_admin_bar` global rather than `$wp_admin_bar`.
Props Frozzare.
Fixes #35686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 01:22:26 +00:00
Drew Jaynes b1127321ec Docs: Fix one line of the DocBlock for the `JsonSerializable` compat interface to use a tab instead of spaces.
Props Frozzare.
Fixes #35699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 01:18:27 +00:00
Drew Jaynes 6a94d3e2e3 Docs: Use the correct parameter name in the DocBlock for `wp_kses_post_deep()`, introduced in [36429].
Props sebastianpisula.
Fixes #35700. See #35316.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 00:18:26 +00:00
Drew Jaynes c1b837b47f Docs: Add a missing type to the return description for `map_deep()`.
Props sebastianpisula.
See #35700.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-07 00:15:27 +00:00
Sergey Biryukov 6e60f8b6f8 Login: In `login_header()`, use correct separator for RTL locales.
Props ramiy.
Fixes #35737.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 22:56:27 +00:00
Boone Gorges 146320744f Allow comments to be queried by 'any' `post_type` or `post_status`.
Props kouratoras.
Fixes #35512.
Built from https://develop.svn.wordpress.org/trunk@36486


git-svn-id: http://core.svn.wordpress.org/trunk@36453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 04:51:25 +00:00
Boone Gorges fe1dd15126 Allow `get_terms()` results to ordered by metadata.
The `$orderby` parameter of `get_terms()` now accepts the following values,
related to term meta:

* 'meta_value'
* 'meta_value_num'
* the value of the `$meta_key` parameter
* any key from the `$meta_query` array

This brings order-by-meta support for terms in line with post, comment, and
user queries.

As a byproduct of these improvements, `$meta_key` and `$meta_value` parameters
have been introduced to `get_terms()`. They interact with `$meta_query` in the
same way as in `WP_Query` and other query classes.

Props jadpm, eherman24.
Fixes #34996.
Built from https://develop.svn.wordpress.org/trunk@36485


git-svn-id: http://core.svn.wordpress.org/trunk@36452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 04:42:26 +00:00
Boone Gorges f1c0ed714a `WP_Query` taxonomy query vars should be set to first of multiple taxonomies.
This provides better parity with `get_queried_object()`, which will return the
first taxonomy/term matched by the current query.

[29891] introduced the abnormal behavior for the 'taxonomy' and 'term'
query vars.

Props Chouby.
Fixes #35619.
Built from https://develop.svn.wordpress.org/trunk@36484


git-svn-id: http://core.svn.wordpress.org/trunk@36451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 03:58:27 +00:00
Andrew Ozz 3a2ef071d4 TinyMCE inline link:
- Fix not displaying anything when the URL is only a fragment. Show the whole URL.
- Fix editing a link when it is the very first word in the editor.
- Fix editing a link then some of the surrounding text or space is selected. Change the selection to only the link node.
- Add placeholder when adding new link.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36483


git-svn-id: http://core.svn.wordpress.org/trunk@36450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 00:51:27 +00:00
Boone Gorges 20c07afbd5 When updating a user, invalidate its 'userslugs' cache.
`user_nicename` can be changed via `wp_update_user()`, so we invalidate just
to be safe.

Props thebrandonallen.
Fixes #35750.
Built from https://develop.svn.wordpress.org/trunk@36482


git-svn-id: http://core.svn.wordpress.org/trunk@36449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 19:03:26 +00:00
Boone Gorges 8db393ada6 Make the `$post` param optional in `get_post_field()`.
When `$post` is `null`, the current post object will be returned.

Props sebastian.pisula.
Fixes #35683.
Built from https://develop.svn.wordpress.org/trunk@36481


git-svn-id: http://core.svn.wordpress.org/trunk@36448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 18:58:25 +00:00
Boone Gorges b5d12e130c Comments: Restore the ability to bypass post_id filter using 0 or '0'.
The changes introduced in [36381], while logical and clearly awesome, introduce
the potential for much breakage. Those who want to query for comments with a
null `comment_post_ID` should use `'post_in' => array( 0 )` instead.

Reverts [36381], [36387].
See #35090.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 18:50:25 +00:00
Boone Gorges 8e5cf1c2fe Comments: Add 'parent__in' and 'parent__not_in' to query var defaults.
Query var defaults are used to calculate a cache key. The fact that these
params were not listed among the defaults was causing cache keys to be
insufficiently specific.

Props danielbachhuber.
Fixes #35677.
Built from https://develop.svn.wordpress.org/trunk@36479


git-svn-id: http://core.svn.wordpress.org/trunk@36446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 18:36:28 +00:00
Gary Pendergast e42e8c6d72 Tests: Use the new `wpdb::close()` method for closing the DB connection.
Props markoheijnen.

Fixes #34903.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-05 01:06:28 +00:00
Andrea Fercia f75f20edb2 Accessibility: simplify the Plugins and Themes tables on the Updates screen.
Although it may seem counterintuitive at first, in very limited cases it's
better to remove improper semantics (this is not a tabular data table) in
order to reduce noise for screen reader users and simplify all the things.
Also improves headings to better separate sections.

Fixes #34780.
Built from https://develop.svn.wordpress.org/trunk@36477


git-svn-id: http://core.svn.wordpress.org/trunk@36444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-04 19:19:27 +00:00
Drew Jaynes 94fdeabe27 Docs: Document the `$args` parameter for `get_categories()` as a hash notation.
The only specific default for `get_categories()` is `$taxonomy` with a value of 'category', all the other arguments are documented separately in `get_terms()`.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-04 14:50:26 +00:00
Drew Jaynes 6bbb34818c Docs: Reference `get_terms()` for arguments available in `get_categories()`.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-04 14:38:28 +00:00
Drew Jaynes 26bf8cda9b Docs: Add more complete information to DocBlocks for private core functions `_wp_dashboard_control_callback()` and `_wp_dashboard_recent_comments_row()`.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:20:26 +00:00
Drew Jaynes 6995ec613e Docs: Add private access notation to the DocBlock for the core `_wp_handle_upload()` function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:19:25 +00:00
Drew Jaynes d62a1bf1e9 Docs: Mark two private functions as such in wp-admin/ajax-actions.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:17:26 +00:00
Drew Jaynes 9351a7c9ff Docs: Add a missing DocBlock for the private `_add_themes_utility_last()` function.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-03 20:07:27 +00:00
Dominik Schilling 72c6f7f86f Suppress possible warnings in PHP < 5.3.3 by `parse_url()` in `wp_validate_redirect()`.
PHP 5.3.3 removed the E_WARNING that was emitted when URL parsing failed.
Built from https://develop.svn.wordpress.org/trunk@36446


git-svn-id: http://core.svn.wordpress.org/trunk@36413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 16:34:27 +00:00
Aaron Jorbin 5c4031dd84 Revert [35792]
This causes a regression and causes redirects to potentially fail.

See #5114 #34028
props ocean90

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


git-svn-id: http://core.svn.wordpress.org/trunk@36412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 16:24:26 +00:00
Dominik Schilling 361ed7a3d6 Better validation of the URL used in HTTP redirects.
Built from https://develop.svn.wordpress.org/trunk@36444


git-svn-id: http://core.svn.wordpress.org/trunk@36411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 15:11:28 +00:00
Dominik Schilling f65de8ec9f HTTP: `0.1.2.3` is not a valid IP.
Built from https://develop.svn.wordpress.org/trunk@36435


git-svn-id: http://core.svn.wordpress.org/trunk@36402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 12:55:29 +00:00
Gary Pendergast e19a8796fd Database: Allow loading when only the `mysqlnd` extension is loaded.
We do an early check for a mysql extension being loaded, but it fails if the `mysqlnd` extension is the only one present.

Props nexurium.

Fixes #33261.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 00:59:25 +00:00
Gary Pendergast 5779ed9d8a WPDB: Add a `close()` method to `wpdb`, for when the connection needs to be manually closed.
In the event that it was closed prematurely, `wpdb::query()` will re-open the connection automatically.

Fixes #34903.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-02 00:13:26 +00:00
Weston Ruter 9f7d608a6a Customizer: Fix searching for available nav menu items by updating reference to nonce.
Fixes regression introduced in [36414] where the nonce for listing available nav menu items was updated to use the new centralized location at `wp.customize.settings.nonce`, but the nonce for search did not get updated.

See #35617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-01 21:36:28 +00:00
Dominik Schilling cd892b86b4 Media: In `wp_read_image_metadata()` make sure that IPTC keywords are UTF8 encoded.
Prevents missing `_wp_attachment_metadata` when an image contains keywords with latin extended characters.

Fixes #35316.
Built from https://develop.svn.wordpress.org/trunk@36429


git-svn-id: http://core.svn.wordpress.org/trunk@36396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-01 14:53:27 +00:00
Andrea Fercia c9e5edd637 Menus: Avoid displaying two spinners when adding selected menu items.
Fixes #35682.
Built from https://develop.svn.wordpress.org/trunk@36427


git-svn-id: http://core.svn.wordpress.org/trunk@36394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-31 18:06:27 +00:00
Andrea Fercia 82f59fc6ef Menus: after [36379] prevent "Quick Search" form submission when pressing Enter.
Fixes #35374.
Built from https://develop.svn.wordpress.org/trunk@36426


git-svn-id: http://core.svn.wordpress.org/trunk@36393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-31 14:03:27 +00:00
Rachel Baker 2573fa7ab8 Comments: Add back `$req` variable in `comments_template()`.
The variables in `comments_template()` should never be assumed to be unused. This function includes the `comments.php` template file from the active theme or falls back to `theme-compat/comments.php`. This is why including a file within a function only brings pain and sorrow.

Reverts r36322.

See #35473.
Built from https://develop.svn.wordpress.org/trunk@36425


git-svn-id: http://core.svn.wordpress.org/trunk@36392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 22:13:26 +00:00
Rachel Baker 099b35933d Comments: Add a back link to `wp_die()` comment form submission error display.
Fixes #4332.

Props wonderboymusic, westonruter, shamess, rachelbaker.
Built from https://develop.svn.wordpress.org/trunk@36424


git-svn-id: http://core.svn.wordpress.org/trunk@36391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 21:56:27 +00:00
Andrea Fercia 98518bdd4d Install: Improve the install page language chooser button style.
Fixes #34547.
Built from https://develop.svn.wordpress.org/trunk@36423


git-svn-id: http://core.svn.wordpress.org/trunk@36390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 14:53:26 +00:00
Andrea Fercia 62d8fda8dd After [36171] remove all the occurrences of the old CSS clearfix.
The old clearfix was applied to very specific items and defined multiple times
across CSS files. Uses the new generic `.wp-clearfix` utility class instead.

See #26396.
Built from https://develop.svn.wordpress.org/trunk@36422


git-svn-id: http://core.svn.wordpress.org/trunk@36389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 13:46:27 +00:00
Dion Hulse 1abb98520b Update Random_Compat to the latest version (1.1.6).
See #35665

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


git-svn-id: http://core.svn.wordpress.org/trunk@36388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-30 00:57:28 +00:00
Boone Gorges bb6a068e29 Simplify action placement in `update_metadata()`.
By combining a number of `foreach` loops, we make the code more readable and
potentially faster in the case where many metadata rows are being updated.

Props Shelob9.
Fixes #35652.
Built from https://develop.svn.wordpress.org/trunk@36420


git-svn-id: http://core.svn.wordpress.org/trunk@36387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-29 04:52:28 +00:00
Dion Hulse 34b9af6efd Menus: Remove a redundant and unused `0` parameter from the `Delete Menu` link on the nav menus admin screen.
Fixes #35641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 06:14:25 +00:00
Boone Gorges 4b4978ecbd Pass additional params to 'get_archive_links' filter.
Props sebastian.pisula.
Fixes #35573.
Built from https://develop.svn.wordpress.org/trunk@36418


git-svn-id: http://core.svn.wordpress.org/trunk@36385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 04:46:26 +00:00
Eric Lewis 24adb71a56 Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:51:26 +00:00
Eric Lewis 22467e840f Networks and sites: Replace "blog" usage with "site" in docs.
Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

See #35417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-28 03:35:27 +00:00
Boone Gorges af34d4f296 Fix set up/tear down of post types in comment query test.
Introduced in [31015].

Props kouratoras.
Fixes #35633.
Built from https://develop.svn.wordpress.org/trunk@36415


git-svn-id: http://core.svn.wordpress.org/trunk@36382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 23:13:27 +00:00
Weston Ruter c376477265 Customizer: Export `nonce`, `theme`, and `url` app settings in preview as exported in pane.
* Introduce `WP_Customize_Manager::get_nonces()` to consolidate logic for retrieving nonces.
* Export nonces centrally in `wp.customize.settings.nonce` with each request and update nav menus preview to utilize.
* Send updated nonces to preview upon `nonce-refresh`.
* Request full preview refresh if Nav Menu selective refresh request fails (e.g. due to bad nonce).
* Update nav menus and widgets in Customizer to utilize `customize_refresh_nonces` for exporting nonces and keeping them up to date.

See #27355.
Fixes #35617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 17:55:26 +00:00
Dominik Schilling e8cc1b5a32 Multisite: Add the global cache group `sites` to `restore_current_blog()` and `wp_start_object_cache()`.
See #32450.
Built from https://develop.svn.wordpress.org/trunk@36413


git-svn-id: http://core.svn.wordpress.org/trunk@36380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 13:51:26 +00:00
Dominik Schilling 87b5e06838 Multisite: Add the global cache group `networks` to `restore_current_blog()`.
Missed in [36258].

See #35251.
Built from https://develop.svn.wordpress.org/trunk@36411


git-svn-id: http://core.svn.wordpress.org/trunk@36378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 13:43:28 +00:00
Eric Lewis c48e9eea46 Build/Test Tools: Move class `WP_UnitTest_Factory` into its own file.
In [36347] we moved all PHP factory classes into their own files except the main class. The main class is now in its own file, and `factory.php` is solely an include manifest for all factory classes.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 03:27:26 +00:00
Eric Lewis 2d2353cbde General: Document the difference between site_url() and home_url().
`site_url()` returns a url where WordPress application files are accessible (e.g. where the `wp-admin/` folder resides). `home_url()` returns a url where the front-end of the WordPress site can be visited.

See #35238.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-27 02:55:27 +00:00
Weston Ruter c7923b2c9d Customizer: Improve parity between JS Setting models in preview with JS Setting models in pane.
* Ensure that Setting `Value` objects in preview get initial `_dirty` flag set if values among POST data.
* Upon `saved` event, send `saved` message to preview with the `response` to trigger `saved` event there.
* Reset `_dirty` flag for all setting `Value` objects in preview upon `saved`.
* Continue to create settings synced from pane even after initial bootstrap, and create them as dirty.
* Ensure that `id` property is set for setting `Value` objects in preview.

See #27355.
Fixes #35616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 23:52:25 +00:00
Andrea Fercia 972215f9f9 Accessibility: Improve the focus style on the Credits screen.
Leads and contributing developers will now look nicer when focused.
Also, combines adjacent image and text links for the same resource thus
simplifying markup and reducing noise for screen reader users.

Props walbo, afercia.
Fixes #34953.
Built from https://develop.svn.wordpress.org/trunk@36406


git-svn-id: http://core.svn.wordpress.org/trunk@36373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 22:38:28 +00:00
Eric Lewis 0efd5b3d00 Comments: Fire an action after a comment is removed from object cache.
When a comment is removed from the object cache, the `clean_comment_cache` action is now fired. This provides plugin and theme developers a chance to perform secondary cache invalidation as needed.

Props spacedmonkey.
Fixes #35610.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 03:47:25 +00:00
Boone Gorges e6d2b6cab0 Query: Respect 'suppress_filters' when filtering search-related SQL.
Props 5um17.
Fixes #35594.
Built from https://develop.svn.wordpress.org/trunk@36404


git-svn-id: http://core.svn.wordpress.org/trunk@36371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 03:12:25 +00:00
Boone Gorges de89efc4dc Introduce `$comment_status` and `$ping_status` params for `WP_Query`.
Props birgire.
Fixes #35601.
Built from https://develop.svn.wordpress.org/trunk@36403


git-svn-id: http://core.svn.wordpress.org/trunk@36370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:56:26 +00:00
Boone Gorges de9d742b9a Allow `is_post_type_viewable()` to accept a post type name.
Previously, it accepted only a post type object.

Props spacedmonkey.
Fixes #35609.
Built from https://develop.svn.wordpress.org/trunk@36402


git-svn-id: http://core.svn.wordpress.org/trunk@36369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:37:26 +00:00
Boone Gorges 0d33e0904e Add tests for `is_post_type_viewable()`.
See #35609.
Built from https://develop.svn.wordpress.org/trunk@36401


git-svn-id: http://core.svn.wordpress.org/trunk@36368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:27:26 +00:00
Boone Gorges ced24390f9 Normalize 'clean_term_cache' docs formatting after [36399].
Built from https://develop.svn.wordpress.org/trunk@36400


git-svn-id: http://core.svn.wordpress.org/trunk@36367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:19:26 +00:00
Boone Gorges 32e5795042 Pass `$clean_taxonomy` param to 'clean_term_cache' action.
Props spacedmonkey.
Fixes #35611.
Built from https://develop.svn.wordpress.org/trunk@36399


git-svn-id: http://core.svn.wordpress.org/trunk@36366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 02:18:26 +00:00
Sergey Biryukov f6cde8e3c5 Docs: Correct return value for `is_allowed_http_origin()`.
Props kraftbj.
Fixes #35607.
Built from https://develop.svn.wordpress.org/trunk@36398


git-svn-id: http://core.svn.wordpress.org/trunk@36365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 00:39:26 +00:00
Eric Lewis d01e8db4ad Plugins: Clarify that mu-plugins can't be "active" in docs.
Plugins installed in the plugins/ folder can be activated by users. This puts the plugin in an "active" state. Plugins in the mu-folder/ are "must-use" plugins that are always loaded. They can't be activated, and thereby can't be "active." Because of this, using the `is_plugin_active()` or `is_plugin_active_for_network()` returns false when checking for these plugins. This clarifies that behavior in the functions' docs.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 00:32:27 +00:00
Andrea Fercia af25083b6f Accessibility: Improve the color contrast ratio replacing the residual occurrences of the `#777` gray.
Uses the existing `#72777c` on white backgrounds and the new `#555d66` "dark medium gray" on darker backgrounds.

Fixes #35605.
Built from https://develop.svn.wordpress.org/trunk@36396


git-svn-id: http://core.svn.wordpress.org/trunk@36363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-26 00:04:26 +00:00
Andrea Fercia eba8321e21 Accessibility: Fix the color contrast ratio in the login screen.
Props scarinessreported for the initial patch.
Fixes #31548.
Built from https://develop.svn.wordpress.org/trunk@36395


git-svn-id: http://core.svn.wordpress.org/trunk@36362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 23:52:25 +00:00
Konstantin Obenland d28ce2a1e4 Pass data consistently on plugin, network plugin, and network theme screens.
List tables on these three screens look similar but come with unexpected caveats.
The network themes screen in particular has been neglected, using a `.plugin`
class to inherit its sibling's styles and not providing classes and data
attributes that the other two offer. This will provide some more consistency.

Fixes #35335.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 22:55:25 +00:00
Jeremy Felt 0b69f2cd63 Multisite: Introduce the WP_Site class.
* A `WP_Site` object initially matches a row from `wp_blogs`.
* A site can be retrieved by its ID through `WP_Site::get_instance()`.
* Adds `sites` to the global cache group and captures instance lookups.
* The multisite bootstrap now ensures `$current_blog` is an instance of `WP_Site`.

Props johnjamesjacoby, jeremyfelt.
See #32450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 21:51:26 +00:00
Dominik Schilling f3c20d5011 Docs: Fix indentation in `add_filter()` example.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@36392


git-svn-id: http://core.svn.wordpress.org/trunk@36359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 18:58:27 +00:00
Drew Jaynes 3fc149d9ee Docs: Fix parameter documentation ordering in the hook docs for the `register_taxonomy_args` filter.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-25 17:11:27 +00:00
Peter Westwood 90b80fce4e i18n tools: Add the text domain to translate_nooped_plural() calls as well.
Fixes #34126 props jrf.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-24 15:29:26 +00:00
Peter Westwood bc56bc2d5f i18n tools: Add a test for the add-textdomain.php script.
Built from https://develop.svn.wordpress.org/trunk@36389


git-svn-id: http://core.svn.wordpress.org/trunk@36356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-24 15:26:28 +00:00
Weston Ruter 57c2b5d192 Customizer: Use "(Untitled)" as site title if `blogname` is empty.
Fixes a layout issue in the Customizer UI. Also de-duplicate title display logic, outputting "Loading..." as site title in PHP with actual title being set upon Customizer `ready`. Also update the site title in response to a `blogname` setting change as opposed to `input` DOM events on the control.

Fixes #35579.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 23:15:27 +00:00
Boone Gorges 00cf77999d In comments list table, `$post_id` should default to `false` rather than 0.
After [36381], the default value of `0` was causing the list table at
edit-comments.php to be empty. `false` prevents this.

This fix is likely temporary, while more research is done into the backward
compatibility concerns tied to [36381].

See #35090.
Built from https://develop.svn.wordpress.org/trunk@36387


git-svn-id: http://core.svn.wordpress.org/trunk@36354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 22:16:26 +00:00
Eric Lewis 51ae114302 Networks and sites: Replace "blog" usage with "site" in docs.
This effort focuses on `src/wp-includes/link-template.php`.

Multisite functions use the term "blog" to refer to what we now call a "site," e.g. `get_current_blog_id()`. These functions are here to stay because of our commitment to backwards compatibility. What we can do is set the documentation straight.

Props mrahmadawais.
Fixes #35589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 16:47:29 +00:00
Sergey Biryukov b0b311053e Docs: Correct `wpdb::db_version()` description.
Props luciole135.
Fixes #35588.
Built from https://develop.svn.wordpress.org/trunk@36385


git-svn-id: http://core.svn.wordpress.org/trunk@36352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 11:22:26 +00:00
Ella Iseulde Van Dorpe 3663a5bca5 TinyMCE: add inline link dialog
First run.
Links the advanced button to the "old" dialog for now.

See #33301.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 00:08:26 +00:00
Weston Ruter fb8544a0ac Customizer: Add shift-click on nav menu items in preview to focus on corresponding nav menu item controls in pane.
Add missing `params.completeCallback` to `MenuItemControl.focus()` for parity with `Control.focus()`. Also adds `params` to `MenuItemControl.expandForm`, `MenuItemControl.collapseForm()`, and `MenuItemControl.toggleForm()`.

Props MattGeri, westonruter.
Fixes #32681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 21:21:26 +00:00
Drew Jaynes 196271e5b4 Docs: List out possible values for the `$show` parameter in the description for `get_bloginfo()`.
Fixes #35581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:22:25 +00:00
Boone Gorges c5ab953773 Allow comment query results to be limited to comments with comment_post_ID = 0.
Previously, this was not possible due to an overly broad `empty()` check.

Passing `null`, `false`, or `''` to 'post_id', or omitting 'post_id'
altogether, will continue to return comments regardless of `comment_post_ID`,
as before. Passing `0` or `'0'` will limit results to comments with no
associated post.

Props danielbachhuber.
Fixes #35090.
Built from https://develop.svn.wordpress.org/trunk@36381


git-svn-id: http://core.svn.wordpress.org/trunk@36348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:20:25 +00:00
Drew Jaynes 90b4ee93b3 Docs: Improve documentation for `bloginfo()` including cross-reference info for the `$show` parameter passed through to `get_bloginfo()`.
See #35581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 20:17:28 +00:00
Andrea Fercia 450cbb3e81 Accessibility: Remove title attributes from the Menus screen.
Also, adds missing labels and improves the existing ones. 
Updates the "custom links" labels and inputs in the Customizer too.
Introduces a generic, reusable, `.wp-initial-focus` CSS class to be used for
the sole purpose of setting the initial focus.
"Quick Search": uniform the attached events and avoids new AJAX requests to
be triggered when the pressed key doesn't change the searched term.

Fixes #35374.
Built from https://develop.svn.wordpress.org/trunk@36379


git-svn-id: http://core.svn.wordpress.org/trunk@36346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 14:26:27 +00:00
Sergey Biryukov 6699b761e1 Docs: Remove redundant PHP tags from `get_object_taxonomies()` description.
Props dotancohen.
Fixes #35553.
Built from https://develop.svn.wordpress.org/trunk@36377


git-svn-id: http://core.svn.wordpress.org/trunk@36344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 02:41:26 +00:00
Andrew Ozz ca1906b159 TinyMCE: remove the `srcset` and `sizes` attributes (if any) after replacing or editing an image.
See #35434.
Built from https://develop.svn.wordpress.org/trunk@36376


git-svn-id: http://core.svn.wordpress.org/trunk@36343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-22 01:19:25 +00:00
Andrea Fercia 496bde4e77 Quick/Bulk Edit: Remove a no more used jQuery loop for unsupported post formats.
See #23426.
See #24096.
Fixes #35564.
Built from https://develop.svn.wordpress.org/trunk@36375


git-svn-id: http://core.svn.wordpress.org/trunk@36342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 22:50:25 +00:00
Weston Ruter dc343e41fa Customizer: Hide help toggle button in panel when no description is supplied.
This aligns with the `.customize-panel-description` element which is also excluded if there is no description.

Props drebbits.web.
Fixes #35540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 22:01:26 +00:00
Sergey Biryukov 7afa923067 Media: In `_wp_handle_upload()`, move ending brace to a new line.
Props georgestephanis.
Fixes #35565.
Built from https://develop.svn.wordpress.org/trunk@36373


git-svn-id: http://core.svn.wordpress.org/trunk@36340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 20:27:26 +00:00
Sergey Biryukov aeefc9af75 Unit Tests: Correct comment in `wp-tests-config-sample.php`.
Props tahteche.
Fixes #35563.
Built from https://develop.svn.wordpress.org/trunk@36372


git-svn-id: http://core.svn.wordpress.org/trunk@36339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 20:25:27 +00:00
Weston Ruter c055021d1e Customizer: Fix `click.preview` event handler for jump links and shift+clicks in preview.
* Prevent following jump links (starting with `#`), but instead scroll that element into view.
* Prevent following links clicked in the Customizer if shift key is pressed when clicking; this fixes an issue when trying to shift-click on a widget or nav menu item (#32681) to just focus on the control in the Customizer.

Fixes #26005.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 06:08:27 +00:00
Dion Hulse 65182e4dc8 Upgrade: Switch the locking mechanism to using static methods so that it can be accessed from other upgrade-classes.
Fixes #34878

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


git-svn-id: http://core.svn.wordpress.org/trunk@36337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 01:22:25 +00:00
Dominik Schilling 23133b0b06 Widgets: Show the "Clear Inactive Widgets" button only after the sidebar with inactive widgets.
Fixes #35447.
Built from https://develop.svn.wordpress.org/trunk@36368


git-svn-id: http://core.svn.wordpress.org/trunk@36335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 21:54:26 +00:00
Drew Jaynes 42caba7134 Docs: Update the `@access` tag value for `WP_Http::_get_first_available_transport()` from `private` to `public`.
When the method was introduced in [17914], the name was underscore-prefixed as is core style for private-use, though it was also introduced with a `public` access modifier for the declaration. Due to core's committment to backward-compatibility, the access modifier overrules in this case, meaning that while the method is underscore-prefixed and was originally-intentioned to be private, it is and always will be a public method, and the documentation should reflect that.

Props Frozzare.
Fixes #35289.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 18:46:26 +00:00
Jeremy Felt 3018d9827c Themes: Enhance filtering options for allowed themes on a network.
* Move the legacy `allowed_themes` filter to `WP_Theme::get_allowed_on_network()`, where it will continue to filter themes allowed on the network.
* Add `network_allowed_themes` filter to `WP_Theme::get_allowed()` and pass `$blog_id` to provide context.
* Add `site_allowed_themes` filter to `WP_Theme::get_allowed_on_site()` and pass `$blog_id` to provide context.

Props pauldewouters, lamosty, michalzuber, dmsnell, johnnypea, rob.
Fixes #28436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 18:29:27 +00:00
Drew Jaynes 1e1d1375b0 Docs: Add missing `@access` tags to DocBlocks for `WP` class methods and properties.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 18:19:27 +00:00
Scott Taylor cee318ed81 Media: When reusing the initial values from the global MediaElement config object, the config object should first be cloned. Objects in JS are references that will retain any changes. This fixes an issue where player controls could get mixed up between instances when multiple players (namely, single audio and audio playlists, in a certain order) are on the same page.
Props Fab1en.
Fixes #34152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 15:47:28 +00:00
Dion Hulse dddfbfa1d3 Emoji: Work around a `mod_security` rule which prevents pages with 4 or more instances of `String.fromCharCode(` from being served.
Fixes #35412 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 07:40:28 +00:00
Andrew Ozz 6c3261d3da TinyMCE: update to 4.3.3. Update the QUnit tests and revert back to testing the non-minified files in /src.
Fixes #35539.
Built from https://develop.svn.wordpress.org/trunk@36352


git-svn-id: http://core.svn.wordpress.org/trunk@36319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 04:18:33 +00:00
Dion Hulse 78b24ed790 Build Tools: Revert to using a human readable timestamp rather than the unix timestamp in [36315].
Fixes #28722

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


git-svn-id: http://core.svn.wordpress.org/trunk@36318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-20 02:02:27 +00:00
Jeremy Felt 1def66a1c9 Themes: Add initial tests for the `allowed_themes` filter.
We'll be adjusting the placement of this filter and adding two other related filters, so we should make sure it continues to work as expected after the change.

See #28436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 23:58:27 +00:00
Dion Hulse 006ae74d4c Core Upgrader: Add a locking mechanism to avoid two concurrent updates of WordPress occuring.
Fixes #34878

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


git-svn-id: http://core.svn.wordpress.org/trunk@36316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 05:07:26 +00:00
Boone Gorges 60a9f41315 Don't double-escape the 'name' param in `get_terms()`.
[32353] changed the way the 'name' param in `get_terms()` is sanitized, by
running it through `sanitize_term_field( 'name' )` before performing the SQL
query. An unintentional side effect of this change was that the string is
double-escaped: once by `wp_filter_kses()`, and once by `esc_sql()`. The
double-escaping was causing 'name' queries to fail when the param contained
apostrophes or other escaped characters.

Fixes #35493.
Built from https://develop.svn.wordpress.org/trunk@36348


git-svn-id: http://core.svn.wordpress.org/trunk@36315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 04:10:25 +00:00
Eric Lewis 96f0c643e3 Build/Test Tools: Move PHP factory classes into their own files.
This makes the code easier to browse.

`factory.php` loads the new files, so this is backwards compatible in case `factory.php` is loaded directly for access to one of the classes.

See #35492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 03:56:27 +00:00
Boone Gorges f1e6cde0a2 Share post fixture in `WP_Comment_Query` tests.
See #30017.
Built from https://develop.svn.wordpress.org/trunk@36346


git-svn-id: http://core.svn.wordpress.org/trunk@36313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 03:03:26 +00:00
Boone Gorges a2c17d92d2 Ignore false values of 'search' in `WP_Comment_Query`.
Props danielbachhuber.
Fixes #35513.
Built from https://develop.svn.wordpress.org/trunk@36345


git-svn-id: http://core.svn.wordpress.org/trunk@36312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 02:55:27 +00:00
Eric Lewis 3f643ba9af Themes: Show template loading error to users with `switch_themes` cap.
In [36338], a template loading error was shown only to users with the `install_themes` capability. This is now displayed users with the `switch_themes` capability, as users with this cap can at least switch to a different theme. Also, this will now show for site administrators in multisite, whereas `install_themes` is limited to superadmins.

Props dd32.
See #21931.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 19:57:26 +00:00
Rachel Baker f956379447 Comments: Remove unused `$default_comments_page` variable in `get_comment_link()`.
Left in r34735, fetches the `default_comments_page` option twice since this variable is unused. 

See #34073 and #35511.

Props Latz.
Built from https://develop.svn.wordpress.org/trunk@36343


git-svn-id: http://core.svn.wordpress.org/trunk@36310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 16:35:28 +00:00
Dion Hulse 61951f5aff CSS: Reference the original location of the CSS rule being overridden.
See #35229

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


git-svn-id: http://core.svn.wordpress.org/trunk@36309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 09:59:26 +00:00
Dion Hulse 987ce83cfc CSS: Stop using `wp-admin.min.css` and instead queue the individual stylesheets up through `load-styles.php`.
We still generate the `wp-admin.*` files for compabitility purposes, however they only include the `@import()` lines.

Fixes #35229

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


git-svn-id: http://core.svn.wordpress.org/trunk@36308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 09:57:29 +00:00
Jeremy Felt fcd674ca6c Docs: Fix type documentation for `WP_Network` properties.
* `$cookie_domain` was incorrectly documented as an `int`.
* `$id` and `$blog_id`, though numeric, are provided as strings and should be documented as such.

Fixes #35404.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 02:59:27 +00:00
Rachel Baker 9065794462 List Tables: Use the $GLOBALS array when unsetting the global post and comment in `WP_Comments_List_Table::single_row()`.
In r35674 only the local variables were unset, when using `unset()` with a global variable the `$GLOBALS` array must be used.


Fixes #35506.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-18 02:50:27 +00:00
Eric Lewis e62c559da3 Themes: Only users with proper capability should see theme errors.
After [36335], if a template file is not loaded, an error is displayed
to logged-in users. As logged-in users may have no capabilities,
this check is insubstantial. Limit the display of this error to users
with the `install_themes` capability, i.e. someone who has the capacity
to deal with the error.

See #21931.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 23:59:26 +00:00
Ella Iseulde Van Dorpe d17af5ff4b Fix unit tests after [36336]
Built from https://develop.svn.wordpress.org/trunk@36337


git-svn-id: http://core.svn.wordpress.org/trunk@36304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 23:38:25 +00:00
Ella Iseulde Van Dorpe dea6197932 Emoji: adjust $wpsmiliestrans
Swap simple-smile.png with SLIGHTLY SMILING FACE
and frownie.png with SLIGHTLY FROWNING FACE

Fixes #31710.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 22:28:29 +00:00
Eric Lewis 435196fc40 Themes: Show an error message to logged-in users if a template file isn't loaded.
On the off-chance the active theme folder is renamed or deleted, a "white screen 
of death" was displayed to the user. Instead, the user is shown a useful error
screen displaying any errors the theme has (e.g. if the theme can't be found).

Props MikeHansenMe, SergeyBiryukov.
See #21931.


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


git-svn-id: http://core.svn.wordpress.org/trunk@36302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 17:29:27 +00:00
Andrea Fercia 82c596594b After [36333] correctly use `esc_attr()` instead of `esc_attr__()`.
See #35313.
Built from https://develop.svn.wordpress.org/trunk@36334


git-svn-id: http://core.svn.wordpress.org/trunk@36301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 16:03:25 +00:00
Andrea Fercia 497de1d658 Accessibility: Remove title attributes from the Posts list table.
Fixes #35313.
Built from https://develop.svn.wordpress.org/trunk@36333


git-svn-id: http://core.svn.wordpress.org/trunk@36300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 15:47:26 +00:00
Rachel Baker 97e367483a Comments: Correct description of `comment_author` property in WP_Comment class.
The `comment_author` property is the comment author’s name, not an ID.

Props meitar.

Fixes #35464.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 15:00:27 +00:00
Andrea Fercia 1183b06bc5 Accessibility: Remove title attributes from the Media Library list table.
Fixes #35136.
Built from https://develop.svn.wordpress.org/trunk@36331


git-svn-id: http://core.svn.wordpress.org/trunk@36298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 14:46:29 +00:00
Eric Lewis fd99c1705e Docs: Nav menu location functions relate to nav menu locations, not nav menus.
Fixes #35471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-17 01:43:26 +00:00
Pascal Birchler 4e978a1ce6 Posts: Correctly pass `$post` to `post_password_required()` in `get_the_excerpt()`.
Corrects the relevant test.

Props sebastian.pisula for initial patch.
Fixes #35486.
Built from https://develop.svn.wordpress.org/trunk@36329


git-svn-id: http://core.svn.wordpress.org/trunk@36296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-16 10:14:28 +00:00
Dominik Schilling 3b3ded01a0 Media: Update some attach/detach strings in the columns view.
* Show a "Media attachment reattached."/"Media attachment detached." message when only one attachment was attached/detached. 
* Use the string placeholder as `number_format_i18n()` returns a string.
* Add translator comments.
* Update help text to refer to the new dropdown menus.
* Add a more generic title to the attach modal.

Fixes #33237.
Built from https://develop.svn.wordpress.org/trunk@36328


git-svn-id: http://core.svn.wordpress.org/trunk@36295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 22:29:25 +00:00
Boone Gorges b750ee042b Correct documentation for `post_author` param of `WP_Comment_Query`.
Props chriscct7.
Fixes #35481.
Built from https://develop.svn.wordpress.org/trunk@36327


git-svn-id: http://core.svn.wordpress.org/trunk@36294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 20:14:26 +00:00
Boone Gorges 4c91776f3b Respect all post-related filters in `WP_Comment_Query`.
The refactor of `WP_Comment_Query`'s SQL generation in [34542] introduced a bug
that caused only the last post-related filter to be respected in comment
queries. In other words, if querying for comments using params
`post_status=draft&post_author=3`, only the last-processed of these params
would be respected. The current changeset fixes the logic so that these clauses
don't overwrite each other.

Props chriscct7.
Fixes #35478.
Built from https://develop.svn.wordpress.org/trunk@36326


git-svn-id: http://core.svn.wordpress.org/trunk@36293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 20:10:51 +00:00
Rachel Baker f407e3a473 Comments: Use TEXT column type in fallback for `wp_get_comment_column_max_length()`.
Fixes #10377.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 20:10:27 +00:00
Boone Gorges d2dabdecf6 Respect custom pagination params when using `wp_list_comments()` in a query loop.
[36157] fixed a problem, introduced in 4.4, that caused custom pagination
parameters passed to `wp_list_comments()`. However, the fix introduced in that
changeset was limited to the `is_singular()` context, so that the bug remained
when `wp_list_comments()` is used within a non-singular `WP_Query` loop. We
fix this by removing the `is_singular()` check and using the more general
`get_the_ID()` to identify the correct post_id to use for the secondary
comment query.

Fixes #35402.
Built from https://develop.svn.wordpress.org/trunk@36324


git-svn-id: http://core.svn.wordpress.org/trunk@36291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:48:25 +00:00
Boone Gorges d5bc0fe493 Populate term cache with proper clone of term objects.
[34999] modified the cache strategy for terms in the context of
`wp_get_object_terms()`. As part of these changes, the `object_id` property of
term objects had to be unset before being cached. To avoid modifying passed-by-
reference terms, `update_term_cache()` attempted to make a copy of the terms
passed to the function; however, it failed to use the `clone` keyword, and thus
only created a reference instead of a copy.

Props berengerzyla.
Fixes #35462.
Built from https://develop.svn.wordpress.org/trunk@36323


git-svn-id: http://core.svn.wordpress.org/trunk@36290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:35:26 +00:00
Pascal Birchler e85f75f23f Comments: Remove unneeded `$req` variable in `comments_template()`.
Props Latz.
Fixes #35473.
Built from https://develop.svn.wordpress.org/trunk@36322


git-svn-id: http://core.svn.wordpress.org/trunk@36289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:33:27 +00:00
Pascal Birchler 552ed65d3b Post: After [36319], add `$post` parameter to the `get_the_excerpt` filter.
Props sebastian.pisula.
Fixes #35474.
Built from https://develop.svn.wordpress.org/trunk@36321


git-svn-id: http://core.svn.wordpress.org/trunk@36288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:28:26 +00:00
Pascal Birchler 1bad16273e Add tests missed and announced in [36319].
See #27246.
Built from https://develop.svn.wordpress.org/trunk@36320


git-svn-id: http://core.svn.wordpress.org/trunk@36287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 14:50:30 +00:00
Pascal Birchler 10be93190e Posts: Add a `$post` parameter to `get_the_excerpt()`.
This allows getting the excerpt for a specific post, similar to how most other template tags work.
A deprecation notice is thrown if a boolean value is passed, which is deprecated since 2.3 and has not been used for a long time.
Adds unit tests.

Fixes #27246.
Built from https://develop.svn.wordpress.org/trunk@36319


git-svn-id: http://core.svn.wordpress.org/trunk@36286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 14:47:26 +00:00
Pascal Birchler 19d4304565 Comments: Add a new `pre_wp_update_comment_count_now` filter.
This allows filtering a post's comment count before it is queried and updated in the database.

Props peterwilsoncc for initial patch.
Fixes #35060.
Built from https://develop.svn.wordpress.org/trunk@36318


git-svn-id: http://core.svn.wordpress.org/trunk@36285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 13:42:26 +00:00
Eric Lewis ededb78efc Docs: Use "site" rather than "blog" in `get_current_blog_id()` docs.
Fixes #35415.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 13:18:27 +00:00
Pascal Birchler 68f12521c8 Post Types: Introduce `unregister_post_type()`.
This new function can be used to completely unregister non built-in post types.

Fixes #14761.
Built from https://develop.svn.wordpress.org/trunk@36316


git-svn-id: http://core.svn.wordpress.org/trunk@36283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 12:20:27 +00:00
Pascal Birchler a6aa15a445 Build Tools: Append the timestamp to `$wp_version` instead of only the current date.
This ensures the `Etag` header added in [36312] changes for every build.

Fixes #28722.
Built from https://develop.svn.wordpress.org/trunk@36315


git-svn-id: http://core.svn.wordpress.org/trunk@36282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 11:54:26 +00:00
Dominik Schilling c5e3716c11 Docs: Fix `@return` type for `wp_get_current_user()` after [36313].
See #19615.
Built from https://develop.svn.wordpress.org/trunk@36314


git-svn-id: http://core.svn.wordpress.org/trunk@36281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 11:16:26 +00:00
Pascal Birchler 9cd880d356 Users: Always return `$current_user` in `wp_get_current_user()`, never a boolean.
Fixes unit tests affected by [36311].

See #19615.
Built from https://develop.svn.wordpress.org/trunk@36313


git-svn-id: http://core.svn.wordpress.org/trunk@36280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 10:47:25 +00:00
Pascal Birchler 9ea68bc533 Script Loader: Add `Etag: $wp_version` header in `load-scripts.php` and `load-styles.php`.
This improves performance since browsers won't re-download the scripts and styles when there was no change in `$wp_version`.

Props sergej.mueller, dd32, swissspidy.
Fixes #28722.
Built from https://develop.svn.wordpress.org/trunk@36312


git-svn-id: http://core.svn.wordpress.org/trunk@36279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 10:23:25 +00:00
Pascal Birchler 283684b616 Users: Deprecate the `get_currentuserinfo()` pluggable function.
It encourages an ugly pattern like `global $userdata; get_currentuserinfo();` in plugins/themes. `wp_get_current_user()` should be used instead, e.g. `$current_user = wp_get_current_user();`.

Props scribu for initial patch.
Fixes #19615.
Built from https://develop.svn.wordpress.org/trunk@36311


git-svn-id: http://core.svn.wordpress.org/trunk@36278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 10:16:27 +00:00
Pascal Birchler 16142a461e Filesystem API: Add a filter to `wp_unique_filename()`.
Props SergeyBiryukov, MikeHansenMe, johnbillion, swissspidy.
Fixes #19121.
Built from https://develop.svn.wordpress.org/trunk@36310


git-svn-id: http://core.svn.wordpress.org/trunk@36277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 09:39:26 +00:00
Pascal Birchler 6951e8d045 Taxonomy: Fix unit tests after [36308].
See #34988.
Built from https://develop.svn.wordpress.org/trunk@36309


git-svn-id: http://core.svn.wordpress.org/trunk@36276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 09:13:26 +00:00
Pascal Birchler 27fa2f65eb Taxonomy: Introduce `wp-admin/term.php` for editing single terms.
This is similar to `edit.php` -> `post.php` and `users.php` -> `user-edit.php` and fixes a bug where screen options for the list table were shown while editing a term.

Fixes #34988.
Built from https://develop.svn.wordpress.org/trunk@36308


git-svn-id: http://core.svn.wordpress.org/trunk@36275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 08:27:27 +00:00
Pascal Birchler b0b13aff2f Embeds: Allow embedding static front pages and pages having a child page with an `embed` slug.
This makes `embed` a special slug that can't be used for new pages/posts. When `https://example.com/foo/embed/` is an existing page, embeds fall back to `https://example.com/foo/?embed=true`.
Adds unit tests.

Fixes #34971.
Built from https://develop.svn.wordpress.org/trunk@36307


git-svn-id: http://core.svn.wordpress.org/trunk@36274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 07:56:26 +00:00
Pascal Birchler b9fd40a8cb Users: Decode special characters in password and email change notification emails.
Fixes #35283.
Built from https://develop.svn.wordpress.org/trunk@36306


git-svn-id: http://core.svn.wordpress.org/trunk@36273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 07:29:27 +00:00
Eric Lewis 207ba54fed In wp.Backbone.Subviews, extract subviews with proper Underscore.js functions.
Subviews are stored internally on the Subview manager as an object. The object 
is composed of key-value pairs where the key is a jQuery selector for a view,
and the value is an array of views that matching the selector.

To extract subviews, `_.flatten()` was used to collate the nested arrays of 
views into a single view. However, `_.flatten()` is not intended to be used 
for objects, and this unintended functionality breaks in newer versions of 
Underscore.js. 

Instead, we'll use `_.values()` to extract the arrays of views first, 
and then flatten the array of arrays.

Props adamsilverstein.
See #34350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 04:02:28 +00:00
Andrea Fercia e41649c325 Accessibility: Improve focus handling on the Taxonomies Quick Edit.
Moves focus back to a proper place when saving or closing the form.

Fixes #35460.
Built from https://develop.svn.wordpress.org/trunk@36304


git-svn-id: http://core.svn.wordpress.org/trunk@36271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 23:03:26 +00:00
Andrea Fercia c6ec579751 Accessibility: Improve focus handling and audible feedback on the Posts Quick-Bulk Edit.
Avoids a focus loss when saving or closing the form moving focus back to a proper place.
Uses `wp.a11y.speak()` to dispatch successful edits and error messages to screen readers.

Fixes #34756.
Built from https://develop.svn.wordpress.org/trunk@36303


git-svn-id: http://core.svn.wordpress.org/trunk@36270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 22:58:27 +00:00
Pascal Birchler aaa11d6207 Allow searching for `0` throughout the admin.
Fixes #31025.
Built from https://develop.svn.wordpress.org/trunk@36302


git-svn-id: http://core.svn.wordpress.org/trunk@36269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 20:06:25 +00:00
Pascal Birchler d4b30f47bf Plugins: Prevent a warning when searching in the plugins list table.
After [36182], plugin data contains compatibility info from the API, which is an array and cannot be searched.

Fixes #35461.
Built from https://develop.svn.wordpress.org/trunk@36301


git-svn-id: http://core.svn.wordpress.org/trunk@36268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 20:00:29 +00:00
Drew Jaynes ca94aafb50 Docs: Add a changelog entry to the DocBlock for `get_post_type_archive_link()` denoting that posts support was added in 4.5.
See [36225]. See #19902.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 17:56:27 +00:00
Drew Jaynes 383b9a44de Docs: Adjust formatting for an added-parameter changelog entry in the hook doc for the `cron_request` filter.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 17:30:28 +00:00
Andrea Fercia 2d76f3cb83 Accessibility: Remove title attributes from the Comments screen.
Fixes #35304.
Built from https://develop.svn.wordpress.org/trunk@36298


git-svn-id: http://core.svn.wordpress.org/trunk@36265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 16:04:27 +00:00
Pascal Birchler ded3a1d72f Plugins: Make sure the 'Beta testing' tab is first in the plugin installer.
This makes feature plugins more discoverable for people running development builds.

Fixes #29631.
Built from https://develop.svn.wordpress.org/trunk@36297


git-svn-id: http://core.svn.wordpress.org/trunk@36264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 09:07:26 +00:00
Pascal Birchler 08693cd206 Administration: After [36295], mark `postBoxL10n` as a global to please JSHint.
See #26399.
Built from https://develop.svn.wordpress.org/trunk@36296


git-svn-id: http://core.svn.wordpress.org/trunk@36263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 08:40:26 +00:00
John Blackbourn 9ae1736d01 Administration: Add a "Drag boxes here" message to empty dashboard meta boxes so it's clear to users that it's possible to drag meta boxes into empty spaces.
Props xavortm
Fixes #26399

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


git-svn-id: http://core.svn.wordpress.org/trunk@36262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 04:13:26 +00:00
Joe Hoyle 0f9b770b6c Add response status code aliases on WP_Http for convenience.
These provide a more descriptive way to set response codes elsewhere,
so it's readable and less chance for the wrong response code to be
used such as 401 vs 403.

Props rmccue for the idea.
Fixes #35426.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 03:16:27 +00:00
John Blackbourn 55bbcf0391 Networks and Sites: Clarify the docblock for `get_current_site()` so it's clear that it returns the current network object, not anything to do with the current site. As a further exercise, the reader is invited to fix the nomenclature surrounding blogs, sites, and networks in WordPress.
Props ericlewis
Fixes #35414

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


git-svn-id: http://core.svn.wordpress.org/trunk@36260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 00:02:25 +00:00
John Blackbourn d6228b95b0 I18N: Introduce tests for `WP_Locale`.
Props realloc, swissspidy
Fixes #34688

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


git-svn-id: http://core.svn.wordpress.org/trunk@36259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 23:50:26 +00:00
Andrea Fercia 7ab88221fa Customizer: Aggregate similar CSS rules.
Fixes #34333.
Built from https://develop.svn.wordpress.org/trunk@36291


git-svn-id: http://core.svn.wordpress.org/trunk@36258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 22:36:26 +00:00
John Blackbourn 045d7d3a18 I18N: Correct an argument description and return value for `wp_dropdown_languages()`.
Props realloc
See #35294

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


git-svn-id: http://core.svn.wordpress.org/trunk@36257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 20:33:25 +00:00
John Blackbourn e56457f7fe Taxonomy: Correct the accetped types for the `taxonomy` element in the arguments passed to `wp_dropdown_categories()`.
Props grapplerulrich
Fixes #35446

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


git-svn-id: http://core.svn.wordpress.org/trunk@36256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 20:16:29 +00:00
Dominik Schilling 9cd5b76fbd jQuery: Replace `$( document ).on( 'ready', fn )` with `$( fn )`.
The 'ready' event is deprecated since jQuery 1.8.

See https://github.com/jquery/jquery-migrate/blob/1.3.0/warnings.md#jqmigrate-ready-event-is-deprecated.
See #35380.
Built from https://develop.svn.wordpress.org/trunk@36288


git-svn-id: http://core.svn.wordpress.org/trunk@36255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 17:39:25 +00:00
Dominik Schilling b7df807589 jQuery: Replace use of the `.load()` method for the "load" event with `.on( 'load', handler )`.
The shortcut is deprecated since jQuery 1.8.

See http://api.jquery.com/load-event/.
See #35380.
Built from https://develop.svn.wordpress.org/trunk@36287


git-svn-id: http://core.svn.wordpress.org/trunk@36254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 17:22:27 +00:00
Dominik Schilling b3d8732c17 jQuery: Replace the use of the `.size()` method with the `.length` property.
The `.size()` method is deprecated since jQuery 1.8. The `.length` property is preferred because it doesn't have the overhead of a function call.

See https://api.jquery.com/size/.
See #35380.
Built from https://develop.svn.wordpress.org/trunk@36286


git-svn-id: http://core.svn.wordpress.org/trunk@36253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 16:17:27 +00:00
Dominik Schilling b1a9983584 External Libraries: Update jQuery to 1.12.0 and jQuery Migrate to 1.3.0.
jQuery:
* Release post: http://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/
* Changes: https://github.com/jquery/jquery/compare/1.11.3...1.12.0

jQuery Migrate:
* Release post: http://blog.jquery.com/2016/01/13/jquery-migrate-1-3-0-released/
* Changes: https://github.com/jquery/jquery-migrate/compare/1.2.1...1.3.0

See #35380.
Built from https://develop.svn.wordpress.org/trunk@36285


git-svn-id: http://core.svn.wordpress.org/trunk@36252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 15:52:26 +00:00
Dominik Schilling b8f2a138e7 Set `svn:eol-style` to native on "jquery-migrate.js" and "jquery-migrate.min.js".
Built from https://develop.svn.wordpress.org/trunk@36284


git-svn-id: http://core.svn.wordpress.org/trunk@36251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 15:45:28 +00:00
Dominik Schilling 0a6f311922 Plugins: In `_get_plugin_data_markup_translate()` remove the fallback to the "default" textdomain for Akismet.
Akismet has its own language files since WordPress 3.9.

Props jrf.
Fixes #35436.
Built from https://develop.svn.wordpress.org/trunk@36283


git-svn-id: http://core.svn.wordpress.org/trunk@36250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-13 13:56:26 +00:00