Commit Graph

35512 Commits

Author SHA1 Message Date
Jeremy Felt
6f1ed31931 Multisite: Replace get_blog_details() in wp_xmlrpc_server::_multisite_getUsersBlogs().
Use `get_site()` instead.

Props flixos90.
Fixes #38350.


git-svn-id: https://develop.svn.wordpress.org/trunk@38934 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 22:53:44 +00:00
Weston Ruter
c6d8d79f15 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38933 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 22:50:39 +00:00
Andrew Ozz
7f8003e6ea TinyMCE: remove and rearrange some of the editor buttons to improve user experience.
Props hugobaeta, melchoyce, celloexpressions, mor10, iseulde, mrwweb.
See #27159.

git-svn-id: https://develop.svn.wordpress.org/trunk@38932 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 22:50:21 +00:00
Weston Ruter
5de6c7927d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38931 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 22:32:55 +00:00
Dominik Schilling (ocean90)
4cfb962850 Tests: Update language files to include a Language header.
See #26511.

git-svn-id: https://develop.svn.wordpress.org/trunk@38930 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 22:25:08 +00:00
John Blackbourn
895203b3e4 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


git-svn-id: https://develop.svn.wordpress.org/trunk@38929 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 21:53:22 +00:00
Dominik Schilling (ocean90)
ad25902a65 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38928 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 21:25:25 +00:00
John Blackbourn
0c14ff0574 Feeds: Greatly reduce the number of dummy posts that are generated for the Atom tests, following on from [38924].
See #35160


git-svn-id: https://develop.svn.wordpress.org/trunk@38927 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:58:13 +00:00
Weston Ruter
87e7c0cd96 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38926 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:52:58 +00:00
Rachel Baker
ea3b41d8e3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38925 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:47:06 +00:00
John Blackbourn
2a4558a312 Feeds: Greatly reduce the number of dummy posts that are generated for the RSS2 tests. This speeds the tests up.
See #35160, #30210


git-svn-id: https://develop.svn.wordpress.org/trunk@38924 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:16:58 +00:00
Dominik Schilling (ocean90)
ade972bf86 Embeds: Realign the provider list after [38693].
See #38003.

git-svn-id: https://develop.svn.wordpress.org/trunk@38923 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:15:45 +00:00
Dominik Schilling (ocean90)
fe100549a7 Upgrade: Realign $_new_bundled_files after [38921].
git-svn-id: https://develop.svn.wordpress.org/trunk@38922 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:02:39 +00:00
Dominik Schilling (ocean90)
95fb8d8221 Upgrade: Add Twenty Seventeen to $_new_bundled_files.
This indicates that Twenty Seventeen should be installed with a WordPress upgrade.

See #38372.

git-svn-id: https://develop.svn.wordpress.org/trunk@38921 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:01:22 +00:00
Dominik Schilling (ocean90)
425589e77f Nav Menus: Update help text to include the two latest default themes, Twenty Sixteen and Twenty Seventeen.
See #38372.

git-svn-id: https://develop.svn.wordpress.org/trunk@38920 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:00:19 +00:00
Dominik Schilling (ocean90)
1f1a105820 Install: Update sidebars_widgets option for Twenty Seventeen to match its three sidebars.
See #38372.

git-svn-id: https://develop.svn.wordpress.org/trunk@38919 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 19:59:31 +00:00
David A. Kennedy
988e2d03b4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38918 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 19:59:11 +00:00
Jeremy Felt
13e2780b59 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38917 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 19:33:34 +00:00
Jeremy Felt
1c034393f0 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38916 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 19:22:32 +00:00
Jeremy Felt
9543b9e259 Multisite: Replace get_blog_details() in wp-includes/ms-blogs.php with get_site().
Props flixos90.
See #37102.
Fixes #38351.


git-svn-id: https://develop.svn.wordpress.org/trunk@38915 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 18:49:03 +00:00
Jeremy Felt
148d7790d7 Multisite: Replace get_blog_details() in get_active_blog_for_user() with get_site().
Props flixos90.
Fixes #38355.


git-svn-id: https://develop.svn.wordpress.org/trunk@38914 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 18:05:20 +00:00
Jeremy Felt
764a31aaa9 Multisite: Introduce tests for get_active_blog_for_user().
Props flixos90.
See #38355.


git-svn-id: https://develop.svn.wordpress.org/trunk@38913 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 18:02:08 +00:00
Andrea Fercia
590a7de43b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38912 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 17:28:40 +00:00
Joe Hoyle
6d8e277152 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38911 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 17:12:18 +00:00
Joe Hoyle
57aec4798f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38910 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 17:07:20 +00:00
Tammie Lister
c388ff84ee Twenty Seventeen: Display scroll down arrow when no menu
This improves scrollability without a menu.

Props nnaimov, melchoyce, davidakennedy
Fixes #38392



git-svn-id: https://develop.svn.wordpress.org/trunk@38909 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 16:50:49 +00:00
Gary Pendergast
94201ff1f5 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38908 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 11:05:17 +00:00
Gary Pendergast
ee65fc1f80 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38907 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 10:24:57 +00:00
Weston Ruter
4e8410a886 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38906 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 06:30:27 +00:00
jeremyfelt
32fce2093c Multisite: Replace get_blog_details() with get_site() in is_user_member_of_blog().
Props flixos90.
Fixes #38358.


git-svn-id: https://develop.svn.wordpress.org/trunk@38905 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 06:01:03 +00:00
Jeremy Felt
0b0a009bfc Multisite: Replace get_blog_details() in ms_site_check() with get_site().
Props flixos90.
Fixes #38357.


git-svn-id: https://develop.svn.wordpress.org/trunk@38904 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 05:54:19 +00:00
Jeremy Felt
701dbe4271 Multisite: Replace get_blog_details() in add_user_to_blog() with get_site().
Adds tests for `add_user_to_blog()`.

Props flixos90.
Fixes #38356.


git-svn-id: https://develop.svn.wordpress.org/trunk@38903 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 05:48:22 +00:00
Jeremy Felt
9ae33a3be4 Multisite: Replace get_blog_details() with get_site() in get_dashboard_blog().
Props dipesh.kakadiya.
Fixes #38353.


git-svn-id: https://develop.svn.wordpress.org/trunk@38902 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 05:04:37 +00:00
Weston Ruter
e6425b0735 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38901 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 04:46:36 +00:00
Weston Ruter
31156b0bfb Customize: Skip attaching expansion event handlers to section containers with the cannot-expand class.
Props kkoppenhaver, celloexpressions.
Fixes #37980.


git-svn-id: https://develop.svn.wordpress.org/trunk@38900 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 04:36:00 +00:00
Dion Hulse
7e9848df2b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38899 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 03:14:31 +00:00
Dion Hulse
7aa09b6d24 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38898 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 02:23:18 +00:00
Andrew Ozz
277bb681d7 TinyMCE: make keyboard shortcuts more discoverable by adding them to the buttons tooltips and in the Formats drop-down.
Props mor10, azaozz.
Fixes #38063.

git-svn-id: https://develop.svn.wordpress.org/trunk@38897 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 01:39:15 +00:00
Dion Hulse
7ae73a021a Revert the svn:ignore changes in [38394] which was missed in the original revert.
See #36335


git-svn-id: https://develop.svn.wordpress.org/trunk@38896 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 01:12:03 +00:00
Dion Hulse
3df3b11e98 HTTP: Call mbstring_binary_safe_encoding() before making a request with Requests to avoid issues with mbstring.func_overload.
Props SergeyBiryukov.
Fixes #38226.


git-svn-id: https://develop.svn.wordpress.org/trunk@38894 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 00:44:13 +00:00
Dion Hulse
cedd323452 Docs: Correct a number of typos/spelling mistakes in inline comments.
Props ottok.
Fixes #38464.


git-svn-id: https://develop.svn.wordpress.org/trunk@38893 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 00:37:50 +00:00
Tammie Lister
edf8779f71 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



git-svn-id: https://develop.svn.wordpress.org/trunk@38892 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 22:29:42 +00:00
Andrew Ozz
c108fdc0ba TinyMCE: change the icon and tooltip for the remove link button in the inline link toolbar.
Props hardeepasrani, ocean90, magicroundabout, iseulde.
Fixes 37278.

git-svn-id: https://develop.svn.wordpress.org/trunk@38891 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 21:57:22 +00:00
Weston Ruter
a89aef0f6e Customize: Harden url matching to account for varying ports and ensuring matching base pathname for allowed urls
Fixes #38409.


git-svn-id: https://develop.svn.wordpress.org/trunk@38890 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 20:06:06 +00:00
Weston Ruter
b5bc4fde53 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38889 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 19:14:26 +00:00
Tammie Lister
71cbe11ee3 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



git-svn-id: https://develop.svn.wordpress.org/trunk@38888 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 19:10:59 +00:00
Weston Ruter
81c6e564fc Customize: Disable theme installation in multisite.
Props celloexpressions, iamfriendly.
Fixes #38370.


git-svn-id: https://develop.svn.wordpress.org/trunk@38887 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 18:16:41 +00:00
David A. Kennedy
ad319b1b1f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38886 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 17:58:18 +00:00
Tammie Lister
58075601c6 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



git-svn-id: https://develop.svn.wordpress.org/trunk@38885 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 17:26:45 +00:00
John Blackbourn
f948218d0f General: Correct the docs for the default HTTP status code used by wp_die().
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@38884 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 13:12:52 +00:00