Commit Graph

38575 Commits

Author SHA1 Message Date
Gary Pendergast
2b49d4660b Docs: Replace incorrect usage of "who's" with "whose".
Whom can say who's "whose" is who's? Is it a Who that Horton heard? Maybe it's The Who whose "who" knowledge will hook whomever hoots "who's" instead of "whose".

Hoot. Hoot.

Props Hafiz.
Fixes #45026.



git-svn-id: https://develop.svn.wordpress.org/trunk@43665 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-02 16:22:46 +00:00
Gary Pendergast
ad1f484317 Posts: Remove the slug from Quick Edit for CPTs with publicly_queryable disabled.
In the full edit screen, CPTs that have disabled the `publicly_queryable` option will hide the slug field, as it doesn't need to be edited. This change brings the Quick Edit view into line with that behaviour.

Props bhargavmehta, krutidugade.
Fixes #43278.



git-svn-id: https://develop.svn.wordpress.org/trunk@43664 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-02 15:52:15 +00:00
Gary Pendergast
75c7cb5acf Taxonomy: Remove the "Note" label from the notes on the Category edit list.
There are notes on both the Tag and Category pages, but only the latter prefixes it with a "Note" label.

Props joanrho, pratikthink, jainnidhi.
Fixes #43800.



git-svn-id: https://develop.svn.wordpress.org/trunk@43663 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-01 21:55:33 +00:00
Gary Pendergast
a386f726da Docs: Add a file header comment to version.php.
Props sephsekla, bruceallen.
Fixes #43765.



git-svn-id: https://develop.svn.wordpress.org/trunk@43662 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-01 20:59:26 +00:00
Sergey Biryukov
a2017354e2 Docs: Document that the $src parameter of WP_Dependencies::add() can be boolean.
Props dimadin.
Fixes #45009.

git-svn-id: https://develop.svn.wordpress.org/trunk@43661 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-28 21:50:45 +00:00
Sergey Biryukov
c2ab97264d Users: Pass the current WP_User_Query instance to found_users_query filter.
Props spacedmonkey.
Fixes #43679.

git-svn-id: https://develop.svn.wordpress.org/trunk@43660 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 22:53:12 +00:00
Sergey Biryukov
45efe978fc Twenty Seventeen: Use a simple counter incremented with each call instead of uniqid() for generating unique IDs for HTML elements.
Props westonruter.
Fixes #44883.

git-svn-id: https://develop.svn.wordpress.org/trunk@43659 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 20:56:59 +00:00
Sergey Biryukov
e1ff4cd7cd General: Introduce wp_unique_id(), a PHP implementation of Underscore's uniqueId method.
A static variable contains an integer that is incremented with each call. This number is returned with the optional prefix.
As such the returned value is not universally unique, but it is unique across the life of the PHP process.

Props westonruter, dlh.
See #44883.

git-svn-id: https://develop.svn.wordpress.org/trunk@43658 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 20:56:30 +00:00
Sergey Biryukov
75a5293460 Docs: Add a line break to wp_is_uuid() DocBlock for better readability.
See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@43657 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 20:45:01 +00:00
Felix Arntz
c12a0cf4f3 Multisite: Fix coding standard errors after [43654].
See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43655 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 15:22:01 +00:00
Felix Arntz
1795dbe25a Multisite: Introduce a site initialization and uninitialization API.
This changeset makes the new CRUD API for sites introduced in [43548] usable for real-world sites. A new function `wp_initialize_site()`, which takes care of creating a site's database tables and populating them with initial values, is hooked into the site insertion process that is initiated when calling `wp_insert_site()`. Similarly, a new function `wp_uninitialize_site()`, which takes care of dropping a site's database tables, is hooked into the site deletion process that is initiated when calling `wp_delete_site()`.

A new function `wp_is_site_initialized()` completes the API, allowing to check whether a site is initialized. Since this function always makes a database request in its default behavior, it should be called with caution. Plugins that would like to use site initialization in special ways can leverage a `pre_wp_is_site_initialized` filter to alter that default behavior.

The separate handling of the site's row in the `wp_blogs` database table and the actual site setup allows for more flexibility in controlling whether or how a site's data is set up. For example, a unit test that only checks data from the site's database table row can unhook the site initialization process to improve performance. At the same time, developers consuming the new sites API only need to know about the CRUD functions, since the initialization and uninitialization processes happen internally.

With this changeset, the foundation for a sites REST API endpoint is fully available. The previously recommended functions `wpmu_create_blog()` and `wpmu_delete_blog()` now call the new respective function internally. Further follow-up work to this includes replacing calls to `wpmu_create_blog()` with `wp_insert_site()`, `update_blog_details()` with `wp_update_site()` and `wpmu_delete_blog()` with `wp_delete_blog()` throughout the codebase.

As a side-effect of this work, the `wpmu_new_blog`, `delete_blog`, and `deleted_blog` actions and the `install_blog()` function have been deprecated.

Fixes #41333. See #40364.


git-svn-id: https://develop.svn.wordpress.org/trunk@43654 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 15:08:32 +00:00
Aaron Jorbin
6604782cd9 General: PHP7.3 throws an E_WARNING when using continue to target a switch
Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: https://github.com/php/php-src/pull/3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Fixes #44543.



git-svn-id: https://develop.svn.wordpress.org/trunk@43653 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-23 22:49:02 +00:00
SergeyBiryukov
fb2699f28d Tests: Add missing public access modifier to Tests_REST_Server methods.
Props andizer.
Fixes #44939.

git-svn-id: https://develop.svn.wordpress.org/trunk@43652 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-23 15:45:02 +00:00
Sergey Biryukov
33074d8c67 Users: Add LIMIT 1 to SQL query in WP_User::get_data_by(), as only one row is requested.
Props spacedmonkey.
Fixes #43692.

git-svn-id: https://develop.svn.wordpress.org/trunk@43651 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-23 15:32:48 +00:00
Sergey Biryukov
e9eaabaf14 Upgrade/Install: Adjust table prefix string check in setup-config.php for the coding standards change in [42343].
Props shashwatmittal, allendav.
Fixes #44318.

git-svn-id: https://develop.svn.wordpress.org/trunk@43650 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-20 05:14:21 +00:00
Sergey Biryukov
2724e2d0fe Tests: Restore restapi group on WP_Test_REST_Revisions_Controller.
See #40510.

git-svn-id: https://develop.svn.wordpress.org/trunk@43647 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-18 03:44:57 +00:00
John Blackbourn
629c76c31b Build/Test Tools: Implement the automatic retry functionality that Travis CI provides.
This functionality will cause the command to be retried up to three times in case of a non-zero return value. Implementing it on commands that perform network requests means that intermittent network failures are less likely to cause a build to fail, as they'll be retried up to three times.

See #44858


git-svn-id: https://develop.svn.wordpress.org/trunk@43645 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-15 09:21:55 +00:00
John Blackbourn
3493feaa5a Docs: Improve docblocks within wp-login.php.
Props birgire

See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@43644 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-14 13:47:01 +00:00
John Blackbourn
948a5ef28b Docs: Correct and improve docblocks for user session management functionality.
See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@43643 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-14 13:44:50 +00:00
John Blackbourn
b2374bf1ad Docs: Correct and improve some docblocks.
See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@43642 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-14 13:34:50 +00:00
Felix Arntz
ffa16fa771 Upgrade/Install: Properly exclude the admin/includesSchema.php tests file for the WordPress.DB.PreparedSQL.NotPrepared sniff.
The way this was implemented in [43630] caused the file to be excluded for all sniffs, since PHPCS does not support file-wide ignores of a specific sniff at this point.

Props jrf.
See #44896.


git-svn-id: https://develop.svn.wordpress.org/trunk@43641 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-14 07:54:53 +00:00
Ian Dunn
7d22ba1961 Privacy: Add test for wp_privacy_export_expiration filter.
Props desrosj.
See #44233.


git-svn-id: https://develop.svn.wordpress.org/trunk@43640 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-13 17:25:31 +00:00
Sergey Biryukov
df261c632a Docs: Correct @since value for _wp_privacy_statuses().
Fix typo in `@since` entry for `WP_Privacy_Policy_Content:add()`.

Props dimadin.
Fixes #44915.

git-svn-id: https://develop.svn.wordpress.org/trunk@43638 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-13 10:19:28 +00:00
K. Adam White
e29d895ffd REST API: Pass correct ID to meta->update_value to permit setting term meta during term creation.
Props joehoyle.
Fixes #44834.



git-svn-id: https://develop.svn.wordpress.org/trunk@43636 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-12 23:55:47 +00:00
Dominik Schilling (ocean90)
82bf9baa32 I18N: In the POMO library, replace chr() calls for static values with their string representation.
Props ccismaru, ocean90.
Fixes #17128.

git-svn-id: https://develop.svn.wordpress.org/trunk@43635 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-12 06:10:42 +00:00
Dominik Schilling (ocean90)
14d99627ce Revert accidental change to package-lock.json introduced in [43571].
git-svn-id: https://develop.svn.wordpress.org/trunk@43634 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-12 05:42:13 +00:00
Adam Silverstein
fd5ba80c5c Media: Improve display and accessibility of meta data in detail view.
* Add a `human_readable_duration` function including tests.
* Add 'pixels' after image width/height.
* Add screen reader text for durations.

Props Presskopp, kiranpotphode, milindmore22, stormrockwell, afercia.
Fixes #39667. 



git-svn-id: https://develop.svn.wordpress.org/trunk@43633 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-08 04:19:40 +00:00
Sergey Biryukov
37b53387ff Docs: Update @since version for (un)registered_taxonomy_for_object_type actions introduced in [43558].
See #44733.

git-svn-id: https://develop.svn.wordpress.org/trunk@43631 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-06 07:48:32 +00:00
Felix Arntz
b33420db6c Upgrade/Install: Fix coding standard errors after [43629].
See #44896.


git-svn-id: https://develop.svn.wordpress.org/trunk@43630 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 12:49:29 +00:00
Felix Arntz
46e5c6c91b Upgrade/Install: Introduce populate_site_meta().
Fixes #44896. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43629 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 11:01:36 +00:00
flixos90
88b725e1cb Upgrade/Install: Introduce populate_network_meta(), moving logic out of populate_network().
Fixes #44895. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43628 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 10:44:02 +00:00
Felix Arntz
f1e1b6299e Upgrade/Install: Add support for an optional $options parameter to populate_options().
Fixes #44893. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43627 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 09:38:04 +00:00
Sergey Biryukov
811eef33a3 Privacy: When clicking a confirmation link for a privacy request, return a WP_Error object if the link has expired.
Returning a string caused a success message to be displayed instead of the correct error message.

Props desrosj.
Fixes #44685.

git-svn-id: https://develop.svn.wordpress.org/trunk@43623 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:43:13 +00:00
Sergey Biryukov
c41c128fda Docs: Update @since version for edit_post_{$post->post_type} action introduced in [43535] to 4.9.9.
See #34706.

git-svn-id: https://develop.svn.wordpress.org/trunk@43616 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:08:33 +00:00
Sergey Biryukov
39c97a768a Docs: Correct parameter type for WP_Privacy_Policy_Content::notice().
Props burhandodhy.
Fixes #44877.

git-svn-id: https://develop.svn.wordpress.org/trunk@43609 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 14:14:15 +00:00
Peter Wilson
0eda564507 Cron API: Clarify documentation for wp_reschedule_event().
Expands documentation to indicate `wp_schedule_event()` ought to be used for rescheduling an upcoming event, while `wp_reschedule_event()` is used for internally rescheduling a recurring event after it runs.

Props Dharm1025, jrf.
Fixes #35968.



git-svn-id: https://develop.svn.wordpress.org/trunk@43608 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 04:03:10 +00:00
Peter Wilson
e686ac1f67 Twenty Sixteen: Add pre-connect resource hint for Google Fonts.
When using Google Fonts, pre-connect to https://fonts.gstatic.com to improve the performance downloading the webfont files.

Props westonruter.
Fixes #44668.


git-svn-id: https://develop.svn.wordpress.org/trunk@43606 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 00:52:53 +00:00
Sergey Biryukov
04516c1299 Taxonomy: Make sure wp_list_categories() correctly outputs term name of 0.
Props joyously, SergeyBiryukov.
Fixes #44872.

git-svn-id: https://develop.svn.wordpress.org/trunk@43605 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-02 22:08:05 +00:00
Rachel Baker
f93c771fc9 REST API: Load missing required file for multisite users in WP_REST_Attachments_Controller::create_item().
Requires wp-admin/includes/image.php to make `wp_read_image_metadata()` function available. Fixes error introduced in [43589].

Props ocean90, soulseekah.
Fixes #43757.

git-svn-id: https://develop.svn.wordpress.org/trunk@43604 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-31 23:45:17 +00:00
Rachel Baker
324d440c7a REST API: Load missing required file for multisite users in WP_REST_Attachments_Controller::check_upload_size().
Requires wp-admin/includes/ms.php to make `upload_is_user_over_quota()` function available to multisite users uploading files.

Props JakePT, rachelbaker.
Fixes #44864.

git-svn-id: https://develop.svn.wordpress.org/trunk@43603 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-31 23:25:39 +00:00
John Blackbourn
2eb9362782 Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.
Fixes #44620


git-svn-id: https://develop.svn.wordpress.org/trunk@43601 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-31 10:51:00 +00:00
Sergey Biryukov
9db8106f92 Docs: Convert @see reference in wp_checkdate() DocBlock to @link.
Props WiZZarD_.
Fixes #44866.

git-svn-id: https://develop.svn.wordpress.org/trunk@43599 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 13:48:50 +00:00
jrf
1730443206 I18n: Improve translators comments [3].
* Add missing translators comments.
* Fix placement of some translators comments.
  Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools.
  The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Includes minor code layout fixes.

Patch `44360-wp-admin-includes-dir.patch` of the series.

Props flipkeijzer, alvarogois, michielatyoast
See #44360


git-svn-id: https://develop.svn.wordpress.org/trunk@43598 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 13:35:27 +00:00
Sergey Biryukov
a0ae2c5d85 Embeds: After [43593], move the new check to a separate line to avoid test_js_no_ampersands_in_compiled failure caused by UglifyJS task.
See #44832.

git-svn-id: https://develop.svn.wordpress.org/trunk@43597 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 12:39:07 +00:00
jrf
0b4334c5e3 I18n: Improve translators comments [2].
* Add missing translators comments.
* Fix placement of some translators comments.
  Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools.
  The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Patch `44360.wp-includes_customize.3.patch` of the series.

Props marcomartins, mihaiiceyro, michielatyoast
See #44360


git-svn-id: https://develop.svn.wordpress.org/trunk@43596 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 12:35:08 +00:00
jrf
7839cf651f I18n: Improve translators comments [1].
* Add missing translators comments.
* Fix placement of some translators comments.
  Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools.
  The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Patch `44360-src.2.diff` of the series.

Props garyj, alvarogois, michielatyoast
See #44360

git-svn-id: https://develop.svn.wordpress.org/trunk@43595 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 12:13:53 +00:00
Sergey Biryukov
f1862cd98c Date/Time: Make sure current_time() always calculates the offset from GMT/UTC.
Previously, UTC context was implied, but could be unreliable due to being affected by plugins.

Props Rarst, rahulsprajapati, marco.marsala.
Fixes #37440.

git-svn-id: https://develop.svn.wordpress.org/trunk@43594 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 12:12:55 +00:00
Sergey Biryukov
c1b7284c4b Embeds: Avoid a JS error in wp.receiveEmbedMessage if data parameter is not set.
Props dsifford, kadamwhite.
Fixes #44832.

git-svn-id: https://develop.svn.wordpress.org/trunk@43593 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 10:29:03 +00:00
Sergey Biryukov
8eebd125f0 Post Formats: Don't assign a variable inside if statement in get_post_format().
Props Mirucon.
Fixes #44840.

git-svn-id: https://develop.svn.wordpress.org/trunk@43592 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 09:00:42 +00:00
Sergey Biryukov
9364b6ed87 Date/Time: Make get_the_date() call get_post_time() for consistency with get_the_time().
Props Rarst.
Fixes #44490.

git-svn-id: https://develop.svn.wordpress.org/trunk@43591 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 08:49:40 +00:00