While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the `$default` parameter to `$default_value` in `wp_has_border_feature_support()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53240 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the `$string` parameter to `$content` in `AtomParser::xml_escape()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53239 602fd350-edb4-49c9-b593-d223f7449a82
Normalize an invalid `sticky_posts` option to an empty array within `stick_post()`. This fixes a bug in which an unexpected option value would prevent new posts from being made sticky.
Follow up to [50380].
Props azouamauriac, denishua, kajalgohel, sergeybiryukov, costdev.
Fixes#55176.
git-svn-id: https://develop.svn.wordpress.org/trunk@53238 602fd350-edb4-49c9-b593-d223f7449a82
Improve tests for `is_wp_version_compatible()` and `is_php_version_compatible()`.
Follow up to [53227].
Props costdev, SergeyBiryukov.
Fixes#54257.
git-svn-id: https://develop.svn.wordpress.org/trunk@53237 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$class` parameter to `$css_class` in:
* `twentysixteen_excerpt()`
* `twentynineteen_post_classes()`
* Renames the `$echo` parameter to `$display` in:
* `twentythirteen_entry_date()`
* `twentytwenty_generate_css()`
* `twentytwenty_site_logo()`
* `twentytwenty_site_description()`
* `twenty_twenty_one_generate_css()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53236 602fd350-edb4-49c9-b593-d223f7449a82
As a result of [52741] and [52743], `wp_enqueue_block_support_styles()` was moved to `wp-includes/script-loader.php`. However, `wp_enqueue_block_style()` was still defined in `wp-includes/blocks.php`. This changeset also moves `wp_enqueue_block_support_styles()` to `wp-includes/script-loader.php` for better consistency.
Follow-up to [52741], [52743].
Props SergeyBiryukov, mukesh27, audrasjb.
Fixes#55182.
See #55148.
git-svn-id: https://develop.svn.wordpress.org/trunk@53234 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the `Last-Modified` header of comments feed was using the date/time of the last comment. This behavior was breaking caching and causing feed readers to believe there is no new content even when there might be new posts.
This commit changes this behavior to use the newest date from both `get_lastcommentmodified()` and `get_lastpostmodified()` functions instead of only using the result from `get_lastcommentmodified()`.
Props xiven, mauteri, costdev, audrasjb.
Fixes#47968.
git-svn-id: https://develop.svn.wordpress.org/trunk@53233 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the `$default` parameter to `$default_value` in `check_column()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53232 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the `$public` parameter to `$is_public` in `wp_install()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53230 602fd350-edb4-49c9-b593-d223f7449a82
This filter prevented removing attachment titles. This changeset removes the filter and deprecates the related function since it is no longer used.
Props dromero20, desrosj, Junaidkbr, francina, antpb, audrasjb, aadilali, etaproducto, azouamauriac, Boniu91, SergeyBiryukov.
Fixes#39108.
git-svn-id: https://develop.svn.wordpress.org/trunk@53228 602fd350-edb4-49c9-b593-d223f7449a82
Move the conversion of `minimalInterval` to milliseconds to be grouped with the other time conversions from seconds to milliseconds.
This fixes a bug in which the minimal and main intervals were compared after the former had been converted to milliseconds but the latter had not. This could cause the heatbeat interval to blow out to unexpectedly high values if the minimal interval was set.
Props tabrisrp, sabernhardt, SergeyBiryukov, audrasjb.
Fixes#54825.
git-svn-id: https://develop.svn.wordpress.org/trunk@53226 602fd350-edb4-49c9-b593-d223f7449a82
Remove reference to uncached database query now `get_comment_count()` uses `WP_Comment_Query` which contains caching. Remove reference to `$wpdb` global, it is no longer used.
Follow up to [53036].
Fixes#19901.
git-svn-id: https://develop.svn.wordpress.org/trunk@53225 602fd350-edb4-49c9-b593-d223f7449a82
This commit updates the translator comment in `twenty_twenty_one_continue_reading_text` to indicate that the text is visually hidden. This change also corrects the comment above the `the_content_more_link` filter to reference the content, not the excerpt.
Props sabernhardt, costdev.
Fixes#55564.
git-svn-id: https://develop.svn.wordpress.org/trunk@53221 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$echo` parameter to `$display` in:
* `wp_popular_terms_checklist()`
* `_post_states()`
* `_media_states()`
* Renames the `$default` parameter to `$default_term` in `wp_popular_terms_checklist()`.
* Renames the `$default` parameter to `$default_template` in `page_template_dropdown()`.
* Renames the `$default` parameter to `$default_page` in `parent_dropdown()`.
* Renames the `$object` parameter to `$data_object` in:
* `do_block_editor_incompatible_meta_box()`
* `do_meta_boxes()`
* `do_accordion_sections()`
* Amends the `$item_object` parameter in other functions for consistency:
* `wp_nav_menu_item_post_type_meta_box()`
* `wp_nav_menu_item_taxonomy_meta_box()`
* `_wp_nav_menu_meta_box_object()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53220 602fd350-edb4-49c9-b593-d223f7449a82
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 Beta 1.
Props zieladam, ndiego.
See #55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53219 602fd350-edb4-49c9-b593-d223f7449a82
Since http://api.wordpress.org/patterns API supports array parameters, there is no need to implode slug values inside the _register_remote_theme_patterns function.
Both WP_REST_Pattern_Directory_Controller and _register_remote_theme_patternsmust be updated to support array request arguments.
Props antonvlasenko.
Fixes#55574.
Follow-up #55505, [53152].
git-svn-id: https://develop.svn.wordpress.org/trunk@53218 602fd350-edb4-49c9-b593-d223f7449a82
Ensures that preloaded request can include a `_fields` query param that asks that only selected response fields are returned.
Props jsnajdr, timothyblynjacobs.
Fixes#55213.
See #55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53217 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$parent` parameter to `$category_parent` in `category_exists()` and `wp_create_category()`. This matches the category object property of the same name.
* Amends similar parameters in `dropdown_categories()` and `wp_dropdown_cats()` for consistency.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53216 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$function` parameter to `$callback` in:
* `add_menu_page()`
* `add_submenu_page()`
* `add_management_page()`
* `add_options_page()`
* `add_theme_page()`
* `add_plugins_page()`
* `add_users_page()`
* `add_dashboard_page()`
* `add_posts_page()`
* `add_media_page()`
* `add_links_page()`
* `add_pages_page()`
* `add_comments_page()`
* Renames the `$echo` parameter to `$display` in `menu_page_url()`.
* Renames the `$parent` parameter to `$parent_page` in `get_admin_page_parent()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53215 602fd350-edb4-49c9-b593-d223f7449a82
This file is copied by the build process but it also needs to be versioned so unit tests can run without issues.
Follow-up [53212].
See #55580.
git-svn-id: https://develop.svn.wordpress.org/trunk@53213 602fd350-edb4-49c9-b593-d223f7449a82
The new "Featured Image" enhancement is handled dynamically, so we need to update how the Cover block is handled in the build processa and registered in the code.
Props ironprogrammer, costdev, Mamaduka, chaion07.
Fixes#55580.
git-svn-id: https://develop.svn.wordpress.org/trunk@53212 602fd350-edb4-49c9-b593-d223f7449a82
The code editor reported this issue while mamduka was browsing the blocks.php file. PHP considers variables undefined until a value is assigned (or the global keyword is used).
Follow-up for [53091].
Props mamaduka, peterwilsoncc.
See 55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53211 602fd350-edb4-49c9-b593-d223f7449a82
This PR aims to fix an issue with fetching remote patterns multiple times inside the WP_REST_Block_Patterns_Controller::get_items method.
Follow-up [53152].
Props antonvlasenko.
See #55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53209 602fd350-edb4-49c9-b593-d223f7449a82
The site editor, unlike other editors, generates the styles coming from global styles (presets, styles) dynamically in the client. This is because the user can modify any value that we need to consolidate (merge core, theme, and user style preferences). We don't want to have the global styles twice, as it introduces subtle bugs.
Props oandregal, youknowriad.
See #55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53208 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$echo` parameter to `$display` in `wp_nav_menu_disabled_check()`.
* Renames the `$object` parameter to `$item_object` in:
* `wp_nav_menu_item_post_type_meta_box()`
* `wp_nav_menu_item_taxonomy_meta_box()`
* `_wp_nav_menu_meta_box_object()`
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53207 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces a link to the outdated W3C specs on Custom Elements with a link to the corresponding WhatWG specification.
Follow-up to [53204].
See #54729.
git-svn-id: https://develop.svn.wordpress.org/trunk@53205 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces a link to the outdated W3C specs on Custom Elements with a link to the corresponding WhatWG specification.
See #54729.
git-svn-id: https://develop.svn.wordpress.org/trunk@53204 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the `$echo` parameter to `$display_message` in `upload_is_user_over_quota()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53203 602fd350-edb4-49c9-b593-d223f7449a82
The X-Frame-Options MDN documentation has been moved to `/docs/Web/HTTP/Headers/X-Frame-Options`. This changeset updates the link accordingly.
See #54729.
git-svn-id: https://develop.svn.wordpress.org/trunk@53202 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$class` parameter to `$xfn_relationship` in `xfn_check()`.
* Renames the `$value` parameter to `$xfn_value` for clarity.
* Includes minor code layout changes for better readability.
Reference: [http://gmpg.org/xfn/join XFN: Getting Started].
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53198 602fd350-edb4-49c9-b593-d223f7449a82
This fixes an `Array double arrow not aligned correctly` WPCS warning.
Follow-up to [53075], [53084], [53091], [53094], [53155], [53129].
See #54728.
git-svn-id: https://develop.svn.wordpress.org/trunk@53197 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit:
* Renames the `$class` parameter to `$classes` in `add_cssclass()`.
* Renames the `$add` parameter to `$class_to_add` for clarity.
* Includes minor code layout changes for better readability.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53193 602fd350-edb4-49c9-b593-d223f7449a82
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.
This commit renames the `$return` parameter to `$return_type` in `media_sideload_image()`.
Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185].
Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
git-svn-id: https://develop.svn.wordpress.org/trunk@53192 602fd350-edb4-49c9-b593-d223f7449a82