Commit Graph

41214 Commits

Author SHA1 Message Date
Sergey Biryukov
559ccdda0c Twenty Twenty: Replace quotation marks in starter content with HTML entities.
Props fahimmurshed.
Fixes #49534.

git-svn-id: https://develop.svn.wordpress.org/trunk@47388 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-27 21:58:54 +00:00
Sergey Biryukov
ef613db765 Docs: Add a reference to WP_Customize_Panel::__construct() for information on accepted arguments in WP_Customize_Manager::add_panel().
Synchronize the documentation between two places, use `WP_Customize_Panel::__construct()` as the canonical source.

Props iaaxpage, marekdedic.
Fixes #48344.

git-svn-id: https://develop.svn.wordpress.org/trunk@47387 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-27 20:34:49 +00:00
Sergey Biryukov
19bdff7326 Docs: Add a reference to WP_Customize_Section::__construct() for information on accepted arguments in WP_Customize_Manager::add_section().
Synchronize the documentation between two places, use `WP_Customize_Section::__construct()` as the canonical source.

Props amolv, marekdedic.
Fixes #48346.

git-svn-id: https://develop.svn.wordpress.org/trunk@47386 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-27 20:27:45 +00:00
Sergey Biryukov
33b88a7c7f Docs: Clarify the type of theme_supports argument in various Customizer classes.
Props marekdedic.
See #48347.

git-svn-id: https://develop.svn.wordpress.org/trunk@47385 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-27 20:21:35 +00:00
Sergey Biryukov
9793244c74 Docs: Add a reference to WP_Customize_Setting::__construct() for information on accepted arguments in WP_Customize_Manager::add_setting().
Synchronize the documentation between two places, use `WP_Customize_Setting::__construct()` as the canonical source.

Props tmanoilov, marekdedic.
Fixes #48347.

git-svn-id: https://develop.svn.wordpress.org/trunk@47384 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-27 20:07:31 +00:00
Sergey Biryukov
bd71eb4b74 Docs: Use a consistent description for the $manager parameter in various Customizer class constructions.
See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47383 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-26 15:31:19 +00:00
Sergey Biryukov
aab2667898 Docs: Add a @see reference to WP_Customize_Control::__construct() in child class constructors.
Follow-up to [47363], [47364].

See #48343, #48348.

git-svn-id: https://develop.svn.wordpress.org/trunk@47382 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-26 13:29:01 +00:00
Sergey Biryukov
bc5a7e9506 Build/Test Tools: Remove redundant Tests_Post_Types::register_post_type() helper method, use register_post_type() directly.
Props gh640, varunshanbhag.
Fixes #49365.

git-svn-id: https://develop.svn.wordpress.org/trunk@47381 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-26 13:16:10 +00:00
Andrew Ozz
3a4faa975f Build Tools: Do not delete the (now committed) script-loader-packages.php file when running clean:js and copy it to /build. Fixes cases when running grunt watch or -dev where that file may be deleted and not recreated.
See #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47380 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-26 05:13:05 +00:00
Jorge Costa
0975f8e79b Post WordPress 5.4 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@47379 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 22:11:55 +00:00
Jorge Costa
16aa8bbcce WordPress 5.4 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@47378 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 21:54:53 +00:00
Sergey Biryukov
762dc39878 Block Editor: Update wp-includes/assets/script-loader-packages.php.
Follow-up to [47352], [47354].

Props aduth, ocean90, garrett-eclipse.
Fixes #49506.

git-svn-id: https://develop.svn.wordpress.org/trunk@47377 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 21:43:57 +00:00
Sergey Biryukov
0347132f12 Privacy: Switch buttons in Next Steps column of privacy request tables to break-word for better legibility on various screen sizes.
Props garrett-eclipse, afercia, nrqsnchz.
Fixes #46304.

git-svn-id: https://develop.svn.wordpress.org/trunk@47376 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 20:59:08 +00:00
Sergey Biryukov
ccb7aec7fc Accessibility: Media: Hide the invisible "file upload button" on media views from assistive technologies.
The button is visually hidden, but was announced by screen readers in workflows unrelated to file uploading, leading to confusion.

Props afercia, audrasjb, azaozz.
Fixes #47611.

git-svn-id: https://develop.svn.wordpress.org/trunk@47375 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 20:42:19 +00:00
Sergey Biryukov
22c02a0325 General: Introduce HTML classes in get_calendar() for easier CSS targeting:
* `.wp-calendar-table` for the `<table>` element.
* `.wp-calendar-nav` for the navigation wrapper.
* `.wp-calendar-nav-prev` for the previous month link.
* `.wp-calendar-nav-next` for the next month link.

Replace `#prev` and `#next` HTML IDs with `.wp-calendar-nav-prev` and `.wp-calendar-nav-next` classes.

Props sabernhardt, BackuPs, audrasjb, jorbin.
Fixes #39763.

git-svn-id: https://develop.svn.wordpress.org/trunk@47374 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 20:28:29 +00:00
Sergey Biryukov
91878831dd Docs: In update_option(), remove an inaccurate statement about the $autoload value for new options.
If the option does not exist, it will be created with whatever was passed to the `$autoload` parameter, `'yes'` being only the default value.

Props leogermani.
Fixes #48357.

git-svn-id: https://develop.svn.wordpress.org/trunk@47373 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 20:06:32 +00:00
Sergey Biryukov
38e9142a66 Coding Standards: Use strict comparison for normalize_whitespace() checks when comparing revisions or autosaves.
Props dkarfa, itowhid06, TimothyBlynJacobs.
Fixes #47965.

git-svn-id: https://develop.svn.wordpress.org/trunk@47372 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 19:33:22 +00:00
Sergey Biryukov
f852ca2cc1 Widgets: Create a unique HTML ID for the <ul> element of Recent Comments widget if more than one instance is displayed on the page.
Props peterwilsoncc, audrasjb, birgire, justinahinon, mbrailer, desrosj.
Fixes #46747.

git-svn-id: https://develop.svn.wordpress.org/trunk@47371 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 19:27:22 +00:00
Sergey Biryukov
97d43fbff5 Bootstrap/Load: In wp_magic_quotes(), revert the type change to string for REQUEST_TIME and REQUEST_TIME_FLOAT values, which should retain their proper type.
Among other things, this preserves compatibility of WP with PHPUnit Code Coverage generation.

Props jrf, Veraxus, Rarst.
See #48605.

git-svn-id: https://develop.svn.wordpress.org/trunk@47370 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 18:31:33 +00:00
Sergey Biryukov
8dbe048737 Docs: In wp_insert_user(), correct @type for rich_editing, syntax_highlighting, comment_shortcuts, and show_admin_bar_front arguments.
Follow-up to [47368].

See #49087.

git-svn-id: https://develop.svn.wordpress.org/trunk@47369 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 18:18:26 +00:00
Sergey Biryukov
d722bdb0ac Docs: In wp_insert_user(), clarify that rich_editing, syntax_highlighting, comment_shortcuts, and show_admin_bar_front arguments accept true or false as a string literal, not boolean.
Props garrett-eclipse, audrasjb, valentinbora, bilgilabs, SergeyBiryukov.
Fixes #49087.

git-svn-id: https://develop.svn.wordpress.org/trunk@47368 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 18:15:00 +00:00
Sergey Biryukov
f1124fc1cb Docs: Clarify in WP_Customize_Manager::remove_*() methods that removing a setting, panel, section, or control does not destroy the class instance or remove its filters.
Props dlh, fgiannar, jon81, westonruter.
Fixes #48747.

git-svn-id: https://develop.svn.wordpress.org/trunk@47367 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 17:48:40 +00:00
Sergey Biryukov
a6b80a326a Comments: Restore the fourth parameter of comments_number() as $post_id, for consistency with get_comments_number_text().
The parameter was previously used as the number of comments, marked as deprecated in [5101].

Given that it's been deprecated for the last 13 years, it should be safe to undeprecate and repurpose it for a cleaner function signature, instead of adding a fifth parameter.

Follow-up to [47276].

Fixes #48772.

git-svn-id: https://develop.svn.wordpress.org/trunk@47366 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 17:32:34 +00:00
Sergey Biryukov
812773b8fc Widgets: Avoid an overflow issue in widget controls that include <select> form fields.
Props alexischenal, audrasjb, dkarfa.
Fixes #49401.

git-svn-id: https://develop.svn.wordpress.org/trunk@47365 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 17:02:27 +00:00
Sergey Biryukov
3bd4e3a075 Docs: Add a reference to WP_Customize_Control::__construct() for information on accepted arguments in WP_Customize_Manager::add_control().
Synchronize the documentation between two places, use `WP_Customize_Control::__construct()` as the canonical source.

Props hAmpzter, marekdedic, SergeyBiryukov.
Fixes #48343.

git-svn-id: https://develop.svn.wordpress.org/trunk@47364 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 16:39:36 +00:00
Sergey Biryukov
5178d29f4a Docs: Add a reference to WP_Customize_Control::__construct() for information on accepted arguments to override class property defaults in child classes.
Props marcio-zebedeu, marekdedic.
Fixes #48348.

git-svn-id: https://develop.svn.wordpress.org/trunk@47363 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 16:19:08 +00:00
K. Adam White
4e0062e5be REST API: Correctly infer empty objects passed via query parameters.
Permit passing an empty object as the string "?obj=". The type of the passed empty argument is inferred from the registered schema.

Props TimothyBlynJacobs, steffanhalv, schlessera, dd32.
Fixes #42961.


git-svn-id: https://develop.svn.wordpress.org/trunk@47362 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 15:32:27 +00:00
K. Adam White
b5190458fe REST API: Permit access to the themes controller if user can edit any post type.
Check a more exhaustive list of post type editing caps beyond "edit_post" to ensure custom user roles with access to to specific post types may still use block editor functionality depending on theme features.

Props miyauchi, TimothyBlynJacobs.
Fixes #46723.


git-svn-id: https://develop.svn.wordpress.org/trunk@47361 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 15:18:19 +00:00
K. Adam White
a0ac0ff13d REST API: Apply all relevant block rendering filters when rendering block previews.
Several filters were introduced to the render_block method since the initial implementation of the block-renderer/ endpoints, causing the output of those endpoints to diverge from the rendered content of blocks on the frontend.

Props kadamwhite, TimothyBlynJacobs, miinasikk.
Fixes #49387.


git-svn-id: https://develop.svn.wordpress.org/trunk@47360 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 15:03:57 +00:00
Sergey Biryukov
51e6228635 Script Loader: Improve performance of wp_script_is() for scripts registered with complex dependencies.
This switches `WP_Dependencies::recurse_deps()` from recursively checking the same handles over and over again to keep a flattened array of queued items and their dependencies for faster lookup in `WP_Dependencies::query()`.

Props superdav42.
Fixes #46469.

git-svn-id: https://develop.svn.wordpress.org/trunk@47359 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 13:40:52 +00:00
Sergey Biryukov
887e0a8004 Docs: Add a @since note for including delete_posts in default capabilities in get_post_type_capabilities().
Follow-up to [47357].

See #30991.

git-svn-id: https://develop.svn.wordpress.org/trunk@47358 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 12:53:35 +00:00
Sergey Biryukov
317e1c076c Posts, Post Types: Ensure delete_posts is included in default post type capabilities regardless of map_meta_cap value.
This resolves PHP notices in a few places in core where this capability is checked.

Props Mte90, johnbillion, dipesh.kakadiya, jipmoors, bamadesigner, dd32, johnjamesjacoby, xedin.unknown, flixos90, SergeyBiryukov.
Fixes #30991.

git-svn-id: https://develop.svn.wordpress.org/trunk@47357 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 12:48:11 +00:00
Sergey Biryukov
196859f90f Customize: When a menu item is removed from the menu, uncheck its source item on the available items panel.
Props donmhico, garrett-eclipse, audrasjb.
Fixes #46830.

git-svn-id: https://develop.svn.wordpress.org/trunk@47356 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 11:12:18 +00:00
Sergey Biryukov
f40c6c9ebe Script Loader: Remove unnecessary reference sign from function definitions in script loader.
This resolves PHP warnings when extensions like `php_uopz` or `php_tideways_xhprof` are in use.

Object variables in PHP 5+ contain a reference to the object, and it's the reference that's passed around.

Props jqz, killerbishop, Mte90, TJNowell, jorbin, pento, pcarvalho, valentinbora, SergeyBiryukov.
Fixes #44979.

git-svn-id: https://develop.svn.wordpress.org/trunk@47355 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 00:57:33 +00:00
Jorge Costa
bc3850c8dc Block Editor: Update WordPress Packages WordPress 5.4 Beta 3.
The following package versions were changed:
@wordpress/block-directory: 1.5.1 -> 1.5.2
@wordpress/block-editor: 3.7.1 -> 3.7.2
@wordpress/block-library: 2.14.1 -> 2.14.2
@wordpress/components: 9.2.1 -> 9.2.2
@wordpress/edit-post: 3.13.1 -> 3.13.2
@wordpress/editor: 9.12.1 -> 9.12.2
@wordpress/format-library: 1.14.1 -> 1.14.2
@wordpress/list-reusable-blocks: 1.13.1 -> 1.13.2
@wordpress/media-utils: 1.7.1 -> 1.7.2
@wordpress/nux: 3.12.1 -> 3.12.2
@wordpress/server-side-render: 1.8.1 -> 1.8.2

Fixes #49506.

git-svn-id: https://develop.svn.wordpress.org/trunk@47354 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 00:16:12 +00:00
Sergey Biryukov
753ffe3968 Accessibility: Widgets: Restore missing string in script loader.
The string was previously added in [42794] and accidentally removed in [44163].

Props garrett-eclipse, audrasjb.
Fixes #49505.

git-svn-id: https://develop.svn.wordpress.org/trunk@47353 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-24 23:05:14 +00:00
Andrew Ozz
b2d243fbe6 Build Tools:
- Update the DependencyExtractionWebpackPlugin to 2.3.0 and set it to output a single assets file.
- Grunt: copy the assets file to both `SOURCE_DIR` and `BUILD_DIR` as `wp-includes/assets/script-loader-packages.php`.
- "Unignore" the `wp-includes/assets` directory. Its content will be committed similarly to `wp-includes/blocks`.
- Update `wp_default_packages_scripts()` to use the above file. This also removes the hard-coded lists of packages and packages with translations.

Props gziolo, pbearne, johnbillion, isabel_brison, ocean90, azaozz.
Fixes #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47352 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-24 21:20:49 +00:00
K. Adam White
4e18f78ced REST API: Fix namespace shadowing issue in route matching logic.
Following [47260] a namespace such as "test-ns" prevents any namespace such as "test-ns/v1" from being found when matching routes.
While not best practice, this was an unintentional back-compat break; this patch restores the original behavior.

Props david.binda, TimothyBlynJacobs.
Fixes #48530.



git-svn-id: https://develop.svn.wordpress.org/trunk@47351 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-24 18:05:12 +00:00
Sergey Biryukov
74baee2f19 Menus: Introduce wp_nav_menu_item_custom_fields_customize_template action that fires at the end of the form field template for nav menu items in the customizer.
This brings parity with the `wp_nav_menu_item_custom_fields` action added in [47190] for the Menus screen.

Props celloexpressions.
Fixes #47056.

git-svn-id: https://develop.svn.wordpress.org/trunk@47350 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-24 14:56:42 +00:00
Sergey Biryukov
c2316edc3a Coding Standards: Add missing braces to if conditions and use strict comparison in js/_enqueues/wp/media/editor.js.
Props ankitmaru.
Fixes #49317.

git-svn-id: https://develop.svn.wordpress.org/trunk@47349 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-23 08:56:44 +00:00
Sergey Biryukov
dd859e48f2 Built/Test Tools: Ignore the node_modules folder in Twenty Nineteen when running grunt jshint:themes.
Follow-up to [45060], [46352], [46450].

Fixes #49494. See #46706.

git-svn-id: https://develop.svn.wordpress.org/trunk@47348 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-23 08:26:15 +00:00
Sergey Biryukov
2f10289ffb Docs: Use third-person singular verbs for function descriptions in wp-includes/option.php, per the documentation standards.
See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47347 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-23 01:05:28 +00:00
Sergey Biryukov
84764d4cee Docs: Add a @staticvar entry for $transports in WP_Http::_dispatch_request().
Props utsav72640.
Fixes #48774.

git-svn-id: https://develop.svn.wordpress.org/trunk@47346 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-22 19:10:47 +00:00
Sergey Biryukov
af57dcb03e I18N: Replace .htaccess with placeholders in the strings for Site Health custom rules check.
Props ramiy.
Fixes #48864.

git-svn-id: https://develop.svn.wordpress.org/trunk@47345 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-22 18:54:09 +00:00
Sergey Biryukov
74908c06bf I18N: Use a consistent wording for "Unable to write to file" strings.
Props ramiy.
Fixes #48862.

git-svn-id: https://develop.svn.wordpress.org/trunk@47344 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-22 18:31:39 +00:00
Jonathan Desrosiers
35ddd5c97d General: Introduce a pull request template.
This ensures that contributors opening a pull request on GitHub for code review have proper guidance.

See https://make.wordpress.org/core/2020/02/21/working-on-trac-tickets-using-github-pull-requests/ and https://meta.trac.wordpress.org/ticket/4903.

Props noisysocks, desrosj.
Fixes #49489.

git-svn-id: https://develop.svn.wordpress.org/trunk@47342 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-21 18:23:28 +00:00
Sergey Biryukov
8837ebd1f6 Build/Test Tools: Remove unused ::assertPostHasTerms() method from tests/term.php.
The associated test was removed in [30241].

See #49485.

git-svn-id: https://develop.svn.wordpress.org/trunk@47341 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-21 17:03:12 +00:00
Adam Silverstein
8793357dfa Comments: improve styling on mobile for comments marked as spam.
Correct an issue where comments marked as spam in a mobile view displayed incorrectly, filling a narrow and very tall column with the notice that a comment was marked as spam. 

Props jeremyfelt, lorenzof, mukesh27, razamalik, xkon.
Fixes #48814.



git-svn-id: https://develop.svn.wordpress.org/trunk@47340 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-21 17:02:18 +00:00
Ian Belanger
bb6b0cdaa5 Bundled Themes: Twenty Nineteen text color setting in pullquote block not applied.
Fixes the pullquote color setting by adding classes that are more specific to the color options.

Props ianbelanger.
Fixes #49410.

git-svn-id: https://develop.svn.wordpress.org/trunk@47339 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-21 14:57:12 +00:00
Sergey Biryukov
3ff0ef5030 I18N: Replace upload_max_filesize, php.ini, MAX_FILE_SIZE with placeholders in upload error strings.
Props ramiy.
Fixes #48869.

git-svn-id: https://develop.svn.wordpress.org/trunk@47330 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-20 17:16:21 +00:00