Commit Graph

35987 Commits

Author SHA1 Message Date
Helen Hou-Sandi
ea4e965942 Post-RC2 bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39474 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 06:16:51 +00:00
Helen Hou-Sandi
baa0da9eb8 WordPress 4.7 RC2.
git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39473 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 06:04:21 +00:00
Andrew Nacin
3bcc86a908 REST API: Register the admin_email setting in single site only.
Merges [39470] and [39471] to the 4.7 branch.

fixes #38990.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39472 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:41:52 +00:00
Gary Pendergast
3b3a0f0a68 REST API: Site URL setting should not be present on multisite installations.
The `siteurl` setting is registered and made available to the REST API. On a multisite installation, this setting is not configurable from the General Settings screen, but due to the above it is configurable from the REST API.

Merge of [39468] to the 4.7 branch.

Props peterwilsoncc.
Fixes #39005.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39469 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:17:26 +00:00
Helen Hou-Sandi
313cb29f82 Custom CSS: Change the help link to something better for users.
fixes #39015 for the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39467 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:11:21 +00:00
Gary Pendergast
e67b742256 REST API: Capability check for editing a single term should use the singular form.
As an extra level of sanity checking, the term ID should be cast as an int in `map_meta_cap()`.

Merge of [39464] to the 4.7 branch.

Props johnbillion, nacin, dd32, pento.
See #35614.
Fixes #39012.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39465 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:08:33 +00:00
Gary Pendergast
0970fc22e1 Docs: Add missing REST API-related args to register_post_type() and register_taxonomy().
These functions now accept the `show_in_rest`, `rest_base`, and `rest_controller_class` args.

Merges [39462] to the 4.7 branch.

Props ketuchetan, rahulsprajapati.
Fixes #39023.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39463 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:49:37 +00:00
Gary Pendergast
aed692cddd REST API: Use the correct error message when editing a single term.
Merges [39460] to the 4.7 branch.

Props ramiy, johnbillion.
Fixes #39017.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39461 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:43:21 +00:00
Gary Pendergast
3904937cd6 Load: Re-add class-wp-upgrader-skins.php, class-feed.php, locale.php, and session.php.
Several files were removed during 4.7 that can be loaded externally, so we need to keep them, though their use is now deprecated.

Merges [39449], [39450], [39453], [39455], and [39456] to the 4.7 branch.
Fixes #39027.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39459 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:29:44 +00:00
Gary Pendergast
378d9f8f7c REST API: Merge similar strings in a comments endpoint parameter description.
Merge of [39457] to the 4.7 branch.

Props ramiy.
Fixes #39036.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39458 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:23:17 +00:00
Dion Hulse
ce83066d30 Revert [38677] from the 4.7 branch.
This avoids fatal errors caused with recursive calling of term functions within the `get_terms` filter.

See #21760.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39454 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:04:05 +00:00
Helen Hou-Sandi
17f7611df2 Twenty Seventeen: Improve ARIA for the nav menu.
The `onResizeARIA()` function was not very useful and buggy.

props afercia.
fixes #39029, #39026 for the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39452 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 03:43:17 +00:00
Helen Hou-Sandi
87e16e3ce3 Twenty Seventeen: Ensure header text color updates in Customizer preview when cleared
Checks if the text color has been cleared and removes the `style` block if it has been. Uses color styles in theme stylesheet.

Props sstoqnov, davidakennedy.

Fixes #38993 for the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39448 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 23:02:15 +00:00
Rachel Baker
75ce33e358 REST API: Fix bug where comment author and author email could be an empty string when creating a comment.
If the `require_name_email` option is true, creating a comment with an empty string for the author name or email should not be accepted.  Both values can be an empty string on update.

Merges [39444] into the 4.7 branch.
Props flixos90, hnle, dd32, rachelbaker, jnylen0, ChopinBach, joehoyle, pento.

Fixes #38971 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39446 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:45:06 +00:00
Helen Hou-Sandi
bcc8cdf112 About page: Add strings for 4.7 and make available for translation.
It doesn't look very pretty; design changes still to come.

merges [39420], [39432], [39433], [39442], [39443] to the 4.7 branch.

props helen, michaelarestad, samuelsidler, jbpaul17, jorbin, nacin, melchoyce, ocean90, ramiy.
see #38616.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39445 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:43:52 +00:00
Rachel Baker
334635ee5e REST API: Fix handling of some orderby parameters for the Posts controller.
- 'orderby' => 'include' requires an array of post_ids via the include collection param.
- 'orderby' => 'id' and 'orderby' => 'slug' need map the correct WP_Query equivalents. 

Merges [39440] to the 4.7 branch.

Props flixos90, hnle, dd32, rachelbaker, joehoyle, pento.
Fixes #38971 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39441 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:20:27 +00:00
Jeremy Felt
fde4185ae4 REST API: Disable DELETE requests for users in multisite.
In wp-admin, users are removed from individual sites rather than deleted. A user can only be deleted from the network admin.
Until support for a PUT request that removes a user's site and content associations is available, DELETE requests are disabled to avoid possible issues with lost content.

Merges [34938] onto 4.7 branch.

Props jnylen0, rachelbaker.
Fixes #38962 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39439 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:15:32 +00:00
Rachel Baker
8fe31dc36a REST API: Return a WP_Error if meta property is not an array.
Fixes bug where a PHP Warning is currently thrown if a client sends a request where `meta` is not an array value.

Merges [39436] onto 4.7 branch.

Props timmydcrawford, jnylen0, rachelbaker, pento.
Fixes #38989 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39437 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:04:06 +00:00
Weston Ruter
73a9c335db Customize: Fix posts limit query arg for WP_Query from incorrect number to posts_per_page.
Merges [39434] onto 4.7 branch.
Props dlh.
Fixes #39022 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39435 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 16:18:43 +00:00
Gary Pendergast
2c8812f524 Plugins: Add a current_priority() method to WP_Hook.
This allows plugins to determine the currently running priority of a filter.

Merges [39430] to the 4.7 branch.

Fixes #39007.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39431 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 07:10:56 +00:00
Gary Pendergast
2c907c7248 Readme: Update recommendations to PHP 7, and to include HTTPS.
See https://wordpress.org/news/2016/12/moving-toward-ssl/

Merges [39428] to the 4.7 branch.

Fixes #39024.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39429 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 07:03:21 +00:00
Gary Pendergast
05b8b42a10 REST API: Require the reassign parameter when deleting users.
When deleting a user through the WordPress admin, a specific decision is presented - whether to assign all of the user's posts to another user, or to delete all of the posts.

This change requires `reassign` as a parameter in the corresponding REST API endpoint, so that content isn't accidentally lost.

Merges [39426] to the 4.7 branch.

Props jeremyfelt.
Fixes #39000.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39427 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:58:36 +00:00
Aaron Jorbin
f2ff360557 Build/Test Tools: Remove PHP 7.1 from allowed failures
[39424] for 4.7

🎉 PHP 7.1 has been officially released. http://php.net/archive/2016.php#id2016-12-01-3

See #37625
Props helen, pento, The PHP team



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39425 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:43:46 +00:00
Helen Hou-Sandi
6df38cddce Twenty Seventeen: Fix broken menu toggle in Customizer after menu items are added
This simplifies the line `$( siteNavigation.closest( '.main-navigation' ), this ).toggleClass( 'toggled-on' );` to `$( siteNavContain ).toggleClass( 'toggled-on' );`, since `this` is the clicked button, so the extra context isn't needed.

Props afercia, laurelfulford.

Fixes #38992 for the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39423 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:33:25 +00:00
Helen Hou-Sandi
3793811761 Twenty Seventeen: Fix style issues with gallery image links
* Ensures dark color scheme has proper box shadow and hover/focus styles.
* Make sure links are correct width.

Props afercia, laurelfulford.

Fixes #38969 for the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39422 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:32:44 +00:00
Helen Hou-Sandi
a10ce3904a Twenty Seventeen: Hide front section panels on page load of Customizer.
Props sstoqnov.

Fixes #38951 for the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39421 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:31:36 +00:00
Joe McGill
9a3f41ea68 Twenty Seventeen: Add .has-header-video styles for custom color schemes.
Following [39413], this adds `.has-header-video` style definitions in
`/inc/custom-header.php` to support custom color schemes.

Props laurelfulford.
Fixes #38995 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39416 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:46:19 +00:00
Joe McGill
a76e08ccab Twenty Seventeen: Better handling of custom headers when no image is set.
This ensures that a standard header is shown on the front page whenever
a header video is set without a header image if the video doesn't load,
e.g., on mobile sizes or if the JS doesn't fire.

This adds a new class, `.has-header-video` that is added whenever the
`wp-custom-header-video-loaded` event is fired, which is then used to style
the custom headers along with `.has-header-image` whenever a header image
is available. This also changes the class name on the custom header media
wrapping `div` from `.custom-header-image` to `.custom-header-media`.

Props laurelfulford, joemcgill.
Fixes #38995 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39414 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:19:44 +00:00
Weston Ruter
b878b509ed Customize: Reuse existing non-auto-draft posts and existing auto-draft posts in the customized state with matching slugs when applying starter content.
* Updates `wp_unique_post_slug()` to ignore `auto-draft` posts. Prevents publishing multiple posts that have the same slugs from starter content.
* Fixes fatal error when attempting to save an header_image setting from a non-admin context.
* Fixes substituting attachment symbols in options and theme mods.
* Fixes applying starter content for header images and background images.

Merges [39411] to 4.7 branch.
See #38114.
Fixes #38928 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39412 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 00:25:47 +00:00
Weston Ruter
a3ed458867 Customize: Reject a changeset update when a non-future date is provided and also ensure that a published changeset always gets set to the current date/time.
* Also moves checks from `customize_save` Ajax handler to the underlying `WP_Customize_Manager::save_changeset_post()` call which plugins may invoke directly.
* Ensures that `customize_save_response` filter is always passed an array, with error code available as `code`.

Props utkarshpatel, westonruter, sayedwp.
Merges [39409] into 4.7 branch.
See #30937.
Fixes #38943 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39410 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 00:06:59 +00:00
Rachel Baker
5a55a6b747 REST API: Add test for creating a comment with an invalid post ID.
Props @jnylen0.

Merges [39375] to the 4.7 branch.
Fixes #38991 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39408 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 03:42:14 +00:00
Rachel Baker
25830c6798 REST API: Correct the admin_email setting description for single site installs.
Display different descriptions for multisite or single site installations.

Props johnbillion, ocean90.

Merges [39406] to the 4.7 branch.
Fixes #38990 for 4.7


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39407 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 03:05:32 +00:00
Weston Ruter
691be0fbf7 Twenty Seventeen: Make spacing on pages without comments consistent
Previously, the top of the page had more space than the bottom, not matching the original design.

Props laurelfulford, melchoyce.
Merges [39404] onto the 4.7 branch.
Fixes #38972 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39405 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 02:51:59 +00:00
Rachel Baker
ff5be90aad REST API: Fix incorrect capability check on term create.
Change the capability check used in `WP_REST_Terms_Controller` when creating a new term is attempted, from `manage_terms` to `edit_terms`. This matches the behavior within the WordPress admin. See #35614.

Props johnbillion, rmccue, rachelbaker, helen, jorbin, SergeyBiryukov.

Merges [39402] to the 4.7 branch.
Fixes #38958 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39403 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 02:45:17 +00:00
Rachel Baker
2a32f5ca13 REST API: Fix incorrect uses of rest_sanitize_value_from_schema().
In the `check_username()` and `check_password()` callbacks in the Users controller cast the provided request value to a string. The `rest_sanitize_value_from_schema()` function was being used incorrectly which was causing unintended request parsing. 
In `rest_sanitize_request_arg()` do not pass nonexistent third parameter for the `rest_sanitize_value_from_schema()` function.

Props jnylen0, joehoyle, rachelbaker, ocean90.

Merges [39400] to the 4.7 branch.
Fixes #38984 for 4.7.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39401 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 02:18:41 +00:00
Mike Schroder
fb1b875797 Media: Fix regression with display of small images in media library.
Fixes a regression in the media library after [38949], which caused
small images (< thumbnail size) to not display within the media library.

Accounts for images that have no intermediate sizes
in `wp_prepare_attachment_for_js()`.

Adds test.

Merges [39396] to the 4.7 branch.

Fixes #38965 for 4.7.
Props joemcgill, clorith, mikeschroder.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39399 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 00:28:00 +00:00
Helen Hou-Sandi
7054419f0f Twenty Seventeen: Make sure header text color is applied when color schemes are active.
Props laurelfulford, ocean90.

Merges [39397] to the 4.7 branch.
Fixes #38980 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39398 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 00:11:26 +00:00
Weston Ruter
ac62809001 Customize: Fix handling of the nav menu item labels (titles) that match defaults (original titles) and fix the display of item type labels.
* Show default labels for nav menu item as placeholders in a control's label field instead of showing blank.
* Store empty string as label instead of copying default labels.
* Prevent labels for post type archive items from being dropped in preview.
* Also ensure that the item type label is displayed on nav menu item controls for settings that are loaded from an existing changeset.

Amends [38618].
See #38015.
Fixes #38955 for 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39395 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:41:50 +00:00
Helen Hou-Sandi
2124943c71 Twenty Seventeen: Make fixed navigation apply at correct height on front page, without header video or image
Props laurelfulford, littlebigthing.

Merges [39392] to the 4.7 branch.
Fixes #38927 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39394 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:38:54 +00:00
Dominik Schilling (ocean90)
8a3192234d Docs: Document the usage of the global $wpdb in _filter_query_attachment_filenames().
Merge of [39390] to the 4.7 branch.

Props mt8.biz.
See #38973.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39391 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:20:33 +00:00
Dominik Schilling (ocean90)
3f120c78cb Twenty Seventeen: Provide a background color fallback for non-webkit browsers on input styles
This allows the styles to work correctly when modified by high contrast computer setups.

Merge of [39388] to the 4.7 branch.

Props presskopp.
See #38939.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39389 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:06:27 +00:00
Dominik Schilling (ocean90)
b07efe6c1f Twenty Seventeen: Allow child themes to easily extend custom color patterns
By adding a filter, child themes can add additional selectors onto the custom color scheme CSS. Like so:

{{{
// Add child theme selectors for color schemes.
function dynamic_seventeen_custom_colors_css( $css, $hue, $saturation ) {
	$css .= '
	.colors-custom .content-menu > article:not(.has-post-thumbnail),
	.colors-custom .content-menu > section:not(.has-post-thumbnail) {
		border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
	}';
	return $css;
}
add_filter( 'twentyseventeen_custom_colors_css', 'dynamic_seventeen_custom_colors_css', 10, 3 );
}}}

Merge of [39386] to the 4.7 branch.

Props celloexpressions.
See #38949.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39387 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 22:56:08 +00:00
Dominik Schilling (ocean90)
b0a9a79f86 Twenty Seventeen: Make screen reader text on scroll arrow more meaningful
This way screen reader users will know what to expect when they use this link.

Merge of [39384] to the 4.7 branch.

Props rianrietveld.
See #38970.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39385 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 22:17:41 +00:00
Dominik Schilling (ocean90)
60e9d045e7 Options: Pass the $passed_default parameter to the default_option_{$option} filter in add_option().
This was missed in [38910].

Merge of [39382] to the 4.7 branch.

Props joehoyle, lucasstark.
See #38176, #38930.

git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39383 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 21:31:38 +00:00
Joe McGill
859f180baf Twenty Seventeen: Keep header videos from extending past footer.
This adds 1px of bottom padding to header videos to keep them from
extending past the footer at the bottom of the page.

Fixes #38950 for 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39381 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 20:58:01 +00:00
Weston Ruter
932b861ef9 Customize: Fix regression in ability to hide fields for advanced menu properties in nav menu item controls.
Props westonruter, celloexpressions.
See #34391.
Fixes #38952 for 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39379 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 18:02:31 +00:00
Weston Ruter
a03f3dc4ee Customize: Fix regression in ability to create submenus for nav menus via drag and drop.
See #34391.
Fixes #38948 for 4.7 branch.
Props delawski, adamsilverstein.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39377 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 17:44:08 +00:00
Helen Hou-Sandi
d9cf3680f3 Twenty Seventeen: Add textdomain for starter content attachment titles.
fixes #38981 for the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39374 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 05:48:52 +00:00
Gary Pendergast
99e5de9431 REST API: Add tests for empty or "no-op" updates.
The API should allow updates that don't actually change anything.  This allows clients to, for example, accidentally send the same request twice without encountering unexpected errors.  This currently works for posts, terms, and users, so this commit adds test cases accordingly.

See #38700 for issues preventing this from working for comments.

Merge of [39371] to the 4.7 branch.

Props jnylen0.
See #38975.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39372 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 03:27:22 +00:00
Dion Hulse
356b9ebdc2 WP_Hook: Re-initialize any actions added directly to $wp_filter by advanced-cache.php.
Props dd32, ocean90.
Merges [39369] to the 4.7 branch.
Fixes #38929.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39370 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-29 05:38:16 +00:00