Commit Graph

36130 Commits

Author SHA1 Message Date
Rachel Baker 0de150991c 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. 

Props flixos90, hnle, dd32, rachelbaker, joehoyle, pento.

Fixes #38971.


git-svn-id: https://develop.svn.wordpress.org/trunk@39440 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:17:36 +00:00
Jeremy Felt 9232ecc9fc 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.

Props jnylen0, rachelbaker.
Fixes #38962.


git-svn-id: https://develop.svn.wordpress.org/trunk@39438 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:10:01 +00:00
Rachel Baker a55506974e 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.

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

git-svn-id: https://develop.svn.wordpress.org/trunk@39436 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 21:55:09 +00:00
Weston Ruter 511ba69e52 Customize: Fix posts limit query arg for `WP_Query` from incorrect `number` to `posts_per_page`.
Props dlh.
Fixes #39022.


git-svn-id: https://develop.svn.wordpress.org/trunk@39434 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 16:17:03 +00:00
Dominik Schilling (ocean90) 65ed569b96 About page: Don't wrap URLs with `<code>` tags.
See #38616.

git-svn-id: https://develop.svn.wordpress.org/trunk@39433 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 12:30:12 +00:00
Dominik Schilling (ocean90) b2a8ce0a72 About page: Restore the double `%` in a `printf()` call which has been removed in [39420].
We need this to escape the percent symbol for "100%".

See #38616.

git-svn-id: https://develop.svn.wordpress.org/trunk@39432 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 12:02:01 +00:00
Gary Pendergast 5ff3f14d78 Plugins: Add a `current_priority()` method to `WP_Hook`.
This allows plugins to determine the currently running priority of a filter.

Fixes #39007.



git-svn-id: https://develop.svn.wordpress.org/trunk@39430 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 07:09:33 +00:00
Gary Pendergast 4db36030e9 Readme: Update recommendations to PHP 7, and to include HTTPS.
See https://wordpress.org/news/2016/12/moving-toward-ssl/

Fixes #39024.



git-svn-id: https://develop.svn.wordpress.org/trunk@39428 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 07:01:39 +00:00
Gary Pendergast d5bfeae9d8 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.

Props jeremyfelt.
Fixes #39000.



git-svn-id: https://develop.svn.wordpress.org/trunk@39426 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:53:59 +00:00
Aaron Jorbin 5eddda525b Build/Test Tools: Remove PHP 7.1 from allowed failures
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/trunk@39424 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:37:46 +00:00
Helen Hou-Sandi 684629b00f About page: Add strings for 4.7 and make available for translation.
It doesn't look very pretty; design changes still to come.

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


git-svn-id: https://develop.svn.wordpress.org/trunk@39420 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:30:20 +00:00
David A. Kennedy df0a35d0d9 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39419 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:24:12 +00:00
David A. Kennedy 4eb6d688a5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39418 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:09:46 +00:00
David A. Kennedy 4cf49676ab Twenty Seventeen: Hide front section panels on page load of Customizer.
Props sstoqnov.

Fixes #38951.


git-svn-id: https://develop.svn.wordpress.org/trunk@39417 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:56:30 +00:00
Joe McGill 25a6c0cc02 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39415 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:43:25 +00:00
Joe McGill 2a3c20626a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39413 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:11:56 +00:00
Weston Ruter bdd33e9dff 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.

See #38114.
Fixes #38928.


git-svn-id: https://develop.svn.wordpress.org/trunk@39411 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 00:24:19 +00:00
Weston Ruter 3e9a2d5a5a 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.
See #30937.
Fixes #38943.


git-svn-id: https://develop.svn.wordpress.org/trunk@39409 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 00:01:51 +00:00
Rachel Baker 6a7883ffcf REST API: Correct the `admin_email` setting description for single site installs.
Display different descriptions for multisite or single site installations.

Props johnbillion, ocean90.
Fixes #38990.


git-svn-id: https://develop.svn.wordpress.org/trunk@39406 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 03:02:48 +00:00
David A. Kennedy b59e6d3d2e 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.

Fixes #38972.


git-svn-id: https://develop.svn.wordpress.org/trunk@39404 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 02:47:09 +00:00
Rachel Baker 03b4bd4ed9 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.

Fixes #38958.

git-svn-id: https://develop.svn.wordpress.org/trunk@39402 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 02:30:07 +00:00
Rachel Baker 6ab5804df1 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.
Fixes #38984.

git-svn-id: https://develop.svn.wordpress.org/trunk@39400 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 02:11:56 +00:00
David A. Kennedy d4d90b0425 Twenty Seventeen: Make sure header text color is applied when color schemes are active.
Props laurelfulford, ocean90.

Fixes #38980.


git-svn-id: https://develop.svn.wordpress.org/trunk@39397 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 00:03:27 +00:00
Mike Schroder 352e997f92 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.

Fixes #38965.
Props joemcgill, clorith, mikeschroder.

git-svn-id: https://develop.svn.wordpress.org/trunk@39396 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 00:01:38 +00:00
Weston Ruter 79182c0fe2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39393 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:35:34 +00:00
David A. Kennedy a27570c98a Twenty Seventeen: Make fixed navigation apply at correct height on front page, without header video or image
Props laurelfulford, littlebigthing.

Fixes #38927.


git-svn-id: https://develop.svn.wordpress.org/trunk@39392 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:29:23 +00:00
Dominik Schilling (ocean90) a1af86e001 Docs: Document the usage of the global `$wpdb` in `_filter_query_attachment_filenames()`.
Props mt8.biz.
Fixes #38973.

git-svn-id: https://develop.svn.wordpress.org/trunk@39390 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:19:14 +00:00
David A. Kennedy 8ff0f85857 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.

Props presskopp.

Fixes #38939.


git-svn-id: https://develop.svn.wordpress.org/trunk@39388 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:02:38 +00:00
David A. Kennedy 856cd3af71 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 );
}}}

Props celloexpressions.

Fixes #38949.


git-svn-id: https://develop.svn.wordpress.org/trunk@39386 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 22:50:40 +00:00
David A. Kennedy dc01ad1cf5 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.

Props rianrietveld.

Fixes #38970.


git-svn-id: https://develop.svn.wordpress.org/trunk@39384 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 22:15:21 +00:00
Dominik Schilling (ocean90) 13fd32cc20 Options: Pass the `$passed_default` parameter to the `'default_option_{$option}` filter in `add_option()`.
This was missed in [38910].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@39382 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 21:21:21 +00:00
Joe McGill a35a3cf952 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39380 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 20:52:36 +00:00
Weston Ruter 30a9cc4884 Customize: Fix regression in ability to hide fields for advanced menu properties in nav menu item controls.
Props westonruter, celloexpressions.
See #34391.
Fixes #38952.


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


git-svn-id: https://develop.svn.wordpress.org/trunk@39376 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 17:42:05 +00:00
James Nylen 74efb754fd REST API: Add test for creating a comment with an invalid post ID.
#38816 fixed creating a comment with an invalid post ID (this should not be
allowed), but we need a test for this.

Fixes #38991.


git-svn-id: https://develop.svn.wordpress.org/trunk@39375 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 16:21:38 +00:00
Helen Hou-Sandi 60cc79e40b Twenty Seventeen: Add textdomain for starter content attachment titles.
fixes #38981.


git-svn-id: https://develop.svn.wordpress.org/trunk@39373 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 05:47:29 +00:00
jnylen0 c716e604c5 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.

Fixes #38975.


git-svn-id: https://develop.svn.wordpress.org/trunk@39371 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 03:02:01 +00:00
Dion Hulse 2d854ef714 WP_Hook: Re-initialize any actions added directly to `$wp_filter` by `advanced-cache.php`.
Props dd32, ocean90.
Fixes #38929.


git-svn-id: https://develop.svn.wordpress.org/trunk@39369 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-29 05:36:46 +00:00
Andrew Ozz 01094b40c1 TinyMCE: fix the styling of notices generated by the editor UI.
Props: mor10, karmatosed, azaozz.
Fixes #38917.

git-svn-id: https://develop.svn.wordpress.org/trunk@39367 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-28 02:11:15 +00:00
Weston Ruter 9c39b16119 Customize: Fix logic for previewing the URL for `nav_menu_item` settings for terms and post type archives.
Fixes typo in args passed to `get_term_link()` which caused a fatal error due to this call returning a `WP_Error` which was set to `url`. Also fixes never-satisfiable condition for obtaining post type archive URL. Also ensures that `WP_Error` never leaks through as `url` by setting it to an empty string. Adds missing unit tests.

Amends [38991].
See #38114.
Fixes #38945.


git-svn-id: https://develop.svn.wordpress.org/trunk@39365 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-27 03:04:35 +00:00
John Blackbourn 8b1afc4743 Build/Test Tools: Add an extra `WP_Error` assertion when testing a valid user activation key. This provides a better failure message if the assertion does fail.
See #38716


git-svn-id: https://develop.svn.wordpress.org/trunk@39364 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-27 01:24:58 +00:00
John Blackbourn 25ede80cab Build/Test Tools: When testing the output of `wp_list_pages()`, use a known and fixed date for each post so the tests don't fail when the date changes between the beginning and end of a test.
Props xrmx
Fixes #38688


git-svn-id: https://develop.svn.wordpress.org/trunk@39363 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-27 00:07:49 +00:00
Weston Ruter 1eff31e319 Git: Prevent untracked files from being ignored by git in bundled themes.
See #27207.
Fixes #38779.


git-svn-id: https://develop.svn.wordpress.org/trunk@39362 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-25 08:27:43 +00:00
Gary Pendergast 2a50523106 Git: Ignore patch related files, so they can't be accidentally committed.
This duplicates the changes in [39360] for git.

See #38727.



git-svn-id: https://develop.svn.wordpress.org/trunk@39361 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-25 04:46:23 +00:00
Gary Pendergast 5577248264 SVN: Ignore patch related files, so they can't be accidentally committed.
Ignore `*.rej`, `*.orig`, `*.patch`, and `*.diff` files in all directories.

Fixes #38727.



git-svn-id: https://develop.svn.wordpress.org/trunk@39360 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-25 04:35:00 +00:00
Helen Hou-Sandi a8cb1d8208 Trunk is really 4.8-alpha now.
git-svn-id: https://develop.svn.wordpress.org/trunk@39359 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-24 21:55:17 +00:00
Helen Hou-Sandi 26a28e6450 Trunk is now 4.8-alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@39357 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-24 21:37:47 +00:00
Helen Hou-Sandi 055e85698b Post-4.7 RC1 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@39355 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-24 04:28:58 +00:00
Helen Hou-Sandi 70ce11bbfd WordPress 4.7 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@39354 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-24 04:02:24 +00:00
Joe Hoyle a1c2caa4e3 REST API: Special case the “standard” post format to always be allowed.
Fixes #38916.

git-svn-id: https://develop.svn.wordpress.org/trunk@39353 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-24 00:07:50 +00:00