Commit Graph

23101 Commits

Author SHA1 Message Date
Weston Ruter
90cd5e5f80 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39412


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 00:26:34 +00:00
Weston Ruter
816196aee7 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39410


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-02 00:07:33 +00:00
Rachel Baker
b460e1fd0d 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39408


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 03:43:35 +00:00
Rachel Baker
a332bb92d2 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

Built from https://develop.svn.wordpress.org/branches/4.7@39407


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 03:06:33 +00:00
Weston Ruter
41118e509a 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39405


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:52:47 +00:00
Rachel Baker
1d9a15ad4a 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39403


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:46:43 +00:00
Rachel Baker
cb6bdc2d4c 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.
Built from https://develop.svn.wordpress.org/branches/4.7@39401


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 02:19:32 +00:00
Mike Schroder
bc1df6bef1 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39399


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 00:28:32 +00:00
Helen Hou-Sandí
7b69275632 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39398


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-01 00:12:34 +00:00
Weston Ruter
71169d688a 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39395


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:42:32 +00:00
Helen Hou-Sandí
02fa7656d1 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39394


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:39:31 +00:00
Dominik Schilling
29e03dd26c 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.
Built from https://develop.svn.wordpress.org/branches/4.7@39391


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:21:32 +00:00
Dominik Schilling
849d8db4fc 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.
Built from https://develop.svn.wordpress.org/branches/4.7@39389


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 23:07:36 +00:00
Dominik Schilling
f50646d6c4 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.
Built from https://develop.svn.wordpress.org/branches/4.7@39387


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 22:57:35 +00:00
Dominik Schilling
413896af01 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.
Built from https://develop.svn.wordpress.org/branches/4.7@39385


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 22:18:33 +00:00
Dominik Schilling
08ff35374b 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.
Built from https://develop.svn.wordpress.org/branches/4.7@39383


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 21:32:34 +00:00
Joe McGill
9650704689 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39381


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 20:58:34 +00:00
Weston Ruter
b9cd04e8ad 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39379


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 18:03:38 +00:00
Weston Ruter
ea8b01eac6 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39377


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 17:45:34 +00:00
Helen Hou-Sandí
6d161ba61a Twenty Seventeen: Add textdomain for starter content attachment titles.
fixes #38981 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39374


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 05:49:34 +00:00
Gary Pendergast
fa7b15c74e 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39372


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 03:28:36 +00:00
Dion Hulse
158d1b55b4 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.

Built from https://develop.svn.wordpress.org/branches/4.7@39370


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 05:39:31 +00:00
Andrew Nacin
28ba2c0911 Build: Remove fsevents from npm-shrinkwrap.json
fsevents is macOS only, and npm-shrinkwrap tries to force it onto other architectures, causing build failures. Upstream: https://github.com/npm/npm/issues/2679.

fixes #38657 for the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@39368


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:59:54 +00:00
Weston Ruter
a8ef25ce7b 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 for 4.7.

Built from https://develop.svn.wordpress.org/branches/4.7@39366


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:59:01 +00:00
Dominik Schilling
acd9d9fad3 Build/Test Tools: Add npm-shrinkwrap.json to 4.7.
By shrinkwraping our dependencies, the same versions of everything will be installed no matter what rules the dependency package.json has specified.

Fixes #38657.
Built from https://develop.svn.wordpress.org/branches/4.7@39358


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:11:52 +00:00
Helen Hou-Sandí
88d2633119 Post-4.7 RC1 bump.
Built from https://develop.svn.wordpress.org/trunk@39355


git-svn-id: http://core.svn.wordpress.org/trunk@39295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-24 04:29:31 +00:00
Helen Hou-Sandí
590ae4393c WordPress 4.7 RC1.
Built from https://develop.svn.wordpress.org/trunk@39354


git-svn-id: http://core.svn.wordpress.org/trunk@39294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-24 04:03:30 +00:00
Joe Hoyle
c662bb84dc REST API: Special case the “standard” post format to always be allowed.
Fixes #38916.
Built from https://develop.svn.wordpress.org/trunk@39353


git-svn-id: http://core.svn.wordpress.org/trunk@39293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-24 00:08:31 +00:00
Joe Hoyle
0a787caec6 REST API: Allow unsetting a post’s password.
Props danielbachhuber, iseulde.
Fixes #38919.
Built from https://develop.svn.wordpress.org/trunk@39352


git-svn-id: http://core.svn.wordpress.org/trunk@39292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 23:13:32 +00:00
Drew Jaynes
a7ddf24f3d Docs: Add a missing changelog entry for the point where the $tagnames parameter was added to get_shortcode_regex().
Props keesiemeijer.
Fixes #38914.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 17:35:32 +00:00
Weston Ruter
456941a018 Customize: Refactor logic for updating custom_css posts by introducing wp_update_custom_css_post() function and renaming update filter.
* Moves logic from `WP_Customize_Custom_CSS_Setting::update()` into a re-usable `wp_update_custom_css_post()` function, useful for future REST API endpoint, WP-CLI command, or plugin migrations.
* Renames `customize_update_custom_css_post_content_args` filter to `update_custom_css_data` and improves the naming of the parameters. Instead of passing `post_content` and `post_content_filtered` the filtered array now contains `css` and `preprocessed` respectively. 
* The second context param for the `update_custom_css_data` filter is now an array of the original args passed to `wp_update_custom_css_post()` and there is now no more `$setting` arg since it isn't necessarily being called in the customizer context.

Props westonruter, georgestephanis.
See #35395.
Fixes #38672.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 17:34:31 +00:00
Joe Hoyle
6f189ddbc8 REST API: Add support for comments of password-protected posts.
Core requires the post password to view and create comments on password protected posts, so we must support a “password” param on the comments endpoint when fetch comments for a specific post and creating a comment on a password protected post.

Props flixos90, jnylen0.
Fixes #38692.
Built from https://develop.svn.wordpress.org/trunk@39349


git-svn-id: http://core.svn.wordpress.org/trunk@39289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 16:15:31 +00:00
Rachel Baker
a985a4d126 REST API: Always fire the rest_insert_* actions after the related object is updated or inserted.
Brings consistency to the `rest_insert_*` actions. Also includes some shuffling and clean-up as well including:
- Ensure we are passing the most current `$post` and `$user` objects to the `update_additional_fields_for_object()` callbacks.
- Changes the function signature of `handle_status_param()` in the Comments controller to accept just the comment_id as the 2nd parameter, instead of a full WP_Comment object. Only the comment_id is needed in the method, this avoids having to include another `get_comment()` call. 
- Renames a variable in the `create_item()` method of the Posts controller from `$post` -> `$prepared_post` to be more explicit.
- Minor fixes/clarifications to the rest_insert_* hook docs

Props rachelbaker, joehoyle
Fixes #38905.
Built from https://develop.svn.wordpress.org/trunk@39348


git-svn-id: http://core.svn.wordpress.org/trunk@39288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 15:33:31 +00:00
Pascal Birchler
98e8bf7ba2 Embeds: Correctly remove security attribute from iframes in IE 10 and IE 11.
This was originally added in 4.4, but presumably broke with [35708], which prevented these browsers from actually reaching the relevant code section.
Let's make embeds work again in IE 10 and IE 11.

Fixes #38694.
Built from https://develop.svn.wordpress.org/trunk@39347


git-svn-id: http://core.svn.wordpress.org/trunk@39287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 13:38:33 +00:00
Helen Hou-Sandí
70fc99e323 Theme starter content: Add support for featured images and page templates.
Featured image support means that attachments can now be imported. Media can be sideloaded from within theme or plugin directories. Like other posts, attachments are auto-drafts until customizer changes are published, and are not duplicated when they already exist in the customized state. Attachment IDs can be used for any number of purposes, much like post IDs. Twenty Seventeen now includes 3 images used as featured images to best showcase the multi-section homepage setup.

As featured image IDs are stored in post meta, it also made sense to add support for page templates. Twenty Seventeen does not include any such templates, but the functionality can be quite important for displaying themes to their best effect.

props westonruter, helen, flixos90.
fixes #38615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 09:53:33 +00:00
Weston Ruter
6b5d960453 Customize: Clean up docs and code style for customize changes in 4.7.
* Adds missing `resolve`/`fail` for promise returned by `loadThemePreview`.
* Adds missing jsdoc blocks and tags.
* Adds missing phpdoc and makes corrections.

See #37770.
Fixes #38908.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 06:05:32 +00:00
Joe Hoyle
e20ded7e75 REST API: Make JS Client store schema in session storage.
Props adamsilverstein.
Fixes #38895.
Built from https://develop.svn.wordpress.org/trunk@39344


git-svn-id: http://core.svn.wordpress.org/trunk@39284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 02:55:30 +00:00
Joe Hoyle
14654d9539 REST API: Allow unsetting of page templates in update requests.
Sending a request to update a page with the template property set to an empty string resulted in an error because “” was not a valid value in the enum.

Props lucasstark, swissspidy.
Fixes #38877.
Built from https://develop.svn.wordpress.org/trunk@39343


git-svn-id: http://core.svn.wordpress.org/trunk@39283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 02:47:30 +00:00
Joe Hoyle
d711f2c18d REST API: Update “resource” strings to use the appropriate nouns.
Props ramiy.
Fixes #38811.
Built from https://develop.svn.wordpress.org/trunk@39342


git-svn-id: http://core.svn.wordpress.org/trunk@39282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 02:42:30 +00:00
David A. Kennedy
68f5457770 Twenty Seventeen: Ensure edit button label displays properly in other languages
This bug occurred in any language where text wraps character-by-character, since those languages don't delimit words with spaces. In Japanese, Chinese and Korean, etc., it was possible for the label to be displayed vertically.

Props tg29359, afercia, odysseygate.

Fixes #38876.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 00:44:30 +00:00
Joe McGill
46b2ef90be Twenty Seventeen: CSS coding standards fixes.
This makes a few adjustments to CSS to bring them inline with WordPress
CSS coding standards including:

* Font weights should be defined using numeric values
* Do not pad parentheses with spaces

This also fixes a couple of typos to inline comments.

Props netweb for initial patch.
Fixes #38901.
Built from https://develop.svn.wordpress.org/trunk@39340


git-svn-id: http://core.svn.wordpress.org/trunk@39280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-22 20:47:33 +00:00
Helen Hou-Sandí
96960d8ed6 Twenty Seventeen: Ensure galleries display correctly in IE11.
It appears IE11 needs an explicit width for an `inline-block` parent element.

props derrickkoo, afercia.
fixes #38872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-22 15:51:36 +00:00
Peter Wilson
0b8740d868 Themes: Prevent unneeded database updates in wp_get_custom_css_post().
When a custom header image was set but custom CSS was not, `wp_get_custom_css_post()` was generating an UPDATE query on every frontend request.

In theme options the header image meta data is stored as an object. In `update_option()` this hits an edge case as the resource IDs of the old and new values never match.

This changes the logic of `wp_get_custom_css_post()` to ensure `set_theme_mod()` is only called when the custom CSS has changed.

Props bradyvercher, helen.
Fixes #38866.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-22 11:41:34 +00:00
Rachel Baker
d87fe366a9 REST API: Set the comment type to a readonly property in the schema.
Document the type property as `readonly` and remove the default value. After #38820 it is no longer possible to set the type property on a comment to anything a custom type.

Props jnylen0, rachelbaker.
Fixes #38886.
Built from https://develop.svn.wordpress.org/trunk@39337


git-svn-id: http://core.svn.wordpress.org/trunk@39277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 22:56:30 +00:00
Helen Hou-Sandí
2406fe498c Plugin install: De-duplicate a conditional, introduced in [38172].
props ChrisWiegman.
fixes #38190.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 21:33:30 +00:00
Joe Hoyle
014bb86248 REST API: Update description strings to match already existing ones in the admin.
Props dimadin.
Fixes #38807.
Built from https://develop.svn.wordpress.org/trunk@39335


git-svn-id: http://core.svn.wordpress.org/trunk@39275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 20:41:30 +00:00
Andrew Ozz
9925a4ebb5 TinyMCE: avoid calling editor.focus() on loading the content in the editor. It may trigger scroll-into-view in the browser. Call the quirks fix in TinyMCE directly.
Props gitlost.
Fixes #38511.
Built from https://develop.svn.wordpress.org/trunk@39334


git-svn-id: http://core.svn.wordpress.org/trunk@39274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 20:15:31 +00:00
Weston Ruter
277d4d0ab0 Customize: Prevent selective refresh from causing infinite fallback refreshes when nav menu contains invalid items.
Invalid nav menu items are exported as settings in the customize controls since it `is_admin()`, but any such `nav_menu_item` settings are excluded from the preview since it's the frontend. Selective refresh for nav menus needs to ignore the syncing of any such `nav_menu_item` settings that are `_invalid` since they are never rendered, and when a nav menu only contains invalid items, an infinite fallback refresh can ensue.

Fixes #38890.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 19:16:32 +00:00
Weston Ruter
3284f9a989 Customize: Remove iframe-specific behaviors from customize preview when previewing on frontend and not contained inside iframe.
* Strip out `customize_messenger_channel` from preview window URL when not contained in iframe.
* Allow interacting with unpreviewable links and forms when previewing customized state on frontend.

See #30937.
Fixes #38867.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 16:56:30 +00:00
Dominik Schilling
2328e7b17a I18N: In wp_dropdown_languages() rename the new show_site_locale_default argument to show_option_site_default.
This makes it consistent with arguments of other `wp_dropdown_*()` functions.

Props SergeyBiryukov.
See #38632.
Fixes #38871.
Built from https://develop.svn.wordpress.org/trunk@39331


git-svn-id: http://core.svn.wordpress.org/trunk@39271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 16:14:30 +00:00