In [59224], customizer accordion item HTML structure was changed to include a `button` element as the interactive control. However, some themes inject custom markup for panel headings.
Fix `controls.js` to handle both the new markup and the old markup, which is relatively common in themes.
Props paullb, desrosj, sabernhardt, joedolson, jorbin.
Fixes#62494.
Built from https://develop.svn.wordpress.org/trunk@59555
git-svn-id: http://core.svn.wordpress.org/trunk@58941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a `noun` or `verb` context to the various occurrences of "upload" in the admin, to make it easier for translators to differenciate these strings depending on the context.
Props timse201, wpgerd.
Fixes#62732.
Built from https://develop.svn.wordpress.org/trunk@59554
git-svn-id: http://core.svn.wordpress.org/trunk@58940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes an issue where the theme browser created unwanted horizontal scrolling on some mobile devices. The issue occured when viewing theme details on mobile.
Follow-up to [26142].
Props wildworks, abcd95, sainathpoojary, dhruvang21, sabernhardt.
Fixes#62411.
Built from https://develop.svn.wordpress.org/trunk@59553
git-svn-id: http://core.svn.wordpress.org/trunk@58939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset addresses adjusts margins around the login form for visual consistency. The margin above and below the form is now consistently set to 24px, and the margin below the logo has also been adjusted to 24px.
Follow-up to [26072].
Props deeppatel8950, audrasjb, priyank9033, viralsampat, vijaysinh9094, sabernhardt, .
Fixes#61667.
Built from https://develop.svn.wordpress.org/trunk@59551
git-svn-id: http://core.svn.wordpress.org/trunk@58937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes an issue in the Media Library where icons or thumbnails of uploaded files were stuck to the border of their container after file upload.
Follow-up to [58279].
Props sukhendu2002, im3dabasia1, sainathpoojary, joedolson.
Fixes#62573.
See #60141.
Built from https://develop.svn.wordpress.org/trunk@59550
git-svn-id: http://core.svn.wordpress.org/trunk@58936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ignore the `format` parameter introduced in WordPress 6.7 for post types that do not support post formats. This protects against a fatal error being thrown in later version of PHP or a warning in earlier versions of PHP.
Follow up to r59115.
Props dd32, sergeybiryukov, yogeshbhutkar.
Fixes#62646.
See #62014.
Built from https://develop.svn.wordpress.org/trunk@59544
git-svn-id: http://core.svn.wordpress.org/trunk@58930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replaces the `-umd` appendage for the `react` and `react-dom` script versions with `.1`. This it to prevent issues with third party code expecting the version number in the form `/^[\d\.]+$/`.
Updates the version to tests in `Tests_Dependencies_Scripts::test_vendor_script_versions_registered_manually` to include the modified version used for cache busting.
Follow up to [59536], [58775].
Props azaozz, desrosj, peterwilsoncc.
Fixes#62422.
Built from https://develop.svn.wordpress.org/trunk@59540
git-svn-id: http://core.svn.wordpress.org/trunk@58926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In 6.7, [58775] changed the way `react` and `react-dom` are bundled in Core. This commit resulted in some changes to the built files that are distributed in WordPress even though the actual version of the libraries remained the same.
The result can be a blank white screen when trying to edit a post when those two script files are heavily cached. This adds `-umd` to the end of the version number to properly purge caches until the next update to these libraries occurs.
Props levskipg, get_dave, smerriman, jdnd, juanwp22, seanlanglands, robertstaddon.
Fixes 62422.
Built from https://develop.svn.wordpress.org/trunk@59536
git-svn-id: http://core.svn.wordpress.org/trunk@58922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `devDependencies` for all default themes with `package.json` files (Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One) are now updated to their latest versions with a few exceptions in Twenty Twenty-One:
- Upgrading `stylelint`/`@wordpress/stylelint-config` requires some work to address rule deprecations.
- `@wordpress/eslint-plugin` does not yet support `eslint` 9.x.
Additionally, `npm audit fix` has been run for each theme.
See #62220.
Built from https://develop.svn.wordpress.org/trunk@59530
git-svn-id: http://core.svn.wordpress.org/trunk@58916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds an input to the Test Old Branches workflow that allows a specific branch to be specified or `all` to run all old branches.
The default behavior is to only test the currently supported version of WordPress as defined in the `CURRENTLY_SUPPORTED_BRANCH` environment variable.
Follow up to [59520].
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59529
git-svn-id: http://core.svn.wordpress.org/trunk@58915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [58010], the external test suite from `html5lib` was imported to validate the tree-construction steps in the HTML Processor to ensure that they are behaving according to the HTML specification.
The test group was excluded by default because there are a high number of skipped tests. The number of skipped tests has come down, but the group does not need to be run on every job.
This introduces a new job in the PHPUnit workflow for regularly running these tests on their own using the changes in [59251[.
Props desrosj, jonsurrell, jorbin, dmsnell, costdev, chaion07, engahmeds3ed.
Fixes#61209.
Built from https://develop.svn.wordpress.org/trunk@59528
git-svn-id: http://core.svn.wordpress.org/trunk@58914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Block Hooks were previously only applied to layout elements such as templates, template parts, patterns, and navigation menus -- things that are edited in the Site Editor.
This changeset enables Block Hooks in post content. The parity between frontend and editor is preserved: Blocks inserted by Block Hooks are visible both on the frontend and in the editor, and any customizations made by the user are respected on the frontend.
This is possible thanks to setting the `metadata.ignoredHookedBlocks` attribute on anchor blocks (a technique first introduced in [57594]). For first child and last child insertion into a Post Content block, the corresponding post object's `_wp_ignored_hooked_blocks` post meta is set.
Props bernhard-reiter, gziolo, jonsurrell, karolmanijak, leewillis77.
Fixes#61074.
Built from https://develop.svn.wordpress.org/trunk@59523
git-svn-id: http://core.svn.wordpress.org/trunk@58909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to avoid slowing down the post editing by using a cached value instead of calling `get_users()`, which can be slow when plugins add various filters to all `get_users()` calls, especially with meta value comparisons on large `user_meta` tables.
Follow-up to [24304], [24543], [41829], [53011], [53018].
Props berislav.grgicak, bor0, costdev.
See #55958.
Built from https://develop.svn.wordpress.org/trunk@59522
git-svn-id: http://core.svn.wordpress.org/trunk@58908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes the necessary changes to update the Slack GitHub Action to the latest version, currently `2.0.0`.
Most notably this update provides more control over how attempts re retried when rate limiting is encountered.
Reverts [59209].
See #61701, #62221.
Built from https://develop.svn.wordpress.org/trunk@59519
git-svn-id: http://core.svn.wordpress.org/trunk@58905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Includes:
* Removing redundant `use_smilies` option switches, as it is set to 1 by default.
* Restoring the `$wpsmiliestrans` array before performing assertions, not after.
* Moving most of the `smilies_init()` calls to a `set_up()` method.
Follow-up to [409/tests], [26191], [28717].
See #62278.
Built from https://develop.svn.wordpress.org/trunk@59516
git-svn-id: http://core.svn.wordpress.org/trunk@58902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to avoid a fatal error from `count()` when `preg_split()` fails on large input.
Includes:
* Optimizing the regular expression used to split the input by tags to avoid unlimited backtracking for better performance.
* Adjusting the function logic for better readability.
Follow-up to [340], [4380], [26191].
Props podpirate, nathkrill, rajinsharwar, dmsnell, bjorsch, q0rban, audrasjb, rupw, Ov3rfly, jorbin, nhrrob, chaion07, mcqueen22, azaozz, narenin, roybellingan, SergeyBiryukov.
See #51019.
Built from https://develop.svn.wordpress.org/trunk@59515
git-svn-id: http://core.svn.wordpress.org/trunk@58901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix a bug where a comment reply would be discarded if `esc` was pressed to dismiss the context menu in Safari or Firefox.
Checks whether the contextmenu is open and ignores the `esc` key if it is.
Props yellowafterlife, yogeshbhutkar, joedolson.
Fixes#62346.
Built from https://develop.svn.wordpress.org/trunk@59514
git-svn-id: http://core.svn.wordpress.org/trunk@58900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When reinstalling a theme by uploading a ZIP file, the wording used in some strings referred to the "active" theme even though it's not the currrently active theme. This changeset replaces these strings to refer to the "installed" theme, which is more accurate.
Follow-up to [52610], [52580].
Props afercia, ankitkumarshah, abcd95, yogeshbhutkar, parthvataliya, sainathpoojary, virgar, gaellebesson, nuryko, guillaumeturpin, maximemeganck, sabrineg.
Fixes#62603.
See #54831, #54770
Built from https://develop.svn.wordpress.org/trunk@59513
git-svn-id: http://core.svn.wordpress.org/trunk@58899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Wrap the classic editor 'Skip to Editor' link in a conditional to prevent it from rendering on post types that do not have editor support.
Props wildworks, parthvataliya, narenin, sainathpoojary, ankitkumarshah, parthvataliya, im3dabasia1.
Fixes#62623.
Built from https://develop.svn.wordpress.org/trunk@59511
git-svn-id: http://core.svn.wordpress.org/trunk@58897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove CSS that could occasionally trigger the accordion buttons to be 100% the height of the accordion container.
Props dhewercorus, im3dabasia1, sabernhardt, rvoigt, ghinamt, vishy-moghan, frankbiganski, redkite.
Fixes#62491.
Built from https://develop.svn.wordpress.org/trunk@59510
git-svn-id: http://core.svn.wordpress.org/trunk@58896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the following `devDependencies`:
- `dotenv` from `16.4.5` to `16.4.7`
- `dotenv-expand` from `11.0.6` to `12.0.1`
- `postcss` from `8.4.47` to `8.4.49`
- `qunit` from `2.22.0` to `2.23.1`
- `sass` from `1.79.4` to `1.79.6`
- `terser-webpack-plugin` from `5.3.10` to `5.3.11`
- `uglify-js` from `3.17.4` to `3.19.3`
- `uuid` from `9.0.1` to `11.0.3`
- `webpack` from `5.90.2` to `5.97.1`
Additionally, `npm audit fix` has been run.
Follow up to [58585].
See #62220.
Built from https://develop.svn.wordpress.org/trunk@59509
git-svn-id: http://core.svn.wordpress.org/trunk@58895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The upgrade testing workflow is currently at ~978 jobs spawned from the strategy matrix. While it's great to test all possible combinations, GitHub's UI cannot keep up with tracking that number of jobs, often taking 30-45 minutes to accurately report the outcome even though the jobs themselves all complete in under 5 minutes.
This is 2x the total number of concurrent jobs allowed for the entire organization (which creates a backlog and slows everything down even more).
This trims down the number of combinations included in the testing matrices to be a bit more thoughtful following the following methodology:
- The last two releases of WordPress are tested against all PHP and MySQL LTS version combinations and the most recent innovation release.
- The next 6 oldest versions of WordPress are tested against both the oldest and newest releases of PHP currently supported for both PHP 7 & 8 along with the oldest and newest MySQL LTS versions currently supported (no innovation releases).
- For the remaining versions of WordPress receiving security updates, they are only included if the database version was different that the previous major release.
- The oldest version of WordPress receiving security updates should always be tested against the same full list of combinations as the last two releases.
When choosing which MySQL versions to test against:
- Only the most recent innovation release should be included in testing.
- Even though MySQL >= 5.5.5 is currently supported, there are no 5.5.x Docker containers available that work on modern architectures.
- 5.6.x Docker containers are available and work, but 5.6 only accounts for ~2.3% of installs as of 12/6/2024.defaults:
- 5.7.x accounts for ~20% of installs, so this is used below instead.
With these changes, the total number of jobs is reduced by ~58%.
Props johnbillion, mukesh27.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59508
git-svn-id: http://core.svn.wordpress.org/trunk@58894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Because reusable workflows could be called from any other repository in a variety of contexts, repository specific `if` conditions should not be present.
Instead, this logic should be included in the calling workflows only.
Props johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59507
git-svn-id: http://core.svn.wordpress.org/trunk@58893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes the issue when an HTML_Processor bookmark was set at a virtual token (a node in the resulting document that does not correspond to an HTML token present in the input string), seek behavior was unreliable.
Props jonsurrell, gziolo.
Fixes#62521.
Built from https://develop.svn.wordpress.org/trunk@59502
git-svn-id: http://core.svn.wordpress.org/trunk@58888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The HTML specification does not close HTML or BODY tags (pop them off the stack of open elements) when their tag closers are encountered. The HTML processor correctly handled this behavior, however it incorrectly "paused" by returning true from the step functions.
Props jonsurrell, dmsnell, gziolo.
Fixes#62583.
Built from https://develop.svn.wordpress.org/trunk@59500
git-svn-id: http://core.svn.wordpress.org/trunk@58886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates docblocks to account for new use of the `custom-css` string in their `$types` parameters and adds information to deprecation of `wp_get_global_styles_custom_css`.
Props justlevine, isabel_brison, ramonopoly.
Fixes#62665.
Built from https://develop.svn.wordpress.org/trunk@59499
git-svn-id: http://core.svn.wordpress.org/trunk@58885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
While the PHPUnit workflow currently relies on the local Docker environment and provides some safety checks that the environment works as expected, this may not always be true and does not test all of the available commands related to the environment.
This introduces a basic workflow for testing the related scripts for the various supported combinations of PHP and database software with the environment to confirm everything is working as expected.
Ideally this would also be run on Windows and MacOS to catch platform specific bugs. Unfortunately, Docker is not supported within the GitHub Action runner images, so not all bugs will be caught by this workflow.
Props johnbillion, Clorith.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59492
git-svn-id: http://core.svn.wordpress.org/trunk@58878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `include` part of the strategy for the PHPUnit testing workflow defines a few testing configurations outside of the matrix. The versions of PHP and MySQL used in these have not been updated for some time. This was mostly due to various incompatibilities that have since been resolved.
Props peterwilsoncc, johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59490
git-svn-id: http://core.svn.wordpress.org/trunk@58876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Partially reverts [59479] and [59461], which previously tried to move some functions from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so they are available early, so that `get_plugin_data()` can be used.
However, other functions from that file are often used by plugins without necessarily checking whether they are available, easily causing fatal errors. Requiring this file directly is a safer approach to avoid such errors.
Props peterwilsoncc, dd32, swissspidy, johnbillion.
Fixes#62244.
Built from https://develop.svn.wordpress.org/trunk@59488
git-svn-id: http://core.svn.wordpress.org/trunk@58874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Because the installation testing workflow relies on the reusable workflow that reads the JSON support files, it should be run when that file is changed to confirm there are no issues.
This is currently only configured for `pull_request` events, but should also be true for `push`.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59485
git-svn-id: http://core.svn.wordpress.org/trunk@58871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Older versions of MariaDB did not contain the `mariadb-admin` command. This command is configured as the `healthcheck` used by the local Docker environment to confirm that the database container has successfully started and is reporting as “healthy”. The current result is a failure when starting the environment while using one of the affected older versions.
For MariaDB versions 10.3 and earlier, the `mysqladmin` command was used instead. Since WordPress still technically supports back to MariaDB 5.5, the local environment should support running these versions. This updates the environment configuration to take this into account when performing a `healthcheck` test.
The README file is also updated to reflect that the same workaround added in [57568] for MySQL <= 5.7 is required when using MariaDB 5.5 on an Apple silicon machine.
Props johnbillion.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59484
git-svn-id: http://core.svn.wordpress.org/trunk@58870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`actions/checkout` will always checkout the current repository unless the `repository` input is specified. This updates the `reusable-support-json-reader-v1.yml` workflow to always default to reading the JSON files from `wordpress-develop`.
A `repository` has also been added to the workflow to allow a different set of JSON files to be read if desired.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59483
git-svn-id: http://core.svn.wordpress.org/trunk@58869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensure that the `$context` arg passed from `update_ignored_hooked_blocks_postmeta` to `apply_block_hooks_to_content` (and from there, to filters such as `hooked_block_types` and `hooked_block`) has the correct type (`WP_Post`).
Filters hooked to `hooked_block_types` etc can typically include checks that conditionally insert a hooked block depending on `$context`. Prior to this changeset, a check like `if ( $context instanceof WP_Post )` would incorrectly fail, as `$context` would be a `stdClass` instance rather than a `WP_Post`. As a consequence, a hooked block inside of a Navigation post object that was modified by the user would not be marked as ignored by `update_ignored_hooked_blocks_postmeta`, and thus be erroneosly re-inserted by the Block Hooks algorithm.
Props bernhard-reiter.
Fixes#62639.
Built from https://develop.svn.wordpress.org/trunk@59482
git-svn-id: http://core.svn.wordpress.org/trunk@58868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This prevents printing styles and scripts before the `<!DOCTYPE>`.
The `_wp_admin_html_begin()` function should precede Customizer script hooks, in case a plugin prints markup inside a hook such as `admin_enqueue_scripts`.
Follow-up to [19995], [27907].
Props sabernhardt.
Fixes#62629.
Built from https://develop.svn.wordpress.org/trunk@59480
git-svn-id: http://core.svn.wordpress.org/trunk@58866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is a follow-up to [59461], which moved `get_plugin_data()` from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so it's available during the plugin loading process.
Related functions like `is_plugin_active()` are often used together and should therefore be moved as well, to improve backward compatibility for plugins which load `wp-admin/includes/plugin.php` only conditionally.
Props johnbillion, dd32, swissspidy.
See #62244.
Built from https://develop.svn.wordpress.org/trunk@59479
git-svn-id: http://core.svn.wordpress.org/trunk@58865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As a follow-up to [59460], make sure that admin strings are loaded when switching locales for auto update notification emails, as those strings are in a separate translation file.
Props benniledl, swissspidy.
Fixes#62496.
Built from https://develop.svn.wordpress.org/trunk@59478
git-svn-id: http://core.svn.wordpress.org/trunk@58864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Interactivity API tries to align client and server rendering so that the behavior is the same. Adds missing handling for `.length` to directives processing on the server on strings and numeric arrays which is inherently supported through JavaScript language on the client.
Props jonsurrell, gziolo, luisherranz.
Fixes#62582.
Built from https://develop.svn.wordpress.org/trunk@59477
git-svn-id: http://core.svn.wordpress.org/trunk@58863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change hides the top border of the first comment in the latest comments block, so that the design
in the editor and the front looks the same.
Props viralsampat, sabernhardt, aishwarryapande, parthvataliya, imranhasanraaz.
Fixes#62282.
Built from https://develop.svn.wordpress.org/trunk@59476
git-svn-id: http://core.svn.wordpress.org/trunk@58862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This gives users another option when selecting how dates are displayed on their site. This change is relevant for better localization, providing more date format choices for users in regions where this format is common.
The `array_unique()` call ensures that if this format was already added by a plugin or theme, it won't be duplicated.
Follow-up to [9131], [22299], [28820], [28848].
Props Daedalon, pbearne, fierevere, im3dabasia1, SergeyBiryukov.
Fixes#55685.
Built from https://develop.svn.wordpress.org/trunk@59475
git-svn-id: http://core.svn.wordpress.org/trunk@58861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a new $size parameter to the wp_editor_set_quality filter. $size is an array with 'width' and 'height' keys. Developers can use this information to set image quality based on the image size.
Props adamsilverstein, joemcgill, Mte90, codekraft, birgire, azaozz, sppramodh.
Fixes#54648.
Built from https://develop.svn.wordpress.org/trunk@59473
git-svn-id: http://core.svn.wordpress.org/trunk@58859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This addresses several instances of `gmdate( 'w' )` being used directly as an integer, when it's actually a numeric string. The issue is remediated by casting the value to `int` before use.
Affected functions:
* `get_calendar()`
* `get_weekstartend()`
Follow-up to [508], [1632].
Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59471
git-svn-id: http://core.svn.wordpress.org/trunk@58857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The post author and post date did not have space between them and the post content. This brings in 1em of top margin. Of note is that this only is if the first element is a paragraph that the issue was caused.
Props abcd95, sabernhardt, desrosj, sainathpoojary, viralsampat.
Fixes#62243.
Built from https://develop.svn.wordpress.org/trunk@59470
git-svn-id: http://core.svn.wordpress.org/trunk@58856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The current implementation of `create_fragment` (and the underlying `create_fragment_at_current_node`) allows passing in a context that might result in a tree that cannot be represented by HTML. For example, a user might use `<p>` as context, and attempt to create a fragment that also consists of a paragraph element, `<p>like this`. This would result in a paragraph node nested inside another -- something that can never result from parsing HTML.
To prevent this, this changeset makes `create_fragment_at_current_node` private and limits `create_fragment` to only `<body>` as context, while a comprehensive solution to allow other contexts is being worked on.
Follow-up to [59444], [59467].
Props jonsurrell, dmsnell, bernhard-reiter.
Fixes#62584.
Built from https://develop.svn.wordpress.org/trunk@59469
git-svn-id: http://core.svn.wordpress.org/trunk@58855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset modifies `WP_HTML_Processor::create_fragment( $html, $context )` to use a full processor and `create_fragment_at_node` instead of the other way around. This makes more sense and makes the main factory methods more clear, where the state required for fragments is set up in `create_fragment_at_node` instead of in both `create_fragment` and `create_fragment_at_current_node`.
This allows for more HTML contexts to be provided to the basic `create_fragment` where the provided context HTML is appended to `<!DOCTYPE html>`, a full processor is created, the last tag opener is found, and a fragment parser is created at that node via `create_fragment_at_current_node`.
The HTML5lib tests are updated accordingly to use this new method to create fragments.
Props jonsurrell, dmsnell, bernhard-reiter.
Fixes#62584.
Built from https://develop.svn.wordpress.org/trunk@59467
git-svn-id: http://core.svn.wordpress.org/trunk@58853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The file could declare its own `$theme` variable, which would override the one used in the `foreach` loop.
To prevent this, call `wp_get_theme()` before loading the file and store the instance in a different variable.
Props neo2k23, swissspidy.
See #62244.
Built from https://develop.svn.wordpress.org/trunk@59466
git-svn-id: http://core.svn.wordpress.org/trunk@58852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This addresses two instances of the (numeric string) `gmdate( 'Z' )` being added to an `int` value.
Affected functions:
* `upgrade_110()`
* `WP_Date_Query::validate_date_values()`
Follow-up to [942], [29925], [45424].
Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59465
git-svn-id: http://core.svn.wordpress.org/trunk@58851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes a missing "D" in the character list used by strspn to find tag openers, causing tags starting with D to be skipped by the tag processor in some circumstances.
Follow-up to [58613].
Props jonsurrell, santosguillamot, wongjn, cbravobernal.
Fixes#62522.
Built from https://develop.svn.wordpress.org/trunk@59464
git-svn-id: http://core.svn.wordpress.org/trunk@58850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This addresses two instances of the (numeric string) return value from `wp_count_terms()` being used directly in `ceil()`, which expects an `int|float`.
Affected methods:
* `WP_Sitemaps_Taxonomies::get_max_num_pages()`
* `wp_nav_menu_item_taxonomy_meta_box()`
Reference: [https://www.php.net/manual/en/function.ceil.php PHP Manual: ceil()].
Follow-up to [14248], [14291], [14569], [14943], [48072], [57648].
Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59462
git-svn-id: http://core.svn.wordpress.org/trunk@58848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In #34114, just-in-time (JIT) translation loading was implemented for projects hosted on WordPress.org. This is now expanded to all other plugins/themes.
Projects with a custom `Text Domain` and `Domain Path` header no longer need to call `load_plugin_textdomain()` or `load_theme_textdomain()`.
This reduces the risk of calling them too late, after some translation calls already happened, and generally makes it easier to properly internationalize a plugin or theme.
This moves the `get_plugin_data()` from `wp-admin/includes/plugin.php` to `wp-includes/functions.php` so it's available during the plugin loading process.
Props swissspidy.
Fixes#62244.
Built from https://develop.svn.wordpress.org/trunk@59461
git-svn-id: http://core.svn.wordpress.org/trunk@58847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If sending an auto update email to the site administrator's email address, look up if a user with the same email exists and switch to that user's locale. If not, explicitly switches to the site locale.
This is a follow-up to [59128] where this was previously added for other types of emails.
Props benniledl, swissspidy.
Fixes#62496.
Built from https://develop.svn.wordpress.org/trunk@59460
git-svn-id: http://core.svn.wordpress.org/trunk@58846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
It is possible to supply a set of default query `args` to `register_taxonomy()` which will be used when querying a list of terms -- for example, `orderby` in order to specify how the resulting list of terms should be sorted.
The Terms REST API controller previously respected these default query args only if the request included a post ID. This changeset makes it so that the default args will also be respected if no post ID is provided.
Props bernhard-reiter, jsnajdr.
Fixes#62500.
Built from https://develop.svn.wordpress.org/trunk@59458
git-svn-id: http://core.svn.wordpress.org/trunk@58844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates `WP_Theme_JSON::get_svg_filters()` to use `WP_Duotone::get_filter_svg_from_preset()` instead of the `wp_get_duotone_filter_svg()` function, deprecated in WordPress 6.3.
Follow-up to [52757], [56101].
Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59455
git-svn-id: http://core.svn.wordpress.org/trunk@58841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This addresses two instances where a function that is documented as returning `{someType}|null` doesn't explicitly return `null`.
Affected functions:
* `array_key_first()`
* `WP_REST_Posts_Controller::handle_terms()`
Follow-up to [38832], [52038].
Props justlevine.
See #52217.
Built from https://develop.svn.wordpress.org/trunk@59453
git-svn-id: http://core.svn.wordpress.org/trunk@58839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This extracts the logic responsible for parsing the `.version-support-*.json` files and returning a list of supported PHP and MySQL versions for a given branch of WordPress into a reusable workflow so that other workflows can make use of the functionality without repeating code.
See #62221.
Built from https://develop.svn.wordpress.org/trunk@59452
git-svn-id: http://core.svn.wordpress.org/trunk@58838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a new function, `wp_render_empty_block_template_warning`, that renders a warning for logged-in users when a block template is empty.
Reviewed by get_dave, richtabor.
Props vcanales, mikachan, peterwilsoncc, richtabor, get_dave, mrfoxtalbot, matveb, arielmaidana, seifradwane, annezazu.
Fixes#62053.
Built from https://develop.svn.wordpress.org/trunk@59449
git-svn-id: http://core.svn.wordpress.org/trunk@58835 1a063a9b-81f0-0310-95a4-ce76da25c4cd