Commit Graph

36417 Commits

Author SHA1 Message Date
Weston Ruter
c4bffeb619 Customize: Defer populating post_name for auto-draft posts in customized state until posts are published.
The ultimate `post_name` is stored in postmeta until the post is published. The `get_page_by_path()` function does not exclude `auto-draft` posts. Revert changes to `wp_unique_post_slug()` from [39411] which excluded `auto-draft` posts.

Props westonruter, dlh for testing, helen for testing.
See #38114, #38928.
Fixes #39078.


git-svn-id: https://develop.svn.wordpress.org/trunk@39506 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-05 19:32:09 +00:00
Weston Ruter
2253e42f06 Customize: Ensure changeset_uuid query param is removed from the customize.php window's location once a changeset has been published (committed) with starter content.
Props westonruter, dlh for testing.
See #30937.
Fixes #39081.


git-svn-id: https://develop.svn.wordpress.org/trunk@39504 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-05 16:55:29 +00:00
Weston Ruter
206b11aa40 Customize: Prevent posts/pages imported via starter content from being dropped when adding post/page stubs via nav menus and the dropdown-pages control.
Props westonruter, dlh for testing.
See #38114, #34923.
Fixes #39071.


git-svn-id: https://develop.svn.wordpress.org/trunk@39502 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-05 16:46:59 +00:00
Weston Ruter
01876b9888 Customize: Ensure textarea for Custom CSS displays as code (in LTR) when an RTL language is active.
See #35395.
Fixes #39085.


git-svn-id: https://develop.svn.wordpress.org/trunk@39499 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-05 13:54:58 +00:00
David A. Kennedy
89038700dd Default Themes: Update version numbers and readme files for 4.7 release
Bump version numbers and update readme files for themes with changes. Also updates description for Twenty Seventeen and removes version number for HTML5 shiv for easier updates in the future.

Props davidakennedy.

Fixes #38858.


git-svn-id: https://develop.svn.wordpress.org/trunk@39496 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 23:26:11 +00:00
David A. Kennedy
977d0a1d66 Twenty Seventeen: Fix CSS specificity problem with CSS feature query for object-fit
Previously, the theme's CSS feature query for `object-fit` overrode styles it shouldn't have on interior pages.

This moves the feature query farther down in the stylesheet so it takes precedence in the cascade in supported browsers, and applies the appropriate selector for the interior pages. In browsers that don't support feature queries or `object-fit`, the fallback styles are still applied. The problem was that the rules had the same specificity, so this way, the cascade takes over properly. The transforms and position changes for fallbacks are still needed in browsers that don't support `object-fit` and feature queries.

Props peterwilsoncc, davidakennedy.

Fixes #39073.


git-svn-id: https://develop.svn.wordpress.org/trunk@39495 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 23:11:17 +00:00
John Blackbourn
7c02c24e5f Role/Capability: Don't assign the delete_site capability to anyone on single site installs.
This capability is not relevant on single site installs; it only applies to deleting a site on a multisite installation.

Fixes #38326


git-svn-id: https://develop.svn.wordpress.org/trunk@39494 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 22:06:36 +00:00
Adam Silverstein
8948847eb1 Docs: Add inline documentation for image-edit.js.
Adds JSDoc DocBlocks to the imageEdit methods.

Props: andizer, rensw90.
Fixes #38748.


git-svn-id: https://develop.svn.wordpress.org/trunk@39493 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 21:34:11 +00:00
Felix Arntz
40668a1c63 Multisite: Replace is_super_admin() with manage_network for admin bar permissions.
Props iaaxpage.
Fixes #39064. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39492 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 21:20:44 +00:00
Rachel Baker
bc6b164d23 Comments: Merge similar strings between comments.php and the REST API comments controller.
Props ramiy.
Fixes #39014.


git-svn-id: https://develop.svn.wordpress.org/trunk@39490 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 20:31:27 +00:00
Rachel Baker
33f442f17b REST API: Merge similar date strings in the revisions and comments controllers.
Props ramiy.
Fixes #39016.


git-svn-id: https://develop.svn.wordpress.org/trunk@39488 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 20:24:54 +00:00
James Nylen
d2a5f48449 REST API: Treat any falsy value as false in 'rest_allow_anonymous_comments'.
Extend the check in 'rest_allow_anonymous_comments' to accept any falsy value
(previously this was an explicit check for `false`).

One possible failure case is that a plugin developer forgets to include a
return value for some code path in their callback for this filter, leading to a
value of `null` which is currently treated like `true`.

Props joehoyle, jnylen0.

Fixes #39010.


git-svn-id: https://develop.svn.wordpress.org/trunk@39487 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 19:29:18 +00:00
johnbillion
01a6118660 Users: Clarify the return value of get_current_user_id() for non-logged-in users.
Props ovenall
Fixes #39051


git-svn-id: https://develop.svn.wordpress.org/trunk@39486 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 19:23:53 +00:00
David A. Kennedy
d69f3f4db7 Twenty Seventeen: Improve display of video header and header image in modern browsers
The theme uses a hack to help the video header and header image fill the available space. This centers around `max-width: 1000%;`. It causes visual issues (zooming of the header video or image) for all users though.

This fixes that with CSS Features Queries. The hack remains for browsers that don't support Feature Queries  and `object-fit`. Browsers that do support both get a better experience with a more reliable styling of the video and image header container.

Props laurelfulford, peterwilsoncc.

Fixes #39035.


git-svn-id: https://develop.svn.wordpress.org/trunk@39483 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 19:15:02 +00:00
David A. Kennedy
53582841f9 Twenty Seventeen: Add specific font stack for Thai language
Improves legability and design for users viewing the theme with Thai language.

Props imnok, netweb, melchoyce.

Fixes #38937.


git-svn-id: https://develop.svn.wordpress.org/trunk@39482 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 19:05:23 +00:00
John Blackbourn
6861a9aac0 Build/Test Tools: Correctly set up the current screen during list table tests so that they don't fail when run individually.
Props desrosj
Fixes #38761


git-svn-id: https://develop.svn.wordpress.org/trunk@39481 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 19:03:40 +00:00
Andrew Nacin
b16f57240e Build/Test Tools: Specify exact node version in package.json.
Enforce it in the tests.

see #35105.


git-svn-id: https://develop.svn.wordpress.org/trunk@39478 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 17:29:26 +00:00
Weston Ruter
06ee519376 Customize: Ensure a custom_css post insertion gets an initial post revision.
Props georgestephanis, westonruter.
See #30854, #38672, #35395.
Fixes #39032.


git-svn-id: https://develop.svn.wordpress.org/trunk@39477 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 17:28:27 +00:00
Helen Hou-Sandi
980459a68b Docs: Update an @since as there will not be a 4.6.2 before 4.7.
props boonebgorges.
fixes #37291. see [38776].


git-svn-id: https://develop.svn.wordpress.org/trunk@39475 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 17:09:20 +00:00
Andrew Nacin
4b2cbf6ac3 REST API: Register the admin_email setting in single site only.
See [39470]. This time including unit test changes.

fixes #38990.


git-svn-id: https://develop.svn.wordpress.org/trunk@39471 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:40:04 +00:00
Andrew Nacin
ceee0b78e1 REST API: Register the admin_email setting in single site only.
fixes #38990.


git-svn-id: https://develop.svn.wordpress.org/trunk@39470 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:38:38 +00:00
Gary Pendergast
55e972cab3 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.

Props peterwilsoncc.
Fixes #39005.



git-svn-id: https://develop.svn.wordpress.org/trunk@39468 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:15:42 +00:00
Helen Hou-Sandi
97191393bc Custom CSS: Change the help link to something better for users.
fixes #39015.


git-svn-id: https://develop.svn.wordpress.org/trunk@39466 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:10:38 +00:00
Gary Pendergast
c4360e54b2 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()`.

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



git-svn-id: https://develop.svn.wordpress.org/trunk@39464 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 05:07:03 +00:00
Gary Pendergast
eea9aed399 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.

Props ketuchetan, rahulsprajapati.
Fixes #39023.



git-svn-id: https://develop.svn.wordpress.org/trunk@39462 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:47:58 +00:00
Gary Pendergast
8e34471a11 REST API: Use the correct error message when editing a single term.
Props ramiy, johnbillion.
Fixes #39017.



git-svn-id: https://develop.svn.wordpress.org/trunk@39460 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:41:16 +00:00
Gary Pendergast
f82946ab4a REST API: Merge similar strings in a comments endpoint parameter description.
Props ramiy.
Fixes #39036.



git-svn-id: https://develop.svn.wordpress.org/trunk@39457 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:20:56 +00:00
Gary Pendergast
2516ae4d4a Load: No-op locale.php
After re-adding `locale.php` in [39455], remove the content of the file so that it can't cause errors in the event of something loading it early in the WordPress load process.

See #39027.



git-svn-id: https://develop.svn.wordpress.org/trunk@39456 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:15:33 +00:00
Gary Pendergast
7e2009642a Load: Re-add locale.php.
`locale.php` is occasionally included directly by custom external code, so should continue to be available. This behaviour is deprecated.

Partial revert of [38364].
See #37827, #39027.



git-svn-id: https://develop.svn.wordpress.org/trunk@39455 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 04:06:15 +00:00
Gary Pendergast
d7d48f6372 Load: Re-add session.php.
`session.php` is occasionally included directly by custom external code, so should continue to be available. This behaviour is deprecated.

Partial revert of [38373].
See #36335, #39027.



git-svn-id: https://develop.svn.wordpress.org/trunk@39453 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 03:50:02 +00:00
Helen Hou-Sandi
af97f9d16b Twenty Seventeen: Improve ARIA for the nav menu.
The `onResizeARIA()` function was not very useful and buggy.

props afercia.
fixes #39029, #39026.


git-svn-id: https://develop.svn.wordpress.org/trunk@39451 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 03:40:13 +00:00
Gary Pendergast
68c8dba269 Load: Re-add class-wp-upgrader-skins.php.
`class-wp-upgrader-skins.php` is occasionally included directly by custom external code, so should continue to be available. This is deprecated in favour of including `class-wp-upgrader.php`, instead.

Revert of [38379].
See #36335, #39027.



git-svn-id: https://develop.svn.wordpress.org/trunk@39450 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 03:39:03 +00:00
Gary Pendergast
0b1ff178a7 Load: Re-add class-feed.php.
`class-feed.php` is occasionally included directly by custom external code, so should continue to be available. This is deprecated in favour of calling `fetch_feed()`, however..

Partial revert of [38374].
See #36335, #39027.



git-svn-id: https://develop.svn.wordpress.org/trunk@39449 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 03:29:23 +00:00
David A. Kennedy
289ced158b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39447 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 23:00:13 +00:00
Rachel Baker
8c26572c8a 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.

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

Fixes #38971.


git-svn-id: https://develop.svn.wordpress.org/trunk@39444 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:43:03 +00:00
Helen Hou-Sandi
049d677153 About page: Remove link tags from inside translatable strings.
props ramiy.
see #38616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39443 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:36:25 +00:00
Helen Hou-Sandi
92691d92a2 About page: Remove emoji from translatable string.
props ocean90.
see #38616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39442 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 22:29:37 +00:00
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