Commit Graph

12759 Commits

Author SHA1 Message Date
iandunn
aa01cbe691 Comments: Move comment consent input outside the label for a11y.
Non-wrapping `label`s are more widely supported by assitive technologies. The CSS changes account for the element re-ordering, and tweak the formatting for improved readability.

Props afercia, xkon, laurelfulford, azaozz.
Fixes #43436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 22:00:49 +00:00
iandunn
753d4f10cd Privacy: Use "website" in comment cookie consent text for clarity.
The term "URL" is technical jargon which will not be familiar to all commenters. "Website" is more universal, and matches the label on the `url` input field.

Props johnjamesjacoby, allendav, azaozz.
See #43436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 21:31:21 +00:00
Andrew Ozz
dd68722112 Privacy: fix typo.
Props casiepa.
Fixes #43939.
Built from https://develop.svn.wordpress.org/trunk@43121


git-svn-id: http://core.svn.wordpress.org/trunk@42950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 20:07:22 +00:00
iandunn
b1cf176f6e Privacy: Add policy link to login screen.
Personal data collection is more likely for registered users than casual visitors, and the privacy policy might have been updated since a user last logged in. Those changes could impact the collection of personal data from registered users, so it makes sense to provide a link to the policy before users log in.

Props voneff, xkon, melchoyce, chetan200891, desrosj.
Fixes #43721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 19:48:21 +00:00
Andrew Ozz
3a43a64c20 Privacy: fix inconsistencies in new strings.
Props audrasjb.
Fixes #43925.
Built from https://develop.svn.wordpress.org/trunk@43118


git-svn-id: http://core.svn.wordpress.org/trunk@42947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 18:42:21 +00:00
Sergey Biryukov
64192e967e Privacy: Correct unit test for wp_user_personal_data_exporter() added in [43055].
`user_status` is not considered personal data, so the total number of exported user properties is 11.

See #43547.
Built from https://develop.svn.wordpress.org/trunk@43116


git-svn-id: http://core.svn.wordpress.org/trunk@42945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 04:11:21 +00:00
Sergey Biryukov
6145ef6dea Docs: Correct DocBlock formatting for wp_privacy_personal_data_erasers filter.
See #43637.
Built from https://develop.svn.wordpress.org/trunk@43104


git-svn-id: http://core.svn.wordpress.org/trunk@42933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 03:14:21 +00:00
Sergey Biryukov
18e8f75ee0 I18N: Use consistent pattern for placeholder references in translator comments in wp-admin/privacy.php.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@43091


git-svn-id: http://core.svn.wordpress.org/trunk@42920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:58:21 +00:00
Sergey Biryukov
a53d6b9cb9 I18N: Use consistent pattern for placeholder references in a translator comment in wp-admin/update-core.php.
See #43523.
Built from https://develop.svn.wordpress.org/trunk@43090


git-svn-id: http://core.svn.wordpress.org/trunk@42919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:55:21 +00:00
Sergey Biryukov
eca2bf8545 I18N: Correct translator comment in wp_privacy_generate_personal_data_export_file().
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43089


git-svn-id: http://core.svn.wordpress.org/trunk@42918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:52:22 +00:00
Sergey Biryukov
14ab38be27 I18N: Use consistent pattern for placeholder references in translator comments in wp_ajax_wp_privacy_erase_personal_data().
See #43438.
Built from https://develop.svn.wordpress.org/trunk@43088


git-svn-id: http://core.svn.wordpress.org/trunk@42917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:39:21 +00:00
Gary Pendergast
2f792d442b REST API: Filter responses based on the _fields parameter, before data is processed.
Historically, the REST API would generate the entire response object, including running expensive filters, then it would apply the `_fields` parameter, discarding the fields that weren't specificed.

This change causes `_fields` to be applied earlier, so that only requested fields are processed.

Props danielbachhuber.
See #43874.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:25:21 +00:00
iandunn
93a90a9aa4 Privacy: Limit export and erasure to super admins on Multisite.
Multisite networks have a variety of use cases, and in many of them single-site administrators are not trusted to take actions that affect the whole network, require making decisions about legal compliance, etc. By default, those actions should require super admin capabilities. Plugins can be used to override that behavior if a particular site's use case calls for it.

Props allendav, jeremyfelt, iandunn.
Fixes #43919.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:07:22 +00:00
Sergey Biryukov
ae8d70c06c Docs: Update @since version numbers for wp_privacy_anonymize_ip() and wp_privacy_anonymize_data().
Props joemcgill.
See #43545.
Built from https://develop.svn.wordpress.org/trunk@43081


git-svn-id: http://core.svn.wordpress.org/trunk@42910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 00:41:21 +00:00
Sergey Biryukov
ac0bf9d352 Login and Registration: Send nocache_headers() on Multisite account activation pages.
Props herregroen.
Fixes #43917.
Built from https://develop.svn.wordpress.org/trunk@43065


git-svn-id: http://core.svn.wordpress.org/trunk@42894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 22:08:20 +00:00
Sergey Biryukov
8e01f9f99b Privacy: Move "Mine" filter for media items above "Trash".
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43063


git-svn-id: http://core.svn.wordpress.org/trunk@42892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 21:47:21 +00:00
Sergey Biryukov
6c2470a091 I18N: Add context for "Mine" string added in [43056].
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43062


git-svn-id: http://core.svn.wordpress.org/trunk@42891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 21:37:23 +00:00
Andrew Ozz
2f321e234e Privacy: improve wp_privacy_erase_personal_data(), return boolean values.
Props ericdaams.
See #43602.
Built from https://develop.svn.wordpress.org/trunk@43061


git-svn-id: http://core.svn.wordpress.org/trunk@42890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 19:27:22 +00:00
Andrew Ozz
f376b6b0c9 Privacy: translate error messages, some fixes and improvements for the AJAX actions for exporting and erasing user data.
Props desrosj, birgire.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@43060


git-svn-id: http://core.svn.wordpress.org/trunk@42889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 19:00:20 +00:00
iandunn
9bb0e18c82 Privacy: Include wp-admin/includes/file.php to avoid fatal error.
`list_files()` is defined in `wp-admin/includes/file.php`, which is not included by `wp-cron.php`, so it needs to be included by the caller in order to avoid a fatal PHP error.

This bug was not detected during testing because the file _is_ included when executing jobs via `wp cron event run`.

Props mikejolley, iandunn.
See #43546.
See https://wordpress.slack.com/archives/C9695RJBW/p1525190405000860.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 17:43:22 +00:00
Andrew Ozz
e0d2de94e7 Privacy: docs fixes and improvements for wp_comments_personal_data_exporter().
Props desrosj.
See #43440.
Built from https://develop.svn.wordpress.org/trunk@43058


git-svn-id: http://core.svn.wordpress.org/trunk@42887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 17:18:21 +00:00
Andrew Ozz
2aa8414d09 Privacy: make the emails in export and erasure list-tables clickable.
Props birgire.
See #43911.
Built from https://develop.svn.wordpress.org/trunk@43057


git-svn-id: http://core.svn.wordpress.org/trunk@42886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 17:12:22 +00:00
Andrew Ozz
3266b10d04 Privacy: add "Mine" filter for media similarly to posts and comments.
Props audrasjb.
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43056


git-svn-id: http://core.svn.wordpress.org/trunk@42885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 15:43:22 +00:00
Andrew Ozz
f4e6b7a29c Privacy: add user information to the personal data export file.
Props TZ-Media, desrosj.
See #43547.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 13:59:21 +00:00
Andrew Ozz
c77a8ed2fc Privacy: add attachments to the personal data export file.
Props allendav.
See #43883.
Built from https://develop.svn.wordpress.org/trunk@43054


git-svn-id: http://core.svn.wordpress.org/trunk@42883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 13:45:21 +00:00
Andrew Ozz
5133e5131b Privacy: fix and improve the help text about adding a privacy policy page.
Props idea15, xkon.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@43053


git-svn-id: http://core.svn.wordpress.org/trunk@42882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 11:43:22 +00:00
Andrew Ozz
237df3367b Privacy: only fold the sections in the privacy policy poxtbox when more than one.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43052


git-svn-id: http://core.svn.wordpress.org/trunk@42881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 09:48:21 +00:00
iandunn
b4290211f4 Bundled Themes: Add link to privacy policy page in footer.
If a privacy policy has been set, then a link to it will automatically be shown in the footer.

The element containing the "Proudly powered by WordPress" link was chosen for the new policy link, in order to minimize visual conflicts with custom CSS that was written before the new link existed. Unfortunately, some minor conflicts are expected and unavoidable. Adding this link is required as part of GDPR compliance, and the benefits outweigh the downsides. 

To further mitigate the conflicts, a new `imprint` class was added to the "Proudly powered..." link, in order to facilitate targeting each link invididually with custom styles.

Props xkon, laurelfulford, birgire, azaozz, iandunn.
See #43715.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 06:28:21 +00:00
Peter Wilson
2e43234f3f Cron API: Return meaningful values from cron functions.
Return values added to Cron API functions to indicate outcome:

* `wp_schedule_single_event()`, `wp_schedule_event()`, `wp_reschedule_event()` and `wp_unschedule_event()`: boolean indicating success or failure,
* `wp_clear_scheduled_hook()`: integer indicating number of jobs cleared (zero or more), `false` if one or more jobs fail to clear,
* `wp_unschedule_hook()`: integer indicating number of jobs cleared (zero or more), `false` if the jobs fail to clear,
* `spawn_cron()`: boolean indicating whether job spawned,
* `wp_cron()`: integer indicating number of jobs spawned (zero or more), `false` if one or more jobs fail to spawned,
* `_set_cron_array()`: boolean outcome of `update_option()`.

Props evansolomon, jrf, peterwilsoncc, pento for code review.
Fixes #21072.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 02:05:23 +00:00
Boone Gorges
0dc6bd7c04 Taxonomy: Ensure that invalid term objects are discarded in WP_Term_Query.
The `get_term()` mapping may result in term objects that are `null` or
`WP_Error` when plugins use `get_term` or a related filter. Since `null`
and error objects are not valid results for a term query, we discard
them.

Props GM_Alex.
See #42691.
Built from https://develop.svn.wordpress.org/trunk@43049


git-svn-id: http://core.svn.wordpress.org/trunk@42878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:08:22 +00:00
Andrew Ozz
d1ab641d16 Privacy: edits and improvements for the default text for a privacy policy.
Props idea15, allendav.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43048


git-svn-id: http://core.svn.wordpress.org/trunk@42877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:06:21 +00:00
iandunn
9abc0fe73e Privacy: Add wp_privacy_personal_data_export_file_created filter.
This runs immediately after the data export file has been successfully created, allowing plugins to introduce some workflow customizations. For example, a plugin could password-protect the export file, for peace of mind, even though the CSPRN in the filename makes brute force attacks nearly impossible.

See #43546.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:04:22 +00:00
iandunn
23bf0c7535 Privacy: Add cron to delete expired export files to protect privacy.
The primary means of protecting the files is the CSPRN appended to the filename, but there is no reason to keep the files after the data subject has downloaded them, so deleting them provides an additional layer of protection. Previously this was done from `wp_privacy_generate_personal_data_export_file()`, but that does not guarantee that it will be run regularly, and on smaller sites that could result in export files being exposed for much longer than necessary.

`wp_privacy_delete_old_export_files()` was moved to a front end file, so that it can be called from `cron.php`.

This introduces the `wp_privacy_export_expiration` filter, which allows plugins to customize how long the exports are kept before being deleted.

`index.html` was added to the `$exclusions` parameter of `list_files()` to make sure that it isn't deleted. If it were, then poorly-configured servers would allow the directory to be traversed, exposing all of the exported files.

Props iandunn, desrosj.
See #43546.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 20:09:23 +00:00
iandunn
5b4aa26436 Privacy: Use a CSPRNG in export filenames for more security.
`rand()` is deterministic and therefore offers much less protection in this context. `wp_generate_password()` is a convenient wrapper around `wp_rand()`, which uses `random_int()` to generate cryptographically-secure psuedorandom numbers.

See #43546.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 18:53:25 +00:00
Andrew Ozz
c21c4e25b3 Privacy: add default text for a privacy policy. First run.
Props xkon, idea15, allendav, azaozz.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43044


git-svn-id: http://core.svn.wordpress.org/trunk@42873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 14:47:21 +00:00
John Blackbourn
d488e773b0 Docs: Update the inline docs for is_protected_meta().
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 14:39:21 +00:00
John Blackbourn
cf02373b39 Comments: Update the inline docs following [42772].
See #43436

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


git-svn-id: http://core.svn.wordpress.org/trunk@42871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 13:10:20 +00:00
Andrea Fercia
eac393b6f1 Coding standards: Change a few occurrences of font weight 700 to 600 in multisite signup and activate.
Props chetan200891.
Amends [43018].
See #43897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 07:05:21 +00:00
Sergey Biryukov
4b6794ba57 Themes: Avoid a PHP 7.2 warning in get_theme_roots() when $wp_theme_directories is an uncountable value.
See [41174] for `wp_get_themes()` and `get_raw_theme_root()`.

Props burlingtonbytes, teddytime, lbenicio, desrosj.
Fixes #43374. See #40109.
Built from https://develop.svn.wordpress.org/trunk@43039


git-svn-id: http://core.svn.wordpress.org/trunk@42868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 04:51:22 +00:00
Sergey Biryukov
94cbb2a3f6 General: Introduce a polyfill for is_iterable() function added in PHP 7.1.
Props jrf, schlessera, desrosj.
See #43619.
Built from https://develop.svn.wordpress.org/trunk@43036


git-svn-id: http://core.svn.wordpress.org/trunk@42865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 04:15:21 +00:00
Sergey Biryukov
5813ccec07 General: Introduce a polyfill for is_countable() function added in PHP 7.3.
Props jrf, ayeshrajans, desrosj.
See #43583.
Built from https://develop.svn.wordpress.org/trunk@43034


git-svn-id: http://core.svn.wordpress.org/trunk@42863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 03:43:21 +00:00
Sergey Biryukov
70a214c186 Help/About: Move "Get involved" link on Credits screen to the top of the page for better visibility.
Props bridgetwillard, desrosj.
See #23348.
Built from https://develop.svn.wordpress.org/trunk@43032


git-svn-id: http://core.svn.wordpress.org/trunk@42861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 03:16:22 +00:00
Sergey Biryukov
bc5a539c4d Login and Registration: Send nocache_headers() on Multisite signup pages.
Props herregroen.
Fixes #43843.
Built from https://develop.svn.wordpress.org/trunk@43030


git-svn-id: http://core.svn.wordpress.org/trunk@42859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 23:05:21 +00:00
Sergey Biryukov
95071b2ea1 Docs: Update @since version for theme_templates filter added in [43025].
See #43872.
Built from https://develop.svn.wordpress.org/trunk@43027


git-svn-id: http://core.svn.wordpress.org/trunk@42856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 22:42:22 +00:00
Sergey Biryukov
0c071471d6 Themes: Introduce theme_templates filter for page templates of all post types.
This complements the `theme_{$post_type}_templates` dynamic filter added in [38951].

Props desrosj.
Fixes #43872.
Built from https://develop.svn.wordpress.org/trunk@43025


git-svn-id: http://core.svn.wordpress.org/trunk@42854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 22:18:22 +00:00
Sergey Biryukov
00ae0a1097 Docs: Remove backtick-escaping around a core function in the hook docs for the pre_prepare_themes_for_js filter.
This allows the function to be auto-linked in the Developer Reference. Added in [42877].

See #42505.
Built from https://develop.svn.wordpress.org/trunk@43024


git-svn-id: http://core.svn.wordpress.org/trunk@42853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 21:47:22 +00:00
Sergey Biryukov
f8177e3a73 Docs: Remove backtick-escaping around a core function in the hook docs for the comment_form_submit_button filter.
This allows the function to be auto-linked in the Developer Reference. See [32037] for `comment_form_submit_field`.

See #42505, #31888.
Built from https://develop.svn.wordpress.org/trunk@43023


git-svn-id: http://core.svn.wordpress.org/trunk@42852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 21:44:22 +00:00
Sergey Biryukov
9a8f48c9bc Docs: Add missing verb in is_admin(), is_blog_admin(), is_network_admin(), is_user_admin() descriptions.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@43022


git-svn-id: http://core.svn.wordpress.org/trunk@42851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 21:14:22 +00:00
Andrea Fercia
e663af477a Coding standards: Change one occurrence of font weight 700 to 600.
Props chetan200891.
Amends [43018].
See #43897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 18:04:21 +00:00
Andrea Fercia
2e8149064e Accessibility: Improve the Themes Installer navigation buttons accessibility.
- really disables buttons when they look disabled (when navigation is at the first or last theme)
- when navigation is at the first or last theme, moves focus to the other navigation button, to avoid a focus loss
- improves the buttons visually hidden accessibility text

Props walbo, afercia.
Fixes #36627.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 17:04:22 +00:00
Andrea Fercia
8d9f1ae0d5 Accessibility: Better color contrast for the tables pagination links.
By making the pagination links use the default style for buttons, color contrast
is improved and the CSS is simplified. Improves consistency with other UI controls.
Also, slightly increases the white space below the pagination links.

Props benoitchantre, afercia.
Fixes #41858.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 16:25:21 +00:00
Andrea Fercia
26e91765eb Coding standards: Use numeric font weights instead of keywords.
Fixes #43897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 11:37:21 +00:00
John Blackbourn
e2719c4e90 Docs: Correct the possible return types for the wpdb::query() method.
Props isabel104

See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-28 14:44:23 +00:00
John Blackbourn
4ccca7a835 Formatting: Begin the process of improving the docs for KSES related functions.
See #33801

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


git-svn-id: http://core.svn.wordpress.org/trunk@42845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-28 13:58:21 +00:00
Andrew Ozz
3677e99e4b Privacy: fix unit tests after [43012].
Props iandunn.
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43015


git-svn-id: http://core.svn.wordpress.org/trunk@42844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-28 12:11:21 +00:00
Andrew Ozz
bfc9c2f469 Fix docs and white space.
Props desrosj.
See #43443.
Built from https://develop.svn.wordpress.org/trunk@43014


git-svn-id: http://core.svn.wordpress.org/trunk@42843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-28 12:04:21 +00:00
John Blackbourn
666887f974 Build/Test Tools: Don't trigger the global variable override PHPCS sniff for core.
Props jrf

Fixes #43776

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


git-svn-id: http://core.svn.wordpress.org/trunk@42842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-28 00:45:20 +00:00
Andrew Ozz
b044b4053e Privacy: add means to export personal data by username or email address. Generate a zipped export file containing all data. First run.
Props allendav.
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43012


git-svn-id: http://core.svn.wordpress.org/trunk@42841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 19:54:21 +00:00
Andrew Ozz
e9eb7518c0 Privacy: update and enhance the method to confirm user requests by email. Introduce WP_User_Request to hold all request vars similarly to WP_Post.
Props mikejolley.
See #43443.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 17:31:22 +00:00
Felix Arntz
af6704edad Multisite: Add meta query functionality to WP_Site_Query.
After the introduction of site metadata in [42836], it should be possible to query sites by that data.

Fixes #40229.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 11:41:22 +00:00
Felix Arntz
a11d2f6a76 Bootstrap: Load class-wp-meta-query.php earlier in wp-settings.php.
This change is necessary to enable multisite-specific meta query functionality during the multisite bootstrap process.

Fixes #40948. See #40229.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 11:37:21 +00:00
Andrew Ozz
f1703c0e70 Privacy: update the method to confirm user requests by email. Use a single CPT to store the requests and to allow logging/audit trail.
Props mikejolley.
See #43443.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 10:12:22 +00:00
Gary Pendergast
52d0b2f982 REST API: Include viewable attribute on Post Type resource for edit context
For the block editor to be able to expose the Preview button correctly, it needs to know the `is_post_type_viewable()` setting, this change adds it to the Post Type response.

Props danielbachhuber.
Fixes #43739.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 03:06:21 +00:00
Felix Arntz
6b2e34f703 General: Implement editorial, design and accessibility feedback for the PHP version nag.
The updated version of the nag is shorter, more on point and less aggressive than the previous one. It integrates better with the other dashboard widgets and fixes several accessibility concerns. A yellow warning color is used when the current PHP version is outdated, a red error color is used when it is also insecure.

Props afercia, birgire, danieltj, flixos90, johnjamesjacoby, karmatosed, Luciano Croce, nerrad, pento, schlessera, SergeyBiryukov, sonjaleix.

Fixes #41191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-26 14:31:24 +00:00
Felix Arntz
603c91b3bc Tests: Skip multisite-only or single site-only tests correctly based on test doc annotations.
Without the `ms-required` and `ms-excluded` groups being marked as excluded in the PHPUnit configurations for the project, those groups were still executed, causing fatal errors. Checking against the groups in the correct structure of the array returned from PHPUnit's `Testcase::getAnnotations()` ensures that those tests are skipped properly.

Fixes #43863.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 22:38:21 +00:00
Ella Iseulde Van Dorpe
6e215cae48 TinyMCE: Update to 4.7.11
Built from https://develop.svn.wordpress.org/trunk@43004


git-svn-id: http://core.svn.wordpress.org/trunk@42833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 22:35:21 +00:00
Andrew Ozz
41a82d6078 Privacy: add better docs for wp_add_privacy_policy_content() and WP_Privacy_Policy_Content::add().
See #43620.
Built from https://develop.svn.wordpress.org/trunk@43003


git-svn-id: http://core.svn.wordpress.org/trunk@42832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 18:10:21 +00:00
iandunn
c9c3c61a53 Privacy: Add template tags for building link to privacy policy page.
This introduces the `get_the_privacy_policy_link()` and `the_privacy_policy_link()` functions, as well as the `privacy_policy_url` filter.

A new `tests/url/` folder was added to better organize tests related to `get_*_url()` functions. Previously, those tests were placed in `tests/url.php` and `tests/link/`, but neither of those locations are optimal. Placing tests in `tests/url.php` violates the guideline of creating separate files/classes for each function under test, and using `tests/link/` conflates two distinct -- albeit related -- groups of functions. Over time, URL-related tests can be migrated to the new folder.

Props birgire, xkon, azaozz, iandunn.
See #43850.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 15:55:21 +00:00
Gary Pendergast
41968f7ea9 REST API: Add who=authors as a query parameter for GET wp/v2/users.
Any WordPress user who can `edit_posts` of a post type with `show_in_rest=true` can query for authors. This maps to current WordPress behavior where a WordPress user who can view the Manage Posts view for a post type can see any WordPress user assigned to a post (whether published or draft).

This implementation, over restricting `who=authors` to users with `list_users`, gives us future flexibility in displaying lists of posts. It still respects more restrictive permissions for `context=edit`.

Props danielbachhuber.
Fixes #42202.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 13:06:21 +00:00
Andrew Ozz
13875fbddb Privacy: fix styling of counts on the list tables for user requests.
Props allendav.
Fixes #43846.
Built from https://develop.svn.wordpress.org/trunk@43000


git-svn-id: http://core.svn.wordpress.org/trunk@42829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 21:35:21 +00:00
Andrew Ozz
11e315ca23 Make the string WordPress translatable.
Props mnelson4.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42999


git-svn-id: http://core.svn.wordpress.org/trunk@42828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 21:23:21 +00:00
Felix Arntz
c1efc2519b Plugins: Show the required PHP version in the plugin details view, if specified.
Props xkon.
Fixes #43650.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 11:41:25 +00:00
Gary Pendergast
e22489f06c REST API: Remove permalink_structure from the index.
This was originally added to allow Gutenberg to do permalink editing, but is no longer required. It's also superceded by #41014.

Reverts [42142].
Fixes #42465.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-23 04:12:20 +00:00
atimmer
c1754d9ac1 Docs: Improve JSDoc for wp-includes/js/wp-backbone.js.
Changes some additional docs after [42993].

Props birgire, adamsilverstein, netweb.
Fixes #35465.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-22 14:37:21 +00:00
Andrew Ozz
cf0d00c602 Privacy: fix get_privacy_policy_url() to only return the URL when the page is published.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@42995


git-svn-id: http://core.svn.wordpress.org/trunk@42824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-20 14:44:20 +00:00
Andrew Ozz
81668f8312 Privacy: add functionality to anonymize commenters.
Props xkon, fclaussen, allendav, birgire, azaozz.
See #43442.
Built from https://develop.svn.wordpress.org/trunk@42994


git-svn-id: http://core.svn.wordpress.org/trunk@42823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-20 12:19:21 +00:00
atimmer
bb8d67e6ea Docs: Improve JSDoc for wp-includes/js/wp-backbone.js.
Props ericlewis, gma992, adamsilverstein.
Fixes #35465.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 14:02:22 +00:00
Andrew Ozz
891deab7c5 Privacy: make the sections in the suggested privacy policy text postbox foldable. Add Read More/Read Less buttons. Fix copying of the suggested text by pressing the button.
Props melchoyce, xkon, azaozz.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42992


git-svn-id: http://core.svn.wordpress.org/trunk@42821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 12:39:21 +00:00
Aaron Jorbin
0b0c754563 Wow. I really shouldn't try to fix the build.
Previous [42989] [42986].
See #43440.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 00:26:21 +00:00
Aaron Jorbin
010a12240f Remove accidental addition to package.json
Introduced in [42989].

See #43440.
Unprops jorbin.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 00:24:21 +00:00
Aaron Jorbin
1da2fdb891 Privacy: Fix JSHint errors
Introduced in [42986].

See #43440.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 00:23:20 +00:00
John Blackbourn
ea8052df59 Upgrade/Install: Don't include wp-includes/formatting.php twice during installation.
This avoids a fatal error caused by function redeclaration.

Props ocean90, kkarpieszuk

Fixes #43609

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


git-svn-id: http://core.svn.wordpress.org/trunk@42817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-18 23:54:20 +00:00
Andrew Ozz
fbb51eafb0 Privacy: fix docs, formatting, white space, add tests for the personal data from comments exporter.
Props birgire.
See #43440.
Built from https://develop.svn.wordpress.org/trunk@42987


git-svn-id: http://core.svn.wordpress.org/trunk@42816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-18 22:55:22 +00:00
Andrew Ozz
b4fdb9ebf2 Privacy: add means to erase personal data by username or email address. First run.
Props allendav, coreymckrill, ericdaams, azaozz.
See #43637, #43602.
Built from https://develop.svn.wordpress.org/trunk@42986


git-svn-id: http://core.svn.wordpress.org/trunk@42815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-18 22:30:22 +00:00
Andrew Ozz
8d9e4937f8 Fix typo in 'wp_get_default_privacy_policy_content' filter.
Props claudiu.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42985


git-svn-id: http://core.svn.wordpress.org/trunk@42814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-17 21:09:20 +00:00
Sergey Biryukov
acd3f4cb10 I18N: Use consistent pattern for placeholder references in a translator comment in media_upload_max_image_resize().
See #43523.
Built from https://develop.svn.wordpress.org/trunk@42984


git-svn-id: http://core.svn.wordpress.org/trunk@42813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 18:37:20 +00:00
Sergey Biryukov
3957635dfb I18N: Correct placeholder references in a translator comment in wp_print_file_editor_templates().
Props afercia.
See #43523.
Built from https://develop.svn.wordpress.org/trunk@42983


git-svn-id: http://core.svn.wordpress.org/trunk@42812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 18:36:24 +00:00
Andrew Ozz
280aeff5d2 Fix typo (missing !).
See #43491.
Built from https://develop.svn.wordpress.org/trunk@42982


git-svn-id: http://core.svn.wordpress.org/trunk@42811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 10:14:21 +00:00
Andrew Ozz
f1e065b13b Privacy: automatically create a Privacy Policy page when installing WordPress.
Props fclaussen, azaozz.

Fixes #43491.
Built from https://develop.svn.wordpress.org/trunk@42981


git-svn-id: http://core.svn.wordpress.org/trunk@42810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 09:00:20 +00:00
Andrew Ozz
3108d2ffb2 Privacy: add a postbox that is shown when editing the privacy policy page, and where plugins and core will output suggested content and additional privacy info. First run.
Props melchoyce, azaozz.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42980


git-svn-id: http://core.svn.wordpress.org/trunk@42809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 08:53:20 +00:00
Peter Wilson
fc20505750 Upgrade/Install: Use high-dpi plugin icons on update dashboard.
Reorder the `$preferred_icons` array for plugins to prefer high-dpi icons (2x) over standard-dpi icons (1x).

Props dd32.
Fixes #43727.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 00:13:20 +00:00
Andrew Ozz
4b2587abda Privacy: improve the screen for setting a privacy policy page.
Props melchoyce, xkon, azaozz.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@42978


git-svn-id: http://core.svn.wordpress.org/trunk@42807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 17:56:20 +00:00
Andrew Ozz
600c5082a3 Privacy: fix error message and list table sorting errors on the Export Personal Data and Remove Personal Data screens.
See #43481.
Built from https://develop.svn.wordpress.org/trunk@42977


git-svn-id: http://core.svn.wordpress.org/trunk@42806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 16:15:21 +00:00
Felix Arntz
35cdc99039 Multisite: Verify the signup nonce using wp_verify_nonce() in signup_nonce_check().
Prior to this change, the nonce passed from `wp-signup.php` was verified with a simple comparison. Furthermore in case of failures, `wp_die()` would be called right during the HTML markup being already printed. Now the error message is returned properly, modifying the `WP_Error` object in the passed `$result`.

Props herregroen.
Fixes #43667.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 15:30:20 +00:00
Dominik Schilling
888236585c Customize: Remove a stray whitespace.
Props tfrommen.
Fixes #43762.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 15:10:20 +00:00
Dominik Schilling
3b76937ec8 Administration: Avoid an extra space in the admin body class.
Props jainnidhi, rhetorical, birgire, mathieuhays.
Fixes #43465.
Built from https://develop.svn.wordpress.org/trunk@42974


git-svn-id: http://core.svn.wordpress.org/trunk@42803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 14:03:20 +00:00
Gary Pendergast
7630cc1bad REST API: Fix a typo introduced in [42729].
Props danielbachhuber.
Fixes #42707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 00:56:21 +00:00
Gary Pendergast
b0d9c54594 Tests: Update the REST API fixtures.
[42967] included new post statii, but didn't add them to the REST API tests.

See #43481.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 00:54:20 +00:00
Andrew Ozz
5493d8b253 Privacy: add helper function for anonymizing data in a standardized way.
Props jesperher, allendav, iandunn, birgire, azaozz.
Fixes #43545.
Built from https://develop.svn.wordpress.org/trunk@42971


git-svn-id: http://core.svn.wordpress.org/trunk@42800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-12 21:20:23 +00:00
Dion Hulse
9bbb2618e4 Bump $wp_version to latest revision.
https://core.trac.wordpress.org/ has been moved to new infrastructure, this is a test commit to verify that trunk builds continue to work as expected.

If you notice any breakage on Trac, please report it to https://meta.trac.wordpress.org/ticket/3526 - there's a number of known UI issues at present which will be resolved soon.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-11 02:59:21 +00:00
Dion Hulse
2844563752 Bump $wp_version to latest revision.
https://core.trac.wordpress.org/ has been moved to new infrastructure, this is a test commit to verify that trunk builds continue to work as expected.

If you notice any breakage on Trac, please report it to https://meta.trac.wordpress.org/ticket/3526 - there's a number of known UI issues at present which will be resolved soon.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-11 02:50:22 +00:00
iandunn
057cef802a Dashboard: Strip more extraneous IP parts to prevent PHP warnings.
This iterates on earlier versions of the code, in order to handle more edge cases. An arbitrary string like `or=\"` will now be stripped, as well as reachability scopes like `%eth0`.

Props eamax, soulseekah, iandunn.
Fixes #41083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 23:19:30 +00:00
Andrew Ozz
108578a8ec Privacy: add new wp-admin screens for exporting and removing of personal data.
Props @melchoyce, @mikejolley, @allendav, @xkon.
See #43481.
Built from https://develop.svn.wordpress.org/trunk@42967


git-svn-id: http://core.svn.wordpress.org/trunk@42796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 18:02:30 +00:00
Adam Silverstein
d1d6e8864e Revisions: improve show_split_view=false support for title.
* When show_split_view argument false, show title changes in a single column and only show title once if title is unchanged.

Props johnbillion, mbelchev.
Fixes #42402.  


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


git-svn-id: http://core.svn.wordpress.org/trunk@42795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 16:12:30 +00:00
Adam Silverstein
b76da1fdf3 REST API: Handle api-request query parameters with plain permalinks.
When constructing the request URL, ensure that  `?` is replaced with `&` when the API root  already contains a `?`. Fixes an issue where requests were broken when sites had permalinks set to plain.

Props aduth.
Fixes #42382.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-09 13:10:31 +00:00
Andrew Ozz
d3f054b5a9 Privacy: fixes and updates for the method to confirm user requests by email.
- Improve function and variable names.
- Allow extra data to be passed with the request.
- Make the option/user meta names more consistent.
- Adds an inline comment explaining use of hash.

Props mikejolley.
See #43443.
Built from https://develop.svn.wordpress.org/trunk@42964


git-svn-id: http://core.svn.wordpress.org/trunk@42793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-06 19:10:30 +00:00
atimmer
f111796282 Docs: Improve JSDoc for wp-admin/js/tags-box.js.
Props carolinegeven, andizer, ireneyoast, herregroen, jjcomack.
Fixes #43499.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-06 07:47:32 +00:00
atimmer
0c37fe30ac Docs: Fix JS Docs for custom-header.js.
Amends [42385].

Props herregroen.
See #42678.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-05 13:40:30 +00:00
Gary Pendergast
e445cdee79 Build Tools: Update the description in package.json and composer.json.
The description now matches the tagline on the front page of WordPress.org.

Props ocean90.
Fixes #43558.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-05 07:16:30 +00:00
Gary Pendergast
756abbd0a3 Build Tools: Add a composer.json for development environments.
This allows Core developers to more easily run coding standards checks on PHP code.

Props netweb.
Fixes #43558.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-05 07:05:30 +00:00
Dominik Schilling
f33092e163 Media: Update built files after [42798].
See #43500.
Built from https://develop.svn.wordpress.org/trunk@42931


git-svn-id: http://core.svn.wordpress.org/trunk@42761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 19:49:30 +00:00
Dominik Schilling
eab5e4bb82 Media: Update minified version of imgAreaSelect after [42874].
Adds imgAreaSelect to the uglify grunt process.

Props adamsilverstein.
Fixes #41242.
Built from https://develop.svn.wordpress.org/trunk@42930


git-svn-id: http://core.svn.wordpress.org/trunk@42760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 19:46:30 +00:00
Dominik Schilling
8043638596 HTTP: Don't treat localhost as same host by default.
Built from https://develop.svn.wordpress.org/trunk@42894


git-svn-id: http://core.svn.wordpress.org/trunk@42724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 15:00:31 +00:00
Dominik Schilling
31a4369366 Template: Make sure the version string is correctly escaped for use in attributes.
Built from https://develop.svn.wordpress.org/trunk@42893


git-svn-id: http://core.svn.wordpress.org/trunk@42723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 14:59:31 +00:00
Dominik Schilling
14bc2c0a6f Login: Use wp_safe_redirect() when redirecting the login page if forced to use HTTPS.
Built from https://develop.svn.wordpress.org/trunk@42892


git-svn-id: http://core.svn.wordpress.org/trunk@42722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 14:32:31 +00:00
Felix Arntz
921e131eae General: Improve wording for PHP version nag.
This changeset adjusts the tone of the message to fit the usual core voice better and addresses accessibility concerns.

Props schlessera.
See #41191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-02 10:15:33 +00:00
Sergey Biryukov
9a11487e22 Taxonomy: In category_description(), don't pass the $taxonomy parameter to term_description().
The parameter was deprecated in [42368] and is now unused.

Props chetan200891.
Fixes #43381. See #42771.
Built from https://develop.svn.wordpress.org/trunk@42890


git-svn-id: http://core.svn.wordpress.org/trunk@42720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-28 23:25:29 +00:00
Andrew Ozz
a4beb40d0b Privacy: add support for exporting multiple pages of personal data.
Props allendav.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@42889


git-svn-id: http://core.svn.wordpress.org/trunk@42719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-28 19:28:31 +00:00
Andrew Ozz
4fed9aa6bd Privacy: add functionality for exporting personal data from comments.
Props allendav, xkon.
Fixes #43440.
Built from https://develop.svn.wordpress.org/trunk@42888


git-svn-id: http://core.svn.wordpress.org/trunk@42718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-28 17:25:31 +00:00
Aaron Jorbin
80464d93bb Bump grunt-patch-wordpress to 1.0.0
Adds the ability to do file mapping (see #43055 ), reformats all of the code to bring it inline with the current WordPress coding standards, and fixes a small number of bugs.

Props pento, netweb, boblinthorst, ireneyoast, omarreiss, herregroen, jorbin
Fixes #43646


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


git-svn-id: http://core.svn.wordpress.org/trunk@42717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-28 16:24:32 +00:00
Sergey Biryukov
2f0f413aa5 Twenty Ten: Restore max-width on .wp-caption.
[42837] fixed the compatibility issue caused by [41724], returning the caption shortcode to the pre-4.9.0 behavior.

Reverts [42386].
Fixes #42604.
Built from https://develop.svn.wordpress.org/trunk@42886


git-svn-id: http://core.svn.wordpress.org/trunk@42716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-28 01:51:29 +00:00
Sergey Biryukov
fa47925a9a Twenty Seventeen: Bump version and update the changelog.
Props audrasjb.
Fixes #43572.
Built from https://develop.svn.wordpress.org/trunk@42881


git-svn-id: http://core.svn.wordpress.org/trunk@42711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-27 21:06:30 +00:00
Sergey Biryukov
0e9549d424 Formatting: Permit use of text-transform in safecss_filter_attr().
Add unit tests for `safecss_filter_attr()`.

Props birgire, juiiee8487, danielbachhuber.
Fixes #42729.
Built from https://develop.svn.wordpress.org/trunk@42880


git-svn-id: http://core.svn.wordpress.org/trunk@42710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-27 00:54:34 +00:00
Sergey Biryukov
ff314fd156 Media: Pass EXIF data to the wp_read_image_metadata filter.
Props desrosj.
Fixes #43624.
Built from https://develop.svn.wordpress.org/trunk@42879


git-svn-id: http://core.svn.wordpress.org/trunk@42709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 20:45:29 +00:00
Sergey Biryukov
079cfd60a9 Media: In wp_read_image_metadata(), rename $sourceImageType variable to $image_type to match coding standards.
See #43624.
Built from https://develop.svn.wordpress.org/trunk@42878


git-svn-id: http://core.svn.wordpress.org/trunk@42708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 20:41:29 +00:00
John Blackbourn
bbcb4300a3 Docs: Correct and improve various inline documentation.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 19:35:29 +00:00
John Blackbourn
2361ca884f Docs: Document more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 19:33:31 +00:00
John Blackbourn
b13e73d05c Docs: Document more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 18:10:32 +00:00
Sergey Biryukov
0895f04705 Docs: Correct method reference in a comment for Bulk_Plugin_Upgrader_Skin::$plugin_info.
See [42677] for `Bulk_Theme_Upgrader_Skin::$theme_info`.

See #42505.
Built from https://develop.svn.wordpress.org/trunk@42873


git-svn-id: http://core.svn.wordpress.org/trunk@42703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-23 00:34:29 +00:00
John Blackbourn
18169f0ae1 Docs: Revert some sneaky debugging code.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:29:30 +00:00
John Blackbourn
1b5d6c6971 Docs: Document many more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:27:32 +00:00
John Blackbourn
7f36bbbdf1 Docs: Document WP_Roles properties with typed array notation.
Props stevenlinx

Fixes #38732
See #41756 

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


git-svn-id: http://core.svn.wordpress.org/trunk@42700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 18:56:33 +00:00
Jeremy Felt
89cb4caddc Multisite: Return WP_Site as expected in get_active_blog_for_user().
Previously it was possible for a standard object representing the site to be returned in some cases.

Fixes #38430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 23:07:30 +00:00
Sergey Biryukov
61a0745df8 Media: On Media Settings screen, make the pairs of labels and inputs always stacked vertically, on both mobile and desktop screens.
Make `<br />` tags on the screen behave as line breaks again after [41836]. Add a missing fieldset + legend for better accessibility.

Props afercia, RavanH, obenland, garrett-eclipse.
Fixes #42724. See #34539.
Built from https://develop.svn.wordpress.org/trunk@42864


git-svn-id: http://core.svn.wordpress.org/trunk@42694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 22:44:31 +00:00
John Blackbourn
2ac3192a5a Build/Test Tools: Implement assertNotWPError() in appropriate places in the test suite.
Props birgire

Fixes #42065

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


git-svn-id: http://core.svn.wordpress.org/trunk@42693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 22:35:32 +00:00
John Blackbourn
1e18087867 General: Instruct file editors not to trim trailing whitespace in markdown files.
Two trailing spaces in a markdown file indicates a line break.

Props netweb

Fixes #43104

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


git-svn-id: http://core.svn.wordpress.org/trunk@42692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 22:15:31 +00:00
Sergey Biryukov
8a701e5b3f Formatting: Avoid a PHP 7.2 warning in wp_kses_attr() when one of $allowedtags elements is an uncountable value.
Props andrei0x309, soulseekah, SergeyBiryukov.
Fixes #43312.
Built from https://develop.svn.wordpress.org/trunk@42860


git-svn-id: http://core.svn.wordpress.org/trunk@42690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 21:35:31 +00:00
Jeremy Felt
b05cb5e5ed Multisite: Use case-insensitive check on email domain whitelist.
Props greatislander.
Fixes #43148.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 19:07:31 +00:00
Andrea Fercia
d0e1b54105 Accessibility: Menus screen: Improve headings and instructions for better accessibility.
Props audrasjb, melchoyce, juliemoynat.
Fixes #43397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 17:48:21 +00:00
Dominik Schilling
80c9ed8bfa Users: Don't show roles dropdown on user-edit.php if current user cannot promote user.
Fixes #43580.
Built from https://develop.svn.wordpress.org/trunk@42856


git-svn-id: http://core.svn.wordpress.org/trunk@42686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-19 20:56:32 +00:00
Dominik Schilling
61ba57abb7 Users: Use promote_users for role updates in edit_user().
`edit_user()` can also update user roles but was still using the `edit_users` capability instead of the newer `promote_users` capability introduced in [14176].
This makes the role handling consistent with the bulk dropdown menu for role changes.

Props flixos90, johnjamesjacoby, ocean90.
Fixes #42564.
Built from https://develop.svn.wordpress.org/trunk@42855


git-svn-id: http://core.svn.wordpress.org/trunk@42685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-19 20:29:34 +00:00
Dominik Schilling
6fd9d2edcf REST API JavaScript Client: Support an empty string for nonce to disable sending the X-WP-Nonce header.
Passing a `nonce` argument with an empty string to `wp.api.init()` now does no longer fall back to `wpApiSettings.nonce`. This makes it possible to stop sending nonce headers, for example to a read-only endpoint on another site in a multisite install.

Props adamsilverstein, FPCSJames, ocean90, swissspidy.
Fixes #42948, #43266.
Built from https://develop.svn.wordpress.org/trunk@42852


git-svn-id: http://core.svn.wordpress.org/trunk@42682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 17:21:30 +00:00
Dominik Schilling
3138d89e1e REST API JS Client: Extend custom nonce functionality to collections.
This brings the improved nonce handling from [41553] to collections to remove the direct `wpApiSettings.nonce` dependency.

Props adamsilverstein, ocean90, swissspidy.
Fixes #43265.
Built from https://develop.svn.wordpress.org/trunk@42851


git-svn-id: http://core.svn.wordpress.org/trunk@42681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 17:04:30 +00:00
Dominik Schilling
aaf1fc64c4 Multisite: Use a numbered placeholder in sprintf() for the site URL.
Fixes missing site domain in the link and a PHP warning.

Props Thomas Vitale, conner_bw.
See #41645.
Fixes #43568.
Built from https://develop.svn.wordpress.org/trunk@42844


git-svn-id: http://core.svn.wordpress.org/trunk@42674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 14:45:30 +00:00
Dominik Schilling
5c291d49de Pinking shears.
See #41057.
Built from https://develop.svn.wordpress.org/trunk@42843


git-svn-id: http://core.svn.wordpress.org/trunk@42673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 14:23:33 +00:00
Joe McGill
2cb76498ba Update unit test following r42839.
This updates the expected version number for Hello Dolly in `Tests_Ajax_Update_Plugin::test_update_plugin` following [42839].

See #43555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-17 20:57:30 +00:00
Joe McGill
0a02c87b48 Update Hello Dolly lyrics.
This updates the Hello Dolly plugin to remove lines which could be objectionable when shown in the admin out of context, and brings the lyrics more in line with Louis Armstrong's recording.

Props sebastienthivinfocom, birgire, audrasjb, joemcgill.
Fixes #43555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-17 20:23:32 +00:00
Joe McGill
06ec96a7a4 Revert max-width styles on caption shortcodes.
This is a partial revert of [41724], so image captions include an
inline `width` style instead of `max-width`.

This returns the caption shortcode to the pre-4.9.0 behavior, while
retaining the extra unit test coverage added in [41724].

Fixes #43123. See #33981.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 20:07:33 +00:00
Felix Arntz
176a289050 Multisite: Introduce metadata for sites.
A new global multisite table `wp_blogmeta` is added to the database schema, and a set of `*_site_meta()` API functions are introduced.

The implementation fails gracefully when the new table is not yet available, which may happen especially shortly after the core update, before the network has been upgraded to the new database schema. The presence of the table is detected once and stored as a global setting on the main network.

Core does not yet use site metadata, but there are several use-cases to be implemented or explored in the near future, and it allows plugins to extend sites with arbitrary data, which will come in particularly handy with the upcoming REST API endpoint for sites.

Props spacedmonkey, johnjamesjacoby, jeremyfelt, flixos90.
Fixes #37923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 02:15:31 +00:00
Felix Arntz
eda5ab56af Bootstrap: Load formatting.php and meta.php earlier in wp-settings.php.
This change is necessary to enable multisite-specific metadata functionality during the multisite bootstrap process.

See #40948.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 02:01:33 +00:00
Felix Arntz
485984e82e Multisite: Add missing group annotations to tests included in [42833].
This ensures tests are skipped correctly when not using multisite.

See #43506.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-13 17:57:30 +00:00
Felix Arntz
57fd97017e Multisite: Ensure the {$network_id}:notoptions array is set in cache in get_network_option().
Prior to this change, the `{$network_id}:notoptions` cache would only be fetched, but not set, unless the actual database lookup would be unsuccessful. This enhancement slightly improves performance by preventing unnecessary external object cache lookups if one is used.

Fixes #43506.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-13 15:37:33 +00:00
Felix Arntz
ed1df81bba General: Introduce dashboard widget to inform administrators about outdated PHP versions.
This new dashboard widget is shown on WordPress sites which are powered by a PHP version which WordPress considers outdated, in order to inform site owners about the resulting problems and to explain how to upgrade to a supported version. An education page for that purpose has been previously created that the widget links to. The link is translatable so that localized versions of the page can be referred to as they become available.

The nag follows the example of the Browse Happy dashboard widget and is only visible for administrators, or network administrators when using multisite. To determine whether it needs to be displayed, a new wordpress.org API introduced prior is called that handles the version logic in a centralized location.

Props flixos90, hedgefield, schlessera.
Fixes #41191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 16:43:31 +00:00
John Blackbourn
d7025e7787 Security: Loosen the admin referrer policy header value to allow the referring host to be sent from the admin area in all cases.
This allows referrer-restricted content from third parties (such as images and fonts) to continue working in the admin area.

Props aranwer104, qcmiao

Fixes #43285

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


git-svn-id: http://core.svn.wordpress.org/trunk@42660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 10:57:35 +00:00
Dion Hulse
42b03122b5 Plugins: Add support for plugins having an active_installs value larger than 1 million.
WordPress.org currently supports up to 5 million, and with the growth of WordPress, it's expected that that upper bound will increase in the future.

Fixes #43193.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 01:57:31 +00:00
Sergey Biryukov
81500e50ef Link Template: Apply get_{$adjacent}_post_excluded_terms filter to an empty excluded_terms parameter as well.
Props soulseekah, zottto.
Fixes #43521.
Built from https://develop.svn.wordpress.org/trunk@42828


git-svn-id: http://core.svn.wordpress.org/trunk@42658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 17:32:31 +00:00
Sergey Biryukov
4848a09b35 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 16:44:34 +00:00
Sergey Biryukov
fab939595d Docs: Fix typo in a comment in WP_Community_Events::trim_events().
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42826


git-svn-id: http://core.svn.wordpress.org/trunk@42656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 10:35:31 +00:00
Sergey Biryukov
15e969be8d Docs: Add missing brace in auto_update_{$type} filter DocBlock.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42825


git-svn-id: http://core.svn.wordpress.org/trunk@42655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 10:30:33 +00:00
Sergey Biryukov
8bab745586 General: In wp_debug_backtrace_summary(), check if $call['args'] is defined to avoid a PHP notice.
Props paulschreiber.
Fixes #31215.
Built from https://develop.svn.wordpress.org/trunk@42824


git-svn-id: http://core.svn.wordpress.org/trunk@42654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 17:31:32 +00:00
Andrew Ozz
ba7b8cd8a0 Accessibility improvements for the Privacy Tools screen.
Propr afercia.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@42823


git-svn-id: http://core.svn.wordpress.org/trunk@42653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 14:01:31 +00:00
Sergey Biryukov
f700ac6075 Docs: Use WP_Term instead of generic object type for the $tag parameter in wp-admin/edit-tag-form.php hook docs.
Props xhezairi, ocean90.
Fixes #43507.
Built from https://develop.svn.wordpress.org/trunk@42822


git-svn-id: http://core.svn.wordpress.org/trunk@42652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 02:01:29 +00:00
Sergey Biryukov
4e9c3f916f Docs: Fix typos in _wp_emoji_list() description.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42821


git-svn-id: http://core.svn.wordpress.org/trunk@42651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 01:50:30 +00:00
Sergey Biryukov
0b799bd6a7 General: In wp_debug_backtrace_summary(), capture hook name for do_action_ref_array() and apply_filters_ref_array() as well.
Props Rarst.
Fixes #43488.
Built from https://develop.svn.wordpress.org/trunk@42820


git-svn-id: http://core.svn.wordpress.org/trunk@42650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 00:05:31 +00:00
Sergey Biryukov
c46a518330 Tests: Skip symlinked theme file tests if symlink() is not available, e.g. in PHP 5.2.x on Windows.
See #43508.
Built from https://develop.svn.wordpress.org/trunk@42819


git-svn-id: http://core.svn.wordpress.org/trunk@42649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:48:30 +00:00
Adam Silverstein
e70caa19a1 Media: Fix image cropping on touch screen devices.
* In initCrop, handle touch events in addition to mouse events.
* In imageSelect jQuery plugin, accept event.which of 0 as provided by touch events.

Props yahil, alexgso, joemcgill.
Fixes #41242.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:27:31 +00:00
Adam Silverstein
6751be3561 Customizer menus: correct oversized viewport after dragging menu items.
Fix an issue where the screen viewport resized to an oversized state on mobile devices after moving sub-menus.

Props kwonye.
Fixes #36884.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:06:30 +00:00
John Blackbourn
d1d60bb22c Themes: Revert [42788] as it breaks a lot of things.
See #43228

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


git-svn-id: http://core.svn.wordpress.org/trunk@42646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:00:31 +00:00
Andrew Ozz
63dd79d908 Respect the commenter decision when they have checked the checkbox to consent to cookies, and keep it checked when they reload the page or post another comment.
See #43436.
Built from https://develop.svn.wordpress.org/trunk@42815


git-svn-id: http://core.svn.wordpress.org/trunk@42645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 15:57:30 +00:00
Andrew Ozz
b93dfd3571 Add Privacy Tools admin page under the Tools menu.
Props allendav, xkon, azaozz.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@42814


git-svn-id: http://core.svn.wordpress.org/trunk@42644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 15:04:33 +00:00
Sergey Biryukov
051dd178b3 Tests: Skip symlinked theme file tests if the links could not be created.
Fixes #43508.
Built from https://develop.svn.wordpress.org/trunk@42812


git-svn-id: http://core.svn.wordpress.org/trunk@42642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 01:10:31 +00:00
Andrea Fercia
127ecc530c Accessibility: Underline the links in the Plugins descriptions and update notices.
Links within blocks and lines of text should always be underlined.

Props Travel_girl, chetan200891, Shital Patel.
Fixes #42647.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 23:20:30 +00:00
Sergey Biryukov
eaf4f346fd Docs: Improve documentation for meta capability filters.
Remove self-references, correct parameter names and descriptions.

Props milana_cap, ocean90, SergeyBiryukov.
Fixes #43504.
Built from https://develop.svn.wordpress.org/trunk@42809


git-svn-id: http://core.svn.wordpress.org/trunk@42639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 23:19:30 +00:00
Andrea Fercia
320a05019a Accessibility: Themes: use aria-current for the Walker_Nav_Menu current link.
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of `aria-current` after [42440], [41683], [41359], and [41371].

Props williampatton, chetan200891, sami.keijonen.
Fixes #43191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 21:31:30 +00:00
Andrea Fercia
48077799d9 Accessibility: Insert Link modal: Improve keyboard interaction.
Avoids to change the selected link when using the Shift and Up/Down arrow keys
to select text in the form fields.

Fixes #43253.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 20:58:30 +00:00
Sergey Biryukov
996efe8f6e Filesystem API: Avoid an infinite loop in wp_mkdir_p() when trying to determine the parent folder with open_basedir restriction in effect.
Props soulseekah, 1265578519-1.
Fixes #43417.
Built from https://develop.svn.wordpress.org/trunk@42801


git-svn-id: http://core.svn.wordpress.org/trunk@42631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 19:32:30 +00:00
Sergey Biryukov
c1897645a2 General: In wp_debug_backtrace_summary(), normalize paths before replacement for better cross–platform compatibility.
Props Rarst.
Fixes #43501.
Built from https://develop.svn.wordpress.org/trunk@42800


git-svn-id: http://core.svn.wordpress.org/trunk@42630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 17:08:31 +00:00
Sergey Biryukov
902232ffec Tests: Correct assertion in Tests_WP_Customize_Setting::test_constructor_with_args().
Props jipmoors.
See #30988, #43218.
Built from https://develop.svn.wordpress.org/trunk@42799


git-svn-id: http://core.svn.wordpress.org/trunk@42629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 16:38:30 +00:00
Sergey Biryukov
e2707d57f9 Docs: Improve JSDoc for wp-includes/js/media/controllers/gallery-add.js.
Props boblinthorst, bramheijmink, manuelaugustin, ireneyoast, igorsch, nataliashitova.
Fixes #43500.
Built from https://develop.svn.wordpress.org/trunk@42798


git-svn-id: http://core.svn.wordpress.org/trunk@42628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 16:25:34 +00:00
Sergey Biryukov
fdc4f68678 Docs: Remove copy/pasted default value description for $type in WP_Customize_Manager::add_setting().
Props DannyCooper.
Fixes #43497.
Built from https://develop.svn.wordpress.org/trunk@42797


git-svn-id: http://core.svn.wordpress.org/trunk@42627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 13:06:33 +00:00
Sergey Biryukov
ef33f565b1 Docs: Improve documentation for add_meta_boxes and do_meta_boxes actions.
Props danieltj, johnbillion, SergeyBiryukov.
Fixes #43229.
Built from https://develop.svn.wordpress.org/trunk@42796


git-svn-id: http://core.svn.wordpress.org/trunk@42626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 03:57:31 +00:00
Sergey Biryukov
24f43065b9 Docs: Document globals in wp-admin/revision.php as @global instead of @param.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42795


git-svn-id: http://core.svn.wordpress.org/trunk@42625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 03:53:34 +00:00
Andrea Fercia
ffedf3d752 Accessibility: Widgets: Make the "Available Widgets" section operable with a keyboard.
For a number of years, the "Available Widgets" section has been off-limits for
keyboard users. Now it can be used also with the keyboard. This change introduces
also some improvements for assistive technologies.

- makes the widget toggles focusable and adds an `aria-expanded` attribute to indicate their state
- improves the toggles labelling to clarify context (add/edit)
- changes the controls to choose a sidebar from list items to buttons
- adds an `aria-label` attribute to the buttons to clarify their purpose
- adds an `aria-pressed` attribute to the buttons to indicate which one is selected
- improves color contrast of the selected button
- uses a `wp.a11y.speak()` message to announce to screen reader users when a widget has been added to a sidebar
- moves focus back to the toggle button when closing a widget

See #40677.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-07 22:27:31 +00:00
Andrea Fercia
e34999f4aa Accessibility: Networks and Sites: mark the New Site required form fields as required.
Also, adds an `aria-describedby` attribute to associate the Admin Email field with its description.

Props dipesh.kakadiya, jackreichert, rianrietveld.
Fixes #37331.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-07 19:41:33 +00:00
Mike Schroder
51b0a3cd28 Media: Correctly allow changing PDF thumbnail crop value.
Corrects logic that keeping plugins from setting crop value of intermediate image sizes for rendered PDFs.

Adds test.

Props leemon, SergeyBiryukov, chetan200891, birgire.
Fixes #43226.
Built from https://develop.svn.wordpress.org/trunk@42792


git-svn-id: http://core.svn.wordpress.org/trunk@42622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-07 01:19:31 +00:00
Andrew Ozz
791b11bc3f Add a method to confirm user requests by email. First run.
Props mikejolley.
See #43443.
Built from https://develop.svn.wordpress.org/trunk@42791


git-svn-id: http://core.svn.wordpress.org/trunk@42621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-06 23:47:30 +00:00
Andrea Fercia
6a4b2a022a Accessibility: Make the Widgets screen "Enable accessibility mode" link more discoverable.
For a number of years, the link to the Widgets screen "Accessibility mode" lived
in the Screen Options panel, hidden by default. Many users, including assistive
technologies users, weren't able to find it or even aware it existed. By bringing
the link in the main screen, visible by default, this change makes the
"Accessibility mode" easily discoverable for everyone.

Props chetan200891, antonioeatgoat.
Fixes #42778.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-06 17:21:33 +00:00
John Blackbourn
6c09e79cc5 Database: Add the query start time to logged query data.
This allows debugging plugins to plot the time at which queries were executed.

Props Rarst for initial patch.

Fixes #43315

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


git-svn-id: http://core.svn.wordpress.org/trunk@42619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 22:54:35 +00:00
John Blackbourn
ea6360b47c Themes: Ensure the theme roots cache is cleared when registering a theme directory.
Props soulseekah, johnbillion

Fixes #43228

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


git-svn-id: http://core.svn.wordpress.org/trunk@42618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 22:14:30 +00:00
John Blackbourn
c9b07e6411 Docs: Standardise and correct documentation relating to parameters which accept plugin names.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 21:50:31 +00:00
John Blackbourn
087b52dced Upgrade/Install: Fix the format of the upgrader_process_complete actions after [42343].
More info: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1323

See #41057, #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 21:44:30 +00:00
Andrea Fercia
9842bd6d24 Accessibility: Change the "Show / Hide dismissed updates" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.
Also, adds an `aria-expanded` attribute to communicate the expandable panel state
and improves the buttons spacing.

Props Cheffheid, audrasjb, afercia.
Fixes #38674.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 15:50:30 +00:00
Andrea Fercia
64634898c2 Accessibility: Change the media upload "Dismiss error" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.

Props Cheffheid, audrasjb.
Fixes #38671.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 15:33:33 +00:00
Sergey Biryukov
084b48e1ba Help/About: Adjust capability checks formatting in help text on Dashboard screen for readability and consistency with similar checks in other files.
See #43472.
Built from https://develop.svn.wordpress.org/trunk@42783


git-svn-id: http://core.svn.wordpress.org/trunk@42613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 03:32:30 +00:00
Sergey Biryukov
24f13abf63 Help/About: Remove popular plugins feed reference from help text on Dashboard screen, no longer relevant since [40607].
Props denisco.
See #43472.
Built from https://develop.svn.wordpress.org/trunk@42782


git-svn-id: http://core.svn.wordpress.org/trunk@42612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 03:17:31 +00:00
Sergey Biryukov
31a3083c28 Help/About: Update "WordPress News" widget references in help text and inline documentation.
Props monikarao, denisco.
Fixes #43400, #43472.
Built from https://develop.svn.wordpress.org/trunk@42781


git-svn-id: http://core.svn.wordpress.org/trunk@42611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 03:04:31 +00:00
Sergey Biryukov
5596017878 Media: Recognize .ico files as displayable images on PHP 5.3+ and allow attachment meta data to be generated for them.
Props remyvv, Guido07111975.
Fixes #43458.
Built from https://develop.svn.wordpress.org/trunk@42780


git-svn-id: http://core.svn.wordpress.org/trunk@42610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 01:03:31 +00:00
Sergey Biryukov
e451dfac9e Help/About: Correct the number of most recent drafts in help text on Dashboard screen.
Props denisco.
Fixes #43471.
Built from https://develop.svn.wordpress.org/trunk@42779


git-svn-id: http://core.svn.wordpress.org/trunk@42609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 00:24:30 +00:00
Sergey Biryukov
3385d5b2de Docs: Expand delete_theme() return value, fix typo in delete_plugins() return value.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42778


git-svn-id: http://core.svn.wordpress.org/trunk@42608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 22:07:29 +00:00
Sergey Biryukov
58592b64dc Docs: Use consistent description for $wp_filesystem global.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42777


git-svn-id: http://core.svn.wordpress.org/trunk@42607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:58:30 +00:00
Sergey Biryukov
179bec1306 Docs: Clarify return values and improve DocBlock formatting for verify_file_md5(), unzip_file(), _unzip_file_ziparchive(), _unzip_file_pclzip(), copy_dir(), WP_Filesystem().
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42776


git-svn-id: http://core.svn.wordpress.org/trunk@42606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:43:30 +00:00
Sergey Biryukov
3c8ae81018 Docs: Clarify download_url() return value, improve DocBlock formatting.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42775


git-svn-id: http://core.svn.wordpress.org/trunk@42605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 19:50:31 +00:00
Sergey Biryukov
7b7ca428f3 Docs: Clarify that wp_update_user() accepts an array as $userdata argument.
Props nextendweb.
Fixes #43051.
Built from https://develop.svn.wordpress.org/trunk@42774


git-svn-id: http://core.svn.wordpress.org/trunk@42604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 18:12:31 +00:00
Sergey Biryukov
86c3c7e1c9 Filesystem API: Allow download_url() to return the response code and body on error as an additional WP_Error object data.
The error response body size is limited to 1 KB by default to avoid taking up too much memory. The size can be increased using `download_url_error_max_body_size` filter.

Props soulseekah, campusboy1987, mihdan, SergeyBiryukov.
Fixes #43329.
Built from https://develop.svn.wordpress.org/trunk@42773


git-svn-id: http://core.svn.wordpress.org/trunk@42603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 17:14:31 +00:00
Andrew Ozz
8ae59374f3 Add a checkbox to the comment form so logged out users can opt-out of commenter cookies.
Props lakenh, xkon, birgire, azaozz.
See #43436.
Built from https://develop.svn.wordpress.org/trunk@42772


git-svn-id: http://core.svn.wordpress.org/trunk@42602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 16:41:33 +00:00
Dominik Schilling
d950c75307 Import: Avoid counting an uncountable type when reading arguments passed to a script.
Props josephscott.
Fixes #42898.
Built from https://develop.svn.wordpress.org/trunk@42771


git-svn-id: http://core.svn.wordpress.org/trunk@42601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-02 17:17:31 +00:00
Andrew Ozz
de8936588c Add pre-save content filter to make target=_blank always secure.
Props notnownikki, iseulde, azaozz
Fixes #43187
Built from https://develop.svn.wordpress.org/trunk@42770


git-svn-id: http://core.svn.wordpress.org/trunk@42600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-02 14:42:31 +00:00
Dominik Schilling
74cb5936fc Docs: Remove trailing whitespace in wp-includes/post.php.
Built from https://develop.svn.wordpress.org/trunk@42769


git-svn-id: http://core.svn.wordpress.org/trunk@42599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-02 10:02:33 +00:00
Boone Gorges
35ad9e9efc Allow LIKE queries against the 'key' value in meta queries.
The new `compare_key=LIKE` parameter works in conjunction with `key` in a
similar way to the `compare=LIKE` and `value`: by doing a "compares" `LIKE`
query. This allows developers to do partial matches against keys when
doing meta queries.

Props mariovalney, chasewg.
Fixes #42409.
Built from https://develop.svn.wordpress.org/trunk@42768


git-svn-id: http://core.svn.wordpress.org/trunk@42598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-01 04:03:33 +00:00
Andrea Fercia
d2d64f13c7 Accessibility: Change the comments "Quick Edit" and "Reply" links to buttons.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.

Props Cheffeid, audrasjb, afercia.
See #43382, #38677.
Fixes #43376.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 22:36:34 +00:00
Sergey Biryukov
e786f9eb91 Docs: Mark WP_Http::_dispatch_request() as deprecated. It's no longer used since [37428].
Fixes #43414.
Built from https://develop.svn.wordpress.org/trunk@42766


git-svn-id: http://core.svn.wordpress.org/trunk@42596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 03:48:30 +00:00
Sergey Biryukov
b0ddd7ca43 Docs: Add description for register_admin_color_schemes().
Props terriann, danieltj.
Fixes #42779.
Built from https://develop.svn.wordpress.org/trunk@42765


git-svn-id: http://core.svn.wordpress.org/trunk@42595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 03:28:31 +00:00
Sergey Biryukov
7d8809c98b XML-RPC: Unify permission error messages in wp_xmlrpc_server.
Props ramiy.
Fixes #42266.
Built from https://develop.svn.wordpress.org/trunk@42764


git-svn-id: http://core.svn.wordpress.org/trunk@42594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 03:19:31 +00:00
iandunn
acfced54f0 External Libraries: Test for MEjs files in src instead of build.
The `build` task doesn't get run during TravisCI jobs, so the `build` folder doesn't exist in that context. Because of that, the test added in r42762 was failling.

Checking for the files in `src` instead achieves the same goal as that commit, but should pass in Travis.

See #43101
See https://wordpress.slack.com/archives/C02RQBWTW/p1519742993000615

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


git-svn-id: http://core.svn.wordpress.org/trunk@42593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 00:26:31 +00:00
iandunn
f71c4f38c3 External Libraries: Test that MediaElement SWF files remain deleted.
The files were removed from Core in r42462 because they're no longer necessary, and have a history of security issues. They remain upstream, though, so this test makes it explicitly clear that they should not be added back in the future without careful consideration and discussion with the Security team.

`Tests_Admin_IncludesUpdateCore::test_new_files_are_not_in_old_files_array_compiled()` would already catch files with the exact same name, but this test will also catch files with new names, just to be extra cautious.

Props iandunn, ocean90, SergeyBiryukov
Fixes 43101

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


git-svn-id: http://core.svn.wordpress.org/trunk@42592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-27 14:38:33 +00:00
Sergey Biryukov
0e802a627d General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.
Built from https://develop.svn.wordpress.org/trunk@42761


git-svn-id: http://core.svn.wordpress.org/trunk@42591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-27 02:31:31 +00:00
iandunn
71f206839d Build/Test Tools: Add watch:phpunit task.
This allow PHPUnit test groups to run automatically when files are changed, rather than having to be ran manually throughout the development process. This creates a smoother developer experience, and a tighter feedback loop.

Props iandunn, netweb, pento
Fixes #42282

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


git-svn-id: http://core.svn.wordpress.org/trunk@42590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-27 00:32:33 +00:00
Sergey Biryukov
669f8bb750 Media: Remove unnecessary aria-required attribute from legacy (pre-3.5.0) media functions, added in [7888].
At the time, having both `required` and `aria-required` meant a wider range of support for browsers and assistive technology. Today, it's safe to use just `required`.

Props shital-patel, afercia, audrasjb.
Fixes #43415.
Built from https://develop.svn.wordpress.org/trunk@42759


git-svn-id: http://core.svn.wordpress.org/trunk@42589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 23:10:31 +00:00
Sergey Biryukov
d3b2daf490 Comments: Remove unnecessary aria-required attribute from comment_form(), added with the function in [12810].
At the time, having both `required` and `aria-required` meant a wider range of support for browsers and assistive technology. Today, it's safe to use just `required`.

Props lakenh, afercia, davidakennedy, henry.wright.
Fixes #39045.
Built from https://develop.svn.wordpress.org/trunk@42758


git-svn-id: http://core.svn.wordpress.org/trunk@42588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 20:50:30 +00:00
Dominik Schilling
666e203f31 Administration: Remove unnecessary capitalization when referencing to plugin/theme editors.
Fixes #43072.
Built from https://develop.svn.wordpress.org/trunk@42757


git-svn-id: http://core.svn.wordpress.org/trunk@42587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 19:35:30 +00:00
Sergey Biryukov
a018cdd4e3 Docs: Add missing @since entries for functions in wp-admin/image-edit.php.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42756


git-svn-id: http://core.svn.wordpress.org/trunk@42586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 18:38:31 +00:00
Sergey Biryukov
9cb07ec40e Taxonomy: Make the "Format" taxonomy name plural, for consistency with other taxonomies.
Props afercia, danieltj.
Fixes #43370.
Built from https://develop.svn.wordpress.org/trunk@42755


git-svn-id: http://core.svn.wordpress.org/trunk@42585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 18:22:31 +00:00
Sergey Biryukov
3812402cc7 Docs: Fix typo in wp.customize.selectiveRefresh.placements() description.
Props Nikschavan.
Fixes #43418.
Built from https://develop.svn.wordpress.org/trunk@42754


git-svn-id: http://core.svn.wordpress.org/trunk@42584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 17:52:31 +00:00
Pascal Birchler
5cde2018ea Docs: Remove erroneous period in the description for esc_html__().
Props danieltj.
Fixes #43419.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 15:57:32 +00:00
Sergey Biryukov
9226691b3c Docs: Remove erroneous @static notation from WP_Tax_Query::get_sql(), added in [32627].
The method was never used as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42752


git-svn-id: http://core.svn.wordpress.org/trunk@42582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 21:45:30 +00:00
Sergey Biryukov
0b45a1e5fa Docs: Remove erroneous @static notation from WP_Http::_dispatch_request(), added in [32650].
The method was never user as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42751


git-svn-id: http://core.svn.wordpress.org/trunk@42581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 21:35:30 +00:00
Sergey Biryukov
bd9cdde1eb Docs: Remove duplicated DocBlock for http_response hook in WP_Http::_dispatch_request().
The filter is already documented in `WP_Http::request()`.

See #42505.
Built from https://develop.svn.wordpress.org/trunk@42750


git-svn-id: http://core.svn.wordpress.org/trunk@42580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 21:32:30 +00:00
Sergey Biryukov
510feac5bb Twenty Fourteen: Remove redundant @access and @static notations from classes.
Props birgire.
See #41452, #42803, #42505.
Built from https://develop.svn.wordpress.org/trunk@42749


git-svn-id: http://core.svn.wordpress.org/trunk@42579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:49:30 +00:00
Sergey Biryukov
c3738e9617 Docs: Remove @access notation from WP_Taxonomy::$meta_box_sanitize_cb.
See #42505, #41452.
Built from https://develop.svn.wordpress.org/trunk@42748


git-svn-id: http://core.svn.wordpress.org/trunk@42578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:38:30 +00:00
Sergey Biryukov
b026fde152 Docs: Remove @static notations from property DocBlocks in wp-admin/* and wp-includes/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42747


git-svn-id: http://core.svn.wordpress.org/trunk@42577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:32:30 +00:00
Sergey Biryukov
08227812a0 Docs: Remove @static notations from method DocBlocks in wp-includes/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42746


git-svn-id: http://core.svn.wordpress.org/trunk@42576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:22:30 +00:00
Sergey Biryukov
0fea564b7d Docs: Remove @static notations from method DocBlocks in wp-admin/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42745


git-svn-id: http://core.svn.wordpress.org/trunk@42575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:06:30 +00:00
Adam Silverstein
de6906a045 Customizer: in menus, reset results when closing the 'add items' panel.
Trigger a keyup event when clearing the search field in response to closing the add item panel. The keyup event triggers a search and resets the results. Previously, the search field was cleared while the potentially blank search results were left in place making it impossible to select new menu items.

Props Blair jersyer, aranwer104, afercia.
Fixes #43333.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 18:48:29 +00:00
Sergey Biryukov
b34b1ee061 Tests: Correct a "false positive" assertion in test_media_handle_upload_ignores_page_parent_for_directory_date().
Props birgire.
Fixes #42736.
Built from https://develop.svn.wordpress.org/trunk@42743


git-svn-id: http://core.svn.wordpress.org/trunk@42573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 18:47:30 +00:00
Sergey Biryukov
61e8101442 Tests: Avoid hardcoded domain name in test_media_handle_upload_uses_post_parent_for_directory_date().
Props birgire.
See #42736.
Built from https://develop.svn.wordpress.org/trunk@42742


git-svn-id: http://core.svn.wordpress.org/trunk@42572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 18:43:30 +00:00
Adam Silverstein
89c9e27fd1 Unit Tests: add a DIR_TESTROOT constant to avoid relative paths.
Fix an issue that prevents tests from running correctly when run outside their normal context.

Props PressLabs, johnbillion.
Fixes #40071.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 18:07:31 +00:00
Adam Silverstein
a299c5c344 Fix eshint error since r42739.
Remove a trailing comma in [42739] that was throing a jshint error.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:49:30 +00:00
Adam Silverstein
da89d20c39 Media: grid view - correct placeholder positioning during uploads.
Preventing contextually created attachments from being added to the grid collection in Attachments.validator. Remove the previous filtering introduced in [41937] which caused the placement issue.

Props lancewillett, Junaidkbr, designsimply, joemcgill.
Fixes #42968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:41:31 +00:00
Sergey Biryukov
4d47bfce41 Coding Standards: Fix code indent in unescape_invalid_shortcodes().
Props joelcj91, GaryJ.
Fixes #43346.
Built from https://develop.svn.wordpress.org/trunk@42738


git-svn-id: http://core.svn.wordpress.org/trunk@42568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:36:30 +00:00
Adam Silverstein
505c2ddb61 Taxonomy: restore TagSearch unit tests and correct deprecated version string.
Reverts unit test removal, instead changing them to expect the function to be deprecated.
Correct the version the ajax callback was deprecated.

Amends [42614].

Props dlh, ocean90.
Fixes #38922.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:28:30 +00:00
Sergey Biryukov
395667f916 Comments: After [42703], make sure $args['type'] in paginate_comments_links() is always defined.
Props anantajitjg.
Fixes #43299.
Built from https://develop.svn.wordpress.org/trunk@42736


git-svn-id: http://core.svn.wordpress.org/trunk@42566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:08:30 +00:00
Sergey Biryukov
35d5163d66 Docs: Correct description for WP_User::get_role_caps().
Props thomaswm.
Fixes #43410.
Built from https://develop.svn.wordpress.org/trunk@42735


git-svn-id: http://core.svn.wordpress.org/trunk@42565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 15:39:30 +00:00
Sergey Biryukov
b6229650e0 Themes: Pre-translate theme names on Themes screen before sorting the array, to improve performance and avoid a warning in PHP 5.x.
Props bobbingwide, sebastian.pisula.
Fixes #34565.
Built from https://develop.svn.wordpress.org/trunk@42734


git-svn-id: http://core.svn.wordpress.org/trunk@42564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 13:18:30 +00:00
Sergey Biryukov
b12620e798 Build/Test Tools: Remove vendor file name entry from .gitignore.
Props netweb.
Fixes #43411.
Built from https://develop.svn.wordpress.org/trunk@42733


git-svn-id: http://core.svn.wordpress.org/trunk@42563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 11:30:32 +00:00
Sergey Biryukov
0e39cef343 Menus: When checking if a Custom Link matches the current URL to add the current-menu-item class, check for decoded URL as well.
Props soulseekah, campusboy1987.
Fixes #43401.
Built from https://develop.svn.wordpress.org/trunk@42732


git-svn-id: http://core.svn.wordpress.org/trunk@42562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-24 13:44:31 +00:00
Sergey Biryukov
fc5617e7fe Administration: Use HTTPS for dashboard_primary_feed URL.
`dashboard_secondary_feed` is already using HTTPS since [29787].

Props iandunn.
Fixes #40416.
Built from https://develop.svn.wordpress.org/trunk@42731


git-svn-id: http://core.svn.wordpress.org/trunk@42561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-24 09:30:33 +00:00
Gary Pendergast
cf49eacd62 REST API: Translate the taxonomy visibility description strings.
This was missed in [42729].

Props TimothyBlynJacobs.
Fixes #42707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-22 00:59:30 +00:00
Gary Pendergast
d6923d285c REST API: Show taxonomy visibility settings.
For Gutenberg and other admin-type interfaces, it's useful to be able to see the visibility settings for taxonomies.

Props joehoyle, pento.
Fixes #42707.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-22 00:24:31 +00:00
Aaron Jorbin
f4f64377b7 Community Events Dashboard: Use wp_list_pluck rather than array_columns
array_columns is only available in PHP 5.5+

Introduced in [42726]

See: #41112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:27:31 +00:00
Andrea Fercia
54a45f6d77 Accessibility: Change the terms "Quick Edit" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.
See #38677 / [42725].

Fixes #43382.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:04:31 +00:00
Aaron Jorbin
9f8d1ab69d Community Events Dashboard: Always show a WordCamp if one is coming up
WordCamps are celebrations of the local WordPress Community and once a local one is scheduled, people in that community should know it is coming. This adjusts the WordPress Events in the dashboard widgets to always display a WordCamp, even if there are multiple Meetups happening first.

Props iandunn, metalandcoffee, warmlaundry, alejandroxlopez, jorbin.
Fixes #41112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:01:31 +00:00
Andrea Fercia
4767e7736c Accessibility: Change the posts "Quick Edit" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation. Also,
adds an `aria-expanded` attribute to the button to communicate to assistive
technologies the expanded / collapsed status of the Quick Edit form.

Props Cheffheid, audrasjb, afercia.
Fixes #38677.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 22:31:32 +00:00
Sergey Biryukov
ebeb2bcf5b Tests: Replace use of $this->server with rest_get_server() for better memory recycling.
Props danielbachhuber.
Fixes #41641.
Built from https://develop.svn.wordpress.org/trunk@42724


git-svn-id: http://core.svn.wordpress.org/trunk@42554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 16:25:31 +00:00
Mark Jaquith
edfe2ece51 Cache API: Allow external object caches to gracefully degrade to the default object cache.
Rework logic for how external object caches are detected, so that if
an external cache does not define a `wp_cache_init()`, the built-in
object cache will be used.

Object caches can now wrap their entire contents in logic checks. So a
Redis caching backend could make sure that the `Redis` PHP class is
available before defining all the caching functions. And if Redis is
not available, the site doesn't break or throw errors or think it is
using caching when it isn't. This is particularly useful for doing
local development, where you might want to develop on a site without
running Memcache or Redis like you are in production.

* Accounts for multisite, which may re-initialize the object cache
multiple times.
* Accounts for object caches that may include `object-cache.php` during
`advanced-cache.php` (before WP loads it).

Props jtsternberg, markjaquith.
Fixes #22661.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 14:59:30 +00:00
Sergey Biryukov
c7c98dd7ea Docs: Correct $id parameter type for old_slug_redirect_post_id filter.
Props dlh.
Fixes #43375.
Built from https://develop.svn.wordpress.org/trunk@42722


git-svn-id: http://core.svn.wordpress.org/trunk@42552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 09:35:33 +00:00
Sergey Biryukov
9e5e5ecdc6 Docs: Add a reference to get_pages() arguments in wp_dropdown_pages() and wp_list_pages(), as they both use the function internally.
Props birgire.
Fixes #43355.
Built from https://develop.svn.wordpress.org/trunk@42721


git-svn-id: http://core.svn.wordpress.org/trunk@42549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 22:24:31 +00:00
Sergey Biryukov
dcf5eb07de Docs: Correct documentation for Heartbeat filters.
`$response` parameter is documented as an array or object, but only array is actually supported.

See #42777, #42505.
Built from https://develop.svn.wordpress.org/trunk@42720


git-svn-id: http://core.svn.wordpress.org/trunk@42548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 21:46:33 +00:00
Peter Wilson
e6ccdf161f General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 02:13:32 +00:00
Dominik Schilling
5eddf9a359 I18N: Remove unused $start_of_week property from WP_Locale.
Missed in [35685], see #28344.

Props birgire, tonybogdanov.
Fixes #43344.
Built from https://develop.svn.wordpress.org/trunk@42718


git-svn-id: http://core.svn.wordpress.org/trunk@42546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-18 16:32:34 +00:00
Konstantin Obenland
3f7a8aac6b Docs: Add filter docs for wp_refresh_nonces
Props chetan200891, slushman, dlh, netweb.
Fixes #42777.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-17 04:42:33 +00:00
Sergey Biryukov
e50b9c943f Database: If both WP_DEBUG and WP_DEBUG_DISPLAY are true, display a more specific error message in wpdb::bail().
Props sivel, Mte90, SergeyBiryukov.
Fixes #13657.
Built from https://develop.svn.wordpress.org/trunk@42716


git-svn-id: http://core.svn.wordpress.org/trunk@42544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-15 14:29:30 +00:00
atimmer
e17e29d4ea Docs: Improve JSDoc for for wp-admin/js/xfn.js.
Props kapteinbluf, igorsch.
Fixes #43204.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-15 13:35:31 +00:00
atimmer
34c6523a0d Docs: Improve JSDoc for wp-admin/js/user-suggest.js.
Amend r42708 by fixing the 80 character wrap around.

Props timhavinga.
See #43270.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-15 13:26:33 +00:00
Sergey Biryukov
7d2cd516d1 Twenty Seventeen: Underline links in comments.
Props jainnidhi, larrach, audrasjb.
Fixes #43317. 
Built from https://develop.svn.wordpress.org/trunk@42713


git-svn-id: http://core.svn.wordpress.org/trunk@42541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-15 03:34:30 +00:00
Sergey Biryukov
5d1e06f939 Docs: Move inline comments in wp_kses_split2() before the blocks they apply to.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42712


git-svn-id: http://core.svn.wordpress.org/trunk@42540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-14 11:46:33 +00:00
Sergey Biryukov
d9f222f740 Customize: Correct closing tags in customize_themes_print_templates().
Props johnpgreen, nandorsky.
Fixes #43307.
Built from https://develop.svn.wordpress.org/trunk@42711


git-svn-id: http://core.svn.wordpress.org/trunk@42539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 22:15:32 +00:00
Drew Jaynes
6e665d1f15 Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions.
These notations largely serve to direct consumers (of both the source and the parsed code reference) to extended information on individual and related conditional tags throughout WordPress. The changeset also standardizes corresponding DocBlock summaries to use third-person singular verbs.

Notations been added for the following functions:

* comments_open()
* email exists()
* has_excerpt()
* has_post_thumbnail()
* has_tag()
* in_category()
* in_the_loop()
* is_404()
* is_active_sidebar()
* is_active_widget()
* is_admin()
* is_admin_bar_showing()
* is_archive()
* is_attachment()
* is_author()
* is_blog_installed()
* is_category()
* is_comments_popup()
* is_date()
* is_day()
* is_dynamic_sidebar()
* is_feed()
* is_front_page()
* is_home()
* is_local_attachment()
* is_main_query
* is_month()
* is_multi_author
* is_new_day()
* is_page()
* is_page_template()
* is_paged()
* is_plugin_active()
* is_plugin_active_for_network()
* is_plugin_inactive()
* is_plugin_page()
* is_post_type_archive()
* is_preview()
* is_rtl()
* is_search()
* is_single()
* is_singular()
* is_sticky()
* is_tag()
* is_tax()
* is_taxonomy_hierarchical()
* is_time()
* is_trackback()
* is_user_logged_in()
* is_year()
* pings_open()
* post_type_exists()
* taxonomy_exists()
* term_exists()
* username exists()
* wp_attachment_is_image()
* wp_script_is()

Props janalwin.
Fixes #43254.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 16:54:31 +00:00
atimmer
5e190dc084 Docs: Improve JSDoc for media/views/spinner.js.
Amends r42675 - includes the built media files.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 15:45:30 +00:00
atimmer
87130f0e20 Docs: Improve JSDoc for wp-admin/js/user-suggest.js.
Props timhavinga.
Fixes #43270.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 15:38:31 +00:00
Sergey Biryukov
68a3e7745a Docs: Add documentation for header_video_settings filter.
Props milana_cap.
Fixes #43300.
Built from https://develop.svn.wordpress.org/trunk@42707


git-svn-id: http://core.svn.wordpress.org/trunk@42535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-12 22:39:31 +00:00
Sergey Biryukov
dfa6839706 Media: In img_caption_shortcode(), make sure $id and $caption_id are always defined.
See #34595.
Built from https://develop.svn.wordpress.org/trunk@42706


git-svn-id: http://core.svn.wordpress.org/trunk@42534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-12 22:36:33 +00:00
Sergey Biryukov
0306b3f637 Docs: Use code formatting for tags in img_caption_shortcode() DocBlock.
See #34595.
Built from https://develop.svn.wordpress.org/trunk@42705


git-svn-id: http://core.svn.wordpress.org/trunk@42533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-12 21:40:31 +00:00
Sergey Biryukov
0f8d7de77d Media: Pass original attribute values to img_caption_shortcode_width filter instead of markup pieces.
Add `caption_id` to the list of documented `[caption]` shortcode attributes.

See #34595.
Built from https://develop.svn.wordpress.org/trunk@42704


git-svn-id: http://core.svn.wordpress.org/trunk@42532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-12 21:37:30 +00:00
Sergey Biryukov
0a97d79899 Comments: Avoid a PHP notice in paginate_comments_links() if type argument is set to array.
The function is a wrapper for `paginate_links()`, which returns an array if requested.

Props anantajitjg.
Fixes #43299.
Built from https://develop.svn.wordpress.org/trunk@42703


git-svn-id: http://core.svn.wordpress.org/trunk@42531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-12 21:12:35 +00:00
Sergey Biryukov
abf27d78b9 Media: After [42695], remove redundant check that is already performed a few lines above.
Props gnif.
See #43255.
Built from https://develop.svn.wordpress.org/trunk@42702


git-svn-id: http://core.svn.wordpress.org/trunk@42530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 21:55:30 +00:00
Sergey Biryukov
c2e74ab915 Database: In require_wp_db(), check if database constants are defined before using them.
Otherwise, `wp-admin/setup-config.php` triggers an undefined constant warning in PHP 7.2.

Props mariusvw, jryancard for initial patch.
Fixes #35560.
Built from https://develop.svn.wordpress.org/trunk@42701


git-svn-id: http://core.svn.wordpress.org/trunk@42529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 18:47:30 +00:00
Sergey Biryukov
b2411e9e3f Administration: Make sure wp.updates.addAdminNotice is displayed after the page header and does not unexpectedly push down "Add New" and other buttons.
Props shivapoudel.
Fixes #41221.
Built from https://develop.svn.wordpress.org/trunk@42700


git-svn-id: http://core.svn.wordpress.org/trunk@42528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 17:28:30 +00:00
Sergey Biryukov
e1e041271e Docs: Fix typo in term_exists() DocBlock.
Props milana_cap, danieltj.
Fixes #43268.
Built from https://develop.svn.wordpress.org/trunk@42699


git-svn-id: http://core.svn.wordpress.org/trunk@42527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 17:16:29 +00:00
Sergey Biryukov
4a55ea5e68 Networks and Sites: In get_site_by_path(), use single domain and path parameters if there's only one item to look for.
This should increase the chances of `WP_Site_Query::get_sites()` hitting an existing cache.

Props spacedmonkey.
Fixes #42299.
Built from https://develop.svn.wordpress.org/trunk@42698


git-svn-id: http://core.svn.wordpress.org/trunk@42526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 17:09:31 +00:00
Sergey Biryukov
f88dddcab5 Media: Add aac to the list of allowed file types.
Props desrosj.
Fixes #42919.
Built from https://develop.svn.wordpress.org/trunk@42697


git-svn-id: http://core.svn.wordpress.org/trunk@42525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 16:40:31 +00:00
Sergey Biryukov
3de0634199 Docs: Fix typo in wp_audio_extensions and wp_video_extensions filter descriptions.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42696


git-svn-id: http://core.svn.wordpress.org/trunk@42524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 16:29:30 +00:00
Sergey Biryukov
e6322d0afe Media: In WP_Image_Editor::make_image(), close previously opened output buffer if the file could not be created.
Props dhanendran, gnif.
Fixes #43255.
Built from https://develop.svn.wordpress.org/trunk@42695


git-svn-id: http://core.svn.wordpress.org/trunk@42523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 16:25:31 +00:00
Sergey Biryukov
beeafbc7ec Media: After [42693], update HTML4 markup in img_caption_shortcode() to avoid an empty ID attribute as well.
Add a unit test for `aria-describedby` in `img_caption_shortcode()`.

See #34595.
Built from https://develop.svn.wordpress.org/trunk@42694


git-svn-id: http://core.svn.wordpress.org/trunk@42522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 15:40:30 +00:00
Sergey Biryukov
0f2b559d05 Media: Only add aria-describedby in img_caption_shortcode() if a non-empty attachment ID attribute was provided.
See #34595.
Built from https://develop.svn.wordpress.org/trunk@42693


git-svn-id: http://core.svn.wordpress.org/trunk@42521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 15:20:30 +00:00
Sergey Biryukov
dffe5deb97 Media: Make sure $caption_id does not depend on an undefined variable.
See #34595.
Built from https://develop.svn.wordpress.org/trunk@42692


git-svn-id: http://core.svn.wordpress.org/trunk@42520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 14:53:30 +00:00
Sergey Biryukov
3e19b66f40 Media: Add aria-describedby to img_caption_shortcode() output to improve image/caption relationship.
Props joedolson.
Fixes #34595.
Built from https://develop.svn.wordpress.org/trunk@42691


git-svn-id: http://core.svn.wordpress.org/trunk@42519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 14:44:30 +00:00
Sergey Biryukov
8df00f0354 Media: Convert concatenation in img_caption_shortcode() to sprintf() for clarity.
See #34595.
Built from https://develop.svn.wordpress.org/trunk@42690


git-svn-id: http://core.svn.wordpress.org/trunk@42518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 14:17:30 +00:00
Sergey Biryukov
7a8e4bcb1b Administration: Remove erroneous transition-delay values from CSS files.
Although unitless zero is allowed for `<length>` CSS data type, it's invalid for `<time>` data type.

Props chetan200891, manuel_84, GaryJ.
Fixes #43195.
Built from https://develop.svn.wordpress.org/trunk@42689


git-svn-id: http://core.svn.wordpress.org/trunk@42517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 12:55:30 +00:00
Sergey Biryukov
e97d2c0407 Users: After [41163], add a notice for Email field on Profile screen that the new address will not become active until confirmed.
Props dilipbheda.
Fixes #43106. See #16470.
Built from https://develop.svn.wordpress.org/trunk@42688


git-svn-id: http://core.svn.wordpress.org/trunk@42516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-11 12:23:31 +00:00
Sergey Biryukov
12f854b6e8 Build/Test Tools: Update prefixed CSS properties in about.css.
Firefox 52+ supports unprefixed `column-count` and `column-gap` properties.

Props netweb, afercia.
Fixes #43190.
Built from https://develop.svn.wordpress.org/trunk@42687


git-svn-id: http://core.svn.wordpress.org/trunk@42515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-10 23:47:31 +00:00
Sergey Biryukov
903224cce4 Plugins: Use correct variable name in install_plugin_information().
Props afragen.
Fixes #43282. See #43192, #29274.
Built from https://develop.svn.wordpress.org/trunk@42686


git-svn-id: http://core.svn.wordpress.org/trunk@42514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-10 22:08:30 +00:00
Sergey Biryukov
b1f48870d7 Administration: Rename Appearance → Editor menu item to Theme Editor and Plugins → Editor to Plugin Editor for clarity.
Props xkon, karmatosed.
Fixes #43072.
Built from https://develop.svn.wordpress.org/trunk@42685


git-svn-id: http://core.svn.wordpress.org/trunk@42513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-10 08:43:32 +00:00
John Blackbourn
ee24b48106 Comments: Add a "Mine" link to the list of filters on the comment listing screen.
This filter shows comments made by the current user, and copies the same filter functionality that's available on the post listing screens.

Props Iceable

Fixes #42379

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


git-svn-id: http://core.svn.wordpress.org/trunk@42512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:46:31 +00:00
Drew Jaynes
1ae9491548 Docs: Fix a copy paste error in the DocBlock summary for wp_ssl_constants(), see [13062].
Props terriann.
Fixes #43272.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:21:31 +00:00
John Blackbourn
b1ed10ab9a HTTP API: Add the URL as a paramter to various HTTP related filters.
Props paulschreiber, purnendu

Fixes #42186

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


git-svn-id: http://core.svn.wordpress.org/trunk@42510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:11:30 +00:00
John Blackbourn
427ae1692d Docs: Un-correct an incorrection correction.
See [42680]

See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:57:30 +00:00
John Blackbourn
763f34d117 Docs: Correct some secondary documentation for the https_local_ssl_verify and https_ssl_verify filters.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:48:29 +00:00
John Blackbourn
fc6ba86b80 Docs: First pass at switching some array parameter documentation to typed notation.
Props janak007

See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:26:31 +00:00
John Blackbourn
91464bce65 Docs: Add missing code formatting to various @since entries.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 16:55:31 +00:00
John Blackbourn
823cac40df Docs: Update the hook docs for update_bulk_theme_complete_actions.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 16:22:45 +00:00
John Blackbourn
332b9844a9 Posts, Post Types: Add a new add_inline_data action which allows extra fields to be added to the inline editing fields.
Props mensmaximus, NathanAtmoz

Fixes #36085

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


git-svn-id: http://core.svn.wordpress.org/trunk@42504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 15:55:32 +00:00
atimmer
8ad4538d0f Docs: Improve JSDoc for media/views/spinner.js.
Props avillegasn.
Fixes #43230.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 14:32:33 +00:00
Sergey Biryukov
b9944def27 Posts, Post Types: Remove extra tabs around page_attributes_meta_box_template action in page_attributes_meta_box().
Props chetan200891.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42674


git-svn-id: http://core.svn.wordpress.org/trunk@42502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 11:24:32 +00:00
Sergey Biryukov
ef4f47d00f Customize: Avoid extra tabs in a textarea in WP_Customize_Control::render_content().
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42673


git-svn-id: http://core.svn.wordpress.org/trunk@42501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:59:30 +00:00
Sergey Biryukov
a5958a289b Upgrade/Install: Avoid extra line breaks in a textarea in wp-admin/setup-config.php.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42672


git-svn-id: http://core.svn.wordpress.org/trunk@42500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:59:00 +00:00
Sergey Biryukov
a65ce4e34b Options: Avoid extra tabs in a textarea in wp-admin/options.php.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42671


git-svn-id: http://core.svn.wordpress.org/trunk@42499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:58:31 +00:00
Sergey Biryukov
cceab04984 Comments: Avoid extra tabs in a textarea in WP_Comments_List_Table::column_comment().
Props chetan200891, jrf.
Fixes #43252.
Built from https://develop.svn.wordpress.org/trunk@42670


git-svn-id: http://core.svn.wordpress.org/trunk@42498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:57:32 +00:00
Helen Hou-Sandí
aaa28bba15 Options: Use strings in the test suite that follow community guidelines.
Also somewhat explain to future maintainers why this pairing of strings was chosen, besides this committer's musical preferences. Social opinions on cancer are fairly clear, as are commonly accepted definitions of profanity and family-friendly language.

Shout out to the close contender, which would have been particularly appropriate here: "You could be the king // But watch the queen conquer".

see #43207, #38176

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


git-svn-id: http://core.svn.wordpress.org/trunk@42495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 22:42:31 +00:00
John Blackbourn
1c2ef0f475 Build/Test Tools: Allow code coverage reports to be generated.
This corrects the attribute needed to allow PHPUnit to generate coverage reports, and also adds a blacklist of files and directories that are excluded from coverage reports.

Props schlessera, jipmoors

Fixes #43067, #43240

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


git-svn-id: http://core.svn.wordpress.org/trunk@42494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 22:21:30 +00:00
John Blackbourn
f7224ea635 Docs: Copy a helpful inline doc into the function header for visibility.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 22:13:30 +00:00
Aaron Jorbin
17589837d2 Options: Use most appropriate language in the test suite.
The test suite's opinion of cancer should be clear.

Reverts r42659.

See #43207, #38176



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


git-svn-id: http://core.svn.wordpress.org/trunk@42492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 20:59:31 +00:00
Boone Gorges
355b6e80da Improve parameter description for 'allow_empty_comments'.
Introduced in [42661].

Props swissspidy.
See #16979.
Built from https://develop.svn.wordpress.org/trunk@42662


git-svn-id: http://core.svn.wordpress.org/trunk@42491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 20:50:30 +00:00
Boone Gorges
6c11ac0c16 Comments: Introduce 'allow_empty_comment' filter.
This filter allows plugin authors to allow empty comments on a selective
basis during comment submission.

Props jpurdy647.
Fixes #16979.
Built from https://develop.svn.wordpress.org/trunk@42661


git-svn-id: http://core.svn.wordpress.org/trunk@42490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 20:09:30 +00:00
Drew Jaynes
39ce01d83a Docs: Fix a typo in the DocBlock description for get_bloginfo() illustrating the URL structure for RDF feeds.
Props ibachal.
See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 19:42:30 +00:00
John Blackbourn
982791db31 Options: Use more appropriate language in the test suite.
See #43207, #38176

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


git-svn-id: http://core.svn.wordpress.org/trunk@42488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 18:52:31 +00:00
Drew Jaynes
9dd9913ecd Docs: Document default arguments for wp_tag_cloud() in a hash notation, noting that full lists of additionally-supported arguments are already documented in get_terms() and wp_generate_tag_cloud().
Props birgire, johnbillion.
Fixes #42019.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-07 15:22:34 +00:00
Felix Arntz
f3eaddd2dc Options: Unhook default option filter when setting is unregistered.
Fixes #43207.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-06 14:49:32 +00:00
Dion Hulse
3517dc0b8b Updates: Partially revert [42584], as this branch of code should always be run after a core update check.
This code branch is responsible for running all autoupdates, including plugins and themes - which should run regardless of if there's a core autoupdate available.

This revert does not revert the `$timeout` changes, as these should still use cached data if it's available.
Ideally this should be decoupled from the core update check to allow background updates to operate even when the core update check is disabled or running more often than twice daily.

See #43103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-06 11:04:34 +00:00
Dion Hulse
0eb9e0c8d0 XML-RPC: Add default values to IXR_Message for PHP 7.2 compatibility to avoid PHP Warnings.
Fixes #43216 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-06 02:56:32 +00:00
Peter Wilson
8f0ab2efb8 Taxonomy: Stop warming term meta cache unnecessarily.
Prevent several core function calls to `get_terms()` from warming the term meta cache.

Props peterwilsoncc, boonebgorges, jrf.
Fixes #43142.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 04:10:30 +00:00
Peter Wilson
0d39b35c11 General: Replace Cheatin’ uh? with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 02:30:34 +00:00
John Blackbourn
a1eb261cd1 Canonical: Add $x_redirect_by parameter to wp_safe_redirect().
See [42633] and [42408].

Fixes #42313.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-04 16:05:32 +00:00
Drew Jaynes
f3ca5b5f47 Tests: Simplify @covers annotations for WP_Error test coverage. Also fix a typo in a test method name.
See #42742.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 17:38:30 +00:00
Drew Jaynes
3544e0151d Tests: Fix two typos introduced for a get_term_field() test in [35270].
See #33968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 17:11:30 +00:00
Andrea Fercia
8a664edcab Administration: Make the Screen Options available on small screens.
Previously, the Screen Options toggle and the related panel content 
were hidden on small screens, preventing access to important settings,
including the ability to toggle the meta boxes visibility.

Props chetan200891.
Fixes #40985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 16:58:30 +00:00
Sergey Biryukov
430a724a03 Help/About: Correct outdated media icons reference in help text on Edit Post screen.
Props thrijith, transl8or.
Fixes #42378.
Built from https://develop.svn.wordpress.org/trunk@42643


git-svn-id: http://core.svn.wordpress.org/trunk@42472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 13:58:30 +00:00
Sergey Biryukov
4951b2897e Media: Remove checkered background for icons in Attachment Details.
Props BandonRandon.
Fixes #42535. See #41948.
Built from https://develop.svn.wordpress.org/trunk@42642


git-svn-id: http://core.svn.wordpress.org/trunk@42471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 13:54:31 +00:00
Andrea Fercia
a7c89d5761 Administration: CSS coding standards: use double quotes for values that require quotes.
As per the WordPress CSS coding standards, CSS properties with values that require quotes must use double quotes.
Also fixes some indentation and spacing.

Fixes #43220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 13:19:32 +00:00
Sergey Biryukov
abdea23275 Docs: Convert $args array description for wp_get_themes() to a hash notation.
Props milana_cap.
Fixes #43213.
Built from https://develop.svn.wordpress.org/trunk@42640


git-svn-id: http://core.svn.wordpress.org/trunk@42469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-02 09:38:30 +00:00
Sergey Biryukov
f45e696e21 Media: Avoid a PHP warning in wp_calculate_image_srcset() if a plugin returns a non-array value via wp_calculate_image_srcset filter.
Props mrmadhat, codegrau.
Fixes #43201.
Built from https://develop.svn.wordpress.org/trunk@42639


git-svn-id: http://core.svn.wordpress.org/trunk@42468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-02 07:48:31 +00:00
Sergey Biryukov
2f54a93369 Posts, Post Types: Don't count pending comments in WP_Posts_List_Table::_display_rows() if the post type does not support comments.
Props seanchayes.
Fixes #43212.
Built from https://develop.svn.wordpress.org/trunk@42638


git-svn-id: http://core.svn.wordpress.org/trunk@42467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-02 07:38:32 +00:00
Sergey Biryukov
66e2c1ed87 Build Tools: Update SPDX License in package.json to adhere to SPDX v3.0 specification.
Props netweb.
Fixes #43032.
Built from https://develop.svn.wordpress.org/trunk@42637


git-svn-id: http://core.svn.wordpress.org/trunk@42466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 16:39:30 +00:00
Sergey Biryukov
e5adb49dbb Tests: Correct erroneous @covers and @use tags.
Props jipmoors.
Fixes #43203.
Built from https://develop.svn.wordpress.org/trunk@42636


git-svn-id: http://core.svn.wordpress.org/trunk@42465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 16:09:30 +00:00
Sergey Biryukov
7282155198 Tests: Improve tests for wp_get_post_parent_id() added in [42397].
Props frank-klein.
Fixes #42797.
Built from https://develop.svn.wordpress.org/trunk@42635


git-svn-id: http://core.svn.wordpress.org/trunk@42464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 16:03:31 +00:00
Sergey Biryukov
8393519ade Menus: Remove $_menu_item_sort_prop global reference from wp_get_nav_menu_items(), unused since [38928].
Props PieWP, welcher.
Fixes #40947.
Built from https://develop.svn.wordpress.org/trunk@42634


git-svn-id: http://core.svn.wordpress.org/trunk@42463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 15:42:31 +00:00
Sergey Biryukov
673ff22b2b Canonical: Add $x_redirect_by parameter to wp_redirect() that allows applications doing the redirect to identify themselves.
This complements the `x_redirect_by` filter added in [42408].

Props NathanAtmoz, johnbillion.
Fixes #42313.
Built from https://develop.svn.wordpress.org/trunk@42633


git-svn-id: http://core.svn.wordpress.org/trunk@42462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 15:06:35 +00:00
Dion Hulse
1e5629d1f1 Themes: Use api.wordpress.org/themes/info/1.2/ to query theme information.
See #43192.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 05:19:30 +00:00
Dion Hulse
7abfd84c75 Plugins: Use api.wordpress.org/plugins/info/1.2/ for querying plugins & plugin information.
See #43192.
Fixes #29274.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 05:17:33 +00:00
Sergey Biryukov
b170b60693 Docs: Correct erroneous class references in @see tags.
Props coffee2code.
Fixes #43158.
Built from https://develop.svn.wordpress.org/trunk@42630


git-svn-id: http://core.svn.wordpress.org/trunk@42459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 01:20:30 +00:00
Sergey Biryukov
76ad62d11e Code Editor: Add Ctrl/Cmd+F as aliases for persistent search for more intuitive behaviour.
Keep Alt+F as well for users who already expect that.

Props Desertsnowman.
See #42586.
Built from https://develop.svn.wordpress.org/trunk@42625


git-svn-id: http://core.svn.wordpress.org/trunk@42454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-31 22:22:30 +00:00
Andrea Fercia
d6a73ef110 Media: avoid page scrolling when opening the media modal.
Moves focus to a proper element within the media modal to avoid the underlying
page to scroll to the bottom. Removes the media modal `freeze` option.

Props andreiglingeanu, adamsilverstein.
Fixes 39859.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-31 17:03:33 +00:00
Adam Silverstein
587da39a9e Remove unit tests for deprecated ajax tag search function.
Fixes unit tests failing since r42614.

Ammends [42614].
See #38922.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 02:29:31 +00:00
Adam Silverstein
35a20d8f50 Remove unused var after r42614, fixing a jshint error.
Built from https://develop.svn.wordpress.org/trunk@42618


git-svn-id: http://core.svn.wordpress.org/trunk@42447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:34:59 +00:00
Weston Ruter
c2369bfad7 Widgets: Fix Text widget unit test which broke due to global scope not being cleaned.
Amends [42613].
See #42495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:34:30 +00:00
Adam Silverstein
39575cede2 Correct the version term_search_min_chars changed. Ammends r42614.
Built from https://develop.svn.wordpress.org/trunk@42616


git-svn-id: http://core.svn.wordpress.org/trunk@42445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:30:30 +00:00
Weston Ruter
c6013a2b87 Customize: Ensure customize_autosaved requests only use revision of logged-in user.
Props dlh, westonruter.
See #42433, #39896.
Fixes #42450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:21:30 +00:00
Adam Silverstein
86434ebca4 Taxonomy: Use REST API for ajax tag search.
Deprecate wp_ajax_ajax_tag_search and switch to using the REST API when searching tags in the tags meta box.

Props nacin, chriscct7, afercia, swissspidy, jnylen0, rmccue, ryelle.
Fixes #38922.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:17:31 +00:00
Weston Ruter
1829a2ce27 Customize: Ensure media playlists get initialized after selective refresh; expose new wp.playlist.initialize() API.
In particular allows audio and video playlists to be added to the Text widget and previewed.

Props bpayton, westonruter.
See #40854.
Fixes #42495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-29 23:56:29 +00:00
Weston Ruter
b32df8f64e Customize: Ensure heartbeat keeps changeset locked when in branching mode.
Props dlh.
See #42024.
Fixes #42658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-29 23:05:31 +00:00
Weston Ruter
a8b77a1948 Customize: Include nav menu item for Home custom link in search results for "Home".
Props audrasjb, westonruter.
Fixes #42991.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-29 22:10:33 +00:00
Gary Pendergast
7d9c47d536 Emoji: Tweak the generated emoji arrays to not cause coding standards errors.
Props netweb, jrf.
Fixes #43150.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-25 01:06:31 +00:00
Sergey Biryukov
1cda7b9667 Role/Capability: Make install_languages capability check less restrictive.
A user should still be able to have the capability, even when language packs cannot be automatically installed. The automatic installation part is separate from that now.

Props flixos90.
Fixes #42697.
Built from https://develop.svn.wordpress.org/trunk@42606


git-svn-id: http://core.svn.wordpress.org/trunk@42435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:42:30 +00:00
Sergey Biryukov
ea6f648401 Upgrade/Install: In postMessage events handler, check for message object existence before checking its action property.
Props manikmist09.
Fixes #43005.
Built from https://develop.svn.wordpress.org/trunk@42604


git-svn-id: http://core.svn.wordpress.org/trunk@42433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:31:30 +00:00
Peter Wilson
6bb7fcebf4 Emoji: Update Emoji browser support tests for Twemoji v2.4.0
Really, following [42598].

Fixes #42862 for trunk, really.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:02:30 +00:00
Sergey Biryukov
a1121f1def Media: Fix JSHint error after [42595].
See #42646.
Built from https://develop.svn.wordpress.org/trunk@42599


git-svn-id: http://core.svn.wordpress.org/trunk@42428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:51:31 +00:00
Peter Wilson
891c8255c3 Emoji: Update Emoji browser support tests for Twemoji v2.4.0
Replaces the fairy (male) browser support test with a woman in business suit levitating. While the things that make people different sometimes become less obvious this isn't always a problem, because the things that make you strange are the things that make you powerful.

Fixes #42862 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:47:30 +00:00
Sergey Biryukov
365c70d415 Media: Store and reuse image cropper ratio settings if available, instead of overwriting.
Props adamsilverstein.
Fixes #42646.
Built from https://develop.svn.wordpress.org/trunk@42595


git-svn-id: http://core.svn.wordpress.org/trunk@42424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:36:31 +00:00
Aaron Jorbin
4d89f4a20c Query: Improve tests for set_found_posts dealing with non arrays
Use a data provider and include tests for `false` and `''`.

Previous: [42581] [42585]

See #42860


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


git-svn-id: http://core.svn.wordpress.org/trunk@42423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 20:52:30 +00:00
Sergey Biryukov
c7b0073e92 Tests: Update emoji base URL in Tests_Formatting_Emoji after [42590].
See #42862.
Built from https://develop.svn.wordpress.org/trunk@42592


git-svn-id: http://core.svn.wordpress.org/trunk@42421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 17:26:30 +00:00
Sergey Biryukov
ee58ffcbe7 Emoji: Update emoji base URL in _print_emoji_detection_script() and wp_staticize_emoji().
Props pento.
Fixes #42862.
Built from https://develop.svn.wordpress.org/trunk@42590


git-svn-id: http://core.svn.wordpress.org/trunk@42419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 16:51:30 +00:00
Gary Pendergast
488df7c563 Docs: Correct some version numbers.
`wp_check_for_changed_dates()`, `_find_post_by_old_slug(), `_find_post_by_old_date()`, and the `old_slug_redirect_post_id` filter were intended to land in 4.9.2, but didn't quite make it. Instead, they'll be landing in 4.9.3.

See #15397.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 06:48:31 +00:00
Gary Pendergast
dcb0ebef21 Tests: Improve the old date redirect tests.
Props frank-klein.
See #15397.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 06:39:30 +00:00
Dion Hulse
02bc2c3186 Tests: Skip newly added tests from [42581] on PHP 5.2 as they require ReflectionMethod.
See #42860.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 04:21:31 +00:00
Dion Hulse
14068105f7 Updates: Only trigger Background Update processes from within the core update check when a core autoupdate is on offer.
This change reduces the number of API calls which WordPress makes to api.wordpress.org during release windows.

Previously the background updates would run upon every core update transient refresh, however now they'll only run if there's an update available.
The change also increases the cache period for plugin & theme checks when running via the cron, from never-cache to 2 hours, which should hopefully reduce the number of needless API calls.

Fixes #43103 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 04:17:30 +00:00
Sergey Biryukov
3429cfeabe Media: Introduce a custom error handler for MediaElement.js to display a download link if a FLV file cannot be rendered for any reason.
Props Clorith.
Fixes #42643.
Built from https://develop.svn.wordpress.org/trunk@42582


git-svn-id: http://core.svn.wordpress.org/trunk@42411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 01:51:30 +00:00
Aaron Jorbin
8a884f562a Query: Fix warning on counting non countable
Adds tests to continue the behavior for both null and strings.

See https://wiki.php.net/rfc/counting_non_countables for information on the PHP change.

Fixes #42860.
Props janak007 and ayeshrajans for initial patches.




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


git-svn-id: http://core.svn.wordpress.org/trunk@42410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 01:21:31 +00:00
Peter Wilson
09432d1aa6 Emoji: Update emoji regex for Twemoji to 2.4.0.
Build `src/wp-includes/formatting.php` following [42566].

Fixes #42862.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 21:12:31 +00:00
Andrew Ozz
84cdc05c58 TinyMCE: backport bug fixes to NotificationManager and WindowManager from d1877933fa (diff-2e5c98d81ce2481aa1042b2320728b65) and to MultiRange from 250675bb7b.
Props peterwilsoncc, azaozz.
Fixes #42722 for trunk, see #43012.
Built from https://develop.svn.wordpress.org/trunk@42576


git-svn-id: http://core.svn.wordpress.org/trunk@42405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 19:35:31 +00:00
Andrew Ozz
5878c6c83a Editor: when keeping the scroll position treat all shortcodes as preview-able. Otherwise in some cases the marker span can get stuck inside the shortcode and break the markup.
Props azaozz, lizkarkoski and othellobloke for testing.
Fixes #42908 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42574


git-svn-id: http://core.svn.wordpress.org/trunk@42403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 17:34:32 +00:00
Sergey Biryukov
d9d841b807 Media: Restore white background of the content area in media modal.
Props afercia, chetan200891.
Fixes #43088.
Built from https://develop.svn.wordpress.org/trunk@42572


git-svn-id: http://core.svn.wordpress.org/trunk@42401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 14:01:31 +00:00
Sergey Biryukov
e9599bc7b5 Email: Don't send notifications for site or network admin email address change to the default 'admin_email' value.
Props tigertech, MattyRob, seanchayes.
Fixes #42693.
Built from https://develop.svn.wordpress.org/trunk@42570


git-svn-id: http://core.svn.wordpress.org/trunk@42399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 13:45:32 +00:00
Sergey Biryukov
5cfda780d8 Customize: Correct "Add Items" button reference in help text shown after creating a new menu.
Props dlh, munyagu, rishishah.
Fixes #42565.
Built from https://develop.svn.wordpress.org/trunk@42568


git-svn-id: http://core.svn.wordpress.org/trunk@42397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 12:03:30 +00:00
Sergey Biryukov
d9a535ee13 Emoji: Update Twemoji to 2.4.0.
WordPress was already on 2.5.0, but Twemoji decided to break their versioning, so 2.4.0 is actually the latest release.

Fixes #42862.
Built from https://develop.svn.wordpress.org/trunk@42566


git-svn-id: http://core.svn.wordpress.org/trunk@42395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 11:49:30 +00:00
Sergey Biryukov
9a1066c90e Taxonomy: Don't display an empty edit link in taxonomy list table if the user doesn't have permissions to edit the term.
Props grapplerulrich.
Fixes #43146.
Built from https://develop.svn.wordpress.org/trunk@42565


git-svn-id: http://core.svn.wordpress.org/trunk@42394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 11:34:31 +00:00
Dion Hulse
fc42c062f1 WPDB: Use a PCRE syntax which supports PCRE compiled between 2003 and 2006.
This fixes a PHP Warning in `wpdb::parse_db_host()` when WordPress is used with (sometimes a modern) PHP that's compiled against an ancient PCRE version.

Fixes #43109 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 03:39:30 +00:00
Aaron Jorbin
9efeb545c0 Remove JSHint due to license compatibility
JSHint inherits a license from JSLint that includes the clause  "The Software shall be used for Good, not Evil." WordPress's license specifically allows grants the freedom to run the program, for any purpose. Please note, this is not an encouragement of evil. Rather than doing something evil, how about learning to love those around you. Instead of tweeting lies and saying people are "Not Good!", help your neighbor. In the words of Lin Manual Miranda, "Love is love is love is love is love is love is love is love, cannot be killed or swept aside." 

This replaces JSHint with esprima, a part of the larger jQuery project, and a custom wrapper for some basic error checking within codemirror.

The existing JSHint configuration is kept in place in case someone wants to use that, but they can only do so for Good.

Fixes #42850
Props netweb for a spelling fix on a comment.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 01:29:32 +00:00
Weston Ruter
2ec77391f6 Widgets: Ensure media is explicitly enqueued from Text widget in case Media widgets are unregistered.
Amends [41344].
See #40854.
Fixes #43125.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 19:25:31 +00:00
Weston Ruter
94d178dd31 Customize: Let default status for Customizer be draft if user does not have capability to publish.
Amends [41626].
Props sayedwp, westonruter.
See #30937.
Fixes #42686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 19:10:34 +00:00
Weston Ruter
183cda343a Customize: Prevent frontend previewing from causing a customization lock on the changeset.
Props dlh.
Amends [41839].
See #42024.
Fixes #42975.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:49:31 +00:00
Peter Wilson
0e94d99f64 REST API: Update the fixture data for wp-api.js tests following [42359].
Props danielbachhuber.
See #41014.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:34:32 +00:00
Weston Ruter
87cae6e261 Customize: Use changeset-specific "locked" messages when branching is enabled.
Props dlh.
See #39896.
Fixes #42655.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:28:31 +00:00
Weston Ruter
cd9f48b54f Customize: Prevent showing SFTP theme installation notification in multisite when user cannot install themes.
Props flixos90.
See #37661, #42184.
Fixes #42674.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 06:15:30 +00:00
Weston Ruter
fa460ab32f Widgets: Allow relative/partial URLs in Image Widget's link field.
Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-22 04:52:33 +00:00
Weston Ruter
11af5ae5cd Code Editor: Disable attr-value-double-quotes HTMLHint rule since too strict for user input.
Using single-quoted attribute values is not in any way invalid HTML.

Amends [41376].
Props sasiddiqui.
See #12423.
Fixes #42802.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-21 08:01:31 +00:00
Pascal Birchler
5ecd978e74 Formatting: Fix typo in inline documentation of _deep_replace().
Props ixkaito.
Fixes #43134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-20 13:32:32 +00:00
Andrew Ozz
365025fb62 Editor: change the test in user_can_richedit() to also detect when IE11 is in compatibility mode.
Props ndavison, azaozz.
Fixes #42503 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42529


git-svn-id: http://core.svn.wordpress.org/trunk@42358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 14:43:31 +00:00
atimmer
d268976255 Docs: Improve JSDoc for password-strength-meter.js.
Props herregroen, carolinegeven, ireneyoast, jjcomack.
Fixes #43066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 13:39:33 +00:00
Dion Hulse
44c89cac5a General: Allow wp_list_pluck() to operate on arrays of references without overwriting the referenced items.
Fixes #16895.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 05:18:31 +00:00
Dion Hulse
26a5d758d5 Tests: Remove redundant assertEquals() calls in listFilter tests.
As these tests are already validating that two arrays match, checking that the counts also match before is redundant and makes it harder to debug when the test fails.

See #16895

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


git-svn-id: http://core.svn.wordpress.org/trunk@42355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-18 05:15:34 +00:00
Sergey Biryukov
0eb2581c67 Media: In _wp_handle_upload(), check if the file was properly uploaded before checking its size.
Props achbed, dglingren.
Fixes #39522.
Built from https://develop.svn.wordpress.org/trunk@42525


git-svn-id: http://core.svn.wordpress.org/trunk@42354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 07:16:30 +00:00
Sergey Biryukov
3b73ac9eb3 Editor: Use explicit context instead of a trailing space for Edit string in TinyMCE plugins.
Props scottlee, ayubadiputra, NathanAtmoz.
Fixes #42543.
Built from https://develop.svn.wordpress.org/trunk@42523


git-svn-id: http://core.svn.wordpress.org/trunk@42352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 06:28:30 +00:00
Weston Ruter
443594dd00 Widgets: Prevent checkValidity from running on a form when widget is first adding to sidebar.
Amends [41352].
See #23120.
Fixes #43003 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 01:24:30 +00:00
Aaron Jorbin
8bd98be63d BUILD/TEST TOOLS: Report Travis test results to make/hosting PHPUnit test results
Send the core test results to make/hosting in order to improve the alerting.  See: https://github.com/WordPress/phpunit-test-reporter/issues/45

Fixes #43099
Props danielbachhuber


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


git-svn-id: http://core.svn.wordpress.org/trunk@42321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 20:29:31 +00:00
Andrea Fercia
fc51a83ed8 Plugins: Fix the plugin details modal "Close" button after [42443].
Props rinkuyadav999.
Fixes #43082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 17:15:32 +00:00
Pascal Birchler
e62806fcb8 Posts, Post Types: Add tests for get_post_type_labels().
These were accidentally omitted in [38157].

See #38157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 08:33:30 +00:00
Dion Hulse
82054452d2 Build: Bump the version of node used on Travis to match WordPress.org.
Props netweb, dd32.
See #35105

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


git-svn-id: http://core.svn.wordpress.org/trunk@42293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:36:30 +00:00
Dion Hulse
88135346c6 Build: Bump grunt-sass to v2.0.0 from v1.2.1 for Node 8.x support.
Changes: https://github.com/sindresorhus/grunt-sass/compare/v1.2.1...v2.0.0

Props netweb.
See #35105.
Fixes #43097.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:33:34 +00:00
Dion Hulse
3fe9cb61ee External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Props joemcgill.
Fixes #42720 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:28:43 +00:00
Dion Hulse
ceaaed6604 Build: Use Node 8.x for trunk.
Props netweb.
See #35105.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 03:58:49 +00:00
Dion Hulse
406ec082cc Build: Switch package.json to using tabs for indents.
Props netweb.
Fixes #43075.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 03:55:49 +00:00
Sergey Biryukov
bee0136037 Plugins: Update review filter links in Details modal.
Props darko-a7, afercia.
Fixes #43016. See #meta3379.
Built from https://develop.svn.wordpress.org/trunk@42459


git-svn-id: http://core.svn.wordpress.org/trunk@42288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 00:15:46 +00:00
Sergey Biryukov
589395347a Widgets: When checking for errors in Custom HTML widget, pass correct value to toggleClass() for Save button.
`toggleClass()` expects a boolean as a second argument, not an integer.

Props iCaleb.
Fixes #42867.
Built from https://develop.svn.wordpress.org/trunk@42457


git-svn-id: http://core.svn.wordpress.org/trunk@42286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 23:47:47 +00:00
Sergey Biryukov
0d23b38fd3 Media: Add small-audio.flac for a unit test added in [42451].
See #42225.
Built from https://develop.svn.wordpress.org/trunk@42453


git-svn-id: http://core.svn.wordpress.org/trunk@42283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 22:33:47 +00:00
Sergey Biryukov
13e40181eb Media: Add flac to the list of allowed file types.
Props blobfolio.
Fixes #42225.
Built from https://develop.svn.wordpress.org/trunk@42451


git-svn-id: http://core.svn.wordpress.org/trunk@42281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 22:17:47 +00:00
Sergey Biryukov
35653f0432 Media: Bring consistency to getimagesize() error suppression.
Props chasewg, joemcgill, jeremyfelt.
Fixes #42480.
Built from https://develop.svn.wordpress.org/trunk@42449


git-svn-id: http://core.svn.wordpress.org/trunk@42279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 19:44:47 +00:00
Sergey Biryukov
9cb44f5f2f Themes: Improve line wrapping in feature filter on Theme Install screen and in the Customizer.
Props chetan200891 for initial patch.
Fixes #42871.
Built from https://develop.svn.wordpress.org/trunk@42447


git-svn-id: http://core.svn.wordpress.org/trunk@42277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 19:27:53 +00:00
Andrew Ozz
1fb6a63449 TinyMCE: on the toolbar drop-downs apply overflow style on the actual element with text.
Props abdullahramzan, azaozz.
Fixes #43090 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42446


git-svn-id: http://core.svn.wordpress.org/trunk@42276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 09:51:48 +00:00
Andrea Fercia
3fb8eee9fc Accessibility: Media: Improve the usage of a few label elements in the media templates.
Label elements should only be used for labelable elements.
- `Uploaded By` and `Uploaded To` aren't form controls and shouldn't be associated with labels
- changes the labels for media source, alternate sources, poster image, and tracks to solve a layout issue and explicitly associate the labels to their form fields (previously, the labels were wrapping also the Remove buttons)

Props Presskopp, afercia.
Fixes #38759, #40468.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-14 16:39:47 +00:00
Andrea Fercia
239da4c1e6 Plugins: Fix the plugin details modal in the install plugin search tab after [41356].
Fixes #43082

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


git-svn-id: http://core.svn.wordpress.org/trunk@42273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-13 18:53:51 +00:00
Peter Wilson
a492541c35 Formatting: Do not run formatting and texturization on author bios.
Removes the formatting and texturization added to author bios in #40040 due to back-compatibility concerns.

Reverts [41172], [41173].

Props 0x6f0, rabmalin for review.
Fixes #42578.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-13 01:11:49 +00:00
Andrea Fercia
9c3344197d Accessibility: use aria-current for the paginated post links output by wp_link_pages().
Continues the introduction in core of the aria-current attribute after [41683], [41359], and [41371].

- changes the `wp_link_pages()` (see the `nextpage` quicktag) output to use an `aria-current` attribute on the current item
- adds `post-nav-links` and `post-page-numbers` CSS classes to help themes style these links
- updates the related tests

Props antonioeatgoat, alexstine.
Fixes #41859.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-12 20:17:51 +00:00
Sergey Biryukov
351d71d7ea Twenty Seventeen: Remove unnecessary comment in front-page.php.
Props hardik-amipara, poena.
Fixes #42820.
Built from https://develop.svn.wordpress.org/trunk@42437


git-svn-id: http://core.svn.wordpress.org/trunk@42267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-12 20:01:51 +00:00
atimmer
6310ad30d0 Docs: Improve JS Docs for controllers/customize-image-cropper.js.
Props manuelaugustin, bramheijmink, andizer, ireneyoast.
Fixes #43020.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-11 14:32:52 +00:00
Dion Hulse
1d59873ace Upgrade: When deleting old files, if deletion fails attempt to empty the file instead.
Props joemcgill, dd32.
Fixes #42963 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-10 06:10:47 +00:00
Dion Hulse
cdfa5adc43 Streams: When checking in wp_is_stream() escape the stream wrapper names for PCRE to avoid PHP warnings when invalid stream wrappers are registered.
Fixes #43054.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-10 02:50:46 +00:00
Mike Schroder
7bfc60864f Media: Skip test_remove_orientation_data_on_rotate if missing deps.
The `test_remove_orientation_data_on_rotate()` test was failing on systems that did not have the `exif` extension available.

Skips test when the `exif_read_data()` function does not exist.

Props danielbachhuber, desrosj.
Fixes #42447.
Built from https://develop.svn.wordpress.org/trunk@42431


git-svn-id: http://core.svn.wordpress.org/trunk@42261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-10 01:17:51 +00:00
Andrew Ozz
4a3faae0e8 Editor: ensure there is a selection before getting the caret position. Fixes a bug in Firefox when there is no selection for a hidden element.
Props johnschulz, azaozz.

Fixes #43012 for trunk.
Built from https://develop.svn.wordpress.org/trunk@42430


git-svn-id: http://core.svn.wordpress.org/trunk@42260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-08 20:20:53 +00:00
Gary Pendergast
fbb1f9162b Formatting: Fix capital_P_dangit() not capital P-ing, dangit.
Unfortunately, in my overzealous desire to fix all the un-capitalised Ps, [42343] capitalled some Ps that intentionally should not be capitals.

This commit fixes the incorrectly capitalling of Ps, as well as including unit tests and PHPCS instructions to ensure we never capitulate to capitalisationing them again.

Props superdav42.
Fixes #43040.
Fixes #43041.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-08 10:36:51 +00:00
atimmer
d1c58e7850 Docs: Improve JSDoc for js/media-upload.js.
Props terwdan, diedeexterkate, andizer, ireneyoast.
Fixes #42956.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-04 14:37:49 +00:00
Andrea Fercia
4e5215deec Editor: Link suggestions: add fallback title for posts with no title.
Fixes #42664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-02 18:11:52 +00:00
Rachel Baker
502dcd51a4 General: Update copyright year to 2018 in license.txt.
Fixes #43007.
Built from https://develop.svn.wordpress.org/trunk@42424


git-svn-id: http://core.svn.wordpress.org/trunk@42255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-01 03:17:48 +00:00
Rachel Baker
2eca52eaa4 REST API: Adjust unit testes to expect a 401 status code in error responses from permission callbacks when user is not authenticated.
Missed in [42421].

Fixes #42828.
Built from https://develop.svn.wordpress.org/trunk@42423


git-svn-id: http://core.svn.wordpress.org/trunk@42254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-01 02:31:46 +00:00
Rachel Baker
a787006298 REST API: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch().
Use the `rest_authorization_required_code()` function to return a 401 status code when a permission callback fails due to a user not being logged in.

Props jaswrks.
Fixes #42828.
Built from https://develop.svn.wordpress.org/trunk@42421


git-svn-id: http://core.svn.wordpress.org/trunk@42252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-30 20:37:47 +00:00
Rachel Baker
386a5c397f Comments: Introduce filter for the arguments for the comment query in the comments list table.
Add `comments_list_table_query_args` filter to the Comments List Table.

Props soulseekah, birgire.
Fixes #42997.
Built from https://develop.svn.wordpress.org/trunk@42420


git-svn-id: http://core.svn.wordpress.org/trunk@42251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-29 18:21:52 +00:00
Dion Hulse
02d04f2b5c WP: Don't attempt to convert multiple-nested arrays to a string in WP->parse_request().
See #14330.
Fixes #42752.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-22 03:18:47 +00:00
Boone Gorges
699025a785 Taxonomy: Restore deprecated argument to term_description() signature.
This ensures that the parameter can't be reused for something else
in the future.

Props jorbin.
Fixes #42605.
Built from https://develop.svn.wordpress.org/trunk@42417


git-svn-id: http://core.svn.wordpress.org/trunk@42248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-22 02:48:51 +00:00
atimmer
02b86b8418 Docs: Improve JSDoc for customize-preview-widgets.js.
Props ireneyoast, andizer, robinvandervliet, boblinthorst.
Fixes #42954.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 15:12:49 +00:00
atimmer
f296e2cbbc Docs: Improve JSDoc for media/views/attachments.js.
Props maartenleenders, herregroen, jipmoors, ireneyoast.
Fixes #42832.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 14:27:52 +00:00
Sergey Biryukov
7dfcb33d4d Docs: Remove erroneous zero-width space before URL in fetch_feed() DocBlock.
Props coffee2code.
Fixes #42951. See #meta3212.
Built from https://develop.svn.wordpress.org/trunk@42414


git-svn-id: http://core.svn.wordpress.org/trunk@42245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 02:40:54 +00:00
Dion Hulse
1caa918dbc i18n: Don't use esc_attr_e() on a variable.
Props yoavf.
Fuxes #42935.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-20 05:35:50 +00:00
John Blackbourn
a5e2908bbd Docs: Improve the function and parameter descriptions for do_meta_boxes().
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-19 15:03:52 +00:00
atimmer
f6a37e7d39 Docs: Remove @summary tags from JSDoc.
As decided in the JavaScript core chat. With a few reasons:

* It is visually cleaner when reading the source.
* This bring the JavaScript documentation closer to the PHP documentation.

The only disadvantage is that the JSDoc parser doesn't split out the summary and the description in the new format. We've decided to solve this when building the JavaScript documentation parser.

Props herregroen.
Fixes #42901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 14:14:53 +00:00
atimmer
65b715c991 Docs: Improve JSDoc for js/media/controllers/edit-image.js.
Amends r42392  - includes the built media files.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 11:20:47 +00:00
Sergey Biryukov
df07690883 Canonical: After [42408], remove sprintf() call for consistency with Location header.
See #42313.
Built from https://develop.svn.wordpress.org/trunk@42409


git-svn-id: http://core.svn.wordpress.org/trunk@42238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 01:11:47 +00:00
Sergey Biryukov
0bc86bc220 Canonical: Introduce x_redirect_by filter that allows applications to identify themselves via X-Redirect-By header when they're doing a redirect.
Props joostdevalk.
Fixes #42313.
Built from https://develop.svn.wordpress.org/trunk@42408


git-svn-id: http://core.svn.wordpress.org/trunk@42237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 01:04:52 +00:00
John Blackbourn
cb53982d1f Media: Pass the attachment ID to the intermediate_image_sizes_advanced filter.
Props drywallbmb, robbie505
Fixes 42745

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


git-svn-id: http://core.svn.wordpress.org/trunk@42236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-16 13:47:47 +00:00
John Blackbourn
3ee38c0a05 Login and Registration: Instruct the browser to disable autocapitalisation for the user login field on the login screen.
Props drywallbmb
Fixes #42886

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


git-svn-id: http://core.svn.wordpress.org/trunk@42235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-16 13:41:48 +00:00
John Blackbourn
e123166a3a Build/Test Tools: Instruct Git and Subversion to ignore Composer's vendor directory.
Props netweb 
Fixes #42909

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


git-svn-id: http://core.svn.wordpress.org/trunk@42234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-16 13:38:53 +00:00
Adam Silverstein
d82e2b02be Media: improve flows for cropping on attachment details screen.
On the "Attachment Details" screen:
* The crop button is always 'enabled'.
* Clicking the crop button with no selection selects the entire image.
* Clicking the crop button with the entire image selected doesn't do anything.
* Clicking the crop button with a selection crops as expected.

Props sonjanyc, afercia, mikeschroder.
Fixes #30155.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 22:03:50 +00:00
atimmer
1f707de9dd Docs: Improve wp-admin JSDoc structural data globally.
JSDoc takes it structural data from `@namespace`, `@lends` and `@memberOf`. This change fixes these tags for all JavaScript files in the wp-admin folder.

* Add jsdoc configuration to parse wp-admin/js files. Use `jsdoc -c jsdoc.conf.json` to generate JSDoc.
* Define all used namespaces using `@namespace`.
* Define each usage of the extend function as a prototype assignment using `@lends`.
* Add `@alias` if JSDoc cannot detect the correct name automatically.

This has previously been corrected for all `wp-includes` JavaScript files: [41351].

Props herregroen.
Fixes #42485.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 13:42:46 +00:00
Boone Gorges
36498bd601 Improve performance of wp_list_pages() tests.
The changeset also removes the use of hardcoded post/author IDs.

Props frank-klein.
Fixes #42903.
Built from https://develop.svn.wordpress.org/trunk@42402


git-svn-id: http://core.svn.wordpress.org/trunk@42231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 11:15:46 +00:00
Gary Pendergast
6da54f0d9b Canonical URLs: Redirect to the correct URL when the post date changes.
When a post slug is changed, we store a copy of the old slug, so that we can redirect visitors visiting the old URL to the new URL.

In the same way, this stores a copy of the old date, when the post date changes, so we can redirect visitors to the new URL.

Props nickmomrik.
Fixes #15397 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 08:31:47 +00:00
Sergey Biryukov
7c77266b9b Docs: Remove extra dot from some @since tags.
Props hardik-amipara.
Fixes #42899.
Built from https://develop.svn.wordpress.org/trunk@42400


git-svn-id: http://core.svn.wordpress.org/trunk@42229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 05:16:47 +00:00
Sergey Biryukov
a3f69ffaa3 Docs: Add missing @staticvar entries in wp-includes/l10n.php.
Props birgire.
Fixes #42800.
Built from https://develop.svn.wordpress.org/trunk@42399


git-svn-id: http://core.svn.wordpress.org/trunk@42228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 05:08:51 +00:00
Sergey Biryukov
ff89ce1879 Posts: Rename $ID to $post in get_post_mime_type() and get_post_status() for consistency with other functions.
See #42797.
Built from https://develop.svn.wordpress.org/trunk@42398


git-svn-id: http://core.svn.wordpress.org/trunk@42227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 01:03:47 +00:00
Sergey Biryukov
0d09b75c4b Docs: Add missing parameter description in wp_get_post_parent_id() function DocBlock.
Rename `$post_ID` to `$post` for consistency with other functions.

Add unit tests for `wp_get_post_parent_id()`.

Props keesiemeijer.
Fixes #42797.
Built from https://develop.svn.wordpress.org/trunk@42397


git-svn-id: http://core.svn.wordpress.org/trunk@42226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 01:02:48 +00:00
Sergey Biryukov
faa04cf9b3 Docs: Add @since version for WP_Customize_Widgets::filter_dynamic_sidebar_params().
Props keesiemeijer.
Fixes #42894.
Built from https://develop.svn.wordpress.org/trunk@42396


git-svn-id: http://core.svn.wordpress.org/trunk@42225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 00:35:47 +00:00
Sergey Biryukov
835bec6282 Docs: Add @since version for WP_Locale_Switcher::init().
Props keesiemeijer.
Fixes #42798.
Built from https://develop.svn.wordpress.org/trunk@42395


git-svn-id: http://core.svn.wordpress.org/trunk@42224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 00:32:46 +00:00
Sergey Biryukov
986e46d2c0 Docs: Add missing @since tags for add menu page functions.
Props keesiemeijer.
Fixes #42882.
Built from https://develop.svn.wordpress.org/trunk@42394


git-svn-id: http://core.svn.wordpress.org/trunk@42223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 00:15:52 +00:00
atimmer
f544da9b38 Docs: Improve JS Docs for wp-admin/js/dashboard.js.
Props jipmoors, andizer, ireneyoast, boblinthorst.
Fixes #42831.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-14 14:11:51 +00:00
atimmer
a846a553a1 Docs: Improve JS Docs for js/media/controllers/edit-image.js.
Props jjcomack, nicollle, andizer.
Fixes #42680.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-13 14:10:52 +00:00
Weston Ruter
fe2fda8cc2 Editor: Fix determining TinyMCE editor width when in inline mode instead of iframe mode.
See #40854.
Amends [41985].
Props aduth.
Fixes #42416 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-13 05:17:48 +00:00
atimmer
1a357d3758 Docs: Improve JS Docs for wp-includes/js/heartbeat.js.
Most of the documentation was already present. This change achieves the following:

* Fixes the formatting for most doc blocks.
* Adds `@since` tags to all functions.
* Makes sure the heartbeat public methods are correctly added to the `wp.heartbeat` namespace.

Props andizer, jjcomack, carolinegeven.
Fixes #42675.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-12 14:33:54 +00:00
Dion Hulse
04efa7e7ea WPDB: Always use mysqli when available.
This change makes WordPress use `mysqli` on PHP <5.5 when available, instead of only in PHP 5.5+ and development installs.

WPDB includes a fallback to `mysql` in the event that the database connection fails with `mysqli` so incompatibilities should be few and far between.

Fixes #42812 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-12 05:43:48 +00:00
Dion Hulse
6322887487 Filesystem: Allow wp_normalise_path() to handle PHP stream wrappers such as php:// correctly.
Props calin, dd32.
Fixes #42837.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-12 04:16:47 +00:00
Konstantin Obenland
d6ffe16606 Twenty Ten: Use global img contraint for captions
Fixes an incompatibility with the way caption width is set since 4.9, where the caption element would cover the whole content width.

Props slilley, Clorith, hardeepasrani.
Fixes #42604.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 23:32:46 +00:00
atimmer
46cbfc405f Docs: Improve JS Docs for custom-header.js.
The `custom-header.js` file is only used on the `wp-admin/themes.php?page=custom-header` page. As that page is no longer linked from the UI the functions in the file are marked deprecated.

Props nicollle, jipmoors, diedeexterkate.
Fixes #42678.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 16:27:51 +00:00
Dion Hulse
078b842c60 Docs: Correct some typos in the docs for wp_ajax_get_community_events().
Props Presskopp.
Fixes #42861.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 08:49:48 +00:00
Dion Hulse
ea74239f90 Posts: When using wp_update_post() on a attachment post_type item, pass the $wp_error parameter through to wp_insert_attachment().
Props MyThemeShop.
Fixes #41513.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 06:37:50 +00:00
John Blackbourn
24a94c55ae Build/Test tools: Switch to PHPUnit's expectOutputString() method instead of manually using output buffers for output assertions.
Props birgire
Fixes #42098

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


git-svn-id: http://core.svn.wordpress.org/trunk@42211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-10 00:31:46 +00:00
John Blackbourn
a985a50526 Build/Test tools: Remove unnecessary PHP functionality tests from the test suite.
Props Frank Klein
Fixes #42277

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


git-svn-id: http://core.svn.wordpress.org/trunk@42210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-09 23:09:48 +00:00
John Blackbourn
ee51200c50 Role/Capability: When checking capabilities before setting a post slug, ensure the correct post type capabilities are used.
Previously, only the `publish_posts` capability was checked. Now, the correct meta or primitive capability for the post type is used where appropriate.

Props peterwilsoncc

Fixes #42464

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


git-svn-id: http://core.svn.wordpress.org/trunk@42209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-09 22:51:54 +00:00
John Blackbourn
dbd8923458 Build/Test tools: Add inline documentation to undocumented methods in the WP_UnitTestCase class.
Props Frank Klein

Fixes #42731

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


git-svn-id: http://core.svn.wordpress.org/trunk@42208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-08 21:01:51 +00:00
Sergey Biryukov
7ec3bfe1ce Permalinks: Remove unnecesary temporary variable in get_permalink().
Props JPry, danimalbrown.
Fixes #41981.
Built from https://develop.svn.wordpress.org/trunk@42378


git-svn-id: http://core.svn.wordpress.org/trunk@42207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 14:50:46 +00:00
Sergey Biryukov
823ec0859a Docs: Correct @staticvar entry for wp_rand().
Props chetan200891, birgire.
Fixes #42796.
Built from https://develop.svn.wordpress.org/trunk@42377


git-svn-id: http://core.svn.wordpress.org/trunk@42206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 13:53:47 +00:00
Sergey Biryukov
0354c3e2f1 Docs: Add missing @return entry for WP_Comment_Query::get_comment_ids().
Props chetan200891, birgire.
Fixes #42795.
Built from https://develop.svn.wordpress.org/trunk@42376


git-svn-id: http://core.svn.wordpress.org/trunk@42205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 13:47:52 +00:00
Konstantin Obenland
856e7917e8 Widgets: Always try restoring widget assignments
For code-historic reasons, restoring widget assignments would not be attempted if there were no sidebars to map.
Restoring previous assignments is something unrelated to sidebar mappings however, so now it will be attempted on every theme switch.

See #42719.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-07 02:20:52 +00:00
Drew Jaynes
f4faaa53c7 Docs: Improve the usefulness of docs for wp_generate_password() by noting the use of wp_rand() vs rand() or mt_rand().
Props webdevmattcrom.
Fixes #42782.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 22:40:47 +00:00
Boone Gorges
39c7daf7db category_description() should be taxonomy-agnostic.
This change reinstates the previous de facto behavior of `category_description()`.
See [40979], [42364]. Because `term_description()` no longer passes `$taxonomy` to
`get_term_field()`, the parameter is no longer needed and has been deprecated.

Fixes #42605. See #42771.
Built from https://develop.svn.wordpress.org/trunk@42368


git-svn-id: http://core.svn.wordpress.org/trunk@42197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 21:49:46 +00:00
Boone Gorges
bc769416d8 get_the_category_by_ID() should be taxonomy-agnostic.
Prior to 4.9, this function was accidentally taxonomy-agnostic in most cases.
The fix in [40979] caused a regression in this function. For backward
compatibility, we make it explicit that the query is by ID only.

See #42771.
Built from https://develop.svn.wordpress.org/trunk@42367


git-svn-id: http://core.svn.wordpress.org/trunk@42196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 21:03:48 +00:00
Boone Gorges
1abbaa0f74 Fix regression in get_tag_link() since 4.9.
See [42364] for description of the problem.

Because `get_category_link()` is now totally taxonomy-agnostic, `get_tag_link()`
can become a simple wrapper.

Props juiiee8487, markjaquith.
See #42771.
Built from https://develop.svn.wordpress.org/trunk@42366


git-svn-id: http://core.svn.wordpress.org/trunk@42195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:52:48 +00:00
Boone Gorges
438f7a0701 Fix incorrect test names from [42364].
See #42771.
Built from https://develop.svn.wordpress.org/trunk@42365


git-svn-id: http://core.svn.wordpress.org/trunk@42194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:47:49 +00:00
Boone Gorges
d8215873a2 Don't do a strict taxonomy check in get_category_link().
Prior to version 4.9, a quirk in the implementation of `get_term()` caused
`get_category_link( 123 )` to fetch the taxonomy archive link for term 123
even if 123 is not in the 'category' taxonomy. The quirk was fixed in [40979];
see #40671. This bugfix introduced a regression for theme authors who were
expecting the old behavior.

By lifting the 'category' restriction, we allow the template function to work
in the old way.

Fixes #42717. See #42771.
Built from https://develop.svn.wordpress.org/trunk@42364


git-svn-id: http://core.svn.wordpress.org/trunk@42193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:39:45 +00:00
Konstantin Obenland
ff25787995 Widgets: Don't try mapping empty sidebars.
Fixes a bug where the mapping logic would try mapping empty sidebars, resulting in PHP warnings.

Props ionvv, chetan200891 for initial patch.
Fixes #42603.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 20:12:48 +00:00
Sergey Biryukov
4048a63b01 Docs: Add missing description for $weekday_name parameter and @return entry in WP_Locale::get_weekday_initial().
Props keesiemeijer, 1naveengiri.
Fixes #42793.
Built from https://develop.svn.wordpress.org/trunk@42361


git-svn-id: http://core.svn.wordpress.org/trunk@42190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-04 15:59:54 +00:00
Peter Wilson
f617a2d6d9 Comments: Modernise JavaScript for comment reply links.
Update the comment reply JavaScript to be unobtrusive and use events rather than inline `onclick` attributes. 

Along with bringing the code into the 2010s this prevents an edge-case in which `addComment.moveForm()` could be called before the JavaScript has loaded.

Props peterwilsoncc, bradparbs.
Fixes #31590.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 22:37:45 +00:00
Joe Hoyle
389283f5bd REST API: Include permalink_structure in the settings route.
There are situations where the REST API client wants to be able to read and set the permalink_structure option. Though this doesn’t fix the use case of front-end rendered unauthenticated websites, it still has utility as a setting in it’s own right.

Props aduth.
See #41014.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 22:29:45 +00:00
Aaron Jorbin
c857299cd2 GENERAL: Update recommended PHP version to 7.2.
Props otto42, johnbillion, rachelbaker, jorbin.
Fixes 42789.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 21:58:46 +00:00
Aaron Jorbin
73aca50ff0 CODING STANDARDS: Fix single/double quotation mark
Broken in [42351].
Unprops adamsilverstein.
Fixes 42679.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 21:19:48 +00:00
Joe Hoyle
12c03d7aa8 REST API: Fix permissions error message in post statuses controller.
The permissions error message when a request tries to fetch post statuses unauthenticated is incorrect. It was a copy/paste from elsewhere, as indicated by the use of "in this post type" where this is no post type referenced.

Props schlessera.
Fixes #42303.
Built from https://develop.svn.wordpress.org/trunk@42356


git-svn-id: http://core.svn.wordpress.org/trunk@42185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 20:49:47 +00:00
Aaron Jorbin
e4e0aa27a5 Docs: Add description for is_day().
Props webdevmattcrom.
Fixes #42784.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 20:42:47 +00:00
Rachel Baker
0e656c1a10 REST API: Correct HTTP status code in error for requests to create a duplicate term.
The 409 error code is intended for situations where it is expected that the user will resolve the conflict and resubmit the same request. We use 400 error codes for other routes when a duplicate request is made. The 400 status code tells the user they need to modify their request for it to be successful.

Props shooper.
Fixes #42781. See #41370.
Built from https://develop.svn.wordpress.org/trunk@42354


git-svn-id: http://core.svn.wordpress.org/trunk@42183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 19:09:49 +00:00
Adam Silverstein
9ff1fb5af1 Docs: Improve JSDocs for cropper.js.
Ammends r42352 - include the built media files.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:56:46 +00:00
Adam Silverstein
56f0da1f45 Docs: Improve JSDocs for cropper.js.
Props manuelaugustin, bramheijmink.
Fixes #42677.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:47:46 +00:00
Adam Silverstein
5b4c7c4fab Docs: Improve JSDocs for common.js.
Props andizer, rensw90, benvaassen, jipmoors, ireneyoast and nicollle.
Fixes 42679.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:12:41 +00:00
Rachel Baker
01eeeb80fd REST API: Add existing term_id to the error data object when attempting to create a duplicate term.
Props shooper, coleh.
Fixes #42597. See #41370.
Built from https://develop.svn.wordpress.org/trunk@42350


git-svn-id: http://core.svn.wordpress.org/trunk@42179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:11:53 +00:00
Drew Jaynes
36b3f1707c Hooks: Standardize naming of dynamic hooks using values derived from superglobals to use interpolation vs concatenation.
This is a continuation of the work that happened in [38307] for #37748.

Props ramiy.
Fixes #42698.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 11:36:50 +00:00
Sergey Biryukov
216441356a Twenty Seventeen: Correct the number of recent posts in a comment in template-parts/page/content-front-page-panels.php.
Props skostadinov, marcelo2605.
Fixes #42621.
Built from https://develop.svn.wordpress.org/trunk@42348


git-svn-id: http://core.svn.wordpress.org/trunk@42177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:47:52 +00:00
Sergey Biryukov
82e5b30939 Twenty Seventeen: Use consistent wording when referring to the front page in inline docs.
Props chetan200891.
Fixes #42666.
Built from https://develop.svn.wordpress.org/trunk@42347


git-svn-id: http://core.svn.wordpress.org/trunk@42176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:44:47 +00:00
Gary Pendergast
ea5c584222 Coding Standards: Add the phpcs.xml.dist file.
See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:41:47 +00:00
Sergey Biryukov
3c4df552ca Docs: Correct $attachment parameter type for wp_prepare_attachment_for_js filter.
Props danielbachhuber.
Fixes #42449.
Built from https://develop.svn.wordpress.org/trunk@42345


git-svn-id: http://core.svn.wordpress.org/trunk@42174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-01 03:30:47 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Gary Pendergast
62be7ad218 Tests: Fix a couple of weirdly formatted comments.
See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 16:23:53 +00:00
John Blackbourn
67d03a98c2 Hardening: Remove the ability to upload JavaScript files for users who do not have the unfiltered_html capability.
Built from https://develop.svn.wordpress.org/trunk@42261


git-svn-id: http://core.svn.wordpress.org/trunk@42090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:00:48 +00:00
John Blackbourn
f1de7e42df Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
Built from https://develop.svn.wordpress.org/trunk@42260


git-svn-id: http://core.svn.wordpress.org/trunk@42089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:56:48 +00:00
John Blackbourn
3713ac5ebc Hardening: Add escaping to the language attributes used on html elements.
Built from https://develop.svn.wordpress.org/trunk@42259


git-svn-id: http://core.svn.wordpress.org/trunk@42088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:55:47 +00:00
John Blackbourn
eaf1cfdc1f Hardening: Use a properly generated hash for the newbloguser key instead of a determinate substring.
Built from https://develop.svn.wordpress.org/trunk@42258


git-svn-id: http://core.svn.wordpress.org/trunk@42087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:52:50 +00:00
Sergey Biryukov
ca6f54cfce Users: After [42256], remove unnecessary double quotes around first_name and last_name properties.
See #42713.
Built from https://develop.svn.wordpress.org/trunk@42257


git-svn-id: http://core.svn.wordpress.org/trunk@42086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:28:53 +00:00
Dion Hulse
05d60f74ed Users: Display partial names in the user listing tables.
This allows showing a name when only the first or last name is provided.

Props shital-patel, antipole.
Fixes #42713.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 03:41:46 +00:00
Drew Jaynes
b17405c3fe General: Add complete test coverage for WP_Error.
See #42742.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 02:19:48 +00:00
John Blackbourn
d8a995fc15 Media: Further improvements to the handling of language codes that get passed to MediaElement.
This change means that only the leading portion of a locale code gets passed to MediaElement, removing problems that arise from locales such as `de_DE_formal` and `pt_PT_ao90`.

Props erich_k4wp, blobfolio, flixos90, ocean90, joemcgill, SergeyBiryukov.

Fixes #42574

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


git-svn-id: http://core.svn.wordpress.org/trunk@42080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 14:52:51 +00:00
Ryan McCue
9b68e59534 REST API: Ensure rest_url() consistently has leading slash.
`rest_url()` inconsistent addes slashes to the passed path depending on whether the site has pretty permalinks enabled. Apart from being inconsistent, this also caused the unit tests to fail when pretty permalinks are enabled.

Props frank-klein.
Fixes #42452. See #41451.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 07:10:46 +00:00
Gary Pendergast
882db52bdd General: Add inline PHPCS options to leave regex indentation.
We have a handful of super long regexen that are written over multiple lines, as a collection of strings concatenated together. Each string is indented appropriately for the regex, but PHPCS doesn't recognised this, so defaults to removing the extra whitespace.

Disabling the `Squiz.Strings.ConcatenationSpacing.PaddingFound` rule for these blocks stops the extra whitespace from being removed.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-28 04:24:57 +00:00
Dion Hulse
58a904e893 Theme Editor: Translate the URL to the Child Themes Codex page.
Props odysseygate, johnpgreen.
Fixes #42454.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:52:47 +00:00
Dion Hulse
271e08a26e Theme Editior: Base the nonce on a simpler combination of fields, for easier debugging & reading.
See #42609.
Fixes #42705.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:44:47 +00:00
Dion Hulse
daacc37405 Theme Editor: Validate files are editable based on their relative filenames, rather than full file path.
This fixes theme editing on Windows platforms where `validate_file()` will return `2` on a full file path.

Fixes #42609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 03:28:48 +00:00
Dion Hulse
28677d382d Theme/Plugin Editor: Remove the caching added in [41806] as it causes more problems than it fixes.
While caching here seemed like a good idea in theory, in practice the cache would be often stale causing development issues.
We exclude common folders (such as `node_modules`) from the scanning to avoid directories which are not useful to the end-user, so as long as those exclusion lists are held up this shouldn't cause too much of a degredation in the future.
We may consider adding caching here again in the future if it's determined that it is really needed.

Props precies, ibenic, mariovalney, schlessera, and all the others who commented on the ticket(s).
This partually reverts [41806].
See #6531.
Fixes #42573.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 02:59:47 +00:00
Gary Pendergast
c90cfa3b50 General: Fix some precision alignment formatting warnings.
The WPCS `WordPress.WhiteSpace.PrecisionAlignment` rule throws warnings for a bunch of code that will likely cause issues for `wpcbf`. Fixing these manually beforehand gives us better auto-fixed results later.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-26 23:57:55 +00:00
Dion Hulse
611c090b41 Docs: Update the documentation for get_post_meta() to clarify that $single has no effect when the $meta_key is not provided.
Props chetan200891, titodevera.
Fixes #42687.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-26 03:17:54 +00:00
Dion Hulse
b33967cd31 WPDB: Fix the parsing of sockets which contain colons within the socket name (used on some cloud providers).
Props natacado.
Fixes #42634 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-24 05:52:46 +00:00
Dion Hulse
5342b33a0b Template: Don't output an empty <ul> in the_meta() when a post only has protected metas.
Props campusboy1987, birgire.
Fixes #42629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-24 05:21:51 +00:00
Dion Hulse
4073743527 Filesystem: Use a more unique filename in wp_tempnam() and get_filesystem_method().
Using a filename which was generated from `time()` could cause two processes to try to use the same filename, causing unexpected behaviour.

Props jrchamp, bikecrazyy.
Fixes #42265.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-24 03:05:50 +00:00
Weston Ruter
e0b4933fdb Themes: Prevent JS error on Themes admin screen when only one theme is installed.
Amends [42029].
Props chetan200891, afercia.
See #42348.
Fixes #42673.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 19:29:46 +00:00
John Blackbourn
8c7bb9009c Users: Correct the value of the lang attribute in the admin area.
This corrects the value when the user's language is set to `English (United States)` but the site language is not.

Props ocean90, afercia

Fixes #42242

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


git-svn-id: http://core.svn.wordpress.org/trunk@42049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 19:04:46 +00:00
Gary Pendergast
871c6d2b45 Setup: Allow for wp-config-sample.php to be formatted according to coding standards.
When the setup process reads `wp-config-sample.php`, it assumes that there are no spaces inside the brackes of the `define()`s. Unfortunately, this doesn't match our coding standards, so will no longer work correctly once we start enforcing them.

This also improves coding standards of the generated `wp-config.php` file.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 05:23:50 +00:00
Gary Pendergast
a779284c00 General: Reformat inline if () statements inside HTML tags.
This pattern occurs a handful of times across the codebase:

`<div class="foo<?php if ( $bar ) { echo ' baz'; } ?>">`

Unfortunately, it doesn't really play nicely with `phpcbf`, so all instances need to be removed in preperation for auto code formatting.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-23 04:09:49 +00:00
John Blackbourn
850532fb01 Cron API: Improvements to docblocks for the event scheduling functions.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-22 15:16:47 +00:00
Dion Hulse
27116397c5 Upgrade: Fix updating plugins which include a numeric file/folder names.
The fix in [41821] caused numeric folder names to be reindexed to 0..n when in the root directory (for example, `my-plugin/24/`).

Props edo888.
See #41524.
Fixes #42628 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-21 04:15:47 +00:00
Boone Gorges
2322b40358 Introduce meta_box_sanitize_cb taxonomy argument.
The `meta_box_cb` argument was introduced in [25572] to allow plugin
authors to provide a custom callback for rendering their taxonomy's meta
box on the post edit screen. However, the routine used to handle the saving
of these custom taxonomy meta boxes was not customizable, but was instead
based simply on whether the taxonomy was hierarchicaly. See [13535].

The new `meta_box_sanitize_cb` argument defaults to the "tag" routine for
non-hierarchical taxonomies and the "category" routine for hierarchical ones,
thereby maintaining the current default behavior. Developers can override this
when the data passed from their `meta_box_cb` differs.

Props boonebgorges, ZaneMatthew, stephenharris.
Fixes #36514.
Built from https://develop.svn.wordpress.org/trunk@42211


git-svn-id: http://core.svn.wordpress.org/trunk@42040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-21 03:15:50 +00:00
Felix Arntz
d14a2988e7 Multisite: Fix broken update blog_versions query after [41661].
Props Mista-Flo, lenasterg.
Fixes #42641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 23:46:48 +00:00
Boone Gorges
d86fe35b7f Improve data types returned from empty hierarchical term queries.
When querying for 'count', ensure that 0 is returned. Otherwise,
ensure that it's an array.

Props xParham, birgire.
Fixes #42327.
Built from https://develop.svn.wordpress.org/trunk@42209


git-svn-id: http://core.svn.wordpress.org/trunk@42038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 22:46:47 +00:00
John Blackbourn
aed08a0f25 HTTP API: Add a WP_Http class constant for the HTTP status code 301.
Fixes #42490

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


git-svn-id: http://core.svn.wordpress.org/trunk@42037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 20:54:49 +00:00
John Blackbourn
6e39468def HTTP API: Add support for a description for HTTP status code 103.
Props Dhruvin

Fixes #42490

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


git-svn-id: http://core.svn.wordpress.org/trunk@42036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 20:35:48 +00:00
John Blackbourn
bb5621a084 General: Pass on the return value from wp_redirect() for wp_safe_redirect().
This brings the behaviour of the two functions in line with each other.

Props Drivingralle

Fixes 42108

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


git-svn-id: http://core.svn.wordpress.org/trunk@42035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 20:24:48 +00:00
Dion Hulse
71bdb1635b DB Repair: Only allow non-falsey values of WP_ALLOW_REPAIR to access the DB repair functionality.
This allows defining the constant as `false` to prevent access (rather than requiring the constant to be removed entirely).

Props tiagohillebrandt, munklefish.
See #11717.
Fixes #42622.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-20 06:21:52 +00:00
John Blackbourn
4ef018df2b Docs: Correct the @since property for the page_attributes_misc_attributes action.
Props jeremyescott, jfarthing84

Fixes #42607

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


git-svn-id: http://core.svn.wordpress.org/trunk@42033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-19 11:52:52 +00:00
Felix Arntz
d9e4fc273d Multisite: Do not show edit links in network users table for users that cannot be edited.
Props ocean90.
Fixes #42552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-17 21:35:51 +00:00
Dion Hulse
24b1297fab Remove the svn:keywords property from files that don't need it.
See #42594

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


git-svn-id: http://core.svn.wordpress.org/trunk@42031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-17 03:01:47 +00:00
Dion Hulse
cf14a9432c Remove the svn:executable property from files that don't need it.
See #42594

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


git-svn-id: http://core.svn.wordpress.org/trunk@42030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-17 02:58:45 +00:00
Sergey Biryukov
1a5adcf722 Rewrite Rules: Correct the logic in extract_from_markers() after [41928].
Props stodorovic.
Fixes #42579. See #39920.
Built from https://develop.svn.wordpress.org/trunk@42199


git-svn-id: http://core.svn.wordpress.org/trunk@42029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-16 13:25:50 +00:00
Weston Ruter
5749295a59 Editor: Re-build tinymce.min.js after [42191].
See #42553.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 23:35:49 +00:00
Weston Ruter
5cab65edab Editor: Disable wp_keep_scroll_position in IE11 since buggy; fix matches polyfill conflict with ME.js by doing runtime feature detection in context window.
Props westonruter, SergeyBiryukov, Clorith for testing.
See #41962, #42029.
Fixes #42553 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:59:47 +00:00
Weston Ruter
f4e974057e File Editor: Eliminate gap inserted between code editor and heading in IE11 when CodeMirror initializes.
Props afercia, melchoyce, Clorith for testing, SergeyBiryukov for testing.
See #12423.
Fixes #42554 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:29:46 +00:00
Weston Ruter
9fabdfb212 Customize: Prevent themes panel from auto-expanding in IE11.
In IE11 the `input` event erroneously gets triggered initially without any user input.

Amends [41648].
See #37661.
Fixes #42556 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 18:12:53 +00:00
Weston Ruter
ee126d2567 Widgets: Set global $post to current queried object instead of nullifying when is_singular() while applying filters (and shortcodes) in Text widget and (via plugin) Custom HTML widget.
Also prevent `[gallery]` shortcode from dumping out every attachment on the site when a containing Text widget is shown on an archive template.

Props westonruter, bobbingwide, joemcgill for testing.
See #10457.
Fixes #42548, #42547 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 02:27:48 +00:00
Weston Ruter
9986ebdc0b Editor: Improve scrolling behavior and prevent autosave logic from causing dirty state when just switching between Visual and Text tabs.
Props pento.
See #41962, #42029.
Fixes #42530 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 00:21:48 +00:00
Weston Ruter
6c64136035 About Page: Fix issue with overlapping images and text on IE11 and Edge 15.
Props Clorith, ryelle, afercia, la-geek, SergeyBiryukov.
See #42514.
Fixes #42545.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 23:02:48 +00:00
Peter Wilson
fc0f64e1ef Editor: Cease adding paragraphs when switching editor tabs.
Fixes an error since [41783] in which extra paragraphs could be added to content when switching editor tabs.

Props pento, adamsilverstein, aduth.
Fixes #42531.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 05:24:47 +00:00
Gary Pendergast
5dab6b6e61 Editor: When switching Editor tabs, don't scroll unnecessarily.
- When switching to the Text view, wait until after the Visual editor element has been hidden, before focussing the `<textarea>`.
- When switching to the Visual view, only scroll if the cursor is not visible on the current screen.

Fixes #42530.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-14 05:19:49 +00:00
Weston Ruter
54a2c0dd1f About: Fix jumping behavior for titles and columns when scrolling.
Props ryelle.
See #42087.
Fixes #42514, #42526.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:47:58 +00:00
Weston Ruter
e484b66335 Customize: Allow notifications for linting errors in code editor control (for Additional CSS) to be overridden to allow saving.
Implements the same override that was implemented in [41721] for the theme/plugin editors.

See #41897, #41887.
Fixes #42528.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:46:34 +00:00
Weston Ruter
609c0db668 Customize: Prevent PHP notice on theme-switch dashboard welcome link (and link to themes admin screen) when user cannot customize.
Props skostadinov, ocean90.
Amends [41699].
See #42050.
Fixes #42525.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 22:45:11 +00:00
Boone Gorges
2f95f44008 Correct documentation for status param of WP_Comment_Query.
The `status` parameter accepts an array or string/comma-separated list.

Introduced in [30084].

Props pbiron.
Fixes #41338.
Built from https://develop.svn.wordpress.org/trunk@42165


git-svn-id: http://core.svn.wordpress.org/trunk@41996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 16:26:47 +00:00
Weston Ruter
4e320fe008 I18N: Fix passing singular/plural strings to JS.
This is a temporary solution while waiting for full I18N support in JS.

Props ocean90, dd32, westonruter, Mirucon for testing.
Amends [41376], [41721], [41389],
See #20491.
Fixes #42510 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 07:08:47 +00:00
Weston Ruter
6d2bf4398c About: Add vertical alignment for developer happiness sections.
Also run CSS autoprefixer to add `-ms-` prefixes for CSS grid identifiers for IE11.

Props Presskopp.
Amends [42121].
See #42087.
Fixes #42524 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 05:48:47 +00:00
Weston Ruter
41d60f59f8 About: Fix grammar typo with pluralization.
Props metodiew, westonruter.
Amends [42121].
See #42087.
Fixes #42476 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-13 05:19:50 +00:00
Weston Ruter
2bec203118 About: Synchronize 4.9 tagline across about pages for credits, freedoms, and privacy.
Props dave.pullig.
Amends [41943].
See #42087.
Fixes #42518 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-12 19:59:53 +00:00
Weston Ruter
2aa2c686d4 Theme Editor: Fix styling of child theme notice.
Props westonruter, melchoyce, ndiego.
See #24048.
Fixes #42491 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-11 20:43:53 +00:00
Weston Ruter
826c589f11 Customize: Restore ability to add Custom Link nav menu items for jump links and other URLs that were previously allowed.
Simplify regular expression for checking URL validity to just do basic checks to confirm the value looks like a URL. Leave the complete validation to the server-side logic in `WP_Customize_Nav_Menu_Item_Setting::sanitize()` to avoid having to maintain two separate codebases for validating URLs.

Props westonruter, SergeyBiryukov for testing.
Amends [41697].
See #32816.
Fixes #42506 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 23:41:53 +00:00
Weston Ruter
e86536afc9 Customize: Prevent nav menu location assignment checkbox change from increasing height by 1px.
Props obenland.
Amends [41817].
See #42157.
Fixes #42492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 23:01:48 +00:00
John Blackbourn
67c973f95e Docs: Correct parameter type documentation for various __call() methods.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@41982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 22:56:47 +00:00
Weston Ruter
6c6d112e74 Customize: Improve accuracy of message displayed when accessing Customizer with a changeset that is already published or trashed.
Amends [38810].
Props dlh.
Fixes #42497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 22:51:46 +00:00
Weston Ruter
016a3f9ecd Customize: Ensure customization drafts are published instead of trashed when scheduled changeset goes live while non-admin user is authenticated (such as during WP Cron).
Props designsimply for testing, dlh for testing, melchoyce for testing.
See #28721, #34923, #42220.
Fixes #42489 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 22:44:52 +00:00
Weston Ruter
10ac2ccd3a Settings: Replace count() call with empty() in get_settings_errors() to prevent PHP 7.2 warnings when $wp_settings_errors is null.
Props pross, dd32, westonruter.
See #40109.
Fixes #42498 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 22:30:56 +00:00
Weston Ruter
9db496159e Customize: Ensure autosave revision is dismissed immediately after implicit restoration notice dismissal as done with explicit notice dismissal.
Fixes issue where a drafted/scheduled changeset could inadvertently re-use the previous autosave revision in the preview while a user expects it to have been dismissed.

See #39896, [41597].
Fixes #42502 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 21:44:55 +00:00
John Blackbourn
3be5d4b4f0 Docs: Improve inline docs for the wp_redirect() and wp_safe_redirect() functions.
See #42505, #42108

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


git-svn-id: http://core.svn.wordpress.org/trunk@41974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 13:44:47 +00:00
Gary Pendergast
e8229a25d5 REST API: Add permalink_structure to the index endpoint.
This allows Gutenberg to implement permalink editing.

Props schlessera.
Fixes #42465.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 06:11:51 +00:00
Weston Ruter
4bf8081e64 Widgets: Style the Image Widget's link field as invalid when a bad URL is supplied.
Fixes issue where user may supply an invalid URL and be unable to save the widget on the Widgets admin screen without being told why.

Amends [41252].
See #41274.
Fixes #42488.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-10 01:28:49 +00:00
Weston Ruter
1ee26acf95 Customize: Fix reliability of just-in-time publishing for changesets that miss their schedule when visiting customize.php.
When just doing `wp_publish_post()` for the changeset from `customize.php`, any option-based settings will fail to get saved because `WP_Customize_Manager` would have already been loaded with `settings_previewed`, resulting in `update_option()` calls being short-circuited. So an admin-ajax request to `customize_save` is used to work around this.

Props westonruter, jeremyfelt, dlh for testing, LittleBigThing for testing.
Amends [41626].
See #28721, #39221.
Fixes #42457 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 04:44:47 +00:00
Weston Ruter
19ec50f92a Customize: Ensure autosaving message gets sent to preview after initial change when saved state is first dirty.
Amends [41667].
Fixes #42475 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 04:15:49 +00:00
Weston Ruter
6c00350575 Settings: Fix date/time format previewing.
Props afercia.
Amends [41857].
Fixes #41603.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 03:55:46 +00:00
Weston Ruter
3c6ce6751f Customize: Restore search icon to available widgets pane incorrectly removed in [41893].
See #42215.
Fixes #42472 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-09 01:02:47 +00:00
Gary Pendergast
39a3fe9180 Admin Bar: Fix another HTML error introduced in [42128].
Props Otto42.
See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-08 23:13:46 +00:00
Dion Hulse
0a81bcf4ff External Libraries: Update Random_Compat from 1.2.1 to 2.0.11.
Notably this fixes PHP7 parse errors of the files and removes the OpenSSL functionality.
Full Changes: https://github.com/paragonie/random_compat/compare/v1.2.1...v2.0.11

Props jrdelarosa.
See #42439.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-08 11:48:49 +00:00
Gary Pendergast
e822e4578a Admin Bar: Fix a HTML error introduced in [42128].
Props swissspidy.
See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-08 08:52:48 +00:00
Gary Pendergast
bde3b95936 Admin Bar: Reformat the render methods.
The admin bar render methods use some cute tricks which don't come close to the WordPress coding standards. So that we can more easily apply automated code fixing to the codebase, these tricks need to be removed.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-08 08:35:51 +00:00
Weston Ruter
d7b49bbc3e Trunk is now 5.0-alpha
Built from https://develop.svn.wordpress.org/trunk@42127


git-svn-id: http://core.svn.wordpress.org/trunk@41958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 05:47:51 +00:00
Weston Ruter
59fdb7a220 Post WordPress 4.9 RC2 bump.
Built from https://develop.svn.wordpress.org/trunk@42125


git-svn-id: http://core.svn.wordpress.org/trunk@41956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 05:26:47 +00:00
Weston Ruter
f76b491135 WordPress 4.9 RC2.
Built from https://develop.svn.wordpress.org/trunk@42124


git-svn-id: http://core.svn.wordpress.org/trunk@41955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:54:47 +00:00
Konstantin Obenland
4eda9c7388 About: Hardcoded image sources.
We're committed to these images now.

See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:26:48 +00:00
Weston Ruter
e4fe01e2b4 Customize: Fix logic inversion in [42113] which prevented themes from being installed in Customizer.
Also fix PHP notice related to parent themes and WordPress.org theme query results.

Props dd32, obenland, celloexpressions, westonruter, atachibana for testing.
See #42406, #37661.
Fixes #42442.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:17:47 +00:00
Mel Choyce
2382232692 About Page: Implement design.
Props ryelle, karmatosed, transl8or, obenland, melchoyce.
See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 04:11:47 +00:00
Gary Pendergast
8255d04abb WPDB: Check that AUTH_SALT is not empty.
In `wpdb::placeholder_escape()`, the key for `hash_hmac()` defaults to `AUTH_SALT`, but `hash_hmac()` will return an empty string if the key is empty.

This had the side effect of the string `{}` being incorrectly replaced with a `%` character in queries just about to be run on the database.

Props jsonfry.
Fixes #42431.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 01:09:47 +00:00
Gary Pendergast
002d65112f WPDB: Fix a PHP notice when AUTH_SALT is undefined.
In `wpdb::placeholder_escape()`, the key for `hash_hmac()` falls back to `rand()` when `AUTH_SALT` is undefined. `hash_hmac()` requires the key to be a string, however, so we need to cast it as such.

Props mkomar.
Fixes #42401.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-07 00:30:46 +00:00
Weston Ruter
a74afff787 Customize: Prevent customize_autosaved=on from getting added to frontend preview URLs.
Amends [41969].
See #39896, #42450.
Fixes #42433.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-06 23:11:53 +00:00
Weston Ruter
c15b2a0908 Customize: Fall back to ISO date format for date/time control inputs if year, month, or day are missing from the date_format option.
Amends [42111].
Props dlh, westonruter.
Fixes #42394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-06 20:28:48 +00:00
John Blackbourn
b8de3548d3 Administration: Ensure the new Privacy Policy screen appears when within the Network Admin and User Admin.
Props hnle, dd32
Fixes #42443

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


git-svn-id: http://core.svn.wordpress.org/trunk@41945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-06 18:17:54 +00:00
Konstantin Obenland
65c1468ff5 File Editors: Account for network admin use
Fixes a bug where files couldn't be accessed in multisite installs.

Props flixos90, westonruter.
Fixes #42420.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-03 18:51:49 +00:00
Weston Ruter
76e01c3562 Customize: Ensure changeset_uuid param for autosave auto-draft gets stripped from location after previewing theme switch when not in branching mode.
Amends [41597].
See #39896.
Fixes #42415.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-03 17:37:52 +00:00
Weston Ruter
d0608c5585 Customize: Make sure theme switch blocking in the Customizer is consistently applied when changeset is drafted/scheduled.
* Consider both `selectedChangesetStatus` and `changesetStatus` states when deciding to disable.
* Factor out common logic into `canSwitchTheme` function on `ThemesPanel`.
* Keep Live Preview and Install buttons disabled in Themes controls and detail overlays when appropriate.

Props westonruter, dlh.
Amends [41788].
See #42126, #37661, #39896.
Fixes #42406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-03 00:59:47 +00:00
Weston Ruter
83c29a4d08 Theme Editor: Ensure files listed recursively can be both viewed and edited.
Prevent edits to 2-level deep theme files from returning a `disallowed_theme_file` error when attempting to save an edit. Aligns logic for gathering `$allowed_files` in `theme-editor.php` for listing files with the validation logic in `wp_edit_theme_plugin_file()`.

Amends [41806].
See #6531.
Fixes #42425.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 23:05:48 +00:00
Weston Ruter
ef272167c4 Customize: Present the date/time control input fields in the same format (and order) as date_format.
Props westonruter, obenland, atachibana for testing, Mirucon for testing.
See #42373, #28721.
Fixes #42394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 23:00:49 +00:00
Konstantin Obenland
99c19a5a82 Codemirror: Unify line endings in csslint.js
This is likely a problem caused upstream and will probably be a non-issue once #41870 is merged in a future release.

Fixes #42424.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 22:31:47 +00:00
Weston Ruter
8902ddba18 Customize: Always use underlying changeset post date as initial date in scheduled date fields if date is future.
Prevent user from having to re-enter the previously-supplied future date if they had switched from schedule to draft but wanted to switch back again. Improves parity with behavior of post edit screen.

Props dlh, westonruter, obenland.
See #39896, #28721.
Fixes #42413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 20:00:48 +00:00
Weston Ruter
fbee634ac7 Customize: Prevent history.replaceState() and history.pushState() calls from causing error in customize preview before DOM ready.
Amends [41597].
See #39896.
Fixes #42414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 19:27:47 +00:00
Weston Ruter
5f16c57782 Customize: Prevent re-importing starter content when changeset is saved as draft or scheduled.
Themes cannot currently be switched in Customizer after changeset is saved anyway.

Props dlh, westonruter.
See #40146, #42411, #42126.
Fixes #42395.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 19:00:54 +00:00
Weston Ruter
7deb33b386 Bundled Themes: Fix fragile update-theme phpunit test which broke after version updates in [42105].
See #42090.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 01:26:48 +00:00
David A. Kennedy
7b74056cf5 Bundled Themes: Bump version numbers and update changelogs for 4.9 release
* Also, updates POT files for Twenty Ten and Twenty Eleven.

Props lemacarl, maedahbatool, mrahmadawais, davidakennedy.

Fixes #42090.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-01 22:43:47 +00:00
Weston Ruter
926f2114f0 Customize: Strip zero padding when setting month to prevent de-selection; add zero-padding for number input fields when blurring.
Amends [42042].
See #42373.
Fixes #42392.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-01 21:04:53 +00:00
Gary Pendergast
a2693fd860 Database: Restore numbered placeholders in wpdb::prepare().
[41496] removed support for numbered placeholders in queries send through `wpdb::prepare()`, which, despite being undocumented, were quite commonly used.

This change restores support for numbered placeholders (as well as a subset of placeholder formatting), while also adding extra checks to ensure the correct number of arguments are being passed to `wpdb::prepare()`, given the number of placeholders.

See #41925.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 12:00:49 +00:00
Weston Ruter
6f2db8ea69 Post WordPress 4.9 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@42050


git-svn-id: http://core.svn.wordpress.org/trunk@41884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 04:32:48 +00:00
Weston Ruter
84c6d74a8c WordPress 4.9 RC1.
Built from https://develop.svn.wordpress.org/trunk@42049


git-svn-id: http://core.svn.wordpress.org/trunk@41883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 03:42:49 +00:00
Weston Ruter
8a1dc558a1 Customize: Consolidate sourcing of control params.
Prevent needlessly iterating over `controlConstructor` to find `type` when it is already supplied.

Amends [41750], [41726].
See #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 02:59:47 +00:00
Adam Silverstein
274792f9cd REST API: JS client - Enumerate endpoints supporting trash.
Improve the logic determining which endpoints support the trash by enumerating them. Endpoints that don't support the trash require `force=true` when deleting. The previous approach relied on the `force` argument description, which is a translated string and was fragile. In the future, we can expose whether an endpoint supports the trash as part of its schema and automate this logic.

Props Soean.
Fixes #40672.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 02:54:48 +00:00
Konstantin Obenland
b61de38e87 Customize: Spiff up theme updates
Fixes UI bugs around theme updates in the Customizer. Theme versions now get updated and users are no longer left alone after a successful update.

Props rinkuyadav999, celloexpressions for initial patch.
Fixes #42365.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 01:33:47 +00:00
Gary Pendergast
8981414082 About page: Tweak the privacy policy language, for clarity.
See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 00:21:49 +00:00
Mel Choyce
f7aa0e24a7 About Page: Update the blurb in "Warning: Potential Danger Ahead!" to be more accurate.
Props transl8or, karmatosed, chanthaboune.
See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 20:58:50 +00:00
Felix Arntz
82c6a301f2 Multisite: Pass network object instead of ID to pre_get_main_site_id.
In the original function introduced in [41380], and subsequently [41861], only the network ID was passed to the new `pre_get_main_site_id` filter. In order to make give quick access to other network properties, it was decided to pass the whole object instead. The changeset includes an additional test.

Fixes #29684.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 19:56:47 +00:00
Weston Ruter
ca84147401 Customize: Allow 0:00-0:59 in date/time control when 24-hour time used.
* Let min hour be 0 and max be 23 in 24-hour time; let min hour be 1 and max be 12 in 12-hour time.
* Show error notification when an invalid date value is provided, not just when not a future date.
* Fix translation of custom validity message.
* Start checking for validity after all inputs have been initially populated.
* Remove support for being able to enter 24:00.
* Cease forcing date input elements from being casted to integers, to allow for invalid inputs to be detected.

Props westonruter, Presskopp, peterwilsoncc, atachibana for testing.
See #39896, #28721.
Fixes #42373.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 16:40:47 +00:00
Weston Ruter
285c6a57c8 Tests: Remove references to deleted JS files in QUnit tests.
Amends [41570], [40584].
See #41755, #40690.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 04:06:48 +00:00
Weston Ruter
fbb0b8bc8f Customize: Debounce requests for theme searches and the updating of the resulting filter count.
Props celloexpressions.
See #37661.
Fixes #42343.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-30 03:57:52 +00:00
Weston Ruter
9a18c87e0c Customize: Fix phpdoc for params in WP_Customize_Manager::add_section().
Amends [40804].
See #39671.
Fixes #42372.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 03:22:49 +00:00
Weston Ruter
5fc9fddccc Customize: Fix interface alignment between Setting and Control, adding defaults to wp.customize.Setting and using wp.customize.previewer as default previewer param.
Also move jsdoc from class to `initialize` method and correct the param types.

Amends [41726], [42037], [32681].
See #42083, #30737.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 03:08:53 +00:00
Weston Ruter
35172737ef Customize: Support instantiation of partials with flat/unwrapped params for parity with controls, sections, and panels in [41726].
* Passing `options.params` when constructing `Partial` is now deprecated in favor of just passing `options`.
* Improve usage of jsdoc in JS `Partial` class.
* Also add `defaults` property to `wp.customize.selectiveRefresh.Partial` class for parity with `Control`.

See #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 00:15:53 +00:00
Weston Ruter
cb7483b595 Customize: Fix mobile placement of panes for available widgets and nav menu items.
Props Mahvash-Fatima.
Amends [41893].
See #42215.
Fixes #42359.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 06:54:47 +00:00
Weston Ruter
84b969efea Customize: Ensure id for section and panel is passed among params to respective templates.
Fixes issue where JS-added Publish Settings section failed to get container element ID set properly to hide its section-meta.

Amends [42025].
See #42337, #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 06:37:47 +00:00
Weston Ruter
685e3c1a67 Customize: Deprecate nav menu classes that are no longer used, instead of removing them immediately.
* Deprecate PHP classes `WP_Customize_New_Menu_Section` and `WP_Customize_New_Menu_Control`.
* Deprecate JS class `wp.customize.Menus.NewMenuControl`.
* Also introduce `wp.customize.Menus.createNavMenu()` for logic to create nav menus separately from the logic for handling UI interactions.

Amends [41768].
See #40104, #42364.
Fixes #42357.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 05:48:47 +00:00
Weston Ruter
9dca5ae189 Customize: Fix deep-linking to sections for themes via autofocus[section] query parameter.
* Expand containing panel when expanding themes section.
* Consolidate UI changes related to a section's expanded state change.
* Prevent collapsing current section when expanding.
* Auto-expand first themes section when expanding panel if one is not expanded already.

See #37661, #42354.
Fixes #42360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 05:22:46 +00:00
Gary Pendergast
615a9afab8 Tests: Update wp-api-generated.js.
[41979] caused a change in `wp-api-generated.js`, so it needs to be updated.

See #39996.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-28 01:56:46 +00:00
Weston Ruter
d348f1624b Customize: Improve Media control accessibility and compatibility for settings passed as arrays or as solitary setting.
* Eliminate Media control template from having dependency on `params.settings.default` for element ID, to fix compat with `params.settings` array or single `params.setting`. See #36167.
* Move description out of label and add `aria-describedby` to Media control's Select button. See #30738, #33085.
* Obtain notification container whenever content is (re-)rendered (such as for Media control). See #38794.
* Re-render notifications after control content is re-rendered, if control is in expanded section. See #38794.

Amends [41390].
See #36167, #38794, #33085, #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 20:18:47 +00:00
Weston Ruter
cb877e10ba Widgets: Prevent showing underlying attachment excerpt as caption when empty caption value is supplied in Image widget.
Allow underlying attachment to display if `caption` is `null`.

Props miyauchi, westonruter.
See #39993.
Fixes #42350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 05:05:51 +00:00
Weston Ruter
7b0de1f1b0 Themes: Switch back from throttling to debouncing in theme searches on admin screen.
Start debouncing after initial search performed when `search` query param is present to prevent initial "flash of unsearched themes".

Props afercia, westonruter.
Amends [41797].
See #40254.
Fixes #42348.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-27 03:31:53 +00:00
John Blackbourn
c6fd6b0374 External Libraries: Remove usage of each() from the Text_Diff_Engine_native class.
This removes deprecated notices in PHP 7.2 but takes a different approach to the upstream class from Horde, which appears to be buggy.

Props SergeyBiryukov
Fixes #41526

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


git-svn-id: http://core.svn.wordpress.org/trunk@41862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-26 12:52:53 +00:00
John Blackbourn
4550ef5b2c External Libraries: Remove usage of text strings in assert() in the Text_Diff_Engine_native class.
See #41526

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


git-svn-id: http://core.svn.wordpress.org/trunk@41861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-26 11:32:48 +00:00
Konstantin Obenland
db00af7cc2 Menus: Add menu-$i slugs to mapping groups
Helps to future proof the feature.
Also orders slugs by popularity to optimize mapping time.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 22:29:49 +00:00
Weston Ruter
a6af74ec32 Customize: Register the Publish Settings section in JS to ensure it does not get unregistered via PHP.
The `publish_settings` section is a fundamental dependency for Customizer, so it must be guaranteed to be registered.

Also unconditionally register core types for panels, sections, and controls in case plugin unhooks all `customize_register` actions.

See #39896.
Fixes #42337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 21:45:49 +00:00
Weston Ruter
3ed6bbf4a4 Customize: Link elements prior to embedding to prevent possible errors when a control is associated with a non-existent section.
Fixes issue specifically with attempting to access an orphaned control's `elements` immediately after it has been added. Normally this would not happen because a control would not be registered without a section, and also a control should only be interacted with once its `embedded` deferred has been resolved.

Also harden logic for gathering list of deferred setting IDs.

See #37964.
Fixes #42330.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 16:49:49 +00:00
Sergey Biryukov
6b3b489a5d Permalinks: Change mention of URI to URL in the description of %category% tag.
Props danieltj, tobifjellner.
Fixes #42147.
Built from https://develop.svn.wordpress.org/trunk@42023


git-svn-id: http://core.svn.wordpress.org/trunk@41857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 11:11:45 +00:00
John Blackbourn
7fc62bbd4f External Libraries: Revert [41633]. This causes warnings when editing and viewing certain revisions.
See #41526

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


git-svn-id: http://core.svn.wordpress.org/trunk@41856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 09:56:53 +00:00
Weston Ruter
6794fd18ef Post WordPress 4.9 Beta 4 version bump.
Built from https://develop.svn.wordpress.org/trunk@42021


git-svn-id: http://core.svn.wordpress.org/trunk@41855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 07:08:52 +00:00
Weston Ruter
f6bf73792c WordPress 4.9 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@42020


git-svn-id: http://core.svn.wordpress.org/trunk@41854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 06:13:47 +00:00
David A. Kennedy
750098da21 Bundled Themes: Make sure new gallery widgets look good in themes
Twenty Ten: Reduces image size and removes image borders for galleries in widget areas.
Twenty Eleven: Reduces image size and removes image borders for galleries in widget areas.
Twenty Twelve: Reduces image size for some gallery sizes in widget areas.
Twenty Thirteen: Ensure proper clearing for images, hide captions for some gallery column combos and ensure good display for galleries in widget areas.
Twenty Fourteen: Ensure proper clearing for images and hide captions for some gallery column combos for galleries in widget areas.
Twenty Seventeen: Hide captions for some gallery column combos for galleries in widget areas.

Props joyously, williampatton, davidakennedy, melchoyce, crunnells.

Fixes #41969.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 02:17:47 +00:00
Weston Ruter
d19c79fa21 Customize: Remove theme_installing notification when installation fails.
Amends [41648].
Props celloexpressions.
See #42184, #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 01:14:46 +00:00
Gary Pendergast
3cd984f024 About page: The link URLs in the privacy policy shouldn't be translatable.
Both of these URLs live on the main wordpress.org site, not Rosetta sites.

See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 01:07:47 +00:00
iandunn
2762709d2a Dashboard: Strip ports from IPs to avoid PHP warnings.
Fixes #41083.
Props pento, iandunn, EatonZ, birgire, dd32.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 00:07:46 +00:00
Weston Ruter
12c626c82e Update $_old_files to add the deleted MediaElement.js files when it was upgraded from 2.22.0 to 4.2.3.
Amends [41198].
See #39686.
Fixes #42097.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-25 00:02:50 +00:00
Sergey Biryukov
116e4712cb I18N: Use a consistent pattern for translator comments for placeholders in the string added in [42013].
See #41974.
Built from https://develop.svn.wordpress.org/trunk@42014


git-svn-id: http://core.svn.wordpress.org/trunk@41848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:40:46 +00:00
Mel Choyce
7495a110cc Code Editors: Add a persistent notification on CSS files, encouraging people to use the CSS panel in the Customizer instead of editing their CSS files directly.
Props helen, westonruter, nic.bertino, michelleweber.
Fixes #42100.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:35:46 +00:00
Weston Ruter
d96b7af890 Permalinks: Fix placement of structure tags based on last cursor position.
Props felipeelia, afercia.
See #29872.
Fixes #42042.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:27:48 +00:00
John Blackbourn
2f3e91028a Filesystem API: Add more specificity to the rules for valid files in validate_file().
This now treats files containing `./` as valid, and also treats files containing a trailing `../` as valid due to widespread use of this pattern in theme and plugin zip files.

Adds tests.

Props Ipstenu, borgesbruno, DavidAnderson, philipjohn, birgire
Fixes #42016, #36170

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


git-svn-id: http://core.svn.wordpress.org/trunk@41845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:15:49 +00:00
John Blackbourn
16cfe96580 Filesystem API: Don't immediately return an error for invalid file names contained within a Zip while it's being extracted.
This allows the extraction of the rest of the valid files within the archive to continue.

See #42016

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


git-svn-id: http://core.svn.wordpress.org/trunk@41844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:11:50 +00:00
Weston Ruter
48e726bbef Embeds: Improve consistency of update and refresh logic for oEmbed caching between oembed_cache and post meta.
* Allow updating oEmbed cache during `parse-embed` requests for non-post editors (such as widgets).
* Update any existing `oembed_cache` post when `usecache` and TTL has passed.
* Do not overwrite a previously valid cache with `{{unknown}}`.

Props dlh.
See #34115.
Fixes #42310.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:10:48 +00:00
Sergey Biryukov
5dd45b38c8 Transients: After [41963], add missing cron task for delete_expired_transients().
Props dlh.
Fixes #41699.
Built from https://develop.svn.wordpress.org/trunk@42008


git-svn-id: http://core.svn.wordpress.org/trunk@41842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 23:00:47 +00:00
John Blackbourn
4812370aab Docs: Improve the docs for validate_file() and validate_file_to_edit().
See #42016, #36170, #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:50:49 +00:00
Sergey Biryukov
29d5ee851c I18N: Use a consistent pattern for translator comments for placeholders in some more Customizer strings.
See #41974.
Built from https://develop.svn.wordpress.org/trunk@42006


git-svn-id: http://core.svn.wordpress.org/trunk@41840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:47:46 +00:00
Sergey Biryukov
f156f90ff5 I18N: Add a context for remaining "Schedule" strings.
Props Mirucon.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@42005


git-svn-id: http://core.svn.wordpress.org/trunk@41839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 22:35:47 +00:00
David A. Kennedy
55c8978f1f Twenty Seventeen: Make gallery link styles consistent in all widget areas
Removes the box shadow on gallery links in footer widget areas so they're consistent with the sidebar widget area.

Props transl8or, sami.keijonen, davidakennedy.

Fixes #42302.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:53:51 +00:00
Weston Ruter
a1ec65b695 Themes: Harmonize list of theme features on Theme Install screen with list in the Customizer.
Use the core list, rather than the .org API, due to inconsistencies and to ensure tags are translated.

Props celloexpressions.
See #37661, #42306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:46:47 +00:00
Sergey Biryukov
50c6a55fba I18N: Give context to "Installed" string added in [41648].
Props dimadin.
Fixes #42325.
Built from https://develop.svn.wordpress.org/trunk@42002


git-svn-id: http://core.svn.wordpress.org/trunk@41836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:43:47 +00:00
Weston Ruter
fd2e006968 Widgets: Limit container-constraining logic in Text widget to video, iframe, object, and embed elements.
Amends [41779].
See #40854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:32:46 +00:00
Joe Hoyle
bebb0b0d82 REST API: Don’t remove unregistered properties from objects in schema.
In r41727 the ability to sanitise and validate objects from JSON schema was added, with a whitelist approach. It was decided we should pass through all non-registered properties to reflect the behaviour of the root object in register_rest_route. To prevent arbitrary extra data via setting objects, we force additionalProperties to false in the settings endpoint.

See #38583.
Built from https://develop.svn.wordpress.org/trunk@42000


git-svn-id: http://core.svn.wordpress.org/trunk@41834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 21:05:49 +00:00
Mel Choyce
c0d0380baa Code Editors: Tweak styles to work better on smaller screens.
See #42100.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 20:29:46 +00:00
Mel Choyce
9c7eb32fc2 Credits: Update "Contributing Developers" to "Noteworthy Contributors."
"Developers" excludes the various major contributors in non-developer roles, so let's update this term to be more inclusive.

See #41022.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 19:29:47 +00:00
Weston Ruter
6737643773 Customize: Prevent theme installation and deletion in Customizer while SFTP credentials need to be requested.
This is a temporary measure while we wait for credentials to be able to be supplied in the Customizer.

Amends [41788].
See #42184, #37661, #42126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 19:06:47 +00:00
Mel Choyce
b008754486 Code Editors: Update copy in warning modals.
Props helen.
See #42100.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 18:47:47 +00:00
Konstantin Obenland
5aa45cd12e Customize: Allow previewed menus to be customized
Fixes a bug where menu assignements couldn't be changed when previewing a theme.
Also removes an unnecessary call to menu mapping after a theme switch from the customizer and makes sure the locations option is always written, for good measure.

Props westonruter.
See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 18:35:48 +00:00
Weston Ruter
7e689f541d Code Editor: Fix phpunit tests related to gutters after [41974].
See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 16:58:50 +00:00
Ella Iseulde Van Dorpe
abc1579a42 TinyMCE: Set undefined FloatPanel zIndex
See [40995] for the Customizer.
Fixes #42322.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 16:52:56 +00:00
Weston Ruter
226263bfec Code Editor: Define default gutters and toggle lint markers based on changes to lint option.
Explicitly define `gutters` in base `defaultSettings` to improve merges of multiple calls to `wp_enqueue_code_editor()`.

Props westonruter, georgestephanis for testing.
Amends [41974].
See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 16:35:54 +00:00
Sergey Biryukov
9eb75432b6 Canonical: Strip trailing punctuation from permalinks.
Previously attempted in [40256], which caused the test for decoded curly quotes to fail in some environments.

`$_SERVER['REQUEST_URI']` contains the encoded URI, so this version removes the failing tests and only checks for encoded curly quotes.

Props joostdevalk, lancewillett, SergeyBiryukov.
Fixes #20383.
Built from https://develop.svn.wordpress.org/trunk@41991


git-svn-id: http://core.svn.wordpress.org/trunk@41825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 14:18:48 +00:00
Sergey Biryukov
bcdedf7f4a Formatting: Make sure wp_allowed_protocols() is filterable until wp_loaded has fired.
Fixes the issue with plugins not being able to use the `kses_allowed_protocols` filter if `esc_url()` was called too early.

Props turtlepod, SergeyBiryukov.
Fixes #36033.
Built from https://develop.svn.wordpress.org/trunk@41990


git-svn-id: http://core.svn.wordpress.org/trunk@41824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 13:25:55 +00:00
John Blackbourn
2623caf8b0 Docs: Correct a class name in the docs for WP_Customize_Manager::post_value().
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 11:57:49 +00:00
Sergey Biryukov
4c16522bbe Taxonomy: Use keypress instead of keyup for listening for Enter key to add a tag via Tags meta box.
Fixes issue with Japanese input.

Props miyauchi.
Fixes #42234.
Built from https://develop.svn.wordpress.org/trunk@41988


git-svn-id: http://core.svn.wordpress.org/trunk@41822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 11:30:49 +00:00
Sergey Biryukov
654386a5b7 Taxonomy: After [40984], add the most_used label for non-hierarchical taxonomies too, and use it on the Menus screen.
Props johnbillion.
Fixes #41150.
Built from https://develop.svn.wordpress.org/trunk@41987


git-svn-id: http://core.svn.wordpress.org/trunk@41821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 11:23:24 +00:00
Sergey Biryukov
ffddfb573b I18N: Remove <code> and <kbd> tags from translatable strings on Settings screens.
Move URLs to separate strings.

Props ramiy.
Fixes #40763.
Built from https://develop.svn.wordpress.org/trunk@41986


git-svn-id: http://core.svn.wordpress.org/trunk@41820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 10:51:52 +00:00
Weston Ruter
9093718b15 Editor: Specify maxwidth in parse-embed requests based on width of editor iframe so that TinyMCE view embeds fit, particularly in Text widgets.
See #40854, #34115.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 04:07:50 +00:00
Helen Hou-Sandí
a7f2613fc7 Buttons: Ensure active styling applies to both :active and .active.
props sayedwp, helen.
fixes #42236.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 23:34:49 +00:00
Sergey Biryukov
a891bc6c92 Docs: Fix typo in path_is_absolute() description.
Props octalmage, birgire.
Fixes #42317.
Built from https://develop.svn.wordpress.org/trunk@41983


git-svn-id: http://core.svn.wordpress.org/trunk@41817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 22:51:46 +00:00
Weston Ruter
fce310e744 Menus: Don't prime nav menu items cache if a persistent cache is being used.
Amends [14560].
Props david.binda.
See #12734.
Fixes #41662.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 22:40:50 +00:00
Mel Choyce
94e74066e9 About Page: Revised strings to be easier to translate.
Props kristastevens, Presskopp, swissspidy.
See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 22:24:47 +00:00
Peter Wilson
339d838475 Comments: Check if wp_new_comment() returns an error.
Adds checks throughout to allow for `wp_new_comment()` returning a `WP_Error` instance.

Updates the docs for the `pre_comment_approved` filter to include that it can be passed an error.

Props enrico.sorcinelli, ryotsun.
Fixes #39730.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 22:12:51 +00:00
Weston Ruter
29d213cfbd REST API: Allow passing existing template value for posts even when template no longer exists.
Also remove `enum` for validating allowed templates to allow plugins to dynamically supply their own templates for specific posts, even when they are not in the theme.

Props TimothyBlynJacobs, jnylen0, swissspidy.
Fixes #39996.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 22:11:46 +00:00
Aaron Jorbin
b8fc8cb59c Dashboard: Remove "Try Gutenberg" callout.
Reverting this for 4.9. It will be added back in a future version of WordPress. This doesn't mean that you shouldn't be trying Gutenberg, just that it isn't ready for a call out to a larger audience. But if you are the type to read commit messages, https://github.com/WordPress/gutenberg could use your pull requests and comments on issues.

Reverts [41931] [41900] [41896] [41895]
See #41316


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


git-svn-id: http://core.svn.wordpress.org/trunk@41812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 20:48:47 +00:00
Weston Ruter
c364743d35 Code Editor: Add underscore as a dependency for the code-editor script.
Amends [41376].
See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 20:38:47 +00:00
Pascal Birchler
74fc7efbae Themes: Add files missed in [41975].
See #41717.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 20:23:49 +00:00
Pascal Birchler
8222b85aa2 Themes: Show templates from both parent and child theme when calling WP_Theme::get_post_templates().
Props birgire for initial patch.
Fixes #41717.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 20:08:47 +00:00
Weston Ruter
0343b1a2c8 Code Editor: Keep linting and its error reporting configured when lint option is changed dynamically.
Also explicitly disable `lint` option for SCSS and LESS.

See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 19:55:46 +00:00
Konstantin Obenland
91ad9114d0 Customize: Ease extendability of filter drawer
By moving the `wporg` conditional inside the method body, the filter drawer can be overridden without having to also override the entire section template.

Props celloexpressions.
Closes #42212.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 18:58:46 +00:00
Andrea Fercia
69518459e6 Customize: Make sure the FTP credentials modal is visible.
The customizer and the theme installer use `visibility: hidden` on the body when
they open full-overlays screens. The FTP credentials modal needs a visibility
property set back to `visible` to be visible over those overlays.

Props purnendu.
Fixes #42205.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 17:54:53 +00:00
Sergey Biryukov
703713756a Tests: Fix typo in test_do_action_with_multiple_callbacks_on_different_priorities().
Props withinboredom.
Fixes #42311.
Built from https://develop.svn.wordpress.org/trunk@41971


git-svn-id: http://core.svn.wordpress.org/trunk@41805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 13:04:49 +00:00
Peter Wilson
ca45ec136f Build/Test tools: Move wp_doing_ajax defintion from class setup to test setup.
Moves defintion of ajax request in `WP_Ajax_UnitTestCase` to `setUp()` method to account for hooks being reset as part of `tearDown()`.

Props matthias.thiel for report.
Fixes #41561.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 05:11:47 +00:00
Weston Ruter
990c6d5a42 Customize: Keep frontend preview link updated to reflect the current state of previewed URL, active theme, and autosaved state.
See #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-23 00:41:47 +00:00
Weston Ruter
5e7e44aba7 Customize: Update 'Save & Activate' reference to 'Publish & Activate' in themes help tab text.
See #39896.
Fixes #42305.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-22 20:03:51 +00:00
John Blackbourn
74cf14cdf3 Docs: Correct docs introduced in [41965].
See #16778

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


git-svn-id: http://core.svn.wordpress.org/trunk@41801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 22:42:51 +00:00
Dion Hulse
cb1b49bca5 Tests: Return an exit code of 1 in the event that the database server for tests is unavailable.
This allows for automated scripts & test suites to handle the failure of the test suite easier.

Props danielbachhuber
Fixes #41916

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


git-svn-id: http://core.svn.wordpress.org/trunk@41800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 14:14:48 +00:00
Gary Pendergast
8608b710b7 Docs: Expand the docs for the core_version_check_query_args filter.
Add documentation for the parameters in the `$query` parameter.

Props MattyRob.
Fixes #16778.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 13:46:50 +00:00
Gary Pendergast
0847fab645 Media: Don't backdate media uploaded to pages.
When media is uploaded to a post, the upload directory is set according to the date of the post, so that the media URLs in the post match when the post was published.

A page is a slightly different beast, pages often live for years, and are regularly updated to stay relevant. This change causes media uploaded to pages to use the upload date to determine the upload directory.

Fixes #10752.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 13:27:48 +00:00
Dion Hulse
26f9c6b909 Transients: Clear expired transients from the database in a daily cron task.
Fixes #41699

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


git-svn-id: http://core.svn.wordpress.org/trunk@41797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 13:22:49 +00:00
Gary Pendergast
f7fcb2cd5b Updates: Add the core_version_check_query_args filter.
This filter allows the data being sent for core update checks to be controlled for privacy concerns.

Props toscho, MattyRob, swissspidy, pento.
Fixes #16778.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 11:55:47 +00:00
Weston Ruter
0c1c0980e7 Customize: Improve back-compat for wp.customize.Control subclasses that expect options.params to be present for direct manipulation before calling parent initialize method.
Fixes known incompatibility with Make theme.

Amends [41726].
See #30741.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 08:51:48 +00:00
Weston Ruter
1f735509af Customize: Allow control subclasses to add to the deferred object before the base class initializes.
Update the `CodeEditorControl`'s `codemirror` deferred to be set before calling the parent class's `initialize` method. Since the `ready` method may be called directly by `initialize` it may be too late to add a new `Deferred` to the control's `deferred` property after calling the base control class's `initialize`.

Amends [41958].
See #41897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 08:44:52 +00:00
Sergey Biryukov
45655bb928 Docs: Document $wp_version global in wp_initial_constants().
Props mt8.biz.
Fixes #42259.
Built from https://develop.svn.wordpress.org/trunk@41959


git-svn-id: http://core.svn.wordpress.org/trunk@41793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 22:04:56 +00:00
Weston Ruter
47c555f8ed Customize: Add codemirror deferred object to CodeEditorControl which is resolved when CodeMirror is initialized.
CodeMirror gets initialized once the control's containing section is expanded. The deferred will be rejected if user preference for syntax highlighting is disabled.
Also move jsdoc from `wp.customize.Control` to intended `wp.customize.Control#initialize()`.

See #41897, #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 21:48:46 +00:00
Weston Ruter
81c87e7d5e Code Editor: Improve ability to create Customizer CodeEditorControl instances in JS, lessening PHP dependencies.
Allow `CodeEditorControl` to be instantiated with a `editor_settings` param which is merged with `wp.codeEditor.defaultSettings`.

Also:

* Turn redundant "CSS Code" control label into screen reader text for Additional CSS.
* Remove `code-editor` as script dependency for `custom-html-widgets` since enqueueing is determined by `wp_enqueue_code_editor()`.
* Remove useless exporting of `code_type` param to JS in `WP_Customize_Code_Editor_Control`.
* Add `disabled` class to Custom HTML widget's Save button when linting errors are present.
* Remove redundant `span` inside CodeEditorControl's `label`.

See #41897, #12423, #41872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 16:39:48 +00:00
Sergey Biryukov
33012ad740 Customize: Use typographic quotation marks in the strings added in [41768].
Props audrasjb, tobifjellner.
Fixes #42290. See #40104.
Built from https://develop.svn.wordpress.org/trunk@41956


git-svn-id: http://core.svn.wordpress.org/trunk@41790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 14:07:47 +00:00
Sergey Biryukov
f80db51d0f Menus: Remove an extra space in the <ul> tag in Walker_Nav_Menu::start_lvl().
Fixes #42289.
Built from https://develop.svn.wordpress.org/trunk@41955


git-svn-id: http://core.svn.wordpress.org/trunk@41789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 10:40:46 +00:00
Mel Choyce
d31ab27d26 Customize Menus: Update capitalization of "next" to match case on the "Next" button.
Props hardeepasrani.
Fixes #42287.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 10:34:49 +00:00
Mel Choyce
4d41bf7127 Customization Locking: Update error message to use existing strings.
Props ramiy.
See #42024.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 10:32:53 +00:00
Weston Ruter
a402312a8d Customize: Prevent using default template for a base control when it has content rendered on the server.
Also prevent invalid `type` attribute from being added to a `select` element.

See #30738.
Fixes #42286.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-20 03:30:46 +00:00
Weston Ruter
6913ad9219 Widgets: Improve extensibility of the Gallery widget and of media widgets generally.
* Introduce a `widget_{$id_base}_instance_schema` filter for plugins to add new properties to a media widget's instance schema.
* Pass all of a gallery widget's instance props to the gallery media frame, not just the ones that core supports.

See #32417, #41914.
Fixes #42285.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 23:44:48 +00:00
Weston Ruter
ea21ad6cc1 Customize: Prevent re-highlighting "Add Items" button after available nav menu items pane has already been opened.
Amends [41930].
Props bpayton.
See #42114.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 18:38:47 +00:00
Weston Ruter
c8105f1460 Customize: Fix alignment of Customize, Activate, and Live Preview buttons appearing on the Themes admin screen.
Amends [41893].
Props Mahvash-Fatima.
See #42215.
Fixes #42275.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 18:10:47 +00:00
Weston Ruter
d695648084 Customize: Fix rendering issues in theme browsing when opening theme details or performing search in Safari.
Props sayedwp.
See #37661.
Fixes #42052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 17:57:47 +00:00
Weston Ruter
b1a9139b46 Customize: Prevent drawing attention to save button if status unchanged from publish; account for changes to status/date when alerting about unsaved changes.
Also fix malformed ESLint directive from [41933].

Amends [41932].
See #39896, #42211.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 17:42:54 +00:00
Gary Pendergast
609da14d59 About page: Update the privacy policy dashes.
If one were to insert 1—3 dashes into a sentence - on purpose - they should use the correct da–
sh.

See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 15:36:47 +00:00
John Blackbourn
06eba419fe Build/Test tools: Document the return value of WP_UnitTestCase::factory().
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 15:33:48 +00:00
Gary Pendergast
31a3c8e744 About page: Update the privacy policy language.
See #40794.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 15:26:48 +00:00
Mel Choyce
02ff01d331 About Page: Commit initial strings for 4.9.
Props kristastevens, dd32, hlashbrooke.
See #42087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 13:57:48 +00:00
Sergey Biryukov
3aa0c23274 Docs: After [37329], update the documentation for register_widget() and unregister_widget().
Both functions can accept a `WP_Widget` instance object instead of a `WP_Widget` subclass name, same as `WP_Widget_Factory::register()` and `::unregister()`.

Props behzod.
Fixes #42270.
Built from https://develop.svn.wordpress.org/trunk@41942


git-svn-id: http://core.svn.wordpress.org/trunk@41776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 13:51:50 +00:00
Sergey Biryukov
1accb992f8 Menus: Pass $recent_args parameter to nav_menu_items_{$post_type_name}_recent filter.
Props welcher, eclev91.
Fixes #39849.
Built from https://develop.svn.wordpress.org/trunk@41941


git-svn-id: http://core.svn.wordpress.org/trunk@41775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 13:05:55 +00:00
Sergey Biryukov
9c4fb24458 Docs: Reference WP_Comment_Query::__construct() as the source of information on accepted arguments in get_comments() and get_approved_comments().
See #41017.
Built from https://develop.svn.wordpress.org/trunk@41940


git-svn-id: http://core.svn.wordpress.org/trunk@41774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 08:49:47 +00:00
Weston Ruter
bdefa6bf34 Post WordPress 4.9 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@41939


git-svn-id: http://core.svn.wordpress.org/trunk@41773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 05:08:48 +00:00
Weston Ruter
0ae160dec1 WordPress 4.9 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@41938


git-svn-id: http://core.svn.wordpress.org/trunk@41772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 04:43:48 +00:00
Joe McGill
d21f6799a6 Customizer: Improve handling of crops in the media library.
This is a follow up on r41732, implementing the following improvements:

* Attachment parent info is now stored in attachment meta rather than a 
separate post meta key.
* Attachments created from contextual crops (e.g. header, logos, etc.) are
filtered out of the media library using a new `_filterContext` method in
`wp.media.controller.Library`.

Props joemcgill, westonruter.
See #21819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 04:18:47 +00:00
Weston Ruter
20aad6b5c5 Customize: Consistently use input_attrs as control param key in JS instead of inputAttrs.
See #30738, #41897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 03:25:47 +00:00
Weston Ruter
f8d16c8aed Customize: Move control's fallback selection of default content template to renderContent method to align with sections and panels.
* Only use default control content template when a more specific template doesn't exist.
* Remove extraneous whitespace from being output in `WP_Customize_Control::render()` method.
* Move Custom Header template printing to `customize_controls_print_footer_scripts` action.

See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 03:04:49 +00:00
Sergey Biryukov
c81acd7cef I18N: Unify permission error message in wp-admin/ms-delete-site.php.
Props ramiy.
Fixes #42268.
Built from https://develop.svn.wordpress.org/trunk@41934


git-svn-id: http://core.svn.wordpress.org/trunk@41768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 00:48:50 +00:00
Weston Ruter
887998f7ed Widgets: Harden logic for checking for valid media URLs.
* Update deprecated `isHostedVideo` method to always return `true` since all oEmbeds are now supported.
* Disable `scanImage` for non-image media widgets.
* Ensure embed URL field element is matched from current media frame instance due to bug where media frames are not destroyed upon closing.
* Update error message for invalid video URLs to ask user to check the URL for validity.

Props gk.loveweb, octalmage, westonruter.
See #42039, #40935.
Fixes #41052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 00:07:54 +00:00
Weston Ruter
ed686152f5 Customize: Draw attention to save button after collapsing the publish settings section when the changeset status or date had been changed.
Props bpayton, westonruter.
See #42114, #39896.
Fixes #42211.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 23:06:49 +00:00
Sergey Biryukov
15c8976cc4 Dashboard: Add missing URL to "Help with testing" link in Gutenberg callout.
See #41316.
Built from https://develop.svn.wordpress.org/trunk@41931


git-svn-id: http://core.svn.wordpress.org/trunk@41765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 22:41:46 +00:00
Weston Ruter
b65d6eb680 Customize: Draw attention to "Add Items" button after creating a new menu.
Introduce `wp.customize.utils.highlightButton()` and `wp.customize.Menus.MenuSection#highlightNewItemButton()`.

Props bpayton, melchoyce, afercia, westonruter.
Fixes #42114.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 22:00:50 +00:00
Sergey Biryukov
71dca590dc Build/Test Tools: Clean up $_REQUEST and $GLOBALS after modifying them in _test_list_hierarchical_page().
Props birgire.
Fixes #42044.
Built from https://develop.svn.wordpress.org/trunk@41929


git-svn-id: http://core.svn.wordpress.org/trunk@41763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:48:48 +00:00
Sergey Biryukov
0f06f90341 Rewrite Rules: Remove redundant if condition in extract_from_markers().
Props Dency, yahil, appchecker.
Fixes #39920.
Built from https://develop.svn.wordpress.org/trunk@41928


git-svn-id: http://core.svn.wordpress.org/trunk@41762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:28:46 +00:00
Sergey Biryukov
0afafb7a1b I18N: Unify error messages in XML-RPC methods wp_deleteCategory() and wp_deleteComment().
Props ramiy.
Fixes #39019.
Built from https://develop.svn.wordpress.org/trunk@41927


git-svn-id: http://core.svn.wordpress.org/trunk@41761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:12:51 +00:00
Sergey Biryukov
50db4bceb0 Administration: After [41120], check for a registered action before sending a Bad Request HTTP response status code.
Props Clorith.
Fixes #42240.
Built from https://develop.svn.wordpress.org/trunk@41926


git-svn-id: http://core.svn.wordpress.org/trunk@41760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 21:01:49 +00:00
Sergey Biryukov
469e37446e Menus: Remove unnecessary top margin for menu item type on Menus screen for correct alignment with the dropdown icon.
Props punit5658.
Fixes #41521.
Built from https://develop.svn.wordpress.org/trunk@41925


git-svn-id: http://core.svn.wordpress.org/trunk@41759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 20:52:49 +00:00
Sergey Biryukov
d2499c4212 Network Admin: After [41923], move the second <p> tag to a new line for better readability.
See #41652.
Built from https://develop.svn.wordpress.org/trunk@41924


git-svn-id: http://core.svn.wordpress.org/trunk@41758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 20:51:48 +00:00
Sergey Biryukov
a749494900 I18N: Remove hardcoded constant from a translatable string in network_step1().
Props ramiy.
Fixes #41652.
Built from https://develop.svn.wordpress.org/trunk@41923


git-svn-id: http://core.svn.wordpress.org/trunk@41757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 20:02:50 +00:00
Sergey Biryukov
73dc2a45e3 Docs: Document $ini_all staticvar in wp_is_ini_value_changeable().
Props nileshdudakiya94.
Fixes #41399.
Built from https://develop.svn.wordpress.org/trunk@41922


git-svn-id: http://core.svn.wordpress.org/trunk@41756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 19:54:48 +00:00
Sergey Biryukov
106beec6a7 I18N: Combine two "Warning" strings in network_step1() and network_step2().
Props ramiy.
Fixes #38570.
Built from https://develop.svn.wordpress.org/trunk@41921


git-svn-id: http://core.svn.wordpress.org/trunk@41755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 19:50:47 +00:00
Sergey Biryukov
eac62c8da0 Date/Time: Use delta comparison in get_gmt_from_date() tests to avoid race conditions.
Props keesiemeijer.
Fixes #38815.
Built from https://develop.svn.wordpress.org/trunk@41920


git-svn-id: http://core.svn.wordpress.org/trunk@41754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 19:42:48 +00:00
Weston Ruter
9cb9695104 Customize: Fix visibility of overlay notifications in Safari.
Props sayedwp, westonruter.
Amends [41390].
See #35210, #42024, #42052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:14:37 +00:00
Felix Arntz
4cb1026757 Multisite: Document all return types in get_networks().
Adds more complete documentation to get_networks() and the corresponding methods in WP_Network_Query.

Fixes #42260.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:13:50 +00:00
Sergey Biryukov
0fc7597032 Docs: Document $default_scripts parameter in _WP_Editors::enqueue_scripts().
Props danieltj, ajayghaghretiya1.
Fixes #41322.
Built from https://develop.svn.wordpress.org/trunk@41917


git-svn-id: http://core.svn.wordpress.org/trunk@41751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:09:47 +00:00
Sergey Biryukov
a28bd1d36c Plugins: Revert unintended change from [41915].
See #37430.
Built from https://develop.svn.wordpress.org/trunk@41916


git-svn-id: http://core.svn.wordpress.org/trunk@41750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 18:01:49 +00:00
Sergey Biryukov
936bf3661f Plugins: After [41608], make the markup in WP_Plugin_Install_List_Table::no_items() a bit more readable.
See #37430.
Built from https://develop.svn.wordpress.org/trunk@41915


git-svn-id: http://core.svn.wordpress.org/trunk@41749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:58:48 +00:00
Sergey Biryukov
4dd637acde Docs: Add @since entry for WP_Automatic_Updater::after_core_update(), introduced in [25841].
See #41017, #29086.
Built from https://develop.svn.wordpress.org/trunk@41914


git-svn-id: http://core.svn.wordpress.org/trunk@41748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:48:49 +00:00
Weston Ruter
ae538512c3 Widgets: Fix previewing embeds in Text widget by allowing parse-embed admin ajax requests with an empty post_ID just as WP_oEmbed_Controller::get_proxy_item_permissions_check() allows.
As of #34115 if there is no post context the oEmbed will be cached in an `oembed_cache` custom post type, so having a post as context is no longer a requirement for caching.

Props biskobe, westonruter.
See #34115, #40450.
Fixes #40854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:40:49 +00:00
Jeremy Felt
548d8c2e0d Multisite: Document all return types in get_sites().
Adds more complete documentation to `get_sites()` and the corresponding methods in `WP_Site_Query`.

Fixes #41789.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:39:46 +00:00
Sergey Biryukov
53dba84ec7 I18N: Remove <a> tag from a translatable string in confirm_another_blog_signup().
Props ramiy.
Fixes #41694.
Built from https://develop.svn.wordpress.org/trunk@41911


git-svn-id: http://core.svn.wordpress.org/trunk@41745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:36:50 +00:00
Sergey Biryukov
3951984680 I18N: Remove <b> tag from a translatable string in post_submit_meta_box().
Props ramiy.
Fixes #41681.
Built from https://develop.svn.wordpress.org/trunk@41910


git-svn-id: http://core.svn.wordpress.org/trunk@41744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:31:48 +00:00
Sergey Biryukov
6b2a4c4574 I18N: Remove <strong> tag from a translatable string in Theme_Upgrader::install_strings().
Props ramiy.
Fixes #41695.
Built from https://develop.svn.wordpress.org/trunk@41909


git-svn-id: http://core.svn.wordpress.org/trunk@41743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:20:48 +00:00
Sergey Biryukov
2b9e8abd8f I18N: Remove <code> tags from translatable strings in Core_Upgrader, Language_Pack_Upgrader, Plugin_Upgrader, Theme_Upgrader.
Props ramiy.
Fixes #41705.
Built from https://develop.svn.wordpress.org/trunk@41908


git-svn-id: http://core.svn.wordpress.org/trunk@41742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:15:47 +00:00
Sergey Biryukov
fb8d73a0f7 Docs: Correct type and description for the $data parameter in WP_Http::browser_redirect_compatibility().
Fixes #41380.
Built from https://develop.svn.wordpress.org/trunk@41907


git-svn-id: http://core.svn.wordpress.org/trunk@41741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 16:38:48 +00:00
Sergey Biryukov
f9ff030127 I18N: Replace hardcoded file name in a translatable string in convert_to_screen() with a placeholder.
Props ramiy.
Fixes #41668.
Built from https://develop.svn.wordpress.org/trunk@41906


git-svn-id: http://core.svn.wordpress.org/trunk@41740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:46:52 +00:00
Sergey Biryukov
82dd23d36f I18N: Make context for "Schedule" string added in [41898] more accurate.
Props ocean90.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@41905


git-svn-id: http://core.svn.wordpress.org/trunk@41739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:39:52 +00:00
Sergey Biryukov
16bee559d4 I18N: Replace hardcoded file name in translatable strings in wp-admin/setup-config.php with a placeholder.
Props ramiy, danieltj.
Fixes #42161.
Built from https://develop.svn.wordpress.org/trunk@41904


git-svn-id: http://core.svn.wordpress.org/trunk@41738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:27:53 +00:00
Konstantin Obenland
d8f98b3649 Customize: Unstick filter pane in Theme selector
Prevents the filter pane from blocking the view of theme search results when it's open.
Users are now able to just scroll to view results.

Props rclations.
Fixes #42212.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:11:46 +00:00
Sergey Biryukov
ac5096d8bd Embeds: Avoid "Division by zero" warning in embed-content.php template if a thumbnail has a zero height.
Props stevenlinx, aegis123.
Fixes #40931.
Built from https://develop.svn.wordpress.org/trunk@41902


git-svn-id: http://core.svn.wordpress.org/trunk@41736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:09:48 +00:00
Sergey Biryukov
a859b46e92 I18N: Replace function name in error message in WP_Http_Curl::request() and WP_Http_Streams::request() with a placeholder.
Props ramiy.
Fixes #41666.
Built from https://develop.svn.wordpress.org/trunk@41901


git-svn-id: http://core.svn.wordpress.org/trunk@41735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 15:04:51 +00:00
Gary Pendergast
a2bd3e23d1 Dashboard: Ensure the "Dismiss" button on the Gutenberg callout is clickable.
Who likes z-index? We like z-index!

Props joemcgill.
See #41316.



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


git-svn-id: http://core.svn.wordpress.org/trunk@41734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 14:55:48 +00:00
Konstantin Obenland
261f0d8ef2 Customize: Allow menu creation in locations pane
Adds a link to the menu creation workflow from the locations selector in the nav menu control.

Props bpayton, westonruter, Travel_girl, melchoyce, celloexpressions.
Fixes #36279.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 14:51:47 +00:00
Sergey Biryukov
97bab0459a I18N: Add a context for "Schedule" string.
Props Mirucon.
Fixes #42165.
Built from https://develop.svn.wordpress.org/trunk@41898


git-svn-id: http://core.svn.wordpress.org/trunk@41732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 14:45:51 +00:00
Mel Choyce
0c73d35816 Code Editors: Fix display of "help" cursor.
Props studionashvegas .
Fixes #42210.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 13:11:49 +00:00
Gary Pendergast
df8ab820ef Dashboard: Remove a rogue comma introduced in [41895].
See #41316.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 12:39:46 +00:00
Gary Pendergast
3981736cd6 Dashboard: Introduce a "Try Gutenberg" callout.
To encourage more people to try Gutenberg, this new Dashboard box allows site users to easily install and try out Gutenberg.

Props pento, melchoyce, joen, karmatosed.
Fixes #41316.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 10:04:47 +00:00
Weston Ruter
e914c0447c Customize: Add missing filter docs in WP_Customize_Nav_Menu_Item_Setting::sanitize().
Props dlh.
Fixes #42257.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 04:57:50 +00:00
Weston Ruter
43b4a2577d Customize: Improve theme browsing UI on small screens.
Props Mahvash-Fatima, melchoyce, celloexpressions.
See #37661.
Fixes #42215.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 04:06:47 +00:00
Weston Ruter
41bb2125b0 Customize: Remove incorrect test assertions for the post_date of customization drafts.
Amends [41887].
See #42220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 02:41:49 +00:00
Weston Ruter
b4edf21599 Media: Add missing mediaelement-migrate.js script to get uglified.
Amends [41877].
See #42189, #39686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 02:26:48 +00:00
Weston Ruter
7ee77760af Widgets: Use a foreach loop instead of The Loop to iterate over posts in Recent Posts widget to avoid needing to reset a polluted global $post.
Props welcher, westonruter.
Amends [14607].
See #12320.
Fixes #37312.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 00:34:46 +00:00
Weston Ruter
dce5306603 Media: Use user locale as ME.js language in admin and add mejsL10n inline script before mediaelement-core so WP-exported translation strings are used.
See #39686.
Fixes #42241.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 00:08:45 +00:00
David A. Kennedy
b6539fb5a0 Twenty Seventeen: Fix double bottom-margins below embeds
Corrects an issue where both the containing paragraph and embed had bottom margins, causing unwanted extra space.

Props westonruter.

Fixes #42118.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-17 22:50:51 +00:00
Weston Ruter
bd9d1d9178 Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled.
* Update stubs to have draft status when changeset is saved as draft, instead of preventing auto-draft garbage collection by giving them a far-future `post_date`.
* Show notice in publish metabox when editing a customization draft indicating that it will be published automatically with its changeset; a link to Customizer is included.
* Include a new "Customization Draft" display post state in the post list table.
* Disconnect stubs from their changesets when they are updated with a status other than "Draft".
* Trash customization drafts when their related changeset is trashed or deleted.
* Add a `_customize_changeset_uuid` postmeta to stubs to link them with their associated changeset.
* Include `customize_changeset_uuid` as context when requesting to insert a new auto-draft.

Props westonruter, melchoyce.
See #39896, #39752, #34923.
Fixes #42220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-17 20:15:52 +00:00
Weston Ruter
955d5b0ab1 Widgets: Prevent MediaElement.js player from overflowing sidebar in Audio widget.
Props bradyvercher.
See #39686.
Fixes #42244.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 23:02:47 +00:00
Felix Arntz
021afced82 Role/Capability: Prevent a fatal error when checking a language capability early or in the frontend.
The meta capabilities `install_languages` and `update_languages` rely on the admin function `wp_can_install_language_pack()`. That function in turn relies on `request_filesystem_credentials()`, so it needs to be ensured that this function is available as well.

Fixes #42230.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:54:57 +00:00
Felix Arntz
3f8621b632 Multisite: Revert [41698] and [41743].
In order for `get_site_by()` to be truly beneficial, caching in `WP_Site_Query` needs to be improved to account for common use-cases and have them be invalidated less aggressively.

See #40180, #40228, #42091.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:35:47 +00:00
Felix Arntz
18789739c1 Multisite: Revert [41719].
While `get_site_by()` makes sense as a more explicit and less complex replacement for `get_blog_details()`, it is not ready yet in terms of caching, where it currently falls short of the older function under specific circumstances.

See #40180, #40228.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 22:29:48 +00:00
Helen Hou-Sandí
bb66a52a14 Code Editors: Minor style improvements.
props melchoyce.
see #42214.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 21:36:48 +00:00
Boone Gorges
af960204b6 Taxonomy: Add note about $number inconsistency to WP_Term_Query docs.
Fixes #41796.
Built from https://develop.svn.wordpress.org/trunk@41881


git-svn-id: http://core.svn.wordpress.org/trunk@41715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:38:48 +00:00
Boone Gorges
9f73875705 Don't force distinct term queries when specifying number and object_ids.
This reverts [41377], which caused performance problems on sites with a large
number of terms.

See #41796.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:35:47 +00:00
John Blackbourn
24783cfc3e Media: Allow the unminified mediaelement script to be enqueued when SCRIPT_DEBUG is true.
Props dsawardekar
Fixes #42229

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


git-svn-id: http://core.svn.wordpress.org/trunk@41713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:15:47 +00:00
Andrea Fercia
575e60e96c Administration: Improve consistency of the "not found" strings.
Partially reverts [41608] restoring the original strings without the word `query`.

See #37430.
Fixes #42231.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:14:48 +00:00
Weston Ruter
2e602a8560 Media: Add MediaElement.js 2.2 back-compat for MediaElement.js 4.2
* Introduces `mediaelement-migrate.js`.
* Upgrades ME.js from 4.2.5-74e01a40 to 4.2.6-78496d1.

Props rafa8626, bradyvercher.
See #39686.
Fixes #42189.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:07:52 +00:00
Andrea Fercia
4085a1b266 Accessibility: Improve the File Editors interstitial warning.
The warning displayed upon first visit on the File Editors introduced in [41774]
needs to be the only perceivable content in the page for users of assistive
technologies. It looks like a modal but it's not exactly an ARIA dialog, not an
ARIA alert either, and needs some special treatment.

- constrains tabbing within the modal
- uses `wp.a11y.speak()` to make screen readers announce the modal message
- hides all the other page content from assistive technologies using `aria-hidden="true"`

This way, even if users miss the speak message, the warning is actually the only
perceivable content in the page.

Fixes #42110.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 17:59:52 +00:00
Jeremy Felt
e362e61ae5 Multisite: Explicitly globalize global variables in ms-settings.php.
Explicitly globalize and document `$domain`, `$path`, `$site_id`, and `$public` in `ms-settings.php.

Props csloisel, danielbachhuber.
Fixes #39419.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 17:06:48 +00:00
Sergey Biryukov
a88704d026 Administration: Remove punctuation from the link text in "Site Address" option description.
Props Presskopp.
Fixes #42190.
Built from https://develop.svn.wordpress.org/trunk@41874


git-svn-id: http://core.svn.wordpress.org/trunk@41708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 14:02:50 +00:00
Weston Ruter
862e8c1807 Customize: Use keydown instead of keyup for listening for enter key to add page stub via dropdown-pages control.
Fixes issue with Japanese input.

Props miyauchi.
Amends [38906].
See #34923.
Fixes #42233.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 07:57:48 +00:00
Weston Ruter
4150e805d7 Widgets: Update preview for Gallery widget when one of its attachments is modified in the media modal, outside the customized state.
* Ensure that changes to captions are shown in preview when modified in media modal.
* Also keep `wp.customize.widgetsPreview.renderedWidgets` updated when widgets are added or removed.

See #41914, #37887, #40403.
Fixes #41979.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 06:46:48 +00:00
Weston Ruter
94f9c7e789 Customize: Prevent theme details modal from being clipped in Safari.
Props afercia.
See #42052, #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 04:41:45 +00:00
Sergey Biryukov
c79492540a Build/Test Tools: Pass correct $message argument to WP_UnitTestCase::setExpectedException() in Tests_Ajax_CompressionTest::test_logged_out() and Tests_Ajax_TagSearch::test_no_results().
PHPUnit 6.4.1 and earlier versions ignored the `'0'` value, causing the issue to go unnoticed.

Fixes #42232.
Built from https://develop.svn.wordpress.org/trunk@41870


git-svn-id: http://core.svn.wordpress.org/trunk@41704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 04:06:49 +00:00
Weston Ruter
2e184426c0 Customize: Add 'save-request-params' event on wp.customize for plugins to inject/modify params in save requests.
Allows feature plugins, for example, to supply a `customize_changeset_title` param instead of having to wrap `wp.customize.previewer.query`.

Props dlh.
Fixes #42206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 22:42:48 +00:00
Weston Ruter
12f647679b Widgets: Rename "Custom Menu" widget to "Navigation Menu".
Props gk.loveweb, ChrisHardie, ajayghaghretiya1, melchoyce.
Fixes #40442.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 22:23:47 +00:00
Sergey Biryukov
46ff957961 Widgets: Move empty title checks out of the apply_filters( 'widget_title' ) calls for clarity.
See #42226.
Built from https://develop.svn.wordpress.org/trunk@41867


git-svn-id: http://core.svn.wordpress.org/trunk@41701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 21:43:47 +00:00
Sergey Biryukov
0ae79ece9f Widgets: In WP_Widget_Media, apply widget_title filter regardless of whether the title is empty, same as other widgets do.
Props Bsop.
Fixes #42226.
Built from https://develop.svn.wordpress.org/trunk@41866


git-svn-id: http://core.svn.wordpress.org/trunk@41700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 21:29:51 +00:00
Weston Ruter
ad8c9f0170 File Editor: Move inline to external style to fix extra padding in RTL page direction.
Props afercia.
Fixes #42221.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 05:51:49 +00:00
Weston Ruter
191beede5e File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
Props afercia.
Fixes #24048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 05:37:51 +00:00
Weston Ruter
8562e4bfac Customize: Fix visibility of theme browser header in Safari.
Props benoitchantre, afercia.
See #42052, #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 04:59:10 +00:00
Felix Arntz
e4550efbb7 Multisite: Return get_current_blog_id() value instead of hard-coded 1 in get_main_site_id() for non-multisite environments.
See #41936.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:46:48 +00:00
Felix Arntz
5ea3d62192 Multisite: Take WP_Network::$blog_id into account in get_main_site_id().
When the `WP_Network::$blog_id` property is set manually, for example in the multisite bootstrap process, `get_main_site_id()` should use that value instead of running its own logic. The main logic for the function was therefore moved into the internal `WP_Network::get_main_site_id()` method, which is now being accessed by the function through the magic property handling for `WP_Network::$blog_id` (and its equivalent `WP_Network::$site_id`).

Props spacedmonkey, jeremyfelt.
Fixes #41936.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:42:54 +00:00
Weston Ruter
24d304a0a1 Customize: Fix positioning of device-previewed window when publish settings are open.
* Update date control padding.
* Collapse publish settings section when opening panes for available widgets or nav menus.
* Remove save and cog buttons in mobile preview only mode.
* Move definition of `wp.customize.previewedDevice` to `wp.customize.state('previewedDevice')` for centralization, maintaining old alias.
* Remove unused CSS because the section is inside form now.

Props sayedwp, westonruter.
See #39896.
Fixes #42027, #42199.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 21:21:55 +00:00
Helen Hou-Sandí
e48b16d96a File editor warning: Add a "Go back" button.
see #42100, #31779.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 20:56:50 +00:00
Weston Ruter
d975dccac9 Code Editor: Fix syntax error in PHP 5.2 and PHP 5.3 after [41855].
See #41871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 19:43:49 +00:00
Mel Choyce
e5db49d607 Settings: Widen time/day input fields on General Settings page, and move the preview onto the next line.
Props desrosj, afercia.
Fixes #41603.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:39:48 +00:00
Adam Silverstein
59c3c7ae14 Media Grid: Fix escape key sometimes failing to close details modal.
Fix an issue where the escape key would no longer close the attachment details modal after attempting to navigate over the navigation boundaries (by clicking the left arrow key on the first media item or clicking the right arrow key on the last media item). Remove a focus blur which caused the underlying Backbone View to not receive the 'keydown' event.

Props subrataemfluence, afercia.
Fixes #42180.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:21:49 +00:00
Weston Ruter
22ecf792b5 Code Editor: Add unit tests for wp_enqueue_code_editor() and WP_Widget_Custom_HTML.
Props ryotsun.
See #12423.
Fixes #41871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 17:58:46 +00:00
Mel Choyce
af6d136163 Improve File Credentials / Code Editor modal responsive styles.
Makes the modal full-width and height. 

Props sami.keijonen, Mirucon, helen.
Fixes #42111.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 14:39:54 +00:00
Weston Ruter
8af4e6e3f9 Customize: Fix positioning of Preview button in mobile.
Props Mahvash-Fatima.
Fixes #42172.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 08:23:50 +00:00
Weston Ruter
d44acf01dc Code Editor: Remove keeping track of wp.codeEditor instances since unused and no removal of instances upon deletion, leading to memory leak.
See #12423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 04:34:52 +00:00
Weston Ruter
0659de4e21 File Editors: Display list of theme/plugin files in scrollable directory tree.
Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:39:47 +00:00
Gary Pendergast
95cfb7f5e4 Login: Swap bloginfo() usage for get_bloginfo().
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.

Props dlh.
Fixes #34625.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:10:48 +00:00
Boone Gorges
a1879766ed Bump 'posts' query cache incrementor when modifying postmeta.
This ensures that the `get_pages()` query cache doesn't go stale when
postmeta is modified.

Props spacedmonkey.
Fixes #40669.
Built from https://develop.svn.wordpress.org/trunk@41849


git-svn-id: http://core.svn.wordpress.org/trunk@41683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 15:20:47 +00:00
Boone Gorges
0fce77da25 Invalidate comment query cache when modifying comment meta.
Comment queries are sensitive to comment meta due to the `meta_query`
parameter, so the cache must be invalidated when comment meta is changed,
added, or deleted.

Props spacedmonkey.
See #40669.
Built from https://develop.svn.wordpress.org/trunk@41848


git-svn-id: http://core.svn.wordpress.org/trunk@41682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 14:59:47 +00:00
Weston Ruter
3bfe1f6c21 Post WordPress 4.9 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@41847


git-svn-id: http://core.svn.wordpress.org/trunk@41681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 06:25:48 +00:00
Weston Ruter
2601b16e76 WordPress 4.9 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@41846


git-svn-id: http://core.svn.wordpress.org/trunk@41680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:43:47 +00:00
Weston Ruter
39a2308a94 Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
Fixes #42173.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:17:49 +00:00
Gary Pendergast
af83fe7fb9 Editor: Improve the accuracy of the list of shortcodes that the word count ignores.
Previously, shortcodes were being counted when the `init` action fired, even though it's possible for shortcodes to be registered later than that.

By leaving the counting until just before the script is printed, we get a more accurate list of shortcodes.

Props ocean90.
Fixes #41917.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:10:50 +00:00
Gary Pendergast
a9d38090ac Login: On the single site login screen, match the logo link text with the title.
Previously, the (W) logo on the single site login screen linked to wordpress.org, with an appropriate `title` attribute, but the link text was the blog name.

To fix this discrepency, the link text is now the same as the `title` attribute.

Props pento, obrienlabs, afercia, flixos90, lukecavanagh, and the infinite stack of bikesheds that WordPress is balanced upon.
Fixes #34625.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:57:46 +00:00
Weston Ruter
da565a20b9 Twenty Seventeen: Fix positioning of edit shortcuts when partials are nested inside a frontpage panel.
Fixes #41557.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:44:45 +00:00
Gary Pendergast
8cb9f6159a Build/Test Tools: Revert [41784].
[41784] was a workaround for a bug in PHPUnit 6.4. PHPUnit 6.4.1 has since been released, which includes a fix for this.

Fixes #42124.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:28:46 +00:00
Weston Ruter
663c20388b Widgets: Update default link_type for Gallery widget from none to post for consistency with wp.media.galleryDefaults.
Props bor0.
See #41914.
Fixes #41985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:21:46 +00:00
Weston Ruter
434e3aba82 Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes.
* Customization locking is checked when changesets are saved and when heartbeat ticks.
* Lock is lifted immediately upon a user closing the Customizer.
* Heartbeat is introduced into Customizer.
* Changes made to user after it was locked by another user are stored as an autosave revision for restoration.
* Lock notification displays link to preview the other user's changes on the frontend.
* A user loading a locked Customizer changeset will be presented with an option to take over.
* Autosave revisions attached to a published changeset are converted into auto-drafts so that they will be presented to users for restoration.
* Focus constraining is improved in overlay notifications.
* Escape key is stopped from propagating in overlay notifications, and it dismisses dismissible overlay notifications.
* Introduces `changesetLocked` state which is used to disable the Save button and suppress the AYS dialog when leaving the Customizer.
* Fixes bug where users could be presented with each other's autosave revisions.

Props sayedwp, westonruter, melchoyce.
See #31436, #31897, #39896.
Fixes #42024.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:01:46 +00:00
Mel Choyce
f44ed386c1 Media: Fix an issue where audio players overflow playlist containers.
Props celloexpressions.
Fixes #41844.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:55:46 +00:00
Mel Choyce
a19f05ad63 Customizer: Improve specificity of small-screen styles in Widgets panel.
Props mrasharirfan, celloexpressions.
Fixes #41614.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:53:47 +00:00
Mel Choyce
7e6748ad61 Settings: Widen image size input fields on Media Settings page.
On narrower devices, input fields are too short to fit the number of default digits they contain. This widens the fields and also breaks each height and width attribute onto a new line for better usability, using some terrible CSS trickery. My apologies.

Props: Toru, Presskopp, desrosj, xkon, ryelle, melchoyce.
Fixes #34539.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:48:47 +00:00
Gary Pendergast
5a8d166547 General: Remove .jshintrc and *.json from the 2-space-indent .editorconfig group.
JSON files don't need a particular indent style, this was just inherited from the jQuery `.editorconfig`, that we based ours on.

`package.json` is staying in the 2-space-indent group for now, due to npm 3 and 4 having issues. Upgrading to npm 5 will allow us to remove `package.json`, too.

Props netweb.
Fixes #40946.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 01:58:45 +00:00
Mel Choyce
009c3a94bb Gallery Widget: Fix row spacing across major browsers.
Props petertoi .
Fixes #42188.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 21:14:51 +00:00
Mel Choyce
71aa62101f Gallery Widget: Remove grey background behind gallery, and align images to the edge of the container.
Props Presskopp, benoitchantre, mrasharirfan.
Fixes #42101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:45:49 +00:00
Weston Ruter
2866a3cad2 Customize: Vary description for nav menu locations control based on whether it is shown during menu creation.
Also fix issue with initial visibility of notice when there are no menus.

Amends [41823].
Props bpayton, melchoyce, westonruter.
See #42116.
Fixes #42113.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:38:50 +00:00
Mel Choyce
e8922f416e TinyMCE: Remove "Unlink" icon from toolbar
Because "unlink" now appears contextually when editing a link, let's remove it from the toolbar.

Props azaozz, ahortin, swissspidy, afercia.
Fixes #36569.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:14:46 +00:00
Mel Choyce
39f3764a4b Code Editors: Improve cursor interactions on warning notices.
Fixes an issue where hovering over the warning icon didn't work if there were multiple warnings on the same line of code. Also updates the cursor from "pointer" to "help" when hovering over warnings and errors.

Props joyously, obenland.
Fixes #42129.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 18:25:46 +00:00
Gary Pendergast
a72be13ec0 Editor: Add the replace_editor filter.
This filter allows the Core editor to be replaced by an entirely different editor (coughcoughGUTENBERGcough).

Props azaozz, who is supposed to be on sabbatical right now.
Fixes #42119.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 12:06:48 +00:00
Pascal Birchler
8b4a8b6c15 Database: Add translators comment for error message in wpdb::prepare().
Props felipeelia.
Fixes #42142.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 08:35:47 +00:00
Weston Ruter
3ba66a0030 Widgets: Update video widget embed failure notice to indicate streams other than YouTube and Vimeo are allowed.
Amends [41759].
See #42039.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 06:22:47 +00:00
Weston Ruter
43801ded60 Customize: Make sure saved state is initially false when restoring autosave revision so that Save button will be enabled.
Amends [41597].
Props sayedwp.
See #39896.
Fixes #42143.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:57:48 +00:00
Weston Ruter
b2c816ff74 Customize: Correct docs for WP_Customize_Manager::changeset_uuid() after changes in [41626].
Props dlh.
Fixes #42174.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:45:46 +00:00
Weston Ruter
3f2b453a4d Customize: Introduce WP_Customize_Manager::trash_changeset_post() to reduce duplication and ensure proper changeset trashing logic.
Trashing a changeset via `wp_trash_post()` does not have the desired result since it mutates `post_content` (via Kses) and the `post_name` (even though it is a UUID).

Props dlh.
See #39896, #42030.
Fixes #42175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:42:49 +00:00
Weston Ruter
c6f2ff7a8e Customize: Add notice for when there are no nav menus created yet, prompting user to create one.
Props bpayton, melchoyce, westonruter.
Fixes #42116.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:28:52 +00:00
Weston Ruter
36f8e77b49 Customize: Prevent outputting value attribute if already supplied among input_attrs.
This allows for `input[type=button]` controls to be added without producing illegal HTML.

Amends [41740].
See #30738, #33085.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 04:26:48 +00:00
Dion Hulse
b35cf2f529 Upgrades: Remove the usage of each() from WP_Upgrader for PHP 7.2 compatibility.
Props chrisvendiadvertisingcom, dd32.
Fixes #41524

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


git-svn-id: http://core.svn.wordpress.org/trunk@41655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 04:24:50 +00:00
Gary Pendergast
fd247bc2e4 Database: When parsing the host, leave the port and socket as null if they're not defined.
This fixes a change in behaviour introduced by [41629].

The host is set to an empty string when it isn't defined, this continues existing behaviour. In particular, the mysqli library treats a `null` host as being the same as `localhost`, which is not always the intended behaviour.

Props birgire, markjaquith, pento.
Fixes #41722.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 00:10:47 +00:00
Weston Ruter
3609d0c4c5 Plugin Editor: Revert superseded changes to activate_plugin() and plugin_sandbox_scrape().
Partially revert [41671], [41561], [41560].
See #21622.
Fixes #39766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 00:03:48 +00:00
Gary Pendergast
80fd3cad0d Database: Fix a test failing on MySQL 5.7 and MariaDB 10.2.
On newer versions of MySQL, an error was being thrown when creating a table with an index that we wanted to be silently truncated.

To avoid this, the test now tries to use a newer InnoDB file format where available, and skips the test when that happens.

Props pento, danielbachhuber, straussd.
Fixes #41716.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 23:46:47 +00:00
Weston Ruter
5bde734323 Customize: Fix vertical alignment of radio and checkbox inputs after [41740].
Props Shital Patel, subrataemfluence, sayedwp.
Amends [41740].
See #33085.
Fixes #42157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 23:45:51 +00:00
Weston Ruter
c1ede53374 Customize: Fix string translations for singular vs plural after [41812].
Props felipeelia, tobifjellner, SergeyBiryukov.
See #42112.
Fixes #42170.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 21:04:49 +00:00
Weston Ruter
5123283cf7 Customize: Improve and clarify help text for Themes panel.
Props michelleweber, melchoyce, celloexpressions.
See #37661.
Fixes #42047.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 20:53:49 +00:00
Weston Ruter
6c05b7bef2 Widgets: Clear dirty flag on widgets admin screen when widget is deleted to prevent irrelevant confirmation prompt when leaving.
Props hazimayesh, felipeelia.
Amends [41352], [41813].
See #23120, #42127.
Fixes #41894.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 20:39:47 +00:00
Weston Ruter
7cb66a5353 Widgets: Allow deletion even when widget form fails validity checks.
Props felipeelia.
Amends [41352].
See #23120.
Fixes #42127.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 18:07:51 +00:00
Weston Ruter
b36fa8ce9c Customize: Adjust "Menu Locations" labels for singular/plural.
Props felipeelia.
Fixes #42112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:57:48 +00:00
Konstantin Obenland
b17b035009 Menus: Limit mapping to registered locations
Weeds out orphaned locations, so their information will not continue to be mapped to future themes.

Fixes #42121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:08:48 +00:00
Konstantin Obenland
a22bb4f3ad Customizer: Account for legacy menu data
Checks for menu location data from when a previewed theme was previously active.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 17:06:47 +00:00
Boone Gorges
8d773262f3 Taxonomy: Don't discard keys when merging queried terms from different taxonomies.
For values of `fields` like `id=>parent`, the keys of the array must be
maintained as part of the query results.

Introduced as part of #40496. See [38667], [40513].

Props miyauchi, dany2217, pcarvalho.
Fixes #41293.
Built from https://develop.svn.wordpress.org/trunk@41809


git-svn-id: http://core.svn.wordpress.org/trunk@41643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 16:45:48 +00:00
Mel Choyce
8f4e2bdb6b Customizer: Vertically center section arrows.
Props dualcube_subrata.
Fixes #42123.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 16:23:50 +00:00
Weston Ruter
7b0dbf49fc Customize: Improve behavior and extensibility of theme loading and searching.
* Introduce `WP_Customize_Themes_Section::$filter_type`, which has built-in functionality for `local` and `remote` filtering. When this set to `local`, all themes are assumed to be loaded from Ajax when the section is first loaded, and subsequent searching/filtering is applied to the loaded collection of themes within the section. This is how the core "Installed" section behaves - third-party sources with limited numbers of themes may consider leveraging this implementation. When this is set to `remote`, searching and filtering always triggers a new remote query via Ajax. The core "WordPress.org" section uses this approach, as it has over 5000 themes to search.
* Refactor `filterSearch()` to accept a raw term string as input. This enables a feature filter to be used on a section where `filter_type` is `local`.
* Refactor `filter()` on a theme control to check for an array of terms. Also sort the results by the number of matches. Rather than searching for an exact match, this will now search for each word in a search distinctly, allowing things like tags to rank in search results more accurately.
* Split `loadControls()` into two functions for themes section JS: `loadThemes()` to initiate and manage an Ajax request and `loadControls()` to create theme controls based on the results of the Ajax call. If third-party sections need to change the way controls are loaded, such as by using a custom control subclass of `WP_Customize_Theme_Control`, this allows them to use the core logic for managing the Ajax call and only override the actual control-creation process.
* Introduce `customize_load_themes` filter to facilitate loading themes from third-party sources (or modifying the results of the core sections).
* Bring significant improvements to the installed themes search filter.

Props celloexpressions.
Amends [41648].
See #37661.
Fixes #42049.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 07:09:52 +00:00
Gary Pendergast
58db3cb54e File Editor: Add support for more than one sub-directory level.
The theme and plugin editors now list all files in the selected theme or plugin, recursing through subdirectories as necessary.

Props WraithKenny, schlessera, chsxf, MikeHansenMe, Daedalon, valendesigns, westonruter, pento.
Fixes #6531.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 05:34:49 +00:00
Weston Ruter
1a22fb3b60 File Editor: Increase robustness of fatal error checking when saving PHP file edits.
* Increase PHP execution time limit prior to issuing loopback requests where are themselves given timeouts to ensure PHP file can be reverted.
* Output scrape messages on success and failure so that absence of either can also be flagged as an error condition.
* Forward browser's HTTP Basic Auth credentials in loopback requests to admin and home URL.
* Display more helpful message when loopback request fails.

Amends [41721].
See #21622.
Fixes #42102.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 05:27:49 +00:00
Weston Ruter
132c847087 Customize: Ensure customized changes pending to be written into changeset are successfully injected into Ajax requests in preview.
Amends [40704].
See #42162.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 04:51:47 +00:00
Weston Ruter
ef1c95ff91 Customize: Constrain focus when overlay notification is displayed.
* Restore previously-focused element when overlay notifications are dismissed.
* Allow notifications to be dismissed via keyboard.

Amends [41667].
See #42110, #35210, #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 03:34:53 +00:00
Weston Ruter
f462387431 Customize: Improve keyboard accessibility for publish settings section.
Props sayedwp.
See #39896.
Fixes #42027.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 23:01:46 +00:00
Konstantin Obenland
756c052ccb Menus: Add social as tertiary mapping group
Allows mapping of all social menus that include the term `social` in their slug.

See #39692.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 21:23:47 +00:00
Adam Silverstein
ca30822541 Docs: add docs for meta authorization filters.
Add filter documentation for `auth_{$object_type}_meta_{$meta_key}` and `auth_{$object_type}_{$sub_type}_meta_{$meta_key}`.

Props ericlewis, johneckman, DrewAPicture.
Fixes #36319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 19:14:52 +00:00
Weston Ruter
598e5f400e Customize: Add jsdoc for api.panel, api.section, api.control, and api.notifications collections.
Props shramee, westonruter.
Fixes #39930.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 18:56:55 +00:00
Konstantin Obenland
8911893672 Widgets: Update globals documentation.
It doesn't look like `wp_register_sidebar_widget()` ever used a global named `$wp_register_widget_defaults`. It does however make use of `$wp_registered_widget_controls` now.

See [8960], [30776].

Props upadalavipul.
Fixes #41592.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 16:35:47 +00:00
Weston Ruter
35b5c9e762 Customize: Eliminate use of customize-loader in core so Customizer is opened consistently in top window.
* Open the door for future browser history feature in #28536, which is currently not feasible when customize-loader is used.
* Remove customizer-loader from being used on admin screens for Dashboard, Themes, non-shiny theme install/update.
* Keep the customize-loader functionality available for plugins, for the time being. It may become deprecated.
* Ensure `return` param in customizer links in Themes screen update to reflect `search` updated by `pushState`.
* Persist `return` when reloading Customizer due to theme switch, autosave restoration, or changeset trashing.
* Use `location.replace()` instead of changing `location.href` when trashing.
* Hide theme browser while Themes screen is loading when there is a `search` to prevent flash of unfiltered themes.
* Use throttling instead of debouncing when searching themes to ensure that screen is updated immediately on page load.
* Fix encoding and decoding of `search` param between URL and search field.
* Add support for dismissing autosaves when closing customize-loader, when it is used by plugins.
* Skip sending changeset UUID to customize-loader for population in browser location if changeset branching is not enabled.

See #28536.
Fixes #40254.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 16:04:48 +00:00
John Blackbourn
c9e8431582 Users: Remove some links to the dashboard from My Sites for users who cannot access it.
See #41453

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


git-svn-id: http://core.svn.wordpress.org/trunk@41630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 15:22:46 +00:00
John Blackbourn
b25e759621 Networks and Sites: Correct the documentation for the update_site_cache parameter of WP_Site_Query.
Props welcher, sudar
Fixes #42155

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


git-svn-id: http://core.svn.wordpress.org/trunk@41629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 14:26:49 +00:00
John Blackbourn
f14b24792a Press This: Use "installation" when referring to the act of installing Press This.
Props Presskopp
Fixes #41620

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


git-svn-id: http://core.svn.wordpress.org/trunk@41628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 14:08:48 +00:00
John Blackbourn
8ec310d44c Customize: Don't use an abbreviation in screen reader help text.
Props pixolin
Fixes 42153

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


git-svn-id: http://core.svn.wordpress.org/trunk@41627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 13:49:52 +00:00
Dominik Schilling
3dfe22a425 Customize: Add context to "View All Locations" string.
This is about navigation menu locations. Also updates the array alignment to use spaces.

See #40104.
Built from https://develop.svn.wordpress.org/trunk@41792


git-svn-id: http://core.svn.wordpress.org/trunk@41626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 16:34:49 +00:00
Dominik Schilling
3bee2912ea Customize: Use a consistent translator comment for the same strings.
See #21492.
Built from https://develop.svn.wordpress.org/trunk@41791


git-svn-id: http://core.svn.wordpress.org/trunk@41625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 16:23:46 +00:00
Pascal Birchler
d323ea9e18 Customize: Add missing word in error message about already published changesets.
Introduced in [41626].

Fixes #42144.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 09:25:55 +00:00
Pascal Birchler
1478135c46 Database: Use numbered placeholders in error message in wpdb::prepare().
Props tobifjellner.
Fixes #42142.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-08 09:18:57 +00:00
Weston Ruter
a01ae9a8c3 Customize: Fix confusion related to visibility of Themes panel with drafted/scheduled changesets.
* Prevent autoloading an existing draft/future changeset when theme not active.
* Add missing notifications container to Themes panel.
* Remove deactivation of themes panel when selected status is not publish.
* Show notification in Themes panel when themes cannot be previewed and disable preview buttons.
* Reject installTheme call when theme preview not available.
* Return promise from installTheme and eliminate use of global events in favor of promises.

Props westonruter, melchoyce, zoonini.
See #37661, #39896.
Fixes #42126.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-07 06:00:54 +00:00
Sergey Biryukov
dc4241986b General: Correct _deprecated_function() calls in debug_fopen(), debug_fwrite(), and debug_fclose().
The second parameter is supposed to be the version number, the replacement function should be the third parameter.

Props milindmore22, jdgrimes.
Fixes #41094.
Built from https://develop.svn.wordpress.org/trunk@41787


git-svn-id: http://core.svn.wordpress.org/trunk@41621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-07 00:40:52 +00:00
Sergey Biryukov
2ae2b1269a Rewrite: In url_to_postid(), bail early if the URL does not belong to the site.
Props ivankristianto, swissspidy, jkhongusc, SergeyBiryukov.
Fixes #39373.
Built from https://develop.svn.wordpress.org/trunk@41786


git-svn-id: http://core.svn.wordpress.org/trunk@41620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 23:29:51 +00:00
Sergey Biryukov
6ecdbe6e0e Editor: Fix JSHint errors after [41783].
See #42059.
Built from https://develop.svn.wordpress.org/trunk@41785


git-svn-id: http://core.svn.wordpress.org/trunk@41619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 19:12:49 +00:00
Sergey Biryukov
20a3f8d6c9 Build/Test Tools: In Tests_Image_Functions::test_load_directory(), check the expected internal type instead of using assertNotInternalType(), which causes an error with PHPUnit 6.4.0.
Props joemcgill.
Fixes #42124.
Built from https://develop.svn.wordpress.org/trunk@41784


git-svn-id: http://core.svn.wordpress.org/trunk@41618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 18:22:48 +00:00
Andrew Ozz
765272e3e5 Editor:
- Fix keeping text selection and scroll position when there are embeds from URL.
- Add editor setting to disable keeping selection and scroll position.
- Remove dependency on Underscore.js.
- Fix error in the Text widget editor.

Props biskobe.
Fixes #42059, see #40854.
Built from https://develop.svn.wordpress.org/trunk@41783


git-svn-id: http://core.svn.wordpress.org/trunk@41617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 17:44:48 +00:00
Sergey Biryukov
806c464e4b Login and Registration: Prevent PHP warnings when POSTing to wp-login.php with an array as a user_login or user_email field.
Props menakas, johnjamesjacoby.
Fixes #40888.
Built from https://develop.svn.wordpress.org/trunk@41782


git-svn-id: http://core.svn.wordpress.org/trunk@41616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 17:37:47 +00:00
Joe McGill
53a58e35b7 Media: Fix MEJS error when removing a media player.
This fixes a bug introduced by the upgrade to MediaElement.js, where code 
calling `wp.media.mixin.removePlayer()` would result in a JS error.

Props rafa8626, afercia.
Fixes #41787.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 16:31:54 +00:00
Sergey Biryukov
0b39f4c99d Twenty Seventeen: Add missing @return tag for twentyseventeen_video_controls().
Props ndoublehwp, audrasjb.
Fixes #41927.
Built from https://develop.svn.wordpress.org/trunk@41780


git-svn-id: http://core.svn.wordpress.org/trunk@41614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 01:35:47 +00:00
Weston Ruter
77a4574b96 Widgets: Apply the same container-constraining embed resizing logic from the Video widget to embeds in the Text widget.
See #40854, #39994.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-06 00:39:52 +00:00
Weston Ruter
b6297d1866 Customize: Prevent color default control type from overriding template for ColorControl.
Amends [41771].
See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 14:36:57 +00:00
Weston Ruter
766db88eb9 Post WordPress 4.9 Beta 1 version bump
Built from https://develop.svn.wordpress.org/trunk@41777


git-svn-id: http://core.svn.wordpress.org/trunk@41611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 05:54:52 +00:00
Weston Ruter
6a899cf45c WordPress 4.9 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@41776


git-svn-id: http://core.svn.wordpress.org/trunk@41610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 05:06:47 +00:00
Weston Ruter
b5f75fc315 File Editors: Fix JSHint error after [41774].
See #31779.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:43:47 +00:00
Helen Hou-Sandí
b698881469 File Editors: Introduce an interstitial warning upon first visit.
This is an effort to provide a speed bump before heading into something potentially destructive and some education for users on better alternatives, even as we make the file editors safer to use. Each user, including existing users, will be shown a one-time dismissible modal warning on their first visit to each of the theme and plugin file editors.

Copy tweaks to come.

props michelleweber, Ipstenu, melchoyce, adamsilverstein, westonruter, toddnestor, aryamaaru, ZaneMatthew, cliffseal, helen.
fixes #31779.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:25:48 +00:00
Weston Ruter
7f7dffafbb Customize: Fix QUnit tests after failures introduced in [41768].
Props bpayton.
Fixes #40104.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 04:23:48 +00:00
Weston Ruter
48209c926f Widgets: Remove "Replace Gallery" button from Gallery widget since redundant with "Edit Gallery".
Props Presskopp, juhise, melchoyce.
See #41914.
Fixes #41994.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 03:13:49 +00:00
Weston Ruter
9d6134a88c Customize: Add default control template for standard input types.
Re-use default template instead of introducing custom one for the Discard Changes button.

See #30738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:56:47 +00:00
Sergey Biryukov
561bde29c7 Administration: Add .protected-post-excerpt class to password-protected post excerpts in the posts list.
Props Soean, mp518, slaFFik, SergeyBiryukov.
Fixes #41426.
Built from https://develop.svn.wordpress.org/trunk@41770


git-svn-id: http://core.svn.wordpress.org/trunk@41604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:50:46 +00:00
Sergey Biryukov
2e8615f21e REST API: After [41760], use correct query variable in WP_Term_Query::parse_orderby() when 'include_slugs' => 'slug__in' is passed.
See #40826.
Built from https://develop.svn.wordpress.org/trunk@41769


git-svn-id: http://core.svn.wordpress.org/trunk@41603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:28:47 +00:00
Weston Ruter
275f4713a5 Customize: Improve the menu creation flow.
Often, folks run into two issues when they create new menus: they click "Add a Menu" thinking it will add a new page to their menu, or they forget to assign their new menu to a location, and then wonder why it doesn't show up on their site.

This commit rearranges the order of items in the menu panel, and updates the flow for creating a menu by breaking it up into steps. Additionally, more help text has been added to guide people through the process of creating a menu.

Also adds default `type` lookups for Panel and Section instances. See #30741.

Props bpayton, obenland, westonruter, celloexpessions, afercia, melchoyce, zoonini, michelleweber.
Fixes #40104.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 02:22:49 +00:00
Sergey Biryukov
a47a253e90 Taxonomy: After [40903], restore documentation for wp_dropdown_categories() arguments that are different from the defaults in WP_Term_Query::__construct().
Fixes #41058.
Built from https://develop.svn.wordpress.org/trunk@41767


git-svn-id: http://core.svn.wordpress.org/trunk@41601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 01:57:48 +00:00
Sergey Biryukov
2f0f46cb84 Menus: Introduce wp_get_nav_menu_name() to retrieve the name of a navigation menu as set in the admin.
Props markoheijnen, christophherr, SpencerFinnell, wojtek.szkutnik, sagarprajapati, welcher, SergeyBiryukov.
Fixes #13910.
Built from https://develop.svn.wordpress.org/trunk@41766


git-svn-id: http://core.svn.wordpress.org/trunk@41600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 01:38:46 +00:00
Konstantin Obenland
2bd80ac24f Widgets: Continue to use shortcode for some embeds
Renders YouTube and Vimeo embeds through WordPress' video shortcode.

See #42039.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 01:29:46 +00:00
K. Adam White
2914ba6db8 Widgets: Fix jshint error in media widget.
Built from https://develop.svn.wordpress.org/trunk@41764


git-svn-id: http://core.svn.wordpress.org/trunk@41598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:58:48 +00:00
Sergey Biryukov
33beafaf02 Posts, Post Types: Introduce page_attributes_misc_attributes action that fires before the help hint text in the 'Page Attributes' meta box.
Props markcallen, MikeHansenMe.
Fixes #34034.
Built from https://develop.svn.wordpress.org/trunk@41763


git-svn-id: http://core.svn.wordpress.org/trunk@41597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:55:47 +00:00
Sergey Biryukov
2c5a378291 Twenty Fourteen: Add missing singular placeholder in comments.php.
Uses the recommended pattern for better compatibility with languages that use the singular form for other numbers. Also adds translator comments.

Props bplv, xkon.
See #39660.
Built from https://develop.svn.wordpress.org/trunk@41762


git-svn-id: http://core.svn.wordpress.org/trunk@41596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:42:46 +00:00
Sergey Biryukov
0a2c1d7749 Twenty Fifteen: Add missing singular placeholder in comments.php.
Uses the recommended pattern for better compatibility with languages that use the singular form for other numbers. Also adds translator comments.

Props bplv, xkon.
See #39660.
Built from https://develop.svn.wordpress.org/trunk@41761


git-svn-id: http://core.svn.wordpress.org/trunk@41595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:41:46 +00:00
K. Adam White
30827e4a4f REST API: Support ordering response collection by listed slugs.
Adds an "include_slug" orderby value for REST API collections to permit returning a collection filtered by slugs in the same order in which those slugs are specified.
Previously, the order of slugs provided with the ?slug query parameter had no effect on the order of the returned records.

Props wonderboymusic, ocean90, boonebgorges.
Fixes #40826.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:37:47 +00:00
Konstantin Obenland
5fe4acb1f5 Widgets: Allow oEmbeds in video widget.
Opens up video embeds to all supported video oEmbed providers.

Props westonruter.
See #42039.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:22:47 +00:00
K. Adam White
704fb3900b REST API: Support objects in settings schema.
Enables register_setting to accept an object as its schema value, allowing settings to accept non-scalar values through the REST API.
This whitelists the added type in the settings controller, and passes properties from argument registration into the validation functions.

Props joehoyle.
See #38583.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:19:49 +00:00
Sergey Biryukov
9319a9cec9 Bundled Themes: Restore double line breaks before media queries.
See #40138.
Built from https://develop.svn.wordpress.org/trunk@41757


git-svn-id: http://core.svn.wordpress.org/trunk@41591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-05 00:02:48 +00:00
Sergey Biryukov
203b275658 Bundled Themes: Change tag cloud format to a list (<ul>) for better semantics and accessibility.
List markup allows screen reader users to know in advance how many tags are within the list.

Props xkon, davidakennedy.
Fixes #40138.
Built from https://develop.svn.wordpress.org/trunk@41756


git-svn-id: http://core.svn.wordpress.org/trunk@41590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 23:53:47 +00:00
Gary Pendergast
37aa531cd4 Plugins: Tweak the plugin icons added in [41695].
- Remove plugins icons from the plugin list table, as there were performance issues loading the icons when the site had lots of plugins.
- Depending on which icons the plugin has uploaded, prefer them in this order: `svg`, `128x128`, `256x256`.
- Improve the style of the fallback icon for plugins that don't have an icon defined.

Props Travel_girl, danieltj, afercia, karmatosed,hugobaeta, empireoflight, brentjett, melchoyce, pento.
Fixes #30186.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 23:43:46 +00:00
Sergey Biryukov
821004b1a6 Twenty Seventeen: After [41703], adjust RTL styles for tag cloud widget.
Props davidakennedy.
Fixes #40184.
Built from https://develop.svn.wordpress.org/trunk@41754


git-svn-id: http://core.svn.wordpress.org/trunk@41588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 23:35:50 +00:00
John Blackbourn
50948669eb Users: Revert [41613], [41614], and [41623] as this feature needs some more work.
See #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 22:17:46 +00:00
Adam Silverstein
adb8f0161b Build: Webpack instead of Browserify as JavaScript bundler.
Use Webpack as our bundler of choice, enabling improved JavaScript build chain capabilities.

Props aduth, netweb, kadamwhite, schlessera.
Fixes #40894. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@41586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 21:02:23 +00:00
Adam Silverstein
0a431ea356 Revert "Add wp.hooks - JavaScript actions and filters."
Revert `wp.hooks` for now as we continue to refine and test. 

Reverts [41375].

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


git-svn-id: http://core.svn.wordpress.org/trunk@41585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 20:25:49 +00:00
Weston Ruter
f5bc1d1f52 Customize: Allow controls to be created with pre-instantiated Setting object(s), or even with plain Value object(s).
* Allow passing settings in keyed object (e.g. `settings: { default: 'id' }  ), or as an array (e.g. `settings: [ 'id' ]`) with first being default; again, `Setting`/`Value` objects may be supplied instead of IDs.
* Allow a single setting to be supplied with just a single `setting` param, either a string or a `Setting`/`Value` object.
* Update `changeset_status` and `scheduled_changeset_date` to be added dynamically with JS and simply passing of `api.state()` instances as `setting`.
* Introduce a `data-customize-setting-key-link` attribute which, unlike `data-customize-setting-link`, allows passing the setting key (e.g. `default`) as opposed to the setting ID.
* Allow `WP_Customize_Control::get_link()` to return `data-customize-setting-key-link` when setting is not registered.
* Eliminate `default_value` from `WP_Customize_Date_Time_Control` since now comes from supplied `Value`.
* Export status choices as `wp.customize.settings.changeset.statusChoices`.
* Export date and time formats as `wp.customize.settings.dateFormat` and `wp.customize.settings.timeFormat` respectively.

Props westonruter, sayedwp.
See #39896, #30738, #30741, #42083.
Fixes #37964, #36167.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 20:02:49 +00:00
Sergey Biryukov
08b5714221 Customize: Improve the wording for Site Icon control intro.
Props michelleweber, dlh, menakas, melchoyce.
Fixes #40430.
Built from https://develop.svn.wordpress.org/trunk@41749


git-svn-id: http://core.svn.wordpress.org/trunk@41583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:59:48 +00:00
John Blackbourn
be693a6181 Build/Test tools: Remove PHP 7.2 from the allowed failures list on Travis CI.
Fixes #40109

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


git-svn-id: http://core.svn.wordpress.org/trunk@41582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:54:48 +00:00
Sergey Biryukov
dd4ea3c038 Customize: Improve the wording for Header Image control intro.
Props michelleweber, menakas, jcc9873, melchoyce.
Fixes #40431.
Built from https://develop.svn.wordpress.org/trunk@41747


git-svn-id: http://core.svn.wordpress.org/trunk@41581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:35:47 +00:00
Mike Schroder
e8a1a7ab2b Media: Store video creation date in meta.
When able to be parsed, store the created date for a video file from meta,
since this is useful separately from the dates on the file itself.

Introduces `wp_get_media_creation_timestamp()` to read the timestamp from
getID3 and a `wp_read_video_metadata` filter analogous to
`wp_read_image_metadata`.

Fixes #35218.
Props stevegrunwell, joemcgill, desrosj, blobfolio, mikeschroder.
Built from https://develop.svn.wordpress.org/trunk@41746


git-svn-id: http://core.svn.wordpress.org/trunk@41580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 19:32:47 +00:00
Adam Silverstein
eb3b3fec1d Security: Rename new wp.sanitize.sanitizeText to stripTagsAndEncodeText.'
Improve function naming: this function strips tags from a string and also encodes any HTML entities.

Props ocean90.

Fixes #40635.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:58:47 +00:00
K. Adam White
37ec288f71 REST API: Add _fields parameter to selectively include fields in response JSON.
Allows REST API consumers to specify the specific fields needed in their application code, whitelisting those fields and omitting all others from the returned JSON response object.
This permits applications that only need for example the ID and title of posts to avoid having to transfer the entire rendered post content over the wire alongside the desired fields.
While this whitelisting has no affect on the queries run when preparing the response, it can yield significant reductions in the bandwidth required to transfer a response payload for simple applications.

Props adamsilverstein, TimothyBlynJacobs, svrooij.
Fixes #38131.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:46:38 +00:00
Jeremy Felt
018a94d5f5 Multisite: Use get_site_by() in get_id_from_blogname().
Fixes #42091.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:45:52 +00:00
Sergey Biryukov
0f0ab0e8ef Media: Improve the preview of transparent images in Edit Image modal by using CSS3 to show a checkered background.
Props powerzilly, stevepuddick.
Fixes #41966. See #41948.
Built from https://develop.svn.wordpress.org/trunk@41742


git-svn-id: http://core.svn.wordpress.org/trunk@41576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:35:46 +00:00
John Blackbourn
fbd44ee554 Security: Add a referrer policy header to the admin and login screens.
This sets a referrer policy of `same-origin` which adds hardening by preventing a referrer being sent from the admin area or login screens to other origins. This helps prevent unwanted exposure of potentially sensitive information that may be contained within URLs.

This change introduces a new filter, `admin_referrer_policy`, for filtering the referrer policy header value. The header can be disabled if necessary by removing the `wp_admin_headers` action from the `admin_init` and `login_init` hooks.

Props joostdevalk
Fixes #42036

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


git-svn-id: http://core.svn.wordpress.org/trunk@41575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 18:25:46 +00:00