Commit Graph

9312 Commits

Author SHA1 Message Date
Andrew Ozz
ed2e427b9d TinyMCE: remove the numbers (2-6) after the headings in the drop-down. These are previews for the actual styling of headings in the editor.
See #27159.
Built from https://develop.svn.wordpress.org/trunk@38939


git-svn-id: http://core.svn.wordpress.org/trunk@38882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 01:42:48 +00:00
John Blackbourn
b4db9fbe3d Build/Test Tools: Continue eliminating randomness in tests.
See #37371

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


git-svn-id: http://core.svn.wordpress.org/trunk@38881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 01:24:43 +00:00
Andrew Ozz
5dda286548 TinyMCE: adjust the shortcuts position and font size in the Formats drop-down to better match the shortcuts in the buttons tooltips.
See #38063.
Built from https://develop.svn.wordpress.org/trunk@38937


git-svn-id: http://core.svn.wordpress.org/trunk@38880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 00:37:30 +00:00
Jeremy Felt
a545afb331 Multisite: Deprecate the blog_details filter.
`get_site()` has replaced `get_blog_details()` throughout core and is the recommended way to retrieve a current or single site object.

The `blog_details` filter is applied when full details are requested from `get_blog_details()`.

To ensure backwards compatibility in the switch to `get_site()`, this `blog_details` filter is now applied in `WP_Site::get_details()` and marked as deprecated with a note to rely instead on the `site_details` filter introduced in 4.6.

Props flixos90.
See #37102.
Fixes #38491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 23:44:30 +00:00
Jeremy Felt
78fc0386af Multisite: Use get_site() in tests where get_blog_details() is not tested.
Remaining tests either rely on the `blog-details` cache key or test `get_blog_details()` itself.

Props flixos90.
Fixes #38497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 23:04:30 +00:00
Jeremy Felt
a4e98f7cb9 Multisite: Replace get_blog_details() in wp_xmlrpc_server::_multisite_getUsersBlogs().
Use `get_site()` instead.

Props flixos90.
Fixes #38350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:54:35 +00:00
Weston Ruter
02ce8db6de Customize: Add explanatory note for custom_css control via textarea[placeholder] and expose any defined input_attrs on such textarea controls.
Props melchoyce, westonruter, celloexpressions.
See #37439.
Fixes #38493.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:52:10 +00:00
Andrew Ozz
e1ae827577 TinyMCE: remove and rearrange some of the editor buttons to improve user experience.
Props hugobaeta, melchoyce, celloexpressions, mor10, iseulde, mrwweb.
See #27159.
Built from https://develop.svn.wordpress.org/trunk@38932


git-svn-id: http://core.svn.wordpress.org/trunk@38875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:51:36 +00:00
Weston Ruter
8d1cb3068a Customize: Add hue-only mode to color picker.
The color control in the customizer can use the new mode by supplying the `mode` param with `hue` (as opposed to the new default `full` value). New control replaces the `range` control in Twenty Seventeen for `colorscheme_hue`. The `wpColorPicker` can opt for hue-only mode via supplying `hue` as the `type` option. Iris Color Picker is updated from v1.0.7 to v1.1.0-beta.

Props mattwiebe, celloexpressions.
Fixes #38263.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:33:30 +00:00
Dominik Schilling
e048613585 Tests: Update language files to include a Language header.
See #26511.
Built from https://develop.svn.wordpress.org/trunk@38930


git-svn-id: http://core.svn.wordpress.org/trunk@38873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:26:29 +00:00
John Blackbourn
1e6a12db38 Feeds: Don't attempt to generate RSS feeds for invalid feed URLs such as wp-content/feed.
Props stevenkword, JRGould, lyubomir_popov, johnbillion
Fixes #30210

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


git-svn-id: http://core.svn.wordpress.org/trunk@38872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 21:54:31 +00:00
Dominik Schilling
7cce73a634 General: Introduce a wp_list_sort() helper function, v2.
In addition to `wp_list_filter()` for filtering a list of objects, and `wp_list_pluck()` for plucking a certain field out of each object in a list, this new function can be used for sorting a list of objects by specific fields. These functions are now all contained within the new `WP_List_Util()` class and `wp_list_sort()` is used in various parts of core for sorting lists.

This was previously committed in [38859] but got reverted in [38862] and [38863]. To fix the previous issues, `wp_list_sort()` supports now an additional argument to preserve array keys via `uasort()`.

Props flixos90, DrewAPicture, jorbin.
Fixes #37128.
Built from https://develop.svn.wordpress.org/trunk@38928


git-svn-id: http://core.svn.wordpress.org/trunk@38871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 21:26:32 +00:00
John Blackbourn
d151e08aa6 Feeds: Greatly reduce the number of dummy posts that are generated for the Atom tests, following on from [38924].
See #35160

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


git-svn-id: http://core.svn.wordpress.org/trunk@38870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:59:30 +00:00
Weston Ruter
54465a68db Customize: Fix logic inversion in determining whether a URL is previewable which prevented previewing anything but homepage.
Fixes regression introduced in [38890].

See #38409.
Fixes #38492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:53:29 +00:00
Rachel Baker
2f263fce99 Feeds: Always return a valid timestamp for the Last-Modified header of comment or post feeds.
Fixes bug where an invalid Last-Modified value would be returned in feed requests for sites that had 0 items to return. Comment or post feeds will now return the current timestamp as the Last-Modified header value.  Example: a request for the comments feed for a site without any comments.

Replaced use of the local static variable `$cache_lastcommentmodified` to store the modified date in `get_lastcommentmodified()` with the Object Cache API.  The `get_lastcommentmodified()` function returns early if there is a cached value and returns `false` if there where no comments found. Introduced `_clear_modified_cache_on_transition_comment_status()` to flush the `lastcommentmodified` cache key when a comment enters or leaves approval status. In `get_lastpostmodified()` return early if there is a cached value and return `false` if there are no posts found.

Props swissspidy, rachelbaker, dllh, leobaiano.
Fixes #38027.
Built from https://develop.svn.wordpress.org/trunk@38925


git-svn-id: http://core.svn.wordpress.org/trunk@38868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:48:29 +00:00
John Blackbourn
92dfd29aee Feeds: Greatly reduce the number of dummy posts that are generated for the RSS2 tests. This speeds the tests up.
See #35160, #30210

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


git-svn-id: http://core.svn.wordpress.org/trunk@38867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:17:37 +00:00
Dominik Schilling
c40eadefb2 Embeds: Realign the provider list after [38693].
See #38003.
Built from https://develop.svn.wordpress.org/trunk@38923


git-svn-id: http://core.svn.wordpress.org/trunk@38866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:16:56 +00:00
Dominik Schilling
1159185401 Upgrade: Realign $_new_bundled_files after [38921].
Built from https://develop.svn.wordpress.org/trunk@38922


git-svn-id: http://core.svn.wordpress.org/trunk@38865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:04:31 +00:00
Dominik Schilling
6e08d8303d Upgrade: Add Twenty Seventeen to $_new_bundled_files.
This indicates that Twenty Seventeen should be installed with a WordPress upgrade.

See #38372.
Built from https://develop.svn.wordpress.org/trunk@38921


git-svn-id: http://core.svn.wordpress.org/trunk@38864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:03:03 +00:00
Dominik Schilling
3db5fa6c90 Nav Menus: Update help text to include the two latest default themes, Twenty Sixteen and Twenty Seventeen.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38920


git-svn-id: http://core.svn.wordpress.org/trunk@38863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:02:32 +00:00
Dominik Schilling
652742bf0a Install: Update sidebars_widgets option for Twenty Seventeen to match its three sidebars.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38919


git-svn-id: http://core.svn.wordpress.org/trunk@38862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:01:13 +00:00
David A. Kennedy
df7e53707e Twenty Seventeen: Refresh color patterns for changes in style.css
This brings the custom colors CSS in line with the stylesheet. Some selectors were missing since many changes occurred in `style.css` a few days before the original merge to Core.

Props celloexpressions, laurelfulford.

Fixes #38389.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:00:42 +00:00
Jeremy Felt
5981dd3107 REST API: Adjust test_get_items_invalid_status_param_is_discarded() after [38911].
Previously, if an invalid post status was assigned to a media object, the object would be returned with an unchanged status. After [38911], an error response is returned.

The assertion in test_get_items_invalid_status_param_is_discarded() needs to be updated to account for the expected error response. The test name has been changed to `test_get_items_invalid_status_param_is_error_response()`.

Fixes #38417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 19:34:30 +00:00
Jeremy Felt
8972cb70b6 Options: Make $passed_default available in remaining default_option_{$option} filter.
Pass `false` as the `$passed_default` value when the `default_option_{$option}` filter is applied in `update_option` as no default is ever passed.

This resolves an error in tests where the 3rd parameter is not available to `filter_default_option()`.

Fixes #38176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 19:23:32 +00:00
Jeremy Felt
680f14fcd1 Multisite: Replace get_blog_details() in wp-includes/ms-blogs.php with get_site().
Props flixos90.
See #37102.
Fixes #38351.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 18:50:30 +00:00
Jeremy Felt
84f25462e1 Multisite: Replace get_blog_details() in get_active_blog_for_user() with get_site().
Props flixos90.
Fixes #38355.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 18:06:29 +00:00
Jeremy Felt
4c0d82d653 Multisite: Introduce tests for get_active_blog_for_user().
Props flixos90.
See #38355.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 18:03:29 +00:00
Andrea Fercia
48b12e9dd6 Menus: Improve the HTML semantics of the "Menu Settings" section.
- removes the previous markup based on a definition list
- groups checkboxes in `fieldset` elements with a `legend`
- simplifies the CSS lowering selectors specificity

Props xavortm.

Fixes #38023.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 17:29:30 +00:00
Joe Hoyle
e8a311ed02 REST API: Validate posts status enum
Currently we are using a different validate callback, so the `enum` is not interpretted. We just have to fallback to the result of `rest_validate_request_arg` in our custom wrapper function.

Fixes #38417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 17:13:28 +00:00
Joe Hoyle
5f777155f2 Options: Add 'default' to register_setting
Add a `default` argument to `register_setting` that will be used an the default option value viet `get_option()` in the event of no other option being specified. This means (if chosen) developers can define their default once via `register_option` and not have to duplicate the value every time they make a call to `get_option()`.

Props rmccue, jorbin, jtsternberg.
Fixes #38176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 17:08:29 +00:00
Tammie Lister
67dbadd476 Twenty Seventeen: Display scroll down arrow when no menu
This improves scrollability without a menu.

Props nnaimov, melchoyce, davidakennedy
Fixes #38392


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


git-svn-id: http://core.svn.wordpress.org/trunk@38852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 16:51:35 +00:00
Gary Pendergast
a62d04afd6 Tests: Fix a PHP notice introduced in [38907].
`WP_DEFAULT_THEME` was being defined in the wrong location.

Also, if WordPress has the original "default" theme installed, ensure that our test theme overrides it.

Props swissspidy for daring to dive into Themes of WordPress Past.
See #31550, #38457.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 11:06:30 +00:00
Gary Pendergast
3ce2dd4131 Tests: Use a minimal theme for tests.
This functionality was originally added in [38858], using `symlink()` to put a link to the theme in WordPress' `themes` directory. Unfortunately, not all installs have write access to the `themes` directory, causing unit tests to fail.

The new method is to add the test theme directory to `$wp_theme_directories`, and fix the handful of tests that don't expect `$wp_theme_directories` to have multiple entries.

The test install/bootstrap routines now also check that `WP_DEFAULT_THEME` is defined, in case the tests are being run on a system that hasn't upgraded its' `wp-tests-config.php`.

See #31550.
Fixes #38457.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 10:25:53 +00:00
Weston Ruter
30a71555cb Customize: Allow page stubs to be created via dropdown-pages controls in the Static Front Page section.
This ability was previously added to nav menus via the available page items panel. The "Add New Page" button only appears when the `allow_addition` control param is supplied as `true`. Code is adapted from the Customize Posts feature plugin.

Props celloexpressions, westonruter.
See #38013, #34923.
Fixes #38164.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 06:31:31 +00:00
Jeremy Felt
6a0ca394e8 Multisite: Replace get_blog_details() with get_site() in is_user_member_of_blog().
Props flixos90.
Fixes #38358.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 06:02:35 +00:00
Jeremy Felt
6e1c166dfb Multisite: Replace get_blog_details() in ms_site_check() with get_site().
Props flixos90.
Fixes #38357.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 05:55:30 +00:00
Jeremy Felt
390dc4b345 Multisite: Replace get_blog_details() in add_user_to_blog() with get_site().
Adds tests for `add_user_to_blog()`.

Props flixos90.
Fixes #38356.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 05:49:29 +00:00
Jeremy Felt
749b480de0 Multisite: Replace get_blog_details() with get_site() in get_dashboard_blog().
Props dipesh.kakadiya.
Fixes #38353.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 05:05:33 +00:00
Weston Ruter
afe90360b5 Customize: Prevent absent site icon link from outputting an empty string as href in customizer; use /favicon.ico as fallback.
An empty string causes some browsers to use the current URL as the `href`. When using `history.replaceState()` Chrome will re-fetch the favicon with each call, meaning that `customize.php` gets hit with wasted requests which tax the server.

Fixes #38377.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 04:47:29 +00:00
Weston Ruter
a1777db166 Customize: Skip attaching expansion event handlers to section containers with the cannot-expand class.
Props kkoppenhaver, celloexpressions.
Fixes #37980.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 04:36:39 +00:00
Dion Hulse
0314e29667 Drop the requirement for the entry points to WordPress to be parsable by PHP4.
Previously we ensured that the entry points to WordPress were parsable by PHP4 in order to display a friendly not-supported-php error message.
However, for the last two years the main entry points have not actually parsed, and we've only added extra parse errors since it last worked in 3.9, so it's time we just remove this 'feature'.
The PHP version checks are still there for PHP 5.0/5.1, and so it's inplace when we eventually drop PHP 5.2 support.

See #29489.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 03:15:30 +00:00
Dion Hulse
2b788037c7 Upgrade: Don't fail a core update just because readme.html or license.txt couldn't be modified.
A number of locked down installs remove `readme.html` or make it inaccessible which would result in an update failure.

Props polevaultweb for the initial patch.
Fixes #31420.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 02:24:31 +00:00
Andrew Ozz
913926c1bd TinyMCE: make keyboard shortcuts more discoverable by adding them to the buttons tooltips and in the Formats drop-down.
Props mor10, azaozz.
Fixes #38063.
Built from https://develop.svn.wordpress.org/trunk@38897


git-svn-id: http://core.svn.wordpress.org/trunk@38840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 01:40:31 +00:00
Dion Hulse
7d24c2cb2a Revert the svn:ignore changes in [38394] which was missed in the original revert.
See #36335

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


git-svn-id: http://core.svn.wordpress.org/trunk@38839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 01:13:29 +00:00
Dion Hulse
7ac6b18d89 HTTP: Call mbstring_binary_safe_encoding() before making a request with Requests to avoid issues with mbstring.func_overload.
Props SergeyBiryukov.
Fixes #38226.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 00:45:29 +00:00
Dion Hulse
e8211f783a Docs: Correct a number of typos/spelling mistakes in inline comments.
Props ottok.
Fixes #38464.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 00:38:35 +00:00
Tammie Lister
23a4550b0d Twenty Seventeen: Resolves the pin icon having variations
This fixes the pin icon having variations in position and size depending on screen and device. 

Props metodiew, mbelchev, davidakennedy
Fixes #38407


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


git-svn-id: http://core.svn.wordpress.org/trunk@38835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 22:31:12 +00:00
Andrew Ozz
1a7a00d14f TinyMCE: change the icon and tooltip for the remove link button in the inline link toolbar.
Props hardeepasrani, ocean90, magicroundabout, iseulde.
Fixes 37278.
Built from https://develop.svn.wordpress.org/trunk@38891


git-svn-id: http://core.svn.wordpress.org/trunk@38834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 21:59:22 +00:00
Weston Ruter
885d1dd89d Customize: Harden url matching to account for varying ports and ensuring matching base pathname for allowed urls
Fixes #38409.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 20:07:31 +00:00
Weston Ruter
1129311849 Customize: Fix live preview button in theme details modal so it includes target theme.
Fixes issue introduced in [38813].

Props celloexpressions.
See #37661.
Fixes #38475.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 19:15:29 +00:00
Tammie Lister
e2c22fa367 Twenty Seventeen: iPad mini, iPhone 5 search form rendering issues fix
On the these devices, there is an issue with the button rendering for the search form. This resolves that.

Props Caspie, alex27, davidakennedy
Fixes #38396


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


git-svn-id: http://core.svn.wordpress.org/trunk@38831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 19:11:35 +00:00
Weston Ruter
d93636bd11 Customize: Disable theme installation in multisite.
Props celloexpressions, iamfriendly.
Fixes #38370.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 18:17:39 +00:00
David A. Kennedy
5452a6a21d Twenty Seventeen: Fix smooth scrolling skip link
The link was scrolling too far. The main problem was that the `menuTop` variable lost it's initial definition of `0`, so all future subtractions were failing.

Props tywayne.

Fixes #38448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 17:59:47 +00:00
Tammie Lister
bb91701a02 Twenty Seventeen: Fixes incorrect use of _x()
There is an incorrect use in twentyseventeen_posted_on(). This fixes that.

Props ocean90, dineshc, mbelchev, davidakennedy
Fixes #38383


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


git-svn-id: http://core.svn.wordpress.org/trunk@38828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 17:27:51 +00:00
John Blackbourn
2dfc3a7572 General: Correct the docs for the default HTTP status code used by wp_die().
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 13:13:58 +00:00
Gary Pendergast
b21d1cb6e6 General: Check to see that the PHP-XML module is enabled before using XML functions.
There are a handful of places where we don't check that the XML functions exist before we use them. Ubuntu's PHP 7 packages don't include PHP-XML by default, increasing the chance of this causing issues.

Props kraftbj, markoheijnen.
Fixes #37122.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 04:45:31 +00:00
Gary Pendergast
efaf9bae66 Menus: Add the menu-item-home class to the static front page.
When a site is using a static front page, and that page is in a menu, it isn't given the CSS class `menu-item-home`, contrary to the developer documentation.

Props christophherr.
Fixes #35272.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 00:32:32 +00:00
Andrea Fercia
46bae0275c Customize: Keep previously uploaded header images in place.
On the Header Image section, the previously uploaded images disappeared off-screen
when using the keyboard to navigate and the remove "X" button got keyboard focus.
Changing the off-screen CSS technique used for the "X" buttons fixes it.

- improves the focus style on the previously uploaded and suggested images
- removes a `tabindex="0"` attribute from the current header image

Fixes #38156.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 19:57:32 +00:00
Andrea Fercia
5c555e5d10 Accessibility: Improve the Tags meta box accessibility.
- changes the "X" links in buttons, improves their color contrast ratio and focus style
- adds screen reader text "Remove item: + tagname"
- uses `wp.a11y.speak()` to give screen reader users feedback when adding/removing tags
- makes the `tagcloud-link` toggle a button, with an `aria-expanded` attribute to indicate the tag cloud collapsed/expanded state
- changes colors for the autocomplete highlighted option in order to have a better color contrast ratio
- reduces the font size for the autocomplete on Press This
- removes CSS related to the old `suggest.js` from Press This

Props joedolson, cgrymala, azaozz, afercia.
Fixes #27555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 18:16:42 +00:00
John Blackbourn
4e65c0cfb4 REST API: Correct a documentation typo.
Props Zuige
Fixes #38458
See #38456

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


git-svn-id: http://core.svn.wordpress.org/trunk@38822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 15:56:30 +00:00
John Blackbourn
f96940f574 REST API: Correct a documentation typo.
Props Zuige
Fixes #38458

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


git-svn-id: http://core.svn.wordpress.org/trunk@38821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 15:52:40 +00:00
Aaron Campbell
3a761adbd7 Shortcodes: Add new strip_shortcodes_tagnames filter.
With the new `strip_shortcodes_tagnames` filter you can specify which shortcodes are stripped by `strip_shortcodes()`. The default is all registered shortcodes.

Props DylanAuty, orvils, swissspidy.
Fixes #37767.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 14:25:31 +00:00
Dominik Schilling
8b3c9607e5 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.

Props dave.pullig.
Fixes #38451.
Built from https://develop.svn.wordpress.org/trunk@38876


git-svn-id: http://core.svn.wordpress.org/trunk@38819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 14:02:31 +00:00
Tammie Lister
dc35c19f60 Twenty Seventeen: Renaming of directory structure
This changes components directory to be called template-parts. Changes reflected in all files that call those sections.

Props bronsonquick, dd32

Fixes #38375

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


git-svn-id: http://core.svn.wordpress.org/trunk@38818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 12:29:30 +00:00
Tammie Lister
05e4d10851 Revert [38873]: Commit does not keep file history due to deleted directory
The last commit to change directory structure for Twenty Seventee, didn't keep the file history so reverting in favour of doing that.

Props Ocean90

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


git-svn-id: http://core.svn.wordpress.org/trunk@38817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 12:23:41 +00:00
Tammie Lister
552b119431 Twenty Seventeen: Renaming of directory structure
This changes components directory to be called template-parts. Changes reflected in all files that call those sections.

Props bronsonquick, dd32

Fixes #38375

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


git-svn-id: http://core.svn.wordpress.org/trunk@38816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 12:07:32 +00:00
Tammie Lister
85d3ca7940 Twenty Seventeen: Remove whitelisting comments for PHP_Codesniffer
Some comments to whitelist PHP_CodeSniffer errors were left in the theme as on GitHub it intergrated with Travis testing. Those are now removed in this patch.

props davidakennedy

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


git-svn-id: http://core.svn.wordpress.org/trunk@38815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 11:06:31 +00:00
Pascal Birchler
5eb3ed3499 Date/Time: Fix unit tests after [38804].
The tests for `date_i18n()` need to use a delta for comparing timestamps.

Fixes #38381. See #37910.
Built from https://develop.svn.wordpress.org/trunk@38871


git-svn-id: http://core.svn.wordpress.org/trunk@38814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 07:19:40 +00:00
Peter Wilson
8db6c6c4ef Bundled theme: Add preconnect to fonts.gstatic.com in 2012-15 themes.
Add preconnect hinting for `https://fonts.gstatic.com` in the bundled themes using Google fonts. WordPress versions 4.7+ include a crossorigin attribute, earlier versions will not.

Props leobaiano, swissspidy, peterwilsoncc.
Fixes #37171.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 01:56:32 +00:00
Peter Wilson
e73ba84b04 Emoji: Load polyfill responsibly.
Improve performance of Emoji tests and loading of the polyfill.

Reduces the number of tests to determine browser support for emoji to those most likely to fail. Adds the defer flag to the loaded scripts for browsers lacking support.

Props superpoincare for perf testing, peterwilsoncc.
Fixes #37817.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 00:00:34 +00:00
David A. Kennedy
e58856bbd0 Twenty Seventeen: Display featured image on static front page
This improves UX, since an image added will be displayed on front end as opposed to not at all. This fix added the front page's featured image above the front page content, similar to how it's handled in the other panels. Also it removed code that was setting the front page's featured image as a fallback to the custom header, and updated the conditions that add the `has-header-image` to remove reference to the front page's featured image.

Props laurelfulford.

Fixes #38402.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 22:15:50 +00:00
David A. Kennedy
0794b2489b Twenty Seventeen: Add theme support for customize selective refresh widgets
Props celloexpressions.

Fixes #38400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 21:48:48 +00:00
David A. Kennedy
222240c4da Twenty Seventeen: Fix spacing issue on pages with comments
This effected the two column layout on pages. The entry content and comment areas needed to be floated and cleared properly.

Props laurelfulford.

Fixes #38388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 20:51:53 +00:00
David A. Kennedy
36f6079b15 Twenty Seventeen: Add post author comment styles
Currently, it's hard to output an SVG in the comment function without a lot of extra effort. So this adds a simple border to the author avatar and removes previous code related to SVGs and/or Genericons.

Props laurelfulford.

Fixes #38403.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 20:37:34 +00:00
Rachel Baker
cdce9d5dac REST API: Allow comments to be created setting the user_agent parameter.
As of WordPress 4.3 the `wp_new_comment()` function has been updated to allow the comment_agent value to be set when a comment is created. The comments API endpoint now allows the comment author's user agent to be set when creating a comment.
Also, the `readonly` property on the `author_user_agent` parameter in the schema was removed.

Props rabmalin for the initial patch.
Fixes #38425.
Built from https://develop.svn.wordpress.org/trunk@38864


git-svn-id: http://core.svn.wordpress.org/trunk@38807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 18:28:32 +00:00
Dominik Schilling
6c8508023f Revert [38859] due to an incomplete implementation.
See https://core.trac.wordpress.org/ticket/37128#comment:27.
See #37128.
Built from https://develop.svn.wordpress.org/trunk@38863


git-svn-id: http://core.svn.wordpress.org/trunk@38806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 17:01:32 +00:00
Weston Ruter
2e173f9e44 Customize: Revert part of [38859] which caused sections to get deactivated in the customizer.
See #37128.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 16:17:41 +00:00
John Blackbourn
e099b4d947 Role/Capability: Add tests for the exist user capability.
See #38236

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


git-svn-id: http://core.svn.wordpress.org/trunk@38804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 14:12:32 +00:00
John Blackbourn
16ccab2ef9 Role/Capability: Improve the test which asserts that a user can edit their own profile.
All users can edit their own profile, as this ability is not linked to an explicit capability. Technically, it should map to the `exist` capability, which will be addressed at a later date.

See #31518 

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


git-svn-id: http://core.svn.wordpress.org/trunk@38803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 13:47:33 +00:00
Pascal Birchler
f54558e75b General: Introduce a wp_list_sort() helper function.
In addition to `wp_list_filter()` for filtering a list of objects, and `wp_list_pluck()` for plucking a certain field out of each object in a list, this new function can be used for sorting a list of objects by specific fields. These functions are now all contained within the new `WP_List_Util()` class and `wp_list_sort()` is used in various parts of core for sorting lists.

Props flixos90, DrewAPicture, jorbin.
Fixes #37128.
Built from https://develop.svn.wordpress.org/trunk@38859


git-svn-id: http://core.svn.wordpress.org/trunk@38802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 11:12:51 +00:00
Gary Pendergast
7d9563801a Tests: Use a minimal theme for tests.
New default themes require workarounds being added to several unit tests, as they often alter default WordPress behaviour. To avoid ongoing maintenance issues, this change switches to a minimal theme when running tests.

This change also removes the old workarounds for default themes.

Fixes #31550.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 11:03:39 +00:00
Sergey Biryukov
aa3b4f911d Remove an obsolete 1 == $total check in paginate_links().
`$total` cannot be a negative number since [4276].

Props jdgrimes.
Fixes #38421.
Built from https://develop.svn.wordpress.org/trunk@38857


git-svn-id: http://core.svn.wordpress.org/trunk@38800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:46:29 +00:00
Pascal Birchler
badf0925a8 I18N: Improve "Site Language" label for per-user language selection.
Renames the label to "Language" and adds an explanation of the feature to the help tab.

Props johnbillion, jorbin.
Fixes #38344.
Built from https://develop.svn.wordpress.org/trunk@38856


git-svn-id: http://core.svn.wordpress.org/trunk@38799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:41:51 +00:00
Pascal Birchler
f88c248a52 Themes: After [38788], further improve the update button when there's no update package.
Prevents running shiny install when no package exists.


Fixes #37774.
Built from https://develop.svn.wordpress.org/trunk@38855


git-svn-id: http://core.svn.wordpress.org/trunk@38798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:36:46 +00:00
Pascal Birchler
11a13f147b List Tables: Do not show filter button when there are no filter options available.
Props juhise, dipesh.kakadiya, swissspidy.
Fixes #37407.
Built from https://develop.svn.wordpress.org/trunk@38854


git-svn-id: http://core.svn.wordpress.org/trunk@38797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:33:54 +00:00
Weston Ruter
4ba392975a Customize: Add sticky headers for panels and sections.
Includes autoprefixing of CSS.

Props delawski, celloexpressions.
See #35186.
Fixes #34343.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 06:37:30 +00:00
Gary Pendergast
16f0c6877e Pings: Allow ping functions to accept WP_Post objects as well as post IDs.
This removes the use of several `global $wpdb` instances, as well as bringing the ping functions into line with other post-related functions, which will accept a post ID or `WP_Post` object.

Props dshanke.
Fixes #38202.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 06:00:31 +00:00
Gary Pendergast
2e04d2a192 Tests: Prevent Twenty Seventeen from interfering with Customizer ajax tests.
Missed in [38850].

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 05:51:30 +00:00
Gary Pendergast
802736514b Tests: Prevent Twenty Seventeen from interfering with Customizer tests.
This was previously fixed in [38837], but it wasn't really the correct answer, to fix it in the theme. So, [38837] is reverted in this commit, and the Twenty Seventeen actions causing problems are unhooked before tests are run.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 05:28:31 +00:00
Aaron Jorbin
82911b1756 Cache API: introduce wp_cache_get_last_changed to improve DRY
One thing fairly common to the cache groups is a block of code to look to see when the cache was last changed, and if there isn't one, to set it for the current microtime(). It appears in 8 different places in core. This adds a new helper `wp_cache_get_last_changed` to DRY things up a bit.

Since `wp-includes/cache.php` isn't guaranteed to be loaded, this new function is in `wp-includes/functions.php`

Props spacedmonkey, desrosj.
Fixes #37464.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 02:54:34 +00:00
Aaron Jorbin
56dfed874f Build/Test Tools: Allow Minimal Builds
Builds can hang or get very slow on copy when you have alot of files. Alot of files can suddenly appear when you are developing new themes or plugins. Often, it's nice to have a minimal build, especially if you are preparing a commit.

This adds a new flag `--minimal-copy` that can be added to any task which does a copy. These tasks include build, test, and copy. This flag will cause no plugins to be copied and only the twenty series of default themes to be copied. Everything else remains the same.

Fixes #38423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 22:24:40 +00:00
David A. Kennedy
8cfe2973d3 Twenty Seventeen: Replace inline control structure to improve code readability
Props vrundakansara, aaroncampbell.

Fixes #38384.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 22:18:29 +00:00
David A. Kennedy
89b20fcf8f Twenty Fifteen, Twenty Seventeen: Add documentation to filters in themes.
Documents a missing one Twenty Fifteen and all four missing ones in Twenty Seventeen.

Props brainstormforce.

Fixes #38382.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 20:34:31 +00:00
Boone Gorges
3dc7e8a97c Comments: Fix description for reverse_top_level argument in wp_list_comments().
It's a boolean, not a string. Introduced in [25567].

Props bcole808.
Fixes #38371.
Built from https://develop.svn.wordpress.org/trunk@38845


git-svn-id: http://core.svn.wordpress.org/trunk@38788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 18:59:29 +00:00
Boone Gorges
bcc26664ed Query: Allow the prefix used for search term exclusion to be filtered.
[38792] allowed `WP_Query`'s hyphen-as-exclusion-prefix feature to be
disabled via filter. A more general solution is to allow the prefix to
be filtered; returning an empty value from a filter callback works to
disable the feature.

Props dlh.
Fixes #38099.
Built from https://develop.svn.wordpress.org/trunk@38844


git-svn-id: http://core.svn.wordpress.org/trunk@38787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 18:42:29 +00:00
Boone Gorges
2265f1a07e Tests: Skip strip_invalid_text() test for big5 charset on MariaDB.
MariaDB doesn't support the tested configuration.

Props ocean90.
Fixes #33171.
Built from https://develop.svn.wordpress.org/trunk@38843


git-svn-id: http://core.svn.wordpress.org/trunk@38786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 18:30:31 +00:00
Gary Pendergast
89544cc03d Tests: Fix ajax tests that fail when Twenty Seventeen is the default theme.
There are some tests who's outcome can be affected by the default theme, so we need to ensure the Twenty Seventeen functionality is unhooked while the tests are running.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 10:48:40 +00:00
Gary Pendergast
bf5d081fe4 Twenty Seventeen: Remove some whitespace accidentally introduced in [38837].
See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:27:32 +00:00
John Blackbourn
7696a3a8c6 oEmbed: Remove the oEmbed provider unit tests.
This reverts [38454] along with its follow-up commits, [38512], [38514], and [38692]. These tests are currently not pass
ing, and maybe they never will. The tests are in a group which does not run by default without a flag, making them quest
ionably useful.

We can re-visit this at a later date.

See #32360

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


git-svn-id: http://core.svn.wordpress.org/trunk@38783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:16:30 +00:00
Gary Pendergast
0e0af249be Themes: Twenty Seventeen is now the default theme.
It's party time!

Fixes #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:13:29 +00:00
Gary Pendergast
2ac1c4cc92 Tests: Fix tests that don't pass when Twenty Seventeen is the default theme.
There are some tests who's outcome can be affected by the default theme, so we need to ensure the Twenty Seventeen functionality is unhooked while the tests are running.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:07:29 +00:00
Gary Pendergast
35186cff65 Twenty Seventeen: Fix a PHP warning on fresh installs.
When setting the `transport` parameter on Customizer settings, we need to ensure the setting exists, particularly on new sites.

See #38372.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 09:04:31 +00:00
Gary Pendergast
e51531a425 Build: Ignore JSHint errors in Twenty Seventeen's third party libraries.
`html5.js` and `jquery.scrollTo.js` are external libraries, so don't need to be checked by JSHint.

Props kadamwhite.
Fixes #38376.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 05:44:30 +00:00
Rachel Baker
6b46336251 REST API: Fix comment option leak causing another test failure.
Set the 'comment_whitelist' option back to the default when tearing down wpAllowComment tests.

See #38373.
Built from https://develop.svn.wordpress.org/trunk@38835


git-svn-id: http://core.svn.wordpress.org/trunk@38778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 05:25:29 +00:00
Rachel Baker
6a94e72369 REST API: Fix test failures.
- Fix leak in setup_notify_comment() test help by removing the comment_flood_filter.
- Correct uses of $term_taxonomy_id -> $term_id in Category and Tags routing.
- Temporarily remove the metadata tests for canola.jpg as that file does not have an exifdata.  Will need to update the test.

Props jorbin, rmccue, nacin
See #38373.
Built from https://develop.svn.wordpress.org/trunk@38834


git-svn-id: http://core.svn.wordpress.org/trunk@38777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 05:13:29 +00:00
David A. Kennedy
7fbb094586 Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen

Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.

See #38372.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 04:12:31 +00:00
Rachel Baker
e4a7c0a397 REST API: Introduce the Content API endpoints.
REST API endpoints for your WordPress content. These endpoints provide machine-readable external access to your WordPress site with a clear, standards-driven interface, allowing new and innovative apps for interacting with your site. These endpoints support all of the following:
- Posts: Read and write access to all post data, for all types of post-based data, including pages and media.
- Comments: Read and write access to all comment data. This includes pingbacks and trackbacks.
- Terms: Read and write access to all term data.
- Users: Read and write access to all user data. This includes public access to some data for post authors.
- Meta: Read and write access to metadata for posts, comments, terms, and users, on an opt-in basis from plugins.
- Settings: Read and write access to settings, on an opt-in basis from plugins and core. This enables API management of key site content values that are technically stored in options, such as site title and byline.

Love your REST API, WordPress!  The infrastructure says, "Let's do lunch!" but the content API endpoints say, "You're paying!"

Props rmccue, rachelbaker, danielbachhuber, joehoyle, adamsilverstein, afurculita, ahmadawais, airesvsg, alisspers, antisilent, apokalyptik, artoliukkonen, attitude, boonebgorges, bradyvercher, brianhogg, caseypatrickdriscoll, chopinbach, chredd, christianesperar, chrisvanpatten, claudiolabarbera, claudiosmweb, cmmarslender, codebykat, coderkevin, codfish, codonnell822, daggerhart, danielpunkass, davidbhayes, delphinus, desrosj, dimadin, dotancohen, DrewAPicture, Dudo1985, duncanjbrown, eherman24, eivhyl, eliorivero, elyobo, en-alis, ericandrewlewis, ericpedia, evansobkowicz, fjarrett, frozzare, georgestephanis, greatislander, guavaworks, hideokamoto, hkdobrev, hubdotcom, hurtige, iandunn, ircrash, ironpaperweight, iseulde, Japh, jaredcobb, JDGrimes, jdolan, jdoubleu, jeremyfelt, jimt, jjeaton, jmusal, jnylen0, johanmynhardt, johnbillion, jonathanbardo, jorbin, joshkadis, JPry, jshreve, jtsternberg, JustinSainton, kacperszurek, kadamwhite, kalenjohnson, kellbot, kjbenk, kokarn, krogsgard, kuchenundkakao, kuldipem, kwight, lgedeon, lukepettway, mantismamita, markoheijnen, matrixik, mattheu, mauteri, maxcutler, mayukojpn, michael-arestad, miyauchi, mjbanks, modemlooper, mrbobbybryant, NateWr, nathanrice, netweb, NikV, nullvariable, oskosk, oso96_2000, oxymoron, pcfreak30, pento, peterwilsoncc, Pezzab, phh, pippinsplugins, pjgalbraith, pkevan, pollyplummer, pushred, quasel, QWp6t, schlessera, schrapel, Shelob9, shprink, simonlampen, Soean, solal, tapsboy, tfrommen, tharsheblows, thenbrent, tierra, tlovett1, tnegri, tobych, Toddses, toro_unit, traversal, vanillalounge, vishalkakadiya, wanecek, web2style, webbgaraget, websupporter, westonruter, whyisjake, wonderboymusic, wpsmith, xknown, zyphonic.
Fixes #38373.
Built from https://develop.svn.wordpress.org/trunk@38832


git-svn-id: http://core.svn.wordpress.org/trunk@38775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 02:55:32 +00:00
John Blackbourn
f5a3446e4d Customize: Improve the labelling of background and header images in the list mode of the media library.
Props deltafactory, coreymcollins, desrosj
Fixes #22857

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


git-svn-id: http://core.svn.wordpress.org/trunk@38774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 23:03:31 +00:00
Weston Ruter
8abba71d47 Customize: Fix unit tests when twentyfifteen is WP_DEFAULT_THEME instead of twentysixteen.
Use an inactive core theme for previewing theme switch instead of assuming `twentysixteen` is installed and active and `twentyfifteen` is not.

See #30937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 19:39:31 +00:00
Weston Ruter
1ccd9e7a6c Customize: Introduce custom CSS for extending theme styles.
* Custom CSS is associated with a given theme and is displayed in an inline `style` element at the `wp_head` hook after the `wp_print_styles` is called so that it overrides any enqueued stylesheets.
* A `wp_get_custom_css()` function is used for accessing the CSS associated with the current theme (or another theme) and a `wp_get_custom_css` filter for manipulating it.
* CSS is managed in customizer via a new "Additional CSS" section with a single `textarea` control. 
* `WP_Customize_Section::$description_hidden` is introduced for hiding extended descriptions in customizer sections behind a help toggle as done with panels.
* CSS is stored in a `custom_css` post type with the theme (stylesheet) slug as the `post_name`.
* `WP_Customize_Custom_CSS_Setting` is introduced to handle validation of CSS, previewing, and persisting the CSS to the `custom_css` post type.
* The `custom_css` setting is tied to a new `unfiltered_css` capability which maps to `unfiltered_html` by default.
* Escaping the message in the notification template is removed to allow markup (`code` tags) to be rendered.

See https://make.wordpress.org/core/2016/10/11/feature-proposal-better-theme-customizations-via-custom-css-with-live-previews/

Props johnregan3, celloexpressions, folletto, westonruter.
Fixes #35395.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 18:15:31 +00:00
Sergey Biryukov
ec5782bed5 Docs: Fix typo in in_category() description.
Props Kenshino, mbootsman.
Fixes #38363.
Built from https://develop.svn.wordpress.org/trunk@38828


git-svn-id: http://core.svn.wordpress.org/trunk@38771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 13:46:44 +00:00
Pascal Birchler
e4d7dd2b8a Upgrade/Install: Refresh update counts after page load.
By enqueuing the updates script in the footer and passing the number of available updates to it after page load, the update bubbles will be more accurate.

Props ocean90, swissspidy.
Fixes #13071.
Built from https://develop.svn.wordpress.org/trunk@38827


git-svn-id: http://core.svn.wordpress.org/trunk@38770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 10:27:29 +00:00
Pascal Birchler
deda5d9796 Resource Hints: Allow passing custom attributes to resource hints.
[37920] introduced resource hints that allow browsers to prefetch specific pages or render them in the background. With this change, the `as`, `crossorigin`, `pr`, and `type` attributes can be passed in addition to the URLs/hosts.

Props peterwilsoncc, swissspidy.
Fixes #38121.
Built from https://develop.svn.wordpress.org/trunk@38826


git-svn-id: http://core.svn.wordpress.org/trunk@38769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 09:29:30 +00:00
Pascal Birchler
39433ad092 Dashboard: Do not show 'Popular Plugin' UI if DISALLOW_FILE_MODS is set.
Props Mte90.
Fixes #37436.
Built from https://develop.svn.wordpress.org/trunk@38825


git-svn-id: http://core.svn.wordpress.org/trunk@38768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 08:44:30 +00:00
Jeremy Felt
64886517b9 Multisite: Replace get_blog_details() with get_site() in network admin screens.
Props iamfriendly.
See #37102.
Fixes #38349.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 06:08:28 +00:00
Jeremy Felt
f2ad579440 Multisite: Replace get_blog_details() in wp-admin/my-sites.php with get_site().
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38348.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 06:02:29 +00:00
Jeremy Felt
325c7411fc Multisite: Replace get_blog_details() in /wp-admin/ms-delete-site.php with get_site().
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38347.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:54:29 +00:00
Jeremy Felt
7eece8b106 Multisite: Replace get_blog_details() usage in wpmu_delete_blog() with get_site().
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38346.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:50:28 +00:00
Jeremy Felt
be6e98426b Multisite: Replace get_blog_details() in WP_Importer::set_blog() with get_site().
Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:45:31 +00:00
Jeremy Felt
4d44eeadd6 Multisite: Use correct types in get_sites() during network upgrade.
`spam`, `deleted`, and `archived` query args should be integers, not strings.

Props ocean90.
See #37823.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:11:28 +00:00
Jeremy Felt
432d90050b Multisite: Add $network_id parameter to hooks in delete_network_option().
Props flixos90.
Fixes #38322.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:02:29 +00:00
Jeremy Felt
eb382b29ae Multisite: Add $network_id parameter to hooks in update_network_option().
Props flixos90.
Fixes #38321.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 05:00:29 +00:00
Jeremy Felt
213a0a2477 Multisite: Add $network_id parameter to hooks in add_network_option().
Props flixos90.
Fixes #38320.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:56:28 +00:00
Jeremy Felt
df6675d1ec Multisite: Add $network_id parameter to filters in get_network_option().
Props flixos90.
Fixes #38319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:54:29 +00:00
Jeremy Felt
1560fbcbc5 Multisite: Use get_network() and get_current_network_id() for current network data.
`get_network()` falls back to the current network when called without any arguments. Between this and `get_current_network_id()`, we can replace almost all instances of the global `$current_site` and all instances of `get_current_site()`.

This effectively deprecates `get_current_site()`, something that we'll do in a future ticket.

Props flixos90.
Fixes #37414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 04:47:30 +00:00
Weston Ruter
1c3b96537f Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context.

For details, see https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/

Fixes #37661, #34843.
Props celloexpressions, folletto, westonruter, karmatosed, afercia.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 03:20:29 +00:00
Joe McGill
8ed022b568 Media: Remove alt fallbacks to improve accessibility.
This removes the fallbacks in `wp_get_attachment_image()` and in
`wp.media.string.props` which attempt to generate an `alt` value
from the image caption or title if an `alt` attribute isn't explicitly
set.

This allows for image HTML to be generated that contains an empty `alt`
value, i.e., `alt=""` which is much preferable for screen readers than
reading redundant content in the case of a caption, or when reading the
image title, which is often generated from the filename and not helpful
as `alt` text.

Props odie2, joedolson, rianrietveld, afercia, iamjolly, joemcgill.
Fixes #34635.
Built from https://develop.svn.wordpress.org/trunk@38812


git-svn-id: http://core.svn.wordpress.org/trunk@38755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 03:06:28 +00:00
Weston Ruter
e8bd9645df Customize: Split out link click.preview and form submit.preview event handlers from anonymous functions into named methods on wp.customize.Preview for extensibility.
See #30937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 02:06:30 +00:00
Weston Ruter
f1ba1918c9 Customize: Implement customized state persistence with changesets.
Includes infrastructure developed in the Customize Snapshots feature plugin.

See https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions/

Props westonruter, valendesigns, utkarshpatel, stubgo, lgedeon, ocean90, ryankienstra, mihai2u, dlh, aaroncampbell, jonathanbardo, jorbin.
See #28721.
See #31089.
Fixes #30937.
Fixes #31517.
Fixes #30028.
Fixes #23225.
Fixes #34142.
Fixes #36485.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-18 20:05:31 +00:00
Gary Pendergast
f6d85de626 Charset: Allow _canonical_charset() to handle mixed-case strings.
Add improved unit tests, and collect existing unit tests together.

Props pbearne.
Fixes #38337.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 23:54:30 +00:00
Andrew Ozz
f76fa00288 TinyMCE wplink:
- Remove the calls to getBookmark() and moveToBookmark() in IE. This is handled automatically when blurring and focusing the editor.
- When inserting a link, move it out of the caret position element. If not, it may be removed with that element on clean-up before save.

Fixes #38335.
Built from https://develop.svn.wordpress.org/trunk@38808


git-svn-id: http://core.svn.wordpress.org/trunk@38751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 20:01:31 +00:00
Weston Ruter
11cb0c06a7 Customize: Skip triggering initial click on pages section for available nav menu items if already open.
Fixes race condition if user opens Pages section before the ajax request to load items finishes.

Props ryankienstra, celloexpressions.
Fixes #36984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 16:23:28 +00:00
Aaron Jorbin
969e4255a9 REST API: Include Vary: Origin in cors headers
`vary: origin` is a W3 CORS implementation recommendation( https://www.w3.org/TR/cors/#resource-implementation ). It's used by default in frameworks such as hapi and Laravel-cors. Overall, it helps sites siting behind a cache such as varnish.

Fixes #38060.
Props procodewp, pdufour for research.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 16:11:30 +00:00
Pascal Birchler
1e54943b0f Docs: Improve documentation for install_plugin_install_status().
Props clarionwpdeveloper, sudar.
Fixes #36912.
Built from https://develop.svn.wordpress.org/trunk@38805


git-svn-id: http://core.svn.wordpress.org/trunk@38748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 08:30:29 +00:00
Pascal Birchler
ffdef38f5b Date/Time: Remove some legacy logic in date_i18n().
Since there's no difference between using `date()` and `gmdate()` in WordPress, we can simply use the former in `date_i18n()` to reduce its complexity.

Adds tests.

Props jdgrimes for initial patch.
Fixes #37910.
Built from https://develop.svn.wordpress.org/trunk@38804


git-svn-id: http://core.svn.wordpress.org/trunk@38747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 08:10:30 +00:00
Andrew Ozz
4996d05355 TinyMCE:
- When editing pages, add body class with the page template, or `page-template-default`.
- Change the page template class when the users select another template, similarly to changing the post type class for posts.

Props webmandesign.
Fixes #37599.
Built from https://develop.svn.wordpress.org/trunk@38803


git-svn-id: http://core.svn.wordpress.org/trunk@38746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 01:10:28 +00:00
John Blackbourn
374a079746 Role/Capability: Disregard the order of capabilities when testing that single site and multisite capability tests match.
See #38191

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


git-svn-id: http://core.svn.wordpress.org/trunk@38745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 23:36:28 +00:00
Andrew Ozz
c388eeca8d TinyMCE: restore the monospace font in textareas in the TinyMCE UI. Make it same as in the Text editor.
Fixes #38125.
Built from https://develop.svn.wordpress.org/trunk@38801


git-svn-id: http://core.svn.wordpress.org/trunk@38744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 22:51:28 +00:00
Andrea Fercia
7be7d396f1 Editor: Add a role button to the Tags meta box tag cloud links.
For better accessibility, the tag cloud links in the Tags meta box should be
reported to assistive technologies as buttons. They don't navigate to a new
resource, instead they perform an action.

Fixes #38318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 20:09:28 +00:00
Andrea Fercia
8aef143d80 Menus: Fix the posts-categories quick search.
On the Menus screen, events that trigger the posts-categories search need to be
delegated. This "boxes" may get dynamically rebuilt so events directly attached
to the search input field need to be delegated.

Fixes #38324.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 20:03:29 +00:00
Sergey Biryukov
4a95bfa4c2 Docs: In get_pages() and wp_list_pages(), note that post_status argument can also be an array.
Adjust the alignment of default argument values for better readability.

Props birgire, desrosj.
Fixes #38136.
Built from https://develop.svn.wordpress.org/trunk@38798


git-svn-id: http://core.svn.wordpress.org/trunk@38741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-16 01:10:31 +00:00
Andrew Ozz
d91da52588 Accessible Tags autocomplete:
- Replace suggest.js with UI Autocomplete.
- Use the same settings like in the editor link toolbar.
- Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
- Add `data-wp-taxonomy` on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.
Built from https://develop.svn.wordpress.org/trunk@38797


git-svn-id: http://core.svn.wordpress.org/trunk@38740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 22:40:28 +00:00
Andrew Ozz
e2e22580db TinyMCE:
- Prevent applying Indent and Outdent while an image with a caption is selected. It doesn't do anything and breaks the caption elements.
- Keep all of the text when a caption `<dl>` was somehow changed.

Fixes #38313.
Built from https://develop.svn.wordpress.org/trunk@38796


git-svn-id: http://core.svn.wordpress.org/trunk@38739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 21:38:28 +00:00
Andrea Fercia
da4da31af1 Administration: Better consistency for the Media, Add Plugins, and Add Themes toolbars.
Fixes the Add Themes toolbar padding. Standardizes the placeholders to no title
case and three trailing dots. Expands the Media search placeholder in
"Search media items..." for consistency with the Plugins and Themes toolbars.

Props mikeviele, jamesacero, mattking5000, koenschipper, dungengronovius.

Fixes #38010.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 21:33:28 +00:00
Weston Ruter
07b97c1d57 Customize: Move Pages below Custom Links in available nav menu items panel.
Props ryankienstra, celloexpressions.
See #36984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 21:21:28 +00:00
Andrew Ozz
2f45415c73 Media modal: make it possible to reorder images by dragging on devices with both touch screen and mouse support.
Props adamsilverstein.
Fixes #31652.
Built from https://develop.svn.wordpress.org/trunk@38793


git-svn-id: http://core.svn.wordpress.org/trunk@38736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 20:29:28 +00:00
Boone Gorges
9783a3df6b Query: Allow the hyphen-prefix-for-search-exclusion feature to be disabled by filter.
WordPress 4.4 introduced "hyphen exclusion" for search terms, so that
"foo -bar" would return posts containing "foo" AND not containing "bar".
The new filter 'wp_query_use_hyphen_for_exclusion' allows developers
to disable this feature when it's known that their content will contain
semantically important leading hyphens.

Props chriseverson, choongsavvii.
Fixes #38099.
Built from https://develop.svn.wordpress.org/trunk@38792


git-svn-id: http://core.svn.wordpress.org/trunk@38735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 20:06:28 +00:00
Rachel Baker
8cbb988196 Pings/Trackbacks: Add new pre_trackback_post action before a trackback is added to a post.
Props dshanske, rachelbaker.
Fixes #37007.
Built from https://develop.svn.wordpress.org/trunk@38791


git-svn-id: http://core.svn.wordpress.org/trunk@38734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 19:39:28 +00:00
Rachel Baker
a6f0fb6d2a REST API: Support sites with index-style permalinks in get_rest_url().
Support the index-style permalinks (http://example.com/index.php/postName) when registering the REST API rewrite rules and within the `get_rest_url()` function. This allows sites that do not have mod_rewrite support to have almost pretty urls and have access to their REST API endpoints.

Props kraftbj.
Fixes #38182.
Built from https://develop.svn.wordpress.org/trunk@38790


git-svn-id: http://core.svn.wordpress.org/trunk@38733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 19:30:29 +00:00
John Blackbourn
afff60c378 Themes: Improve the inline documentation for the get_*_template() functions by providing examples instead of verbose explanations.
Fixes #38249
See #37770

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


git-svn-id: http://core.svn.wordpress.org/trunk@38732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 14:20:29 +00:00
Pascal Birchler
a60ac4684b Themes: Do not show an update button if there's no update package.
This updates the list view to match the existing behaviour in the single theme modal.

Props tristangemus for initial patch.
Fixes #37774.
Built from https://develop.svn.wordpress.org/trunk@38788


git-svn-id: http://core.svn.wordpress.org/trunk@38731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 13:33:29 +00:00
John Blackbourn
dec7dd74ea Users: Use the role name instead of the role display name when fetching the list of users with no role. This avoids false positives when dealing with user roles that, for example, contain spaces in the display name.
Props procodewp, choongsavvii
Fixes #38234

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


git-svn-id: http://core.svn.wordpress.org/trunk@38730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-14 12:05:30 +00:00
Jeremy Felt
295e48baa9 Multisite: Maintain switched state in site icon/logo functions.
Adjusts `get_custom_logo()`, `get_site_icon_url()`, and `has_custom_logo()` so that when called in a switched state, the original switched stack is not adjusted.

Props achbed, flixos90.
Fixes #38253.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-13 22:28:28 +00:00
Gary Pendergast
456f8015b7 KSES: Deprecate wp_kses_js_entities().
This function was originally introduced to fix an XSS attack in Netscape 4, which never affected any other browsers, or later versions of Netscape.

I'm willing to go out on a limb, and say that we've officially dropped security support for Netscape 4.

Props dmsnell, desrosj.
Fixes #33848.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-13 22:25:31 +00:00
Boone Gorges
acd764a1d3 Taxonomy: Cache results of term count queries.
Fixes #38295.
Built from https://develop.svn.wordpress.org/trunk@38784


git-svn-id: http://core.svn.wordpress.org/trunk@38727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 15:30:31 +00:00
Boone Gorges
9935b60e72 Comments: When checking comments, returned error object should include HTTP status code.
The status code in the `WP_Error` `data` array is needed to send
headers in wp-comments-post.php, and was erroneously not included in
[38778].

Props needle, websupporter.
Fixes #36901.
Built from https://develop.svn.wordpress.org/trunk@38783


git-svn-id: http://core.svn.wordpress.org/trunk@38726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 13:50:30 +00:00
Andrew Ozz
5f5c85c510 TinyMCE: prevent iOS Safari from expanding the iframe width beyond the container width.
Fixes #38289.
Built from https://develop.svn.wordpress.org/trunk@38782


git-svn-id: http://core.svn.wordpress.org/trunk@38725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 03:36:30 +00:00
Jeremy Felt
a9290f631b Multisite: Clarify that get_site_by_path() does not return exact matches.
Props stevenlinx.
Fixes #38152.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-12 01:10:29 +00:00
Andrew Ozz
61c95f84f6 TinyMCE: update the charmap plugin to the latest dev. version. Fixes problems with inserting white space characters.
Fixes #37936.
Built from https://develop.svn.wordpress.org/trunk@38780


git-svn-id: http://core.svn.wordpress.org/trunk@38723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 23:56:31 +00:00
Boone Gorges
220c0589da Taxonomy: Specify taxonomy when populating cached object terms.
[38776] introduced a call to `get_term()` using only the term ID. This
causes problems in cases where shared terms have not been split. Since
we have the taxonomy available, there's no harm in passing it along to
`get_term()`.

Props dd32.
See #37291.
Built from https://develop.svn.wordpress.org/trunk@38779


git-svn-id: http://core.svn.wordpress.org/trunk@38722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 04:06:28 +00:00
Boone Gorges
0bdfa2ab1e Comments: Abstract die() calls from comment submission routine.
Since 4.4, comment submission has been mostly abstracted into a function,
rather than being processed inline in wp-comments-post.php. This change
made it easier to write automated tests against the bulk of the comment
submission process. `wp_allow_comment()` remained untestable, however:
when a comment failed one of its checks (flooding, duplicates, etc),
`die()` or `wp_die()` would be called directly. This shortcoming posed
problems for any application attempting to use WP's comment verification
functions in an abstract way - from PHPUnit to the REST API.

The current changeset introduces a new parameter, `$avoid_die`, to the
`wp_new_comment()` stack. When set to `true`, `wp_new_comment()` and
`wp_allow_comment()` will return `WP_Error` objects when a comment check
fails. When set to `false` - the default, for backward compatibility -
a failed check will result in a `die()` or `wp_die()`, as appropriate.

Prior to this changeset, default comment flood checks took place in the
function `check_comment_flood_db()`, which was hooked to the
'check_comment_flood' action. This design allowed the default comment
flood routine to be bypassed or replaced using `remove_action()`.
In order to maintain backward compatibility with this usage, while
simultaneously converting the comment flood logic into something that
returns a value rather than calling `die()` directly,
`check_comment_flood_db()` has been changed into a wrapper function for
a call to `add_filter()`; this, in turn, adds the *actual* comment flood
check to a new filter, 'wp_is_comment_flood'. Note that direct calls
to `check_comment_flood_db()` will no longer do anything in isolation.

Props websupporter, rachelbaker.
Fixes #36901.
Built from https://develop.svn.wordpress.org/trunk@38778


git-svn-id: http://core.svn.wordpress.org/trunk@38721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 03:43:28 +00:00
Dion Hulse
f40c2a62a6 Taxonomy: Avoid a fatal error in the_tags() in the event that get_the_term_list() returns a WP_Error.
Props michalzuber.
See #37291.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 03:27:31 +00:00
Boone Gorges
e97ab5362b Taxonomy: Better error handling when fetching object terms from cache.
Since [37573], `get_object_term_cache()` has expected term IDs to be
stored in the taxonomy relationship cache. The function would then
reach directly into the 'terms' cache to fetch the data corresponding
to a given term, before returning a `WP_Term` object. This caused
problems when, for one reason or another, term data was cached
inconsistently:

* If the 'terms' cache is empty for a given term ID, despite the earlier call to `_prime_term_caches()`, `get_term()` would return an error object.
* If the array of cached term IDs contains an invalid ID, `get_term()` would return an error object.

We avoid these errors by no longer touching the 'terms' cache directly,
but running term IDs through `get_term()` and allowing that function to
reference the cache (and database, as needed). If `get_term()` returns
an error object for any of the cached term IDs, `get_object_term_cache()`
will return that error object alone. This change ensures that upstream
functions, like `get_the_terms()`, return `WP_Error` objects in a
predictable fashion.

Props dd32, michalzuber.
Fixes #37291.
Built from https://develop.svn.wordpress.org/trunk@38776


git-svn-id: http://core.svn.wordpress.org/trunk@38719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 01:56:29 +00:00
Gary Pendergast
7c1cb69e7a XML-RPC: Re-add a global $wpdb missed in [38768].
See #37699.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 01:43:31 +00:00
Andrew Ozz
af8eaef148 TinyMCE: add support for custom dashicon for wp.mce.View.setLoader().
Props procodewp.
Fixes #37900.
Built from https://develop.svn.wordpress.org/trunk@38774


git-svn-id: http://core.svn.wordpress.org/trunk@38717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 00:56:29 +00:00
Andrew Ozz
cb966db094 TiinyMCE: update to 4.4.3, changelog: https://www.tinymce.com/docs/changelog/#version443-september12016
Fixes #38081, #38245, #37507, #37808 and #38000.
Built from https://develop.svn.wordpress.org/trunk@38773


git-svn-id: http://core.svn.wordpress.org/trunk@38716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 00:10:32 +00:00
Andrew Ozz
c69916d57d Editor: do not send the request for releasing the post lock on unload when post_ID or active_post_lock is missing.
Props dlh, adamsilverstein.
Fixes #38271.
Built from https://develop.svn.wordpress.org/trunk@38772


git-svn-id: http://core.svn.wordpress.org/trunk@38715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 22:42:30 +00:00
Rachel Baker
84de4937b1 REST API: Remove reference to the plugin in infrastructure activation test.
Also adds class exists checks for WP_REST_Request and WP_REST_Response.

Props kraftbj.
Fixes #38279.
Built from https://develop.svn.wordpress.org/trunk@38771


git-svn-id: http://core.svn.wordpress.org/trunk@38714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 21:51:08 +00:00
Andrea Fercia
1905ea030a Accessibility: Improve the UI controls to move the Menu items.
On the Menus screen, the links to move menu items behave like buttons: they
perform an action so they should be real buttons to be correctly reported to
assistive technologies. Since they're logically grouped controls, they should
also be wrapped in a `<fieldset>` element for better semantics and accessibility.

Props Cheffheid.
Fixes #35578.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 16:26:12 +00:00
John Blackbourn
35e1f5faa5 Role/Capability: Add tests for all user roles that check custom capabilities that do not have any form of handling (eg. in a map_meta_cap filter).
See #38191

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


git-svn-id: http://core.svn.wordpress.org/trunk@38712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 14:40:30 +00:00
Gary Pendergast
af69f4ab1a General: Restore usage of $wpdb, instead of $this->db.
Hiding the `$wpdb` global behind a property decreases the readability of the code, as well as causing irrelevant output when dumping an object.

Reverts [38275], [38278], [38279], [38280], [38387].
See #37699.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 06:38:31 +00:00
Weston Ruter
2064e34833 Customize: Show Pages section first and pre-expanded in list of available nav menu items.
Props ryankienstra, westonruter.
Fixes #36984.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 23:41:30 +00:00
Weston Ruter
d6f9cb01d9 Customize: Improve message displayed in widgets panel when there are no widget areas currently displayed in the preview.
Props karmatosed, westonruter.
Fixes #36922.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 21:09:31 +00:00
Weston Ruter
28795e8dc2 Customize: Ensure customize_validate_{$setting->id} filters apply on input post values for WP_Customize_Setting subclasses that neglect to apply the filter themselves.
Fixes #37638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 20:08:32 +00:00
Peter Wilson
ffb703c002 Emoji: Update Emoji CDN filter default for resource hints.
Updates the default value for the filter `emoji_svg_url` used in `wp_resource_hints()` to match the default used for the filter in `_print_emoji_detection_script()`.

See [38717], #38724.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 04:24:31 +00:00
John Blackbourn
45edc9ec57 Build/Test Tools: Continue eliminating randomness in tests.
See [38762]
See #37371

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


git-svn-id: http://core.svn.wordpress.org/trunk@38706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 01:30:29 +00:00
John Blackbourn
72ccdfd70b Build/Test Tools: Begin eliminating unnecessary randomness in tests.
Although unlikely, clashes in randomly generated strings could cause unexpected failures. In addition, most randomness is entirely unnecessary, is bad practice, and increases test time (however small it may be).

See #37371

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


git-svn-id: http://core.svn.wordpress.org/trunk@38705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-09 01:12:31 +00:00
John Blackbourn
0b0868efc3 Build/Test Tools: Revert [38759]. PHPUnit's @requires syntax was introduced in PHPUnit 3.7, but the tests for PHP 5.2 use PHPUnit 3.6 because it's the latest version that supports PHP 5.2.
Fixes #38256

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


git-svn-id: http://core.svn.wordpress.org/trunk@38704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 22:43:31 +00:00
John Blackbourn
282864e2fc Media: Correct the hostname used in the wp_get_attachment_metadata() test.
See #36246

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


git-svn-id: http://core.svn.wordpress.org/trunk@38703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 12:05:30 +00:00
John Blackbourn
615b70b45f Build/Test Tools: Make use of PHPUnit's @requires notation.
Fixes #38256

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


git-svn-id: http://core.svn.wordpress.org/trunk@38702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 01:20:29 +00:00
John Blackbourn
ebe86537ce HTTP API: Remove an unnecessary duplicate HTTP request in the HTTP tests.
See #30017

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


git-svn-id: http://core.svn.wordpress.org/trunk@38701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 01:03:29 +00:00
John Blackbourn
e82de0c7fb HTTP API: Convert the POST redirect test to use a dataProvider in order for its speed to be more accurately measured.
See #38237

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


git-svn-id: http://core.svn.wordpress.org/trunk@38700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-08 00:30:30 +00:00
Andrew Ozz
470c5a1f2a TinyMCE: Allow pasting in image captions. Remove blocks and insert <br> tags instead, also remove elements that would break the caption like other images, video, audio, etc.
See #36211.
Built from https://develop.svn.wordpress.org/trunk@38756


git-svn-id: http://core.svn.wordpress.org/trunk@38699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 21:41:29 +00:00
John Blackbourn
c0f1a49575 Themes: Remove paged.php from the theme template hierarchy.
The position of this template within the hierarchy is of so little use that zero themes in the WordPress.org theme directory make use of it. It's second only to `index.php` in the hierarchy, meaning that any archive template such as `category.php` or `archive.php` will be chosen before it.

Fixes #38162
Props ryankienstra for initial patch

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


git-svn-id: http://core.svn.wordpress.org/trunk@38698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 21:03:31 +00:00
Dominik Schilling
5fd943f49c Menus: Hide controls in the search tab if no items are found.
Props sayedwp, afercia, tywayne, abrightclearweb.
Fixes #35576.
Built from https://develop.svn.wordpress.org/trunk@38754


git-svn-id: http://core.svn.wordpress.org/trunk@38697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:56:29 +00:00
Dominik Schilling
859498efd3 Taxonomy: On wp-admin/term.php, don't show a 'Back to' link which links to the current page.
Fixes #37573.
Built from https://develop.svn.wordpress.org/trunk@38753


git-svn-id: http://core.svn.wordpress.org/trunk@38696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:13:28 +00:00
Dominik Schilling
32516036db Taxonomy: Remove paged argument from referer and add it only if current page is greater than 1.
Props swissspidy.
See #38194.
Built from https://develop.svn.wordpress.org/trunk@38752


git-svn-id: http://core.svn.wordpress.org/trunk@38695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 20:06:28 +00:00
Aaron Jorbin
a8802232ec Make sure rewrite rules are not written until wp_loaded has fired
If a plugin attempts to change the rewrite rules to early, other plugins may have their rules inadvertently discarded. Additionally, some function such as `url_to_post_id` cause a rewrite rule lookup that could cause this accidental flushing. This forces the flushing to only occur once `wp_loaded` has been fired.

Fixes #37892.
Props Chouby.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 19:44:28 +00:00
Dominik Schilling
0dcd49e6fc Taxonomy: Don't drop term order and current page when bulk deleting terms.
* Removes special handling for `edit-tags.php` which is no longer required because of `term.php`. Related: [34202] and [36308].
* Sets `$referer` to `$_SERVER['REQUEST_URI']` because `wp_get_referer()` returns false if `$_SERVER['REQUEST_URI'] === $_REQUEST['_wp_http_referer']`.
* Sets `paged` always to `$pagenum` which is the value of `$wp_list_table->get_pagenum();`. This avoids an additional redirect when you delete an item which was previously on the last page.

Fixes #38194.
Built from https://develop.svn.wordpress.org/trunk@38750


git-svn-id: http://core.svn.wordpress.org/trunk@38693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 19:39:29 +00:00
Dominik Schilling
ae2ff33c91 Docs: Improve formatting of filter docs added in [38689].
Fixes #35590.
Built from https://develop.svn.wordpress.org/trunk@38749


git-svn-id: http://core.svn.wordpress.org/trunk@38692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 19:24:28 +00:00
Dominik Schilling
fc79800fc5 Comments: Pass $comment to the comment_max_links_url filter.
Props rachelbaker.
Fixes #37955.
Built from https://develop.svn.wordpress.org/trunk@38748


git-svn-id: http://core.svn.wordpress.org/trunk@38691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 18:32:29 +00:00
Pascal Birchler
ef8f9168b6 Taxonomy: Introduce WP_Taxonomy and use it in register_taxonomy() and unregister_taxonomy().
This changes the global `$wp_taxonomies` to an array of `WP_Taxonomy ` objects. `WP_Taxonomy ` includes methods to handle rewrite rules and hooks.
Each taxonomy argument becomes a property of `WP_Taxonomy`. Introducing such a class makes further improvements in the future much more feasible.

Props boonebgorges for review.
Fixes #36224. See #36217.
Built from https://develop.svn.wordpress.org/trunk@38747


git-svn-id: http://core.svn.wordpress.org/trunk@38690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 17:12:29 +00:00
Pascal Birchler
561c136b8f Docs: Document global variables used by get_the_content().
Props goranseric, morganestes.
Fixes #37173.
Built from https://develop.svn.wordpress.org/trunk@38746


git-svn-id: http://core.svn.wordpress.org/trunk@38689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 17:00:29 +00:00
Pascal Birchler
319d885ea0 Plugins: Correctly display the current plugin in the plugin editor.
When editing a plugin file, show the correct plugin as being edited in the dropdown with the correct activation status.

Props aniketpant, dd32, DrewAPicture, jayarjo, MattyRob, mt8.biz, solarissmoke, swissspidy, WraithKenny.
Fixes #24122, #17552.
Built from https://develop.svn.wordpress.org/trunk@38745


git-svn-id: http://core.svn.wordpress.org/trunk@38688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 16:58:28 +00:00
Pascal Birchler
ff411ed5f4 Menus: Do not show trashed posts in nav menus.
Trashed posts cannot be accessed by site visitors and thus should not be visible on the front end. By marking menu items of trashed posts as invalid, they are excluded from the output.

Props solarissmoke, swissspidy.
Fixes #19038.
Built from https://develop.svn.wordpress.org/trunk@38744


git-svn-id: http://core.svn.wordpress.org/trunk@38687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 16:50:29 +00:00
Pascal Birchler
d7c994d1bf Upgrade/Install: Show correct time of last checked update.
Props PieWP for initial patch.
Fixes #37554.
Built from https://develop.svn.wordpress.org/trunk@38743


git-svn-id: http://core.svn.wordpress.org/trunk@38686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 16:37:31 +00:00
Weston Ruter
2f52e4db9b Customize: Add workaround for Safari bug causing preview frame to be unscrollable via mousewheel after a refresh.
Props westonruter, tristangemus.
Fixes #38149.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 20:17:29 +00:00
Rachel Baker
6cab59e945 Trackbacks: Allow the error message strings passed to trackback_response() to be translatable.
Localize the error messages in wp-trackback.php.

Props websupporter.
Fixes #38214.
Built from https://develop.svn.wordpress.org/trunk@38741


git-svn-id: http://core.svn.wordpress.org/trunk@38684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 18:09:29 +00:00
Rachel Baker
4ca1385b60 Comments: Account for the comment_order option in get_page_of_comment().
Use the value of the `comment_order` setting to determine the date_query key to pass to `WP_Comment_Query`.
Fixes a bug where sites that had comments ordered "newest" first would have the incorrect page number returned.

Props tyxla, boonebgorges.
Fixes #31101.
Built from https://develop.svn.wordpress.org/trunk@38740


git-svn-id: http://core.svn.wordpress.org/trunk@38683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 17:42:29 +00:00
Helen Hou-Sandí
e4bfe48ebc Login: Don't rely on wp_is_mobile() for functionality.
Making behavior changes based on some broad definition of what mobile is rarely, if ever, makes sense. Each bit of functionality should be more clearly targeted, whether that's for screen size, performance, or some kind of touch capability.

props akibjorklund.
see #33704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 15:52:30 +00:00