Commit Graph

11994 Commits

Author SHA1 Message Date
Joe Hoyle
a8a015c3c0 REST API: Update description strings to match already existing ones in the admin.
Props dimadin.
Fixes #38807.

git-svn-id: https://develop.svn.wordpress.org/trunk@39335 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 20:40:10 +00:00
azaozz
48192f196f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39334 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 20:14:01 +00:00
Weston Ruter
ccf9b72446 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39333 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 19:15:05 +00:00
Weston Ruter
f21e17dbf0 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39332 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 16:55:20 +00:00
Dominik Schilling (ocean90)
257026f7a3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39331 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 16:14:01 +00:00
Dominik Schilling (ocean90)
e2f67203bb I18N: Add an additional caching layer for _load_textdomain_just_in_time().
Previously, if no translation files exist for a text domain, `_load_textdomain_just_in_time()` went through the entire process each time it was called. This results in an increased call to `get_locale()` and its `locale` filter.
This change splits the logic into `_get_path_to_translation()` and `_get_path_to_translation_from_lang_dir()`. The former, which is used by `_load_textdomain_just_in_time()`, caches the result of the latter. It also removes some non-working code from `WP_Locale_Switcher::load_translations()`.

Props jrf, swissspidy, sharkomatic, ocean90.
Fixes #37997.

git-svn-id: https://develop.svn.wordpress.org/trunk@39330 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 16:06:38 +00:00
Ryan McCue
0cbea5855e REST API: Trim trailing slashes from routes.
WordPress' rewrites do this usually, but the behaviour was inconsistent when using non-pretty permalinks.

Props joehoyle.
Fixes #38873.


git-svn-id: https://develop.svn.wordpress.org/trunk@39329 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 05:45:31 +00:00
Ryan McCue
096f23db65 REST API: Correctly map meta keys to field names.
This accidentally assumed $name was the same as $meta_key, which ruined the whole point of $name.

Props tharsheblows, joehoyle.
Fixes #38786.


git-svn-id: https://develop.svn.wordpress.org/trunk@39328 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 05:40:46 +00:00
Ryan McCue
4b275bf861 REST API: Disable anonymous commenting by default.
Adding a brand new anonymous comment method is a potential conduit for spam. Since it's still useful functionality, we're now hiding it behind a filter to allow plugins and themes to turn it on if they do want it.

Props helen, rachelbaker, joehoyle.
Fixes #38855.


git-svn-id: https://develop.svn.wordpress.org/trunk@39327 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 05:31:07 +00:00
John Blackbourn
347040745d I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
See #38882


git-svn-id: https://develop.svn.wordpress.org/trunk@39326 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 02:45:53 +00:00
Sergey Biryukov
7faf699c69 I18N: Move the support forums URL in update-related HTTP API error messages to a separate translatable string that is already used elsewhere.
Props ramiy, SergeyBiryukov.
Fixes #38880.

git-svn-id: https://develop.svn.wordpress.org/trunk@39325 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 01:51:39 +00:00
John Blackbourn
942302eb63 Remove an erroneous @TODO introduced in [39323].
See #38882


git-svn-id: https://develop.svn.wordpress.org/trunk@39324 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 01:25:09 +00:00
John Blackbourn
f6f0e6098d I18n: Begin introducing translator comments for strings which include placeholders but no accompanying translator comment.
Adds context to one string used in two different contexts for the new user and new site signup email notification.

More to come.

See #38882


git-svn-id: https://develop.svn.wordpress.org/trunk@39323 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 01:21:01 +00:00
Joe Hoyle
ec023e37ec REST API: Merge two error messages for edit / update.
Props ramiy.
Fixes #38879.

git-svn-id: https://develop.svn.wordpress.org/trunk@39322 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-20 22:35:44 +00:00
Sergey Biryukov
da47a962d5 REST API: Update error messages in WP_REST_Comments_Controller to use the common text for permission errors.
Props ramiy.
Fixes #38875.

git-svn-id: https://develop.svn.wordpress.org/trunk@39321 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-20 11:45:59 +00:00
Weston Ruter
bf07e57e4b Customize: Ensure that WP_Customize_Manager::save_changeset_post() returns setting_validities even for supplied values that are unchanged from values in changeset.
Check setting existence and authorization via `WP_Customize_Manager::validate_setting_values()` even for `null` values to account for custom params being added to settings, preventing failures from being silently ignored.

See #38705, #30937.
Fixes #38865.


git-svn-id: https://develop.svn.wordpress.org/trunk@39320 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 22:38:40 +00:00
Gary Pendergast
e969ae3b6a Emoji: Update Twemoji fallback to version 2.2.2.
This removes support for the skin tone modifier on emoji involving two or more people. This functionality is opposed by Apple and Google, so there is unlikely to be an input mechanism for such emoji, they oppose it on the grounds that they "...do not think a mechanism should be supported that only permits depiction of multi-person groups (or elements) in which each person has the same skin tone."

See their official notification for further details: http://www.unicode.org/L2/L2016/16332-remove-multi-emb.pdf

This change does not require a CDN update, as no emoji were altered or added, only removed.

See #38113.



git-svn-id: https://develop.svn.wordpress.org/trunk@39319 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 11:04:30 +00:00
Weston Ruter
68b9b45548 Customize: Ensure WP_Customize_Setting::value() returns previewed value for custom types utilizing the customize_value_{$id_base} filter.
Fixes #38864.


git-svn-id: https://develop.svn.wordpress.org/trunk@39318 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 05:59:12 +00:00
Helen Hou-Sandi
e1215e1268 Twenty Seventeen: Avoid an undefined index notice after [39291].
props westonruter.
see #38847.


git-svn-id: https://develop.svn.wordpress.org/trunk@39317 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 04:54:14 +00:00
Sergey Biryukov
bc11236b4c I18N: Use 'WordPress hook name' instead of 'PHP hook name' in translator comments added in [39315].
See #38862.

git-svn-id: https://develop.svn.wordpress.org/trunk@39316 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 02:43:49 +00:00
Sergey Biryukov
b706194ec3 I18N: Add translator comments for strings in _deprecated_*() functions.
See #38862.

git-svn-id: https://develop.svn.wordpress.org/trunk@39315 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 02:38:16 +00:00
Sergey Biryukov
d9c848142e I18N: Remove unnecessary __() calls in _rotate_image_resource() and _flip_image_resource().
Use `_deprecated_function()`'s native strings.

Props ramiy.
Fixes #38862.

git-svn-id: https://develop.svn.wordpress.org/trunk@39314 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 02:29:51 +00:00
Sergey Biryukov
78ae6a3ac0 REST API: Merge some more permission error strings missed in [39309].
See #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39313 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 02:20:08 +00:00
Sergey Biryukov
4e5fdda8f9 Text Changes: Merge strings referring to list_users capability.
See #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39312 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 02:15:10 +00:00
Sergey Biryukov
ecb95b299c I18N: Merge two 'RSS Error:' strings.
Props ramiy.
Fixes #38861.

git-svn-id: https://develop.svn.wordpress.org/trunk@39311 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 01:56:01 +00:00
Sergey Biryukov
ae7642de08 REST API: After [39306], move author_ip argument to the correct place.
See #38822.

git-svn-id: https://develop.svn.wordpress.org/trunk@39310 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 01:51:01 +00:00
Sergey Biryukov
dad2cdf083 REST API: Merge and clarify some permission error strings.
Fixes #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39309 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 01:45:30 +00:00
Sergey Biryukov
81353e76be Text Changes: Merge and clarify some permission error strings in the admin.
See #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39308 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 01:37:25 +00:00
Sergey Biryukov
abfbc08c34 I18N: Merge two 'ERROR:' strings.
Props ramiy.
Fixes #38860.

git-svn-id: https://develop.svn.wordpress.org/trunk@39307 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 01:08:40 +00:00
Sergey Biryukov
24b1b19c50 REST API: After [39302], clarify author_ip parameter in error message.
Properties of objects should not be translated, and therefore are pulled out of the translation strings.

Props ramiy.
Fixes #38822.

git-svn-id: https://develop.svn.wordpress.org/trunk@39306 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 01:05:36 +00:00
Sergey Biryukov
b61f722856 REST API: Merge two similar permission error strings in class-wp-rest-comments-controller.php.
We're checking if `current_user_can( 'moderate_comments' )` here, not the specific comment permissions.

See #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39305 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 00:09:07 +00:00
Sergey Biryukov
d087812e08 REST API: Merge two similar permission error strings.
Props ramiy.
Fixes #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39304 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 23:52:21 +00:00
Mike Schroder
0ab17d2158 Media: Allow override of PDF setup for multiple pages or DPI.
After [39187], WordPress started loading only the first page of a PDF.

This is appropriate for performance, but made it impossible to
write plugins that read other pages without overriding `load()`.

Introduces `WP_Image_Editor_Imagick->pdf_setup()`, to allow an override
to change WordPress' rendering DPI defaults or which pages are loaded.

Fixes #38832. See #38522, #31050.
Props markoheijnen, joemcgill, mikeschroder.

git-svn-id: https://develop.svn.wordpress.org/trunk@39303 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 22:21:19 +00:00
Rachel Baker
aa4af7839e REST API: On Comment create, limit the ability to set the author_ip value directly.
Users without the moderate_comments capability can no longer set the `author_ip` property directly, and instead receive a `WP_Error` if they attempt to do so. Otherwise, the `author_ip property` is populated from `$_SERVER['REMOTE_ADDR']` if present and a valid IP value. Finally, fallback to 127.0.0.1 as a last resort.

Props dd32, rachelbaker, joehoyle.
Fixes #38819.

git-svn-id: https://develop.svn.wordpress.org/trunk@39302 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 21:12:03 +00:00
Helen Hou-Sandi
9385bda4ce Autoprefixer for [39249].
Fixes one errant value and re-aligns some existing prefixed property values so they don't get doubled when precommit/postcss is run again in the future.

props davidakennedy.
see #29158.


git-svn-id: https://develop.svn.wordpress.org/trunk@39301 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 21:05:33 +00:00
David A. Kennedy
364d79e205 Twenty Seventeen: Make all Codex links in DocBlocks use HTTPS
Props johnpgreen.

Fixes #38854.


git-svn-id: https://develop.svn.wordpress.org/trunk@39300 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 20:48:47 +00:00
Ella van Dorpe
1e4c6afab3 TinyMCE: fix automatic scroll on page load.
Set focus when new content is loaded in the editor, but not when it's the initial load.

Fixes #38511.



git-svn-id: https://develop.svn.wordpress.org/trunk@39299 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 20:37:50 +00:00
Joe Hoyle
96dba32dfb REST API: Clarify parameters when used in error strings.
Properties of objects should not be translated, and therefore are pulled out of the translation strings.

Props ocean90, ramiy, danielbachhuber.
Fixes #38822.

git-svn-id: https://develop.svn.wordpress.org/trunk@39298 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 20:20:01 +00:00
David A. Kennedy
05b394ccaa Twenty Seventeen: Adds background-attachment: fixed; to devices that should support it
iOS  disables this feature under the hood, but it also distorts the images – unlike other mobile devices that don't support it. So this adds a  check for both `background-attachment: fixed` support or whether it’s an iOS device - passing it adds the class `background-fixed` which is used to add the proper styles.

It also lowers the media query so the parallax-like style is present on a wider range of screens since this bug can be better targeted and avoided. In this way, screens that aren't the offending devices aren't punished merely based on screen size.

Props joemcgill, laurelfulford, helen.

Fixes #38395.


git-svn-id: https://develop.svn.wordpress.org/trunk@39297 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 20:10:18 +00:00
Joe Hoyle
ba5a196d9e REST API: Change “ipv4” types to “ip” to support ipv6.
Stop presuming IP address are IPv4, instead make the type “ip” to be agnostic of IP version. This fixes requests with ipv6 addresses for comments in core.

Props dd32, schlessera, danielbachhuber.
Fixes #38818.

git-svn-id: https://develop.svn.wordpress.org/trunk@39296 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 19:32:03 +00:00
Joe Hoyle
db07183b6f REST API: Check read permissions on posts when viewing comments.
With a few tests for getting / creating comments to reflect core behaviour.

Props timmyc.

git-svn-id: https://develop.svn.wordpress.org/trunk@39295 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 19:06:26 +00:00
Helen Hou-Sandi
b34803f431 Twenty Seventeen: Rename the starter content menus to match the menu area names.
Saves strings and is more descriptive.

props davidakennedy.
see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39294 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 19:04:25 +00:00
Rachel Baker
7552367e7a REST API: Remove the karma property and query parameter from the Comments endpoints.
WordPress has not used the `karma` property internally for the past 8 years. There is no need to expose it in the REST API endpoints. Sites that use `karma` can include it using the `register_rest_field()` function.

Props dd32, danielbachhuber.
Fixes #38821.

git-svn-id: https://develop.svn.wordpress.org/trunk@39292 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 18:52:19 +00:00
David A. Kennedy
ebe736af3f Twenty Seventeen: Ensure the use of proper image size for custom header image
The `sizes` attribute was calculated incorrectly, resulting in the browser downloading the wrong resource. This filters the attribute to correct that.

Before the filter, the `img` contained:
`sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px"`

And after:
`sizes="100vw"`

Props joemcgill, transl8or.

Fixes #38847.


git-svn-id: https://develop.svn.wordpress.org/trunk@39291 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 18:42:16 +00:00
Rachel Baker
f553ad6277 REST API: On comment create, return an error if the type property is set to anything other than comment.
Of the default comment_types, only comments are expected to be created via the REST API endpoint. Comments do not have registered types the way that Posts do, so we do not have a method to accurately check permissions for arbitrary comment types.

Props dd32, boonebgorges, rachelbaker.
Fixes #38820.

git-svn-id: https://develop.svn.wordpress.org/trunk@39290 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 18:36:10 +00:00
Rachel Baker
659822098a REST API: Allow parent property to be explicitly set to 0 when creating or updating a Post.
Props lucasstark, danielbachhuber.
Fixes #38852.

git-svn-id: https://develop.svn.wordpress.org/trunk@39289 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 18:11:49 +00:00
Rachel Baker
ff38fc46e4 REST API: On comment create, return an error if the post parameter does not relate to a valid WP_Post object.
Return a `WP_Error` object for attempts to create a comment without an empty or invalid `post` ID.

Props dd32, jnylen0, rachelbaker.
Fixes #38816.

git-svn-id: https://develop.svn.wordpress.org/trunk@39288 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 16:55:03 +00:00
Rachel Baker
cceb9a6053 REST API: On comment create, fallback to the user_agent header value.
If a user-agent is not explicitly provided in the `author_user_agent` parameter, fallback to the `user_agent` value in the request header.

Props dd32, jnylen0, rachelbaker.
Fixes #38817.

git-svn-id: https://develop.svn.wordpress.org/trunk@39287 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 16:21:27 +00:00
Helen Hou-Sandi
faf751b039 Twenty Seventeen: Remove some extraneous function calls.
fixes #38848.


git-svn-id: https://develop.svn.wordpress.org/trunk@39286 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 06:35:15 +00:00
Weston Ruter
c1b2e9dd41 Customize: Remove obsolete edit shortcut style rules from Twenty Seventeen.
Props celloexpressions.
Fixes #38776.


git-svn-id: https://develop.svn.wordpress.org/trunk@39285 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 05:22:00 +00:00
Ella van Dorpe
48830b5e10 TinyMCE: remove extra space in tooltip.
This prevents wrapping and looks better, even though there seems to be some space between the other control key characters.

See #38063.



git-svn-id: https://develop.svn.wordpress.org/trunk@39284 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 23:58:11 +00:00
Peter Wilson
bd320a9965 Taxonomy: Update register_taxonomy hook to use WP_Taxonomy object.
Casts `WP_Taxonomy` to an array for passing to the `register_taxonomy` hook. This maintains backward compatibility with the processed arguments used prior to WordPress 4.7.

Fixes #38765.


git-svn-id: https://develop.svn.wordpress.org/trunk@39283 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 23:34:42 +00:00
Ella van Dorpe
bbd3e0174e TinyMCE views: fix Firefox issues.
* Set focus before rendering to prevent reload in Firefox.
* Rerender views if they are unloaded.
* Remove timeout added in [29513].
* Fix argument in wp.mce.views.render.
* Empty views on hide. Missed in #36434.

Props gitlost, azaozz, iseulde.
Fixes #38511.



git-svn-id: https://develop.svn.wordpress.org/trunk@39282 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 20:31:12 +00:00
Sergey Biryukov
3f11a75b2d Docs: Use 3-digit, x.x.x style semantic versioning for @since 4.7.0 entries.
See #37770.

git-svn-id: https://develop.svn.wordpress.org/trunk@39281 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 18:27:16 +00:00
Sergey Biryukov
f493ebb369 Taxonomy: Prevent wp_list_categories() from producing not well-nested output if hide_title_if_empty is true.
Props chesio.
Fixes #38839. See #33460.

git-svn-id: https://develop.svn.wordpress.org/trunk@39280 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 18:01:13 +00:00
Joe McGill
1c547f56c1 Twenty Seventeen: Additional default header image optimizations.
This is a follow-up to [39248] that applies a bit more compression to
the default header image in Twenty Seventeen.

Props Presskopp, lukecavanagh.
Fixes #38793.

git-svn-id: https://develop.svn.wordpress.org/trunk@39279 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 17:12:49 +00:00
Sergey Biryukov
eb26b2a6a7 Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.
Props ramiy, SergeyBiryukov.
Fixes #38808.

git-svn-id: https://develop.svn.wordpress.org/trunk@39278 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 15:52:18 +00:00
Andrea Fercia
b2983232c3 Small coding standards cleanup of wp-custom-header.js.
Small coding standards cleanup of wp-custom-header.js after [39272].


git-svn-id: https://develop.svn.wordpress.org/trunk@39277 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 09:03:39 +00:00
Weston Ruter
a3b66814a7 Customize: Add unit tests for importing theme starter content.
Props welcher, westonruter.
See #38114, #38533, #38615.
Fixes #38540.


git-svn-id: https://develop.svn.wordpress.org/trunk@39276 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 08:17:57 +00:00
Gary Pendergast
365241878f Database: Add support for LIKE-escaped tables in ::get_table_from_query().
The `SHOW TABLES LIKE` query can be used to search for tables that match a pattern, `wp\_123\_%`, for example. While this isn't the name of an actual table, the `wp_123_` prefix can be used by database drop-ins to direct the query correctly. This change removes the escaping and `%` modifier, to provide this usable prefix.

Props andy, pento.
Fixes #38751.



git-svn-id: https://develop.svn.wordpress.org/trunk@39275 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 04:20:22 +00:00
Boone Gorges
206a330d72 Comments: Query used to fill comment descendants should reset 'offset' and 'number' params.
Descendant queries should not inherit the 'offset' and 'number'
parameters of the parent query, or descendants will be missed.

Previously: [38497].

See #37696.

git-svn-id: https://develop.svn.wordpress.org/trunk@39274 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-17 03:02:40 +00:00
Joe McGill
1e05bf877e Twenty Seventeen: Add styles for custom header video controls.
Following [39272], this uses the `header_video_settings` filter to modify
the default video header control markup and adds theme specific styles
for the play/pause button.

Props melchoyce, laurelfulford, joemcgill, davidakennedy, bradyvercher.
Fixes #38697.

git-svn-id: https://develop.svn.wordpress.org/trunk@39273 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 23:37:42 +00:00
Joe McGill
b5563ef917 Themes: Improve a11y and extendability of custom video headers.
This adds play/pause controls to video headers, along with voice
assistance, using `wp.a11y.speak`, to make custom video headers more
accessible. To make styling the play/pause button easier for themes,
CSS has been omitted from the default implementation.

This also includes a refactor of the `wp.customHeader` code to introduce
a `BaseHandler` class, which can be extended by plugins and themes to modify
or enhance the default video handlers.

Props davidakennedy, afercia, bradyvercher, joemcgill, adamsilverstein, rianrietveld.
Fixes #38678.

git-svn-id: https://develop.svn.wordpress.org/trunk@39272 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 23:25:28 +00:00
Weston Ruter
ac9a74eff5 Customize: Ensure Close button actually closes customizer (instead of going back) after switching to a different theme inside a customize-loader iframe.
Fixes #38833.


git-svn-id: https://develop.svn.wordpress.org/trunk@39271 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 22:16:10 +00:00
Weston Ruter
0dbb9c4248 Customize: Prevent edit shortcut buttons from being inserted into container elements in the head or into elements which should not get interactive children.
See #27403, #38672.
Fixes #38830.


git-svn-id: https://develop.svn.wordpress.org/trunk@39270 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 20:36:40 +00:00
Dominik Schilling (ocean90)
a9a8a9b121 Users: In edit_user() fall back to site's locale instead of en_US for invalid user locales.
See #38632, #29783.
Fixes #38798.

git-svn-id: https://develop.svn.wordpress.org/trunk@39269 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 20:11:12 +00:00
Weston Ruter
be9b516d42 Customize: Allow URL for Codex link in Additional CSS section to be translated.
Props odysseygate, ocean90, westonruter.
See #35395.
Fixes #38823.


git-svn-id: https://develop.svn.wordpress.org/trunk@39268 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 18:41:13 +00:00
Sergey Biryukov
b91eca1291 REST API: After [39252] and [39264], uppercase some more 'ID' references in translatable strings.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39266 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 13:27:10 +00:00
Sergey Biryukov
9421418577 REST API: Uppercase 'ID' in endpoint descriptions and error messages for consistency with other strings.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39264 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 12:17:31 +00:00
Helen Hou-Sandi
93583764b5 Post-4.7 beta 4 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@39263 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 01:53:12 +00:00
Helen Hou-Sandi
d8fbae7fc3 WordPress 4.7 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@39262 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 01:34:31 +00:00
Helen Hou-Sandi
5d43d3a353 Theme starter content: Add reference IDs for most default widgets.
Some widgets that require more configuration are not included, such as RSS and Custom Menu. Tag Cloud is also not included because fresh sites do not have any tags to display.

Also adds a search widget to a Twenty Seventeen footer widget area.

see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39261 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 00:39:47 +00:00
Helen Hou-Sandi
e29ff6f4ca Theme starter content: Refine the content for pages.
see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39260 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 00:28:27 +00:00
Sergey Biryukov
830f60ffb8 REST API: Unify some more permission error messages.
Props ramiy.
Fixes #38803.

git-svn-id: https://develop.svn.wordpress.org/trunk@39259 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 23:35:50 +00:00
Sergey Biryukov
6e997f7cf9 Text Changes: Unify permission error messages in wp-admin/users.php.
Props ramiy.
Fixes #38804.

git-svn-id: https://develop.svn.wordpress.org/trunk@39258 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 22:24:30 +00:00
Sergey Biryukov
922878c13f REST API: Unify permission error messages.
Props ramiy.
Fixes #38803.

git-svn-id: https://develop.svn.wordpress.org/trunk@39257 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 22:22:33 +00:00
Helen Hou-Sandi
2c3006d7a1 Theme starter content: Add more social link items to select from.
New: Foursquare, GitHub, LinkedIn, Pinterest, and YouTube. They are also now all alphabetized.

see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39256 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 21:19:40 +00:00
Helen Hou-Sandi
345341f8d9 Theme starter content: Revamp the credits widget into an about widget.
The credits widget from the original commit was a nice test to see the date changing, but isn't really very inspirational. Also, implement it in Twenty Seventeen.

see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39255 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 21:07:36 +00:00
Sergey Biryukov
b059e8df3e I18N: Remove <code> tags from translatable strings in wp-includes/class-wp-customize-manager.php.
Props ramiy.
Fixes #38802.

git-svn-id: https://develop.svn.wordpress.org/trunk@39254 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:53:18 +00:00
Sergey Biryukov
a0be8c4393 Text Changes: Unify permission error message in wp-ajax-response.js.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@39253 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:41:40 +00:00
Sergey Biryukov
72b100ed7e REST API: Remove two duplicate strings, use the ones we already have.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39252 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:39:13 +00:00
Sergey Biryukov
4230b2a17c REST API: Unify permission error messages.
Props ramiy.
See #38791, #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@39251 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 20:36:27 +00:00
Joe Hoyle
d76017c51e REST API: Clean up argument and property types.
There's a couple of places where we were missing type notes for arguments, which mainly affects documentation.

Props jnylen0.
Fixes #38792.


git-svn-id: https://develop.svn.wordpress.org/trunk@39250 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 18:15:30 +00:00
Helen Hou-Sandi
d37312f3bf Customize: More visible focus and hover states for close and back buttons.
props celloexpressions, folletto.
fixes #29158.


git-svn-id: https://develop.svn.wordpress.org/trunk@39249 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 18:10:16 +00:00
Joe McGill
e9c20890da Twenty Seventeen: Compress the default header image.
This replaces the default `header.jpg` with a compressed version.
The original was 209KB and the new version is 143KB with almost no
distinguishable visual loss.

Props Presskopp.
Fixes #38793.

git-svn-id: https://develop.svn.wordpress.org/trunk@39248 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 18:00:22 +00:00
Andrea Fercia
a3e9876c39 Accessibility: Improve the Post Attributes meta box fields labels.
With [38951] the support for custom page templates has been extended to all post
types. By making the visible meta box titles real labels, accessibility improves
for all users and form fields have meaningful labels.

Fixes #38790.


git-svn-id: https://develop.svn.wordpress.org/trunk@39247 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 16:00:41 +00:00
Joe McGill
f922c64efa Media: Make PDF preview sizes filterable.
This adds a new filter, `fallback_intermediate_image_sizes`, which
can be used to modify the array of image sizes created for previewing
PDFs in the media library and checks for the existence of sizes before
processing any image representations of a PDF.

Fixes #38594.

git-svn-id: https://develop.svn.wordpress.org/trunk@39246 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 13:25:46 +00:00
Sergey Biryukov
9ae30a3725 REST API: After [39238] and [39239], move the remaining translator comments to preceding line.
See #38791.

git-svn-id: https://develop.svn.wordpress.org/trunk@39245 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 13:06:11 +00:00
Dominik Schilling (ocean90)
6e19fe7f5c Docs: Apply documentation standards to the new get_available_languages filter.
See #38788.

git-svn-id: https://develop.svn.wordpress.org/trunk@39244 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:51:17 +00:00
Weston Ruter
8bb2e8e9f7 Customize: Ensure edit shortcuts have same background color regardless of theme colors.
Fixes #38776.


git-svn-id: https://develop.svn.wordpress.org/trunk@39243 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:13:21 +00:00
Weston Ruter
b7efb95bc9 Customize: Add !important line-height to edit shortcut buttons.
Ensure that icon inside edit shortcut is centered when theme defines default `line-height` for `button` elements.

Fixes #38787.


git-svn-id: https://develop.svn.wordpress.org/trunk@39242 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:07:49 +00:00
Weston Ruter
29629ecc52 Customize: Allow starter content to apply in a new theme when switching from another theme containing changes.
* Ensure that starter content can apply from theme B after previewing starter content in theme A.
* Introduce new `starter_content` flag in changeset setting params which is used to capture whether a value is starter content and thus can be overridden.
* Create changeset up-front with `starter_content` flags instead of waiting for `AUTOSAVE_INTERVAL`.
* Eliminate instantiation of settings for widget instances in favor of directly calling `sanitize_widget_js_instance`. This eliminates issues with looking for widgets before they are registered.
* Ensure that non-placeholders (inline arrays instead of string references) can be supplied in starter content.
* Re-use auto-draft posts as starter content across theme switches.
* Introduce `starter_content` param for `WP_Customize_Manager::save_changeset_post()` which is `false` except when starter content is being loaded on a `fresh_site`.

See #38114.
Fixes #38541.


git-svn-id: https://develop.svn.wordpress.org/trunk@39241 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 09:02:38 +00:00
Peter Wilson
55fd899391 Themes: Remove front page restriction from video header functions.
Adds a callback for determining when video headers should be displayed in themes supporting custom headers. By default, video headers are only displayed on the front page of a site.

Theme authors may set a custom callback by passing `'video-active-callback' => 'mytheme_video_active_callback'` as an argument. The default callback is `is_front_page()`.

This introduces the new function `is_header_video_active()` - returns `true` on pages that should display video headers. The return value can be filtered using the new filter of the same name.

Props flixos90, bradyvercher, peterwilsoncc, joemcgill.
Fixes #38738.


git-svn-id: https://develop.svn.wordpress.org/trunk@39240 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 07:15:20 +00:00
Ryan McCue
2d0cd4493c REST API: Move translator comments to preceding line.
Inline translator comments break POT file generation.

Props dd32.
See #38791.


git-svn-id: https://develop.svn.wordpress.org/trunk@39239 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 05:38:21 +00:00
Ryan McCue
6fee13fda7 REST API: Add translator comments to text with placeholders.
Props dimadin.
Fixes #38791.


git-svn-id: https://develop.svn.wordpress.org/trunk@39238 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 04:27:49 +00:00
Weston Ruter
c03e8cd51c Customize: Only show video header controls if previewing front page; show explanatory notice when controls are hidden.
Also include todo for the `header_video` control's `button_labels`. See #38796.

Props westonruter, joemcgill, celloexpressions.
Fixes #38778.


git-svn-id: https://develop.svn.wordpress.org/trunk@39237 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 03:46:14 +00:00
Peter Wilson
f62112fa16 Posts, Post Types: Improve sanitisation of templates' post types.
Prevents post type templates ignoring post types due to invalid characters. Each entry in the `Template Post Type` comment is run through `sanitize_key()` to match the sanitisation used by `register_post_type()`.

Fixes #38766.


git-svn-id: https://develop.svn.wordpress.org/trunk@39236 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 03:36:13 +00:00
Gary Pendergast
80bd60fb88 I18N: Add the get_available_languages filter.
Sometimes, a language file may not exist in exactly the format or location that `get_available_languages()` expects it to be in - for sites with this level of customisation, they need to be able to add their own language files to the list of those available.

Props yoavf.
Fixes #38788.



git-svn-id: https://develop.svn.wordpress.org/trunk@39235 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 01:18:37 +00:00
Weston Ruter
32325e8e1d Customize: Use video-specific labels for buttons in Header Video media control.
See #38172.


git-svn-id: https://develop.svn.wordpress.org/trunk@39234 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 00:21:33 +00:00
Weston Ruter
ad0dae996e Customize: Adjust layout for edit shortcuts only when shown.
Add theme-specific positioning of edit shortcuts in Twenty Fourteen and Twenty Seventeen.

Props sirbrillig, sstoqnov, westonruter.
Fixes #38651.


git-svn-id: https://develop.svn.wordpress.org/trunk@39233 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 00:14:24 +00:00
Tammie Lister
c8b86fdd52 Twenty Seventeen: Fix for mobile menu parent items requiring double tap
After further review from the accessibility team, it was determined that the menu items with sub-menus don't need the aria-haspopup attribute.

Props davidakennedy, celloexpressions, voldemortensen, afercia
See #38397



git-svn-id: https://develop.svn.wordpress.org/trunk@39232 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 22:33:40 +00:00
Helen Hou-Sandi
7ba0908947 Theme starter content: Add context to all strings.
fixes #38770.


git-svn-id: https://develop.svn.wordpress.org/trunk@39231 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 21:37:55 +00:00
Dominik Schilling (ocean90)
cf220df2b7 I18N: Don't use get_available_languages() in _load_textdomain_just_in_time().
`get_available_languages()` is only designed to work with translations for core. Using it for plugins/themes means unnecessary `strpos()` checks and incomplete results for plugins/themes whose names are beginning with `admin-` or `ms-`.

Props swissspidy, ocean90.
Fixes #38590.

git-svn-id: https://develop.svn.wordpress.org/trunk@39230 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 21:06:22 +00:00
Weston Ruter
58d01ff805 Customize: Maximize height of Custom CSS textarea without causing doubled scrollbars.
Textarea will fill vertical height of Custom CSS section for browsers that support `calc()` and when plugins don't add other controls to the section. Also run CSS autoprefixer.

Props michaelarestad, westonruter.
See #35395.
Fixes #38755.


git-svn-id: https://develop.svn.wordpress.org/trunk@39229 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 19:11:35 +00:00
Weston Ruter
292011aecc Customize: Improve styles for hover, focus, and active states on edit shortcuts.
Props michaelarestad.
Fixes #38758.


git-svn-id: https://develop.svn.wordpress.org/trunk@39228 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 18:48:59 +00:00
Weston Ruter
64e9d9f4eb Customize: Use selective refresh for custom header changes when possible.
* Use `postMessage` transport for header image settings by default when video headers are supported, and thus `the_custom_header_markup()` will necessarily be used (and thus a selective refresh partial will be available).
* Ensure that `the_custom_header_markup()` always outputs a container element in the customizer preview even if the header is empty.
* Ensure that edit shortcut appearing for custom header does not get positioned off-screen.

Props bradyvercher, westonruter.
See #38639.
Fixes #38737.


git-svn-id: https://develop.svn.wordpress.org/trunk@39227 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 18:40:08 +00:00
Tammie Lister
28befc73cd Twenty Fourteen: Removes video header support
Support was added to test implementation but never completed. This removes the test implementation.

Props davidakennedy
Fixes #38783


git-svn-id: https://develop.svn.wordpress.org/trunk@39226 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 17:16:04 +00:00
Tammie Lister
bffa48a6ee Twenty Seventeen: Resolves focused controls hidden by the top menu.
When a page is scrolled, the top nav menu become fixed. Depending on the page content this caused issue where focused links or buttons may be hidden behind the  nav menu.

Props afercia, davidakennedy, Fencer04
Fixes #38476



git-svn-id: https://develop.svn.wordpress.org/trunk@39225 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 17:00:57 +00:00
Tammie Lister
6d7ed1e861 Twenty Seventeen: Fixes custom header text color issues
Removes default header text color and updates and updates selectors.

Props laurelfulford, davidakennedy, Idealien
Fixes #38391



git-svn-id: https://develop.svn.wordpress.org/trunk@39224 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:48:32 +00:00
Joe Hoyle
850dd1be76 REST API: Make all collection params filterable.
For developers wanting to add their own registered collection parameters, they can now use the `rest_$type_collection_params` filter. This brings consistency with the already existing `rest_$post_type_collection_params`.

Fixes #38710.
Props jnylen0.


git-svn-id: https://develop.svn.wordpress.org/trunk@39223 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:41:40 +00:00
Joe Hoyle
58169b04fa REST API: Validate and Sanitize registered meta based off the schema.
With the addition of Array support in our schema validation functions, it's now possible to use these in the meta validation and sanitization steps. Also, this increases the test coverage of using registered via meta the API significantly.

Fixes #38531.
Props rachelbaker, tharsheblows.


git-svn-id: https://develop.svn.wordpress.org/trunk@39222 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:35:35 +00:00
David A. Kennedy
76e44c9166 Twenty Seventeen: Make sure theme JavaScript follows proper coding standards
Props sstoqnov, afercia.

Fixes #38752.


git-svn-id: https://develop.svn.wordpress.org/trunk@39221 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 11:40:55 +00:00
David A. Kennedy
5b41a1c33e Twenty Seventeen: Make custom header preview match front end in Customizer when changed
* Toggles `has-header-image` body class  in Customizer preview whenever images or videos are added or removed.
* Hides the `.custom-header-image`div in CSS when an image or video haven't been set so preview changes are smoother.
* Also fixes the main issues in #38391 – making the preview match.

Props bradyvercher.

Fixes #38627.
See #38391.


git-svn-id: https://develop.svn.wordpress.org/trunk@39220 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 11:22:25 +00:00
Ryan McCue
ecb1e33d0d REST API: Improve validation for usernames and passwords.
Also improves the slashing of user data in the REST API to avoid data loss.

Props jnylen0.
Fixes #38739.


git-svn-id: https://develop.svn.wordpress.org/trunk@39219 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 07:12:31 +00:00
Weston Ruter
47a04c044d Customize: Remove root panel description text which notes that edit shortcuts can be toggled by clicking anywhere in the preview.
Amends [39131], in which this method of toggling edit shortcuts was removed.
Props presskopp.
See #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@39218 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 04:32:47 +00:00
Andrew Ozz
61de8de75a TinyMCE: fix black outline around _moz_abspos. This is added in Firefox in paragraphs inserted after a non-editable block.
See #38757.

git-svn-id: https://develop.svn.wordpress.org/trunk@39217 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 02:33:05 +00:00
David A. Kennedy
2835aa5f99 Twenty Seventeen: Adds numbers to the table of contents in style.css
Props karmatosed.

Fixes #38767.


git-svn-id: https://develop.svn.wordpress.org/trunk@39216 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 23:44:39 +00:00
David A. Kennedy
40b3a5a878 Twenty Seventeen: Fix Customizer preview display issues in IE9
IE9 doesn't understands `vh ` (vertical height) when inside of an `iframe`. Normally IE9 will understand `vh` as the vertical height relative to the viewport, but in an `iframe`, IE9 thinks the vertical height is relative to the size of the whole page. So this fixes that when the site is viewed in the Customizer preview – an `iframe`.

Props laurelfulford.

Fixes #38722.


git-svn-id: https://develop.svn.wordpress.org/trunk@39215 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 23:30:53 +00:00
Weston Ruter
2158edc28f Customize: Prevent the "Hide Controls" button label from overrunning the device preview buttons.
Adds translation context for "Hide Controls" strings so translators can supply shorter strings where space is constrained. Adds styles to fade-out long the "Hide Controls" label where it would run into the device preview buttons.

Props westonruter, ocean90.
Fixes #38762.


git-svn-id: https://develop.svn.wordpress.org/trunk@39214 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 18:59:21 +00:00
Helen Hou-Sandi
0c044ba8d9 Media: Clearly indicate that PDF thumbnails are just document previews.
This helps affirm that your upload is fine, and has not been reduced down to the first page or changed into an image. This applies to the attachment details modal in the media library, where media is also now centered in the preview area.

props folletto, helen.
fixes #38717.


git-svn-id: https://develop.svn.wordpress.org/trunk@39213 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 16:38:06 +00:00
Dion Hulse
6ade77e936 WP_HTTP: Map internal Requests hooks to WordPress actions.
This change introduces a `requests-{$hook}` action which can be used to hook into Requests hooks, and restores the `http_api_curl` action.

Props rmccue.
Fixes #37843.


git-svn-id: https://develop.svn.wordpress.org/trunk@39212 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 10:35:15 +00:00
Dion Hulse
4404f32cb5 Updates: Allow background updates to update multiple plugins/themes in the same request.
Due to the `clear_update_cache` parameter not being respected, update caches were being cleared incorrectly which prevented multiple plugins to be updated at the same time in background updates - failing with a `fs_unavailable` error message.

Fixes #38024


git-svn-id: https://develop.svn.wordpress.org/trunk@39211 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 09:52:49 +00:00
Dion Hulse
7e9960edad Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy.
Fixes #38655.


git-svn-id: https://develop.svn.wordpress.org/trunk@39210 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 07:41:30 +00:00
Weston Ruter
c68c1c8ec7 Customize: Improve extensibility of Custom CSS.
* Add `customize_value_custom_css` filter to `WP_Customize_Custom_CSS::value()` method.
* Introduce `customize_update_custom_css_post_content_args` filter in `WP_Customize_Custom_CSS::update()` method.
* Make clear that `wp_get_custom_css()` and `wp_get_custom_css` filter are specifically for obtaining the value to render/display. Eliminate use of `wp_get_custom_css()` when getting the setting value. Use the underlying `post_value` directly when `is_previewed`.
* Move anonymous functions handing JS previewing for `custom_logo`, `custom_css`, and `background` into named functions on the `wp.customize.settingPreviewHandlers` to allow plugins to override/extend preview logic.
* Update `_custom_background_cb` to always print a `style` tag wen in the customizer preview, and update background preview logic to replace existing style element instead of appending a new style to the head so that background changes don't unexpectedly override any Custom CSS in the preview's stylesheet cascade.

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


git-svn-id: https://develop.svn.wordpress.org/trunk@39209 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 02:42:04 +00:00
David A. Kennedy
97ae697d6a Twenty Seventeen: Fix typos in font family translator comment
Props dimadin.

Fixes #38740.


git-svn-id: https://develop.svn.wordpress.org/trunk@39208 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 01:29:29 +00:00
David A. Kennedy
09a0941999 Twenty Seventeen: Update screen-reader-text to reset word-wrap
This resets the property to normal where needed and, to be safe, uses `!important`. It avoids screen readers reading out words ignoring spaces between words in some cases.

Props afercia.

Fixes #38764.


git-svn-id: https://develop.svn.wordpress.org/trunk@39207 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 00:25:49 +00:00
Tammie Lister
5cab939b1e Twenty Seventeen: Keyboard navigation on Safari 10 fix
This resolves the weird behaviour on Safari 10 has some weird behaviour.

Props rianrietveld, swisspidy, afercia, sami.keijonen, arush, davidakennedy
Fixes #38387



git-svn-id: https://develop.svn.wordpress.org/trunk@39206 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-12 23:38:43 +00:00
Joe McGill
ef9eb5f26e Customize: Rename "Header Visuals" to "Header Media".
"Header Visuals" is a bit vague since the title/tagline are arguably
also “header visuals”. "Header Media" is more descriptive and is
consistent with how we refer to images/videos throughout core.

Props bradyvercher.
Fixes #38756.

git-svn-id: https://develop.svn.wordpress.org/trunk@39205 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 23:23:06 +00:00
Andrew Ozz
9f67a915d9 TinyMCE: fix freezing the editor when wpautop is disabled and a paragraph starts with a lot of white space characters.
Fixes #38294.

git-svn-id: https://develop.svn.wordpress.org/trunk@39204 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 23:06:03 +00:00
Dominik Schilling (ocean90)
74e3e309c3 Multisite: Rename the $user parameter to $user_login in wpmu_signup_blog_notification() and wpmu_signup_user_notification().
[38961] added a `$user = get_user_by( 'login', $user );` call which was overriding the `$user` string variable for the login name. The change to `$user_login` makes this clear.

Props johnjamesjacoby.
Fixes #38763.

git-svn-id: https://develop.svn.wordpress.org/trunk@39203 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 22:19:14 +00:00
Weston Ruter
5f9c6ef4ae Customize: Remove left-margin guard from edit shortcuts and adjust for small screen sizes.
Removes the `.customize-partial-edit-shortcut-left-margin` class which was not effective on some themes, created a worse experience for other themes, and which did not recalculate when the preview was reflowed or resized. Now some small-width media queries are added to handle common cases while more dramatic issues can be handled by the theme. Also renames `Partial.positionEditShortcut()`to `Partial.addEditShortcutToPlacement()` which is a more accurate description of its function.

Props sirbrillig, sstoqnov.
See #38651, #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@39202 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 09:46:47 +00:00
Helen Hou-Sandi
9d73e7a311 Post-4.7 beta 3 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@39201 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 03:31:59 +00:00
Helen Hou-Sandi
543fe671c0 WordPress 4.7 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@39200 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 03:18:47 +00:00
Weston Ruter
af640568fe Customize: Prevent previewer from appearing to freeze when refreshing too fast.
Fixes race condition issue where a previous iframe fails to get destroyed, leaving a iframe pending loading persistently shown.

Props nikeo, westonruter.
Fixes #38728.


git-svn-id: https://develop.svn.wordpress.org/trunk@39199 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 22:42:38 +00:00
Helen Hou-Sandi
195e86fda5 Twenty Seventeen: Better RTL positioning for scroll down arrow.
props adamsilverstein.
fixes #38706.


git-svn-id: https://develop.svn.wordpress.org/trunk@39198 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 13:53:58 +00:00
Helen Hou-Sandi
9f6a9e6c4a Customize: Ensure RTL version of customize-preview.css is loaded.
props adamsilverstein.
see #27403, #38706.


git-svn-id: https://develop.svn.wordpress.org/trunk@39197 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 13:53:00 +00:00
Joe Hoyle
08c7dddc41 REST API: Allow updating a comment without the content present.
For all resources in the REST API, sending partial updates is supported. This fixes needing to _always_ specify comment content.

Props jnylen.
Fixes #38720.


git-svn-id: https://develop.svn.wordpress.org/trunk@39196 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 03:34:30 +00:00
Helen Hou-Sandi
208998a9d5 Customize: Make "Add New Page" buttons less intrusive.
They now better match the existing add functionality from the category metabox and are better separated from the surrounding inputs. All hail `.button-link`.

fixes #38164. see #35126.


git-svn-id: https://develop.svn.wordpress.org/trunk@39194 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:55:56 +00:00
joehoyle
660333387e REST API: Use wp_slash rather than addslashes.
See #38726.
Props dd32.


git-svn-id: https://develop.svn.wordpress.org/trunk@39192 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:38:02 +00:00
Joe Hoyle
c67401baf1 REST API: Add rest_base to response objects of wp/v2/taxonomies and wp/v2/types
Though we have the `_links.collection` available, having this value can be useful to know post type / taxonomy urls if you need to build them another way.

Props youknowriad, jnylen0.
Fixes #38607.


git-svn-id: https://develop.svn.wordpress.org/trunk@39191 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:20:09 +00:00
Joe Hoyle
ec2ffb45c1 REST API: unfiltered_html and slashing: terms.
Follow-up to #38609 and #38704; handle slashes correctly for taxonomy terms.

Props westonruter, jnylen0.
Fixes #38726, see #38609.


git-svn-id: https://develop.svn.wordpress.org/trunk@39190 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:09:40 +00:00
John Blackbourn
9ac95f7650 Docs: Improve the documentation for parameters which accept OBJECT, ARRAY_A, and ARRAY_N as parameters.
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@39188 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 22:59:02 +00:00
Mike Schroder
28e538bf80 Media: Only load first PDF page for thumbnails.
To improve performance, directly load the first page of uploaded PDFs
to reduce the total clock time necessary to generate thumbnails.

Props dglingren, lukecavanagh, helen, johnbillion, mikeschroder.
See #38522.

git-svn-id: https://develop.svn.wordpress.org/trunk@39187 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 21:04:04 +00:00
Weston Ruter
477e34fbf8 Customize: Eliminate use of flexbox for edit shortcuts.
Props sirbrillig.
See #27403.
Fixes #38660.


git-svn-id: https://develop.svn.wordpress.org/trunk@39186 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 20:54:41 +00:00
Weston Ruter
5fb093bfe6 Customize: Split out custom_css query logic from wp_get_custom_css() into a re-usable wp_get_custom_css_post() function to also be used when updating.
Props georgestephanis, westonruter.
See #38672, #35395.


git-svn-id: https://develop.svn.wordpress.org/trunk@39185 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 20:42:22 +00:00
Tammie Lister
b847c1c2c4 Twenty Seventeen fix for Travis Error
Removed semi-colo on line 46

Props swissspidy


git-svn-id: https://develop.svn.wordpress.org/trunk@39184 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 16:54:51 +00:00
Tammie Lister
208e443dc5 Twenty Seventeen: Fixes focused controls hidden by top menu.
When a page is scrolled, the top nav menu became fixed. This resolves that.

Props afercia, Fencer04, davidakennedy
Fixes #38476



git-svn-id: https://develop.svn.wordpress.org/trunk@39183 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 16:12:35 +00:00
Ryan McCue
446dc73042 REST API: Include template in all post type schemas.
[38951] added templates to all post types, but didn't add them to the schema.

Props swissspidy.
Fixes #38698.


git-svn-id: https://develop.svn.wordpress.org/trunk@39182 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 07:12:01 +00:00
Weston Ruter
8a0c502703 Customize: Store modifying user ID with setting change written into changeset and restore current user when setting is being saved.
Restoring the current user context when saving a setting ensures filters apply as expected, such as Kses. When a user is not associated with a given setting change, continue to override `capability` to be `exist` when saving. Skip overwriting setting values in a changeset that have not changed, facilitating concurrent editing and amending a changeset by a user with fewer privileges.

See #30937.
Fixes #38705.


git-svn-id: https://develop.svn.wordpress.org/trunk@39181 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 07:02:53 +00:00
Weston Ruter
865f3633f4 Customize: Prevent post_content and post_name from being modified when trashing customize_changeset posts.
See #30937.
Fixes #38719.


git-svn-id: https://develop.svn.wordpress.org/trunk@39180 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 05:44:14 +00:00
Ryan McCue
c20af6e31f Roles/Capabilities: Add meta-caps for comment, term, and user meta.
Additionally, use these meta-caps in the REST API endpoints.

Previously, register_meta()'s auth_callback had no effect for non-post meta. This introduces `{add,edit,delete}_{comment,term,user}_meta` meta-caps to match the existing post meta capabilities. These are currently only used in the REST API.

Props tharsheblows, boonebgorges.
Fixes #38303, fixes #38412.


git-svn-id: https://develop.svn.wordpress.org/trunk@39179 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 03:41:07 +00:00
Ryan McCue
cd5572b67a REST API: Fire correct hooks when creating users on multiste.
`add_user_to_blog()` is now called, ensuring the correct hooks are called, along with setting the primary blog and clearing relevant caches.

Props jeremyfelt.
Fixes #38526.


git-svn-id: https://develop.svn.wordpress.org/trunk@39177 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 01:34:56 +00:00
David A. Kennedy
b2fc03af7f Twenty Seventeen: Fix badly pixelated images on iOS devices
The CSS property `background-attachment: fixed` is disabled in some mobile browsers for performance reasons. So here, the fix increases the breakpoint where the `background-attachment: fixed` is applied to the front page images. Doing this removes the fixed backgrounds and the issue from all smaller screens, but the downside is that it also removes the fixed backgrounds from smaller laptops. It's also possible future devices could fall into this breakpoint, but this seems to be the most practical solution.

Props laurelfulford.

Fixes #38395.


git-svn-id: https://develop.svn.wordpress.org/trunk@39176 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 01:11:59 +00:00
Weston Ruter
b20cda2d4b Customize: Rename unfiltered_css meta capability to edit_css; add revisions support to custom_css post type.
Props lukecavanagh, georgestephanis, westonruter.
See #38672, #35395.


git-svn-id: https://develop.svn.wordpress.org/trunk@39175 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 01:11:49 +00:00
Aaron Jorbin
6d98c6cda5 Cleanup .orig file accidentally added.
Introduced in [39165].

Unprops joemcgill.



git-svn-id: https://develop.svn.wordpress.org/trunk@39171 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 23:29:53 +00:00
Pascal Birchler
21e874e00a I18N: Add ability to change user's locale back to site's locale.
Previously there was no way to remove the user locale setting again, even though that might be desirable.

This adds a new 'Site Default' option to the user-specific language setting by introducing a new `show_site_locale_default` argument to `wp_dropdown_languages()`.

Props ocean90.
See #29783.
Fixes #38632.

git-svn-id: https://develop.svn.wordpress.org/trunk@39169 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 23:00:38 +00:00
Pascal Birchler
5f610350e1 Posts, Post Types: Fix post type templates with child themes.
After [38951] added support for post type templates beyond pages, this fixes an issue where an empty meta box would be shown when using child themes.

Fixes #38696.

git-svn-id: https://develop.svn.wordpress.org/trunk@39168 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 22:40:28 +00:00
Drew Jaynes
b955bdd506 Docs: Notate the incoming $theme object members for WP_Theme_Install_List_Table::single_row() as a proper hash notation.
h/t coffee2code.
See #37770.


git-svn-id: https://develop.svn.wordpress.org/trunk@39166 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 20:15:38 +00:00
Joe McGill
c25537e6e2 Themes: Remove Vimeo logic from header_video_settings().
Following [39148] and [39128], this removes the mime type logic for
Vimeo URLs from `get_header_video_settings()` and removes remaining
Vimeo reference from `_validate_external_header_video()` docs.

Fixes #38544.

git-svn-id: https://develop.svn.wordpress.org/trunk@39165 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 19:19:23 +00:00
David A. Kennedy
61af54b335 Twenty Seventeen: Improve SVG markup, providing more options customization
* Removes `aria-hidden` argument. Lets `aria-hidden="true"` be there by default and sets it empty when there is `title` and `desc`.
* Adds unique IDs for title and desc for accessible implementation options.
* Removes absolute path in the Customizer. It didn't work in Internet Explorer, and the original bug is fixed in #30028.
* Add whitespace around `<use>`, from #38387.

Props sami.keijonen, swissspidy, laurelfulford.

Fixes #38659.
See #38387.


git-svn-id: https://develop.svn.wordpress.org/trunk@39164 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 18:00:07 +00:00
Dominik Schilling (ocean90)
221384ab8a Customize: Autoprefixer for [39149].
See #38667.

git-svn-id: https://develop.svn.wordpress.org/trunk@39163 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 15:24:45 +00:00
Joe Hoyle
4f685410b2 REST API: Remove get_allowed_query_vars() now filter is gone.
Now all public query vars are not supoprted via `?filter` in the REST API, we can remove the get_allowed_query_vars() method and filter. To provide developers with a good altnerative to `filter`, the `"rest_{$this->post_type}_collection_params"` filter has been added.

Props rmccue, rachelbacker, danielbachhuber.
Fixes #38629.


git-svn-id: https://develop.svn.wordpress.org/trunk@39162 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 14:07:10 +00:00
Joe Hoyle
6fd4d6e0ea REST API: Remove rest_get_post filter and get_post abstraction.
This filter was originally introduced in https://github.com/WP-API/WP-API/pull/2535 to support Customizer Changesets (née Transactions). This is a super broad filter and doesn't really fit with the design of the API, nor is it (arguably) the right level to do this.

Props rmccue.
Fixes #38701.


git-svn-id: https://develop.svn.wordpress.org/trunk@39161 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 13:08:49 +00:00
Ryan McCue
08efd7b636 REST API: Require 6 characters for comment email addresses.
The regular comments API requires 6 characters rather than 3, so we need to match this.

Props mangeshp, dd32.
Fixes #38506.


git-svn-id: https://develop.svn.wordpress.org/trunk@39158 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 06:41:57 +00:00
Ryan McCue
e74994b2f4 REST API: Respect unfiltered_html for HTML comment fields.
Same as [39155], but for comments, natch.

Props jnylen0.
Fixes #38704, see #38609.


git-svn-id: https://develop.svn.wordpress.org/trunk@39157 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 06:35:51 +00:00
Ryan McCue
074d204c12 REST API: Respect unfiltered_html for HTML post fields.
This necessitates a change to our slashing code as well. Ah slashing, the cause of, and solution to, all of life's problems.

Props jnylen0.
Fixes #38609.


git-svn-id: https://develop.svn.wordpress.org/trunk@39155 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 05:54:22 +00:00
Ryan McCue
f6e433b250 REST API: Change attachment caption & description to objects.
Just like excerpt and content for regular posts, these have transformations applied that can make the content significantly different from the raw value.

Props jnylen0.
Fixes #38679.


git-svn-id: https://develop.svn.wordpress.org/trunk@39154 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 04:28:47 +00:00
Weston Ruter
c0f007b691 Customize: Fix loading of theme screenshots in themes section and remove erroneous borders on hover.
Fixes regressions introduced in [38648].

Props delawski, mckernanin.
See #34391.
Fixes #38222.


git-svn-id: https://develop.svn.wordpress.org/trunk@39153 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-07 21:46:43 +00:00
David A. Kennedy
750d78a8e3 Twenty Seventeen: Fix post navigation font legibility issue
The combination of font-size and weight for post navigation made lower case "i"s illegible in some cases. Using `15px` seemed to be the best choice all around. Also adjusts the spacing around the arrows a bit, since they touch the text on small screen sizes.

Props laurelfulford.

Fixes #38670.


git-svn-id: https://develop.svn.wordpress.org/trunk@39152 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-07 21:06:20 +00:00
Weston Ruter
1207af99d4 Customize: Move Custom CSS control placeholder help text to setting default value.
The `WP_Customize_Custom_CSS_Setting::value()` method now returns the `default` if `wp_get_custom_css()` returns empty.

Props westonruter, afercia, helen.
See #35395.
Fixes #38685.


git-svn-id: https://develop.svn.wordpress.org/trunk@39151 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-07 18:12:28 +00:00
Ella van Dorpe
c78f002ae6 TinyMCE: wptextpattern: Fix inline patterns.
* Allow spaces inside inline pattern text, unless the delimiter stands alone.
* Add more unit tests.
* Add more inline docs.

Part props azaozz.
Fixes #37693.



git-svn-id: https://develop.svn.wordpress.org/trunk@39150 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-06 23:37:09 +00:00
westonruter
7f069a69dc Customize: Allow tab characters in custom CSS input.
Pressing `Esc` followed by `Tab` allows for tabbing to the next element.

Props afercia, coffee2code, westonruter.
See #35395.
Fixes #38667.


git-svn-id: https://develop.svn.wordpress.org/trunk@39149 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-06 19:08:01 +00:00
Joe McGill
8e7ab859fd Customize: Remove Vimeo validation for external videos.
Following [39128], this removes the validation logic for Vimeo URLs from
`_validate_external_header_video()` since WP does not support the
display of videos from Vimeo by default.

This also includes a change to using `esc_url_raw()` instead of `esc_url()`
on the URL value to avoid unexpected behavior from the inclusion of HTML
entities.

Props peterwilsoncc, westonruter.
Fixes #38544.

git-svn-id: https://develop.svn.wordpress.org/trunk@39148 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-05 18:31:06 +00:00
Andrea Fercia
8a6fa93b84 Accessibility: Revert [38984] as it needs to be better communicated to plugin authors.
See #37513.


git-svn-id: https://develop.svn.wordpress.org/trunk@39147 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-05 16:27:13 +00:00
David A. Kennedy
d93ca46c4f Twenty Seventeen: Fix playlists not rendering on blog/archive pages when using video or audio post format
TwentySeventeen attempts to highlight media found in post content by using `get_media_embedded_in_content()` to extract videos from the content and display their HTML differently. However, the HTML being generated by the playlist shortcode relies on JavaScript to update the video element with the markup needed to display the playlist properly. The `get_media_embedded_in_content()` function wasn't designed to handle this use case.

The patch looks for the presence of `wp-playlist-script` in the content and shows the standard content rather than trying to pluck the media elements from the content using `get_media_embedded_in_content()`.

Props joemcgill.

Fixes #38390.


git-svn-id: https://develop.svn.wordpress.org/trunk@39146 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-05 00:44:28 +00:00
Weston Ruter
5d832bc2ae Customize: For Header Image, ensure "Previously uploaded" and "Suggested" headings are hidden when lists are empty.
Fixes regression introduced with the addition of control notifications in [37476]. The container element for notifications is injected after the `.customize-control-title` element if the `.customize-control-notifications-container` element does not already exist in the control's template. Also adds missing margin between current image and uploaded images.

Props bradyvercher.
See #34893.
Fixes #38561.


git-svn-id: https://develop.svn.wordpress.org/trunk@39145 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 23:14:47 +00:00
Weston Ruter
d616ad29a5 Customize: Remove edit shortcut toggle button from preview since visibility is now linked with pane visibility.
Amends [39131].
Props westonruter, sirbrillig.
See #27403.
Fixes #38668.


git-svn-id: https://develop.svn.wordpress.org/trunk@39144 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 20:53:56 +00:00
Helen Hou-Sandi
7435ecdce0 Post-4.7 beta 2 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@39143 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 17:40:12 +00:00
Helen Hou-Sandi
7ece646407 WordPress 4.7 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@39142 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 16:08:49 +00:00
Aaron Jorbin
9768ec2b97 Administration: Ensure collapse menu is usable with a keyboard
Currently, the "Collapse menu" item is not focusable and keyboard users can't collapse/expand the admin menu. This aims to fix it so that screen readers no longer announce it as a clickable but it remains unfocusable and thus unusable. So it's now a button.

Quoting joedolson at WordCamp Chicago 2014:
"If it's supposed to act like a button, it should be a button."

Also includes a grunt:precommit run that picked up some postcss changes to src/wp-includes/css/customize-preview.css

Fixes #29958.
Props ajercia, ipm-frommen for an iterative patch, valendesigns for an iterative patch, GaryJ for feedback, joedolson for feedback, helen for feedback




git-svn-id: https://develop.svn.wordpress.org/trunk@39141 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 16:01:24 +00:00
Helen Hou-Sandi
f7e5811287 Customize: Revert theme install feature.
This is a great goal for core, and is close, but it is not in shape to be shipped for 4.7 and there is not enough time left in the development cycle to alter and polish sufficiently. There are bugs, but more than that, there are more fundamental questions around the use of existing UI, general UX, and how findable themes are (not) on the .org side.

see #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@39140 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 15:53:01 +00:00
John Blackbourn
f8a5c7b8d4 Editor: Correct the docblock for the wp_default_editor filter.
Props dimadin
See #38327


git-svn-id: https://develop.svn.wordpress.org/trunk@39139 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 12:14:05 +00:00
Weston Ruter
ef33fd1841 Customize: Ensure page/post stubs are included in listings and searches for available nav menu items.
Include the customized state in the Ajax requests to load items and search items.

See #38573.
Fixes #38122.


git-svn-id: https://develop.svn.wordpress.org/trunk@39138 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 07:23:49 +00:00
Weston Ruter
d6c217886a Customize: Combine Ajax requests for initial load of available nav menu items into a single request.
When there are many post types registered, prevent Ajax requests from piling up and slamming WordPress with concurrent requests.

Props curdin, westonruter.
Fixes #36697.


git-svn-id: https://develop.svn.wordpress.org/trunk@39137 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 06:03:51 +00:00
Weston Ruter
71f8622cdc Customize: Use button with svg as click target instead of :before content, improving clickability of edit shortcuts in Firefox.
Props sirbrillig, celloexpressions, delawski.
See #38532.


git-svn-id: https://develop.svn.wordpress.org/trunk@39136 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 01:47:56 +00:00
David A. Kennedy
a02ab35128 Twenty Seventeen: Make sure skip link works in all versions of Internet Explorer
This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.

Props afercia, sami.keijonen.

See #38604.


git-svn-id: https://develop.svn.wordpress.org/trunk@39135 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 23:07:20 +00:00
Dominik Schilling (ocean90)
ece3b68aaf I18N: In get_user_locale() ensure that $user_id isn't a falsy value before calling get_user_by().
Fixes #38485.

git-svn-id: https://develop.svn.wordpress.org/trunk@39134 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 23:05:34 +00:00
Weston Ruter
ed37aaa664 Customize: No-op edit_post_link() when in customizer preview.
Edit links can be restored in plugins by removing the `__return_empty_string` function from the `get_edit_post_link` filter at the `customize_preview_init` action.

Fixes #38648.


git-svn-id: https://develop.svn.wordpress.org/trunk@39133 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:43:43 +00:00
Weston Ruter
58f7c47cfc Customize: For toggling visibility of the controls pane, rename "Collapse (Sidebar)" to "Hide Controls" and "Expand Sidebar" to "Expand Controls".
Fixes #38647.


git-svn-id: https://develop.svn.wordpress.org/trunk@39132 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:34:05 +00:00
Weston Ruter
a981b22e15 Customize: Let edit shortcuts be persistently visible when controls pane is expanded, hidden when collapsed, and always visible in mobile preview. Remove initial flash of edit shortcuts.
Props westonruter, sirbrillig.
Fixes #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@39131 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:22:43 +00:00
Dominik Schilling (ocean90)
fb9b3819de Load: Remove unused global imports in wp_load_translations_early().
See #38535.

git-svn-id: https://develop.svn.wordpress.org/trunk@39130 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:02:00 +00:00
David A. Kennedy
119c36b0bd Twenty Seventeen: Correct issues with hidden overflow and height on site header
In -r39124, some additional issues were introduced:

* The 'overflow: hidden' on the `.site-header;` was added to prevent a side-scrolling issue, but it ended up cutting off the menu. It looks like the cause of the side-scroll was related to how the scroll down icon was rotated, so it's addressed by rotating the icon and not the `<a>`.
* Also, `min-height` doesn't play well with `display: table;` in Firefox. So it's addressed with just `height`.

Props laurelfulford, sami.keijonen.

See #38543.


git-svn-id: https://develop.svn.wordpress.org/trunk@39129 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:01:46 +00:00
Joe McGill
bd52f81e87 Customize: Remove Vimeo reference from description for external header videos.
Vimeo's API requires a Pro account to display videos as background videos
(i.e., without player controls), thus we shouldn't support Vimeo
URLs by default in custom header videos. This removes the reference of Vimeo
from the control description in the customizer.

Fixes #38544.

git-svn-id: https://develop.svn.wordpress.org/trunk@39128 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 21:33:47 +00:00
Pascal Birchler
8a08cfc840 I18N: Use the user's locale when loading text domains in the admin.
Leverages `get_user_locale()` in `load_*_textdomain()` and `_load_textdomain_just_in_time()` to always load translations in the user's language when in the admin.

This re-introduces [39069], but now with additional tests and a `function_exists( 'wp_get_current_user' )` check in `get_user_locale()` in case it gets used early.

Props swissspidy, ocean90.
Fixes #38485.

git-svn-id: https://develop.svn.wordpress.org/trunk@39127 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 20:07:08 +00:00
Rachel Baker
4757546045 REST API: Modify the structure of our DELETE responses to be more explicit.
Add the `deleted` property to the root of the Response object to communicate if the delete action was successful. Move the state of the resource prior to the delete request under a new `previous` property.  As a result DELETE responses are now structured like so:
 `{ deleted: true, previous: { ... } }`

Also includes helpful information to DELETE requests for resources that are not trashable.

Props timmydcrawford, rmccue, jnylen0.
Fixes #38494.

git-svn-id: https://develop.svn.wordpress.org/trunk@39126 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 20:04:59 +00:00
David A. Kennedy
9dd2063876 Twenty Seventeen: Fix site name and description appearing off screen in some browsers
* Occurred in Firefox and IE 11.
* Removes Flexbox in favor of more well-supported `display: table; ` layout technique.
* Maintains consistent layout on smaller screens.

Props laurelfulford.

Fixes #38543.


git-svn-id: https://develop.svn.wordpress.org/trunk@39124 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 19:43:15 +00:00
Joe McGill
4bdbfc4526 Themes: Improve support for placeholders in default headers.
When themes register default headers, they can use sprintf style placeholder
strings in place of the template directory URI, which WordPress transforms
in several places by running the value of
`get_theme_support( 'custom-header', 'default-image' )` through `sprintf()`.

This fixes a few places where WordPress skipped the `sprintf()` step and
referenced the `get_theme_support()` value directly.

Props bradyvercher for initial patch.
See #38557.

git-svn-id: https://develop.svn.wordpress.org/trunk@39123 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 19:01:16 +00:00
Dominik Schilling (ocean90)
c1f7d89592 I18N: Show "Settings saved." in the correct language after switching the site language.
This simplifies the logic by comparing `get_user_locale()` before and after an settings update.

Props swissspidy, ocean90.
See #29783, #29281.
Fixes #38482.

git-svn-id: https://develop.svn.wordpress.org/trunk@39122 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 17:54:42 +00:00
Joe McGill
f64f956847 Themes: Improve reliability of URL used in get_header_image_tag().
`get_header_image_tag()` relies on the data returned by `get_custom_header()`
to build the attributes for the header `<img>` element. However,
`get_custom_header()` relies on data from the `header_image_data` theme
mod rather than the `header_image` theme mod that `get_header_image()` uses.
This can create inconsistencies when no header image is set, but a theme
supports a default header image.

This fixes the issue by making `get_custom_image_tag()` rely on the URL
returned by `get_header_image()` instead.

Props bradyvercher.
Fixes #38633.

git-svn-id: https://develop.svn.wordpress.org/trunk@39121 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 12:36:01 +00:00
Weston Ruter
144f0cb317 Customize: Prevent collapsing expanded panel/section/control when Esc is pressed on another closable UI element.
Prevents collapsing constructs when hitting `Esc` on a TinyMCE toolbar, lightbox, or expanded color picker.

See #22237.
Fixes #38091.


git-svn-id: https://develop.svn.wordpress.org/trunk@39120 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 06:18:35 +00:00