This removes the toggle UI when updates aren't available. When plugins use the filter, the UI is updated to show that they are being controlled via code. And then removed entirely when not available.
See #50798.
Fixes#50280.
Props elrae, pbiron, SergeyBiryukov, audrasjb, azaozz, StephenCronin, whyisjake, dd32, TimothyBlynJacobs, desrosj.
git-svn-id: https://develop.svn.wordpress.org/trunk@48669 602fd350-edb4-49c9-b593-d223f7449a82
Since `wp_get_environment_type()` runs too early for plugins to hook these filters, and the result is then cached in a static variable and cannot be changed later, the filters are not that useful.
The `WP_ENVIRONMENT_TYPES` and `WP_ENVIRONMENT_TYPE` constants and environment variables should be enough for now.
Follow-up to [47919], [48188], [48372].
Props Clorith, SergeyBiryukov.
Fixes#33161.
git-svn-id: https://develop.svn.wordpress.org/trunk@48662 602fd350-edb4-49c9-b593-d223f7449a82
Changes from using `preg_match()` based `.php` extension checking to using `substr()` in `wp_opcache_invalidate()`.
Props jnylen0, aaroncampbell, SergeyBiryukov, desrosj, mikeschroder.
Fixes#50784.
git-svn-id: https://develop.svn.wordpress.org/trunk@48657 602fd350-edb4-49c9-b593-d223f7449a82
Gutenberg no longer uses the assets field to fetch the assets for the installed block so this field can be dropped from the endpoint. This allows us to reintroduce it at a later point without needing to worry about backward compatibility.
See #50732.
git-svn-id: https://develop.svn.wordpress.org/trunk@48656 602fd350-edb4-49c9-b593-d223f7449a82
Ensure that background updater can be loaded for testing to see if auto-updates can enable automatic updates.
Fixes#50793.
Props dd32.
git-svn-id: https://develop.svn.wordpress.org/trunk@48655 602fd350-edb4-49c9-b593-d223f7449a82
This applies to the Themes screen and the Customizer theme browser.
Props afragen, SergeyBiryukov.
See #48491.
git-svn-id: https://develop.svn.wordpress.org/trunk@48652 602fd350-edb4-49c9-b593-d223f7449a82
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands:
* `npm run lint:jsdoc`
* `npm run lint:jsdoc:fix`
The latter will run the linter and try to fix an possible issues automatically.
Fixes#43828.
Props netweb, atimmer, kamataryo, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48650 602fd350-edb4-49c9-b593-d223f7449a82
DocBlocks should start with a brief, one sentence explanation of the purpose of the function spanning a maximum of two lines.
Follow-up to [48648].
See #44427.
git-svn-id: https://develop.svn.wordpress.org/trunk@48649 602fd350-edb4-49c9-b593-d223f7449a82
Prior to the PHPMailer update in 5.5, old version of the PHPMailer was setting the validator to 'auto' resulting in a sophisticated logic for determining what email address validation should be used. But the new version defaults to 'php', possibly leading to rejection of email addresses which were fine prior to the upgrade. Let's use the WordPress core function `is_email()` so that it can be fully pluggable.
Fixes#50720.
Props david.binda, ayeshrajans, Synchro, SergeyBiryukov, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48645 602fd350-edb4-49c9-b593-d223f7449a82
The custom link colors for admin scheme colors were overriding the danger color.
Props kebbet, dlh.
Fixes#50547.
git-svn-id: https://develop.svn.wordpress.org/trunk@48643 602fd350-edb4-49c9-b593-d223f7449a82
In [47559] the `WP_REST_Request::set_param()` method was adjusted to try and overwrite an existing parameter definition before forcing the value in the first parameter slot. If `set_param()` was called on a request with an `application/json` content type and an empty body, a PHP warning would be issued. This was due to the JSON parameter type not being set to an array when the body is empty.
This commit avoids the warning by adding an `is_array()` check before calling `array_key_exists`. Ideally, `WP_REST_Reuest::parse_json_params()` would set the JSON parameter type to an empty array in this case, but that is too large of a change at this point in the cycle.
Props manooweb.
Fixes#50786.
git-svn-id: https://develop.svn.wordpress.org/trunk@48642 602fd350-edb4-49c9-b593-d223f7449a82
Support for retrieving the langauge pack alongside the install API request was added in https://meta.trac.wordpress.org/changeset/10091 to avoid having to make a plugin update check during the REST API check.
Fixes#50732.
Props dd32, ocean90, ryelle, swissspidy, tellyworth, whyisjake, TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@48641 602fd350-edb4-49c9-b593-d223f7449a82
This applies to the Themes screen fallback used when JS is turned off.
Props afragen, desrosj, SergeyBiryukov.
See #48491.
git-svn-id: https://develop.svn.wordpress.org/trunk@48640 602fd350-edb4-49c9-b593-d223f7449a82
Backport the latest block patterns from the Gutenberg plugin.
The new patterns adapt properly to Core themes.
Props nrqsnchz.
Fixes#50550, #50594.
git-svn-id: https://develop.svn.wordpress.org/trunk@48639 602fd350-edb4-49c9-b593-d223f7449a82
This applies to the Themes screen, Add Themes screen, and the Customizer theme browser.
Props afragen, desrosj, SergeyBiryukov.
See #48491.
git-svn-id: https://develop.svn.wordpress.org/trunk@48638 602fd350-edb4-49c9-b593-d223f7449a82
Changes incorrectly named `$filename` variable to `$filepath` and adjusts wording to align with PHP docs.
See #36455.
git-svn-id: https://develop.svn.wordpress.org/trunk@48632 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the correct values are being compared when retrieving the result for custom post types.
Additionally, pass the `$post_type` parameter to `get_lastpostdate` and `get_lastpostmodified` filters.
Props mikaumoto, munyagu, donmhico, johnbillion, SergeyBiryukov.
Fixes#47777.
git-svn-id: https://develop.svn.wordpress.org/trunk@48631 602fd350-edb4-49c9-b593-d223f7449a82
Because `wp_insert_post()` and `wp_transition_post_status()` are called during the process, plugins can unexpectedly modify `$post`.
Props markparnell, tofandel, archon810, SergeyBiryukov.
Fixes#46671.
git-svn-id: https://develop.svn.wordpress.org/trunk@48625 602fd350-edb4-49c9-b593-d223f7449a82
This provides a minor performance improvement by only running the function in contexts where it's needed.
Follow-up to [47211], [47213], [47763], [48619].
See #46829, #49374.
git-svn-id: https://develop.svn.wordpress.org/trunk@48620 602fd350-edb4-49c9-b593-d223f7449a82
This allows special pages to be denoted as such when editing a menu in the Customizer.
This applies to the Front Page, Posts Page, and Privacy Policy Page.
Follow-up to [47211], [47213], [47763].
Props dlh, whyisjake, SergeyBiryukov.
Fixes#46829. See #49374.
git-svn-id: https://develop.svn.wordpress.org/trunk@48619 602fd350-edb4-49c9-b593-d223f7449a82
Synchronize the documentation between two places, use `WP_Customize_Partial::__construct()` as the canonical source.
Props marekdedic.
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48617 602fd350-edb4-49c9-b593-d223f7449a82
* `wp_privacy_personal_data_export_page`
* `wp_privacy_personal_data_erasure_page`
Hooks should be single-quoted when referenced.
Props pbiron, coffee2code.
See #49572, #meta5318.
git-svn-id: https://develop.svn.wordpress.org/trunk@48616 602fd350-edb4-49c9-b593-d223f7449a82
As of WordPress 4.7, developers can register their own bulk actions on list table screens.
Follow-up to [17297], [38647].
Props joyously, pbiron.
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48614 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the passed value was only used as a fallback if `get_language_attributes()` is not yet available.
Props apedog.
Fixes#49060.
git-svn-id: https://develop.svn.wordpress.org/trunk@48607 602fd350-edb4-49c9-b593-d223f7449a82
This adds the changes from [48073] to the `style-rtl.css` file.
Previously committed in [48514], accidentally reverted in [48602].
See #45912, #49843.
git-svn-id: https://develop.svn.wordpress.org/trunk@48605 602fd350-edb4-49c9-b593-d223f7449a82
Alignments and blocks were not always appearing as they should in the admin.
- Wide alignments sometimes appear only as wide as the text column.
- Full and wide appear centered on the text column
- Full-width blocks sometimes do not take up the full width of the page, and other times they cause a horizontal scroll.
- Wide and full group block children take up the full width of the block by default.
Fixes#49843.
Props kjellr, Joen, poena.
git-svn-id: https://develop.svn.wordpress.org/trunk@48602 602fd350-edb4-49c9-b593-d223f7449a82
Due to the varying server setups, `$_SERVER['SERVER_NAME'];` can't reliably ensure that there will be a relevant host that could be used as the hostname in an email. Since the `network_home_url()` is set at this point, and is filterable, this should better enable emails to be sent from the server.
Fixes#25239.
Props layotte, SergeyBiryukov, nacin, sreedoap, szepe.viktor, jesin, kitchin, mensmaximus, mt8.biz, Grzegorz.Janoszka, cbutlerjr, dd32, BjornW, neodjandre, BjornW, Ipstenu, ocean90, danielbachhuber, desmith, joemcgill, jdgrimes, riasat, derekakelly, swissspidy, lilmike, tsimmons, robert.peake, DavidAnderson, cloudstek, pigdog234, BjornW, rawrly, pessoft, RedSand, seayou, dvershinin, bastho, chesio, Starbuck, afragen, ocean90, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48601 602fd350-edb4-49c9-b593-d223f7449a82
The function is used for adding a new term, not updating an existing one.
Props audrasjb, bmartinent.
Fixes#50753.
git-svn-id: https://develop.svn.wordpress.org/trunk@48600 602fd350-edb4-49c9-b593-d223f7449a82
Note that passing `div` to the `style` parameter will result in no additional list markup.
Props liuhaibin, jeremyfelt, functionalrhyme.
Fixes#49181.
git-svn-id: https://develop.svn.wordpress.org/trunk@48597 602fd350-edb4-49c9-b593-d223f7449a82
When used as a noun referring to the "virtual" place, `Trash` should be capitalized.
Follow-up to [47233], [48352].
See #45317, #40244.
git-svn-id: https://develop.svn.wordpress.org/trunk@48594 602fd350-edb4-49c9-b593-d223f7449a82
This prevents fatal errors when other hooked functions are expecting both parameters.
Props dd32, desrosj, audrasjb, pbiron.
Fixes#50662.
git-svn-id: https://develop.svn.wordpress.org/trunk@48584 602fd350-edb4-49c9-b593-d223f7449a82
These strings already have a context in `create_initial_post_types()`, and should use the same context in `_wp_privacy_statuses()`.
Props ramiy, audrasjb.
Fixes#50740.
git-svn-id: https://develop.svn.wordpress.org/trunk@48578 602fd350-edb4-49c9-b593-d223f7449a82
There are two pieces in here:
1) The update to change blacklist to blocklist is moved to disallowed_list. "Block" has a meaning in our code, and there could be ambiguity between this code and code related to blocks.
2) This improves backwards compatibility for code that was accessing the now deprecated code.
Previously: [48477], [48405], [48400], [48121], [48122], [48124], [48142], [48566]
Props: desrosj, SergeyBiryukov, johnjamesjacoby
Fixes: #50413
git-svn-id: https://develop.svn.wordpress.org/trunk@48575 602fd350-edb4-49c9-b593-d223f7449a82
With loading="lazy" being added to all images in [47554], let's ensure that it passes kses attributes too.
Fixes#50731.
Props TimothyBlynJacobs, peterwilsoncc, azaozz.
git-svn-id: https://develop.svn.wordpress.org/trunk@48572 602fd350-edb4-49c9-b593-d223f7449a82
This was missed in [48142] which renamed `add_option_allowed_list()` to `add_allowed_options()` for better readability. The two functions should have consistent names.
See #50413.
git-svn-id: https://develop.svn.wordpress.org/trunk@48566 602fd350-edb4-49c9-b593-d223f7449a82
In [47758] a new function `rest_filter_response_by_context` was introduced to expand the JSON schema features supported by the context filtering mechanism.
This commit improves the performance of that function by eliminating repetitive comparisons and loops. Additionally, it improves multi-type support for object + array types.
Fixes#50700.
Props dlh.
git-svn-id: https://develop.svn.wordpress.org/trunk@48555 602fd350-edb4-49c9-b593-d223f7449a82
The previous filter failed the goal of allowing developers to filter all providers before they are registered, since it only filtered the built-in ones.
The more specific `wp_sitemaps_add_provider` filter enables exactly that, as it filters every sitemap provider right before it is added to the sitemaps registry.
Props pbiron, pfefferle, Chouby, swissspidy.
Fixes#50660.
git-svn-id: https://develop.svn.wordpress.org/trunk@48543 602fd350-edb4-49c9-b593-d223f7449a82
Following [48536], rename the function to match the rest of the sitemaps logic.
Also eliminates some dead code after [48523].
Props pbiron.
See #50724. See #50643.
git-svn-id: https://develop.svn.wordpress.org/trunk@48540 602fd350-edb4-49c9-b593-d223f7449a82
Simplify some other strings, use a consistent format for translator comments.
Follow-up to [48535].
See #50038.
git-svn-id: https://develop.svn.wordpress.org/trunk@48539 602fd350-edb4-49c9-b593-d223f7449a82
This fixes an issue where the block directory appears unstyled due to the stylesheets not being enqueued.
Props ryelle, timothyblynjacobs, earnjam.
Fixes#50661.
git-svn-id: https://develop.svn.wordpress.org/trunk@48537 602fd350-edb4-49c9-b593-d223f7449a82
Before this change, the limit of 50k entries was enforced for the number of providers, not the amount of sitemaps all providers add to the index in total.
Props pbiron, swissspidy.
Fixes#50666.
git-svn-id: https://develop.svn.wordpress.org/trunk@48532 602fd350-edb4-49c9-b593-d223f7449a82
The REST API treats routes without a permission_callback as public. Because this happens without any warning to the user, if the permission callback is unintentionally omitted or misspelled, the endpoint can end up being available to the public. Such a scenario has happened multiple times in the wild, and the results can be catostrophic when it occurs.
For REST API routes that are intended to be public, it is recommended to set the permission callback to the `__return_true` built in function.
Fixes#50075.
Props rmccue, sorenbronsted, whyisjake, SergeyBiryukov, TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@48526 602fd350-edb4-49c9-b593-d223f7449a82
If sitemaps are disabled, previously there would be a rewrite rule for the sitemap endpoint. This endpoint would display the homepage since there was a rewrite rule. Now, Sitemaps are loaded, and the proper HTTP headers are returned.
Fixes#50643.
Props swissspidy, kraftbj, donmhico.
git-svn-id: https://develop.svn.wordpress.org/trunk@48523 602fd350-edb4-49c9-b593-d223f7449a82
This will be the time the was proposed, added to the reminder interval.
Fixes#48333.
Props SergeyBiryukov, desrosj.
git-svn-id: https://develop.svn.wordpress.org/trunk@48522 602fd350-edb4-49c9-b593-d223f7449a82
It doesn't make sense to be able to filter the comments list table when there are are no (trashed/spam) comments available.
Fixes#40188.
Props swissspidy, Jim_Panse, menakas, akbarhusen429, dinhtungdu, birgire, SergeyBiryukov, davidbaumwald, rebasaurus, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48521 602fd350-edb4-49c9-b593-d223f7449a82
This helps administrators keep track of which versions of plugins and themes are running on their site when auto-updates occur.
Props audrasjb, pbiron.
Fixes#50350.
git-svn-id: https://develop.svn.wordpress.org/trunk@48517 602fd350-edb4-49c9-b593-d223f7449a82
This updates three packages:
- `@wordpress/browserslist-config` from `2.5.0` to `2.7.0`
- `autoprefixer` from `9.6.0` to `9.8.5`.
- `chokidar-cli` from `2.0.0` to `2.1.0`
See #49768.
git-svn-id: https://develop.svn.wordpress.org/trunk@48515 602fd350-edb4-49c9-b593-d223f7449a82
The oEmbed service for Hulu no longer works and appears to have been silently disabled.
Props tacitonic, talldanwp, youknowriad, bph.
Fixes#50676.
git-svn-id: https://develop.svn.wordpress.org/trunk@48512 602fd350-edb4-49c9-b593-d223f7449a82
- `post_title`,
- `post_content` (image description),
- `post_excerpt` (image caption as saved in the DB),
- `_wp_attachment_image_alt` meta (alt text for the img tag as saved in the DB).
Props spacedmonkey, joedolson, TimothyBlynJacobs, azaozz.
Fixes#50675.
git-svn-id: https://develop.svn.wordpress.org/trunk@48510 602fd350-edb4-49c9-b593-d223f7449a82
In [48456], database import and export icons were introduced. However, the arrows were pointing in the wrong directions. This reverses the arrows to be pointing correctly based on the action described in the name.
Props johnbillion, joen, desrosj, empireoflight.
Fixes#49913.
git-svn-id: https://develop.svn.wordpress.org/trunk@48506 602fd350-edb4-49c9-b593-d223f7449a82
This brings consistency with the `get_{$meta_type}_metadata` filter and more closely matches the `get_metadata_default()` function signature.
Follow-up to [48502].
Props spacedmonkey.
See #43941.
git-svn-id: https://develop.svn.wordpress.org/trunk@48505 602fd350-edb4-49c9-b593-d223f7449a82
Due to Thickbox shenanigans, the buttons height needed to be shrunk a little to center properly in the iframe.
Fixes#49828.
Props ibachal, Otto42, afercia.
git-svn-id: https://develop.svn.wordpress.org/trunk@48503 602fd350-edb4-49c9-b593-d223f7449a82
The order of parameters in `get_metadata_default()` did not match the signature of `get_metadata()`. This could be confusing for developers who are familiar with the existing metadata API.
Fixes#43941.
Props SergeyBiryukov, spacedmonkey, johnjamesjacoby.
git-svn-id: https://develop.svn.wordpress.org/trunk@48502 602fd350-edb4-49c9-b593-d223f7449a82
Ensure that `get_admin_page_title()` returns a value from pages registered using `add_menu_page()`.
Fixes#46081.
Props grapestain, valentinbora, SergeyBiryukov, audrasjb.
git-svn-id: https://develop.svn.wordpress.org/trunk@48500 602fd350-edb4-49c9-b593-d223f7449a82
When `wp_count_posts()` is cached, it does so with all statuses defaulted to 0. The problem is however, if this is called before all plugins have registered their desired statuses, they won't have that default.
Fixes#49685.
Props obliviousharmony, SergeyBiryukov.
git-svn-id: https://develop.svn.wordpress.org/trunk@48497 602fd350-edb4-49c9-b593-d223f7449a82
Adjusts the gallery shortcode handler to check for the `link` attribute when outputting to a feed.
Fixes#22101.
Props ifrins, mdgl, SergeyBiryukov, chriscct7, stevenkword, iworks, DrewAPicture, birgire, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48496 602fd350-edb4-49c9-b593-d223f7449a82
The `@deprecated` DocBlock tag should start with the version followed by the description of what to use instead.
Fixes#44959.
Props keesiemeijer, sabernhardt.
git-svn-id: https://develop.svn.wordpress.org/trunk@48495 602fd350-edb4-49c9-b593-d223f7449a82
This ensures consistency with `Plugin_Upgrader::install_strings()` and resolves an issue caused by the property not existing in other upgrader implementations.
Props schlessera, azaozz.
See #50670.
git-svn-id: https://develop.svn.wordpress.org/trunk@48493 602fd350-edb4-49c9-b593-d223f7449a82
WordPress Core comes by default with a number of block patterns and a frequent request was to be able to opt-out of the Core block patterns.
You can now opt-out using remove_theme_support( 'core-block-patterns' )
Props desrosj, nosolosw.
Fixes#50669.
git-svn-id: https://develop.svn.wordpress.org/trunk@48492 602fd350-edb4-49c9-b593-d223f7449a82
* Move default term assignment from `wp_set_object_terms()` to `wp_insert_post()`.
* Make sure the passed taxonomy list overwrites the existing list if not empty.
* Remove the default term option on `unregister_taxonomy()`.
* Prevent deletion of the default term in `wp_delete_term()`.
Props enrico.sorcinelli, TimothyBlynJacobs.
See #43517.
git-svn-id: https://develop.svn.wordpress.org/trunk@48480 602fd350-edb4-49c9-b593-d223f7449a82
- changes the politeness level of the two error messages introduced in [47835] to `assertive`
- remove unnecessary `polite` parameters as that's the default value
See #50512, #50052.
git-svn-id: https://develop.svn.wordpress.org/trunk@48479 602fd350-edb4-49c9-b593-d223f7449a82
This change renames `$new_whitelist_options` to `$new_allowed_options`. This makes the variable’s purpose more clear, and promotes using more inclusive language.
For backwards compatibility, the new variable is passed by reference to the old one.
Follow up to [48121].
Props ayeshrajans, desrosj, jorbin, SergeyBiryukov.
See #50413.
Fixes#50434.
git-svn-id: https://develop.svn.wordpress.org/trunk@48477 602fd350-edb4-49c9-b593-d223f7449a82
If there are no pages and no static homepage, there will still be one sitemap including the homepage URL.
This change ensures that this sitemap is correctly listed in the sitemap index.
Props Chouby, pacifika, elrae.
Fixes#50571.
git-svn-id: https://develop.svn.wordpress.org/trunk@48476 602fd350-edb4-49c9-b593-d223f7449a82
This makes it easier to style the sitemap and for example center the entire content area.
Props ramiy.
Fixes#50622.
git-svn-id: https://develop.svn.wordpress.org/trunk@48471 602fd350-edb4-49c9-b593-d223f7449a82
This makes it easier for plugins using the `home_url` filter to detect sitemap URLs.
Props Chouby.
Fixes#50592.
git-svn-id: https://develop.svn.wordpress.org/trunk@48470 602fd350-edb4-49c9-b593-d223f7449a82
This is consistent with other email inputs across the admin.
Follow-up to [27743], [42967].
Props man4toman, sushyant.
Fixes#50625.
git-svn-id: https://develop.svn.wordpress.org/trunk@48468 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the ⌧ button would close the search panel, or remove the results. This restores that, in addition pressing escape will do the same.
Fixes#48198.
Props garrett-eclipse, tobifjellner, afercia, JavierCasares.
git-svn-id: https://develop.svn.wordpress.org/trunk@48461 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [48373].
- ignores hidden "sortables" areas
- hides the reorder buttons when there's only one post box
- makes the reorder buttons slightly bigger to match the side of the toggle button
Fixes#39074.
git-svn-id: https://develop.svn.wordpress.org/trunk@48460 602fd350-edb4-49c9-b593-d223f7449a82
Gutenberg 7.9 added support for themes to bundle their own custom styles in to the editor. These changes have been added to 2010 - 2016.
See #50120.
Props kjellr, sabernhardt, ianbelanger.
git-svn-id: https://develop.svn.wordpress.org/trunk@48459 602fd350-edb4-49c9-b593-d223f7449a82