49922 Commits

Author SHA1 Message Date
Daniel Richards
a39a35c8e6 Theme JSON: Ensure root selector (body) is not wrapped in :root :where().
Pre-WordPress 6.6, the `body` selector was used for styles associated with the body.

In 6.6, this was mistakenly changed to `:root :where(body)`, an increase in specificity, causing some issues for themes.

This change reverts the specificity increase, styles again use the `body` selector.

Syncs PHP changes from https://github.com/WordPress/gutenberg/pull/63726.

Props talldanwp, andrewserong, aaronrobertshaw, mukesh27, hellofromtonya.
Fixes #61704.



git-svn-id: https://develop.svn.wordpress.org/trunk@58856 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-06 08:24:14 +00:00
Dennis Snell
8aca1cf6bc WP_Debug_Data: Extract wp-constants data into separate method.
This is the part two in a larger modularization of the data in `WP_Debug_Data`.
Previously this was a single massive method drawing in debug data from various
groups of related data, where the groups were independent from each other.

This patch separates the second of twelve groups, the `wp-constants` info,
into a separate method focused on that data.

This work precedes changes to make the `WP_Debug_Data` class more extensible
for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7106
Discussed in https://core.trac.wordpress.org/ticket/61648

Props: apermo, costdev, dmsnell.
See #61648.


git-svn-id: https://develop.svn.wordpress.org/trunk@58855 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-05 21:37:05 +00:00
Sergey Biryukov
8e7035fd81 Menus: Check if taxonomy term exists in wp_update_nav_menu_item().
When inserting a term from a non-existing taxonomy as a nav item, the `post_title` property should be empty, and the function should not throw a fatal error for `wp_specialchars_decode()`.

Includes bringing some consistency to similar checks for post types and post type archives in the same code fragment.

Follow-up to [14283], [14450], [35382], [36095].

Props dd32, narenin, mukesh27, SergeyBiryukov.
Fixes #61799.

git-svn-id: https://develop.svn.wordpress.org/trunk@58854 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-05 18:58:49 +00:00
Tammie Lister
b17b5d1854 Twenty Twenty-One: Fixes float clearing elements being visible in Row and Grid blocks.
The grid layout looks different between front and back end due to the float clearing elements being visible in Row and Grid blocks. This moves the hack rather than deletes it.

Props up1512001, sabernhardt, poena.
Fixes #61611.


git-svn-id: https://develop.svn.wordpress.org/trunk@58853 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-05 10:07:32 +00:00
Tammie Lister
ddd53c27ad Twenty Sixteen: Fixes Code block not showing same line-height and padding on front and in editor.
The Code block had a difference in line-height and padding in the editor and front end. This does not fix font-family which has another ticket.

Props viralsampat, sabernhardt.
Fixes #61700.


git-svn-id: https://develop.svn.wordpress.org/trunk@58852 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-05 09:49:14 +00:00
Tammie Lister
8b2ff8636f Twenty Nineteen: Fixes Button block not changing appearance settings.
The Button block isn't reflecting appearance settings. This fix keeps the default as font-weight bold but also adds support for other weights.

Props pranitdugad, pitamdey, sabernhardt.
Fixes #61437.


git-svn-id: https://develop.svn.wordpress.org/trunk@58851 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-05 08:55:08 +00:00
Daniel Richards
d842ee4598 Block Styles: Fix ordering of stylesheets when a style variation is applied.
Adjusts the dependency order to ensure stylesheets are output in the correct order.

Syncs the PHP changes from https://github.com/WordPress/gutenberg/pull/63918.

Props talldanwp, aaronrobertshaw, andrewserong, aristath, mukesh27, ramonopoly, ytfeldrawkcab.
Fixes #61748.



git-svn-id: https://develop.svn.wordpress.org/trunk@58850 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-05 06:39:21 +00:00
Robert Anderson
471a6195d0 Media: Automatically convert HEIC images to JPEG
Automatically create a JPEG version of uploaded HEIC images if the server has
a version of Imagick that supports HEIC. Conversion is done silently through
the existing `WP_Image_Editor` infrastructure that creates multiple sizes of
uploaded images.

This allows users to view HEIC images in WP Admin and use them in their posts
and pages regardless of whether their browser supports HEIC. Browser support
for HEIC is relatively low (only Safari) while the occurrence of HEIC images is
relatively common. The original HEIC image can be downloaded via a link on
the attachment page.

Props adamsilverstein, noisysocks, swissspidy, spacedmonkey, peterwilsoncc.
Fixes #53645.


git-svn-id: https://develop.svn.wordpress.org/trunk@58849 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-05 04:11:40 +00:00
Peter Wilson
0a12ad2890 General: Removing static from wp_get_wp_version().
Removes the static storing the version number in `wp_get_wp_version()` to ensure the version number is reported correctly after a WordPress upgrade is completed.

Reverts [58827].

Props costdev, SergeyBiryukov, Cybr.
See #61782.


git-svn-id: https://develop.svn.wordpress.org/trunk@58848 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-04 22:07:06 +00:00
Sergey Biryukov
54e2272b95 Site Health: Display raw value for max_file_uploads on Site Health Info screen.
This resolves a fatal error if `strict_types` PHP setting is enabled:
{{{
Argument #1 ($num) must be of type float, string given
}}}

Since the goal of the Site Health Info screen is to display raw values where possible, the `number_format()` call here does not seem to provide any benefit.

Props krishneup, sabernhardt, audrasjb, SergeyBiryukov.
Fixes #60364.

git-svn-id: https://develop.svn.wordpress.org/trunk@58847 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-04 22:01:28 +00:00
Sergey Biryukov
e4b3f44306 Docs: Correct documentation for the_password_form hook.
This replaces an outdated note about the 20 characters limit on the password field in the WordPress database schema.

The `post_password` column was increased to 255 characters in WordPress 4.7.

Follow-up to [27676], [38590].

Props debarghyabanerjee, peterwilsoncc, dd32, mukesh27.
Fixes #61703.

git-svn-id: https://develop.svn.wordpress.org/trunk@58846 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-03 18:30:51 +00:00
Dennis Snell
bdef9de86c HTML API: Fix an infinite loop in certain unclosed SCRIPT tags.
When the Tag Processor (or HTML Processor) attempts to parse certain
incomplete script tags, the parser enters an infinite loop and will
hang indefinitely. The conditions to reach this situation are:

- Input HTML ends with an open script tag.
- The final character of input is `-` or `<`.

The infinite loop was caused by the parser-advancing increment not being
called when two `||` OR conditions short-circuited. If the first
condition was true, the `$at++` code was never reached.

This path resolves the issue.

Developed in https://github.com/wordpress/wordpress-develop/pull/7128
Discussed in https://core.trac.wordpress.org/ticket/61810

Follow-up to [55203].

Props: dmsnell, jonsurrell.
Fixes #61810.


git-svn-id: https://develop.svn.wordpress.org/trunk@58845 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-02 23:46:45 +00:00
Dennis Snell
0c46e2a0b4 HTML API: Indicate when WordPress rejects attribute updates.
When setting an an attribute value in the HTML API, WordPress may reject
an update based on rules in `kses`. In these cases, the return value from
an escaping function will be an empty string, and the HTML API should
reject the update. Unfortunately, it currently reports that it updates the
attribute but sets an empty string value, which is misleading.

In this patch, the HTML API will refuse the attribute update and return
false to indicate as much when WordPress rejects the updates.

Developed in https://github.com/wordpress/wordpress-develop/pull/7114
Discussed in https://core.trac.wordpress.org/ticket/61719

Follow-up to [58472].

Props: amitraj2203, dmsnell, mukesh27.
Fixes #61719.


git-svn-id: https://develop.svn.wordpress.org/trunk@58844 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-02 22:57:46 +00:00
Peter Wilson
0e06e2b522 General: Use clean WordPress version in is_wp_version_compatible().
Update `is_wp_version_compatible()` to use `wp_get_wp_version()` introduced in [58813] to ensure the value of `$wp_version` has not been modified by a theme or plugin.

Props costdev, mukesh27, Cybr, sergeybiryukov.
Fixes #61781.



git-svn-id: https://develop.svn.wordpress.org/trunk@58843 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-02 22:36:27 +00:00
Sergey Biryukov
da0f44fdff Docs: Improve the wording for cron_reschedule_event_error action description.
Follow-up to [54258].

Props NekoJonez, audrasjb.
See #61608.

git-svn-id: https://develop.svn.wordpress.org/trunk@58842 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-02 19:38:44 +00:00
Dennis Snell
a799101e46 HTML API: Add support for IN SELECT IN TABLE parsing.
As part of work to add more spec support to the HTML API, this patch adds
support for the IN SELECT IN TABLE insertion mode. This small section of the
spec handles rules for the `<select>` element and its children when found
inside of a `<table>`.

Developed in https://github.com/wordpress/wordpress-develop/pull/7044
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell.
See #61576.


git-svn-id: https://develop.svn.wordpress.org/trunk@58841 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-01 22:51:11 +00:00
Dennis Snell
6afe6bc178 HTML API: Add support for IN CAPTION parsing.
As part of work to add more spec support to the HTML API, this patch adds
support for the IN CAPTION insertion mode. This small section of the
spec handles rules for the `<caption>` element.

Developed in https://github.com/wordpress/wordpress-develop/pull/7041
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell.
See #61576.


git-svn-id: https://develop.svn.wordpress.org/trunk@58840 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-01 22:34:29 +00:00
Dennis Snell
5b8e0ec00b HTML API: Add support for IN COLUMN GROUP parsing.
As part of work to add more spec support to the HTML API, this patch adds
support for the IN COLUMN GROUP insertion mode. This small section of the
spec handles rules for the `<colgroup>` element.

Developed in https://github.com/wordpress/wordpress-develop/pull/7042
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell.
See #61576.


git-svn-id: https://develop.svn.wordpress.org/trunk@58839 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-01 22:04:44 +00:00
Sergey Biryukov
d0566719b3 Docs: Correct some typos in a comment in wp_salt().
Follow-up to [58837].

Props kebbet.
Fixes #59871.

git-svn-id: https://develop.svn.wordpress.org/trunk@58838 602fd350-edb4-49c9-b593-d223f7449a82
2024-08-01 20:30:48 +00:00
Peter Wilson
74e03e3cbe Options, Meta APIs: Prime salts when stored in database.
For salts generated and stored in the database, use `wp_prime_site_option_caches()` within `wp_salt()` to prime the options in a single database query, down from up to nine database queries.

The options are primed when the corresponding constant is either undefined or uses the default string `put your unique phrase here`.

Props joemcgill, spacedmonkey, peterwilsoncc.
Fixes #59871.



git-svn-id: https://develop.svn.wordpress.org/trunk@58837 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-31 22:56:32 +00:00
Dennis Snell
883146e8a5 HTML API: Introduce full parsing mode in HTML Processor.
The HTML Processor has only supported a specific kind of parsing mode
called _the fragment parsing mode_, where it behaves in the same way
that `node.innerHTML = html` does in the DOM. This mode assumes a
context node and doesn't support parsing an entire document.

As part of work to add more spec support to the HTML API, this patch
introduces a full parsing mode, which can parse a full HTML document
from start to end, including the doctype declaration and head tags.

Developed in https://github.com/wordpress/wordpress-develop/pull/6977
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell.
See #61576.


git-svn-id: https://develop.svn.wordpress.org/trunk@58836 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-31 16:54:23 +00:00
Sergey Biryukov
489b840cfd Bundled Themes: Update schema version in style variation files.
This ensures that settings and styles are properly handled by code editors that support schema.

Reference: [https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/theme-json-v2/#json-schema Theme.json Version 2 Reference: JSON Schema].

Follow-up to [58403].

Props poena, umeshsinghin.
Fixes #61789.

git-svn-id: https://develop.svn.wordpress.org/trunk@58835 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-31 14:03:24 +00:00
ramonopoly
c3e1d3a8b8 Background: add background attachment support to theme.json styles
Introduces the ability to specify a value for `background.backgroundAttachment` in theme.json styles.

The theme.json value determines the CSS value for the `background-attachment` property.

This feature was introduced into the Gutenberg plugin in version 18.9.

Props andrewserong, mukesh27, noisysocks, ramonopoly.

Fixes #61720



git-svn-id: https://develop.svn.wordpress.org/trunk@58834 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-31 02:39:46 +00:00
Dennis Snell
dfd1de09af HTML API: Add TEMPLATE and related support in HTML Processor.
As part of work to add more spec support to the HTML API, this patch adds
support for the IN TEMPLATE and IN HEAD insertion modes. These changes are
primarily about adding support for TEMPLATE elements in the HTML Processor,
but include support for other tags commonly found in the document head, such
as LINK, META, SCRIPT, STYLE, and TITLE.

Developed in https://github.com/wordpress/wordpress-develop/pull/7046
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell, westonruter.
See #61576.


git-svn-id: https://develop.svn.wordpress.org/trunk@58833 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-30 18:44:45 +00:00
Sergey Biryukov
a16d9eea54 Site Health: Improve the wording for PHP version check.
This aims to make the message more accurate by referring to the version of PHP currently recommended by WordPress, not the current version of PHP.

Follow-up to [44986], [46267], [47254].

Props swb1192, psykro, swissspidy, joemcgill, mukesh27, aristath.
See #61623.

git-svn-id: https://develop.svn.wordpress.org/trunk@58832 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-30 12:23:06 +00:00
Dennis Snell
9ed3553da6 REST API, Meta: Store updates in database when they are equal to the defaults.
This patch fixes an oversight from when default metadata values were introduced
in #43941 in WordPress 5.5: metadata updates should persist in the database
even if they match the registered default value (because the default values 
can change over time).

Previously, the REST API code was comparing updated values against the value
returned by the default-aware `get_metadata()` method. This meant that if no
value existed in the database, and the default value was supplied to the update,
WordPress would think that the updated value was already persisted and skip
the database call.

Now, the `get_metadata_raw()` method is called for comparing whether or not
a database update is required, fixing the bug.

In this patch both issues are resolved.

Developed in https://github.com/wordpress/wordpress-develop/pull/6782
Discussed in https://core.trac.wordpress.org/ticket/55600

Follow-up to [48402].

Props: dmsnell, kraftner, ramon-fincken.
Fixes #55600.


git-svn-id: https://develop.svn.wordpress.org/trunk@58831 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 18:47:21 +00:00
Dennis Snell
345699c071 WP_Debug_Data: Extract wp-filesystem data into separate method.
This is the first part in a larger modularization of the data in `WP_Debug_Data`.
Previously this was a single massive method drawing in debug data from various
groups of related data, where the groups were independent from each other.

This patch separates the first of twelve groups, the `wp-filesystem` info,
into a separate method focused on that data.

This work precedes changes to make the `WP_Debug_Data` class more extensible
for better use by plugin and theme code.

Developed in https://github.com/wordpress/wordpress-develop/pull/7065
Discussed in https://core.trac.wordpress.org/ticket/61648

Props: afragen, apermo, costdev, dmsnell.
See #61648.


git-svn-id: https://develop.svn.wordpress.org/trunk@58830 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 18:20:11 +00:00
Dennis Snell
c6aaf0a7db HTML API: Add set_modifiable_text() for replacing text nodes.
This patch introduces a new method, `set_modifiable_text()` to the
Tag Processor, which makes it possible and safe to replace text nodes
within an HTML document, performing the appropriate escaping.

This method can be used in conjunction with other code to modify the
text content of a document, and can be used for transforming HTML
in a streaming fashion.

Developed in https://github.com/wordpress/wordpress-develop/pull/7007
Discussed in https://core.trac.wordpress.org/ticket/61617

Props: dmsnell, gziolo, zieladam.
Fixes #61617.



git-svn-id: https://develop.svn.wordpress.org/trunk@58829 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 17:57:12 +00:00
Dennis Snell
c73d8a4415 HTML API: Close all elements at the end of a document.
When the model of breadcrumb generation in the HTML Processor and node
traversal was simplified, the change introduced a bug whereby unclosed
nodes at the end of a document would remain unvisited and unclosed.

In this patch, a fix is applied to ensure that all open elements close
while traversing a document. A couple of minor documentation typos are
fixed in the patch as well.

Developed in https://github.com/wordpress/wordpress-develop/pull/7085
Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58713].

Props: dmsnell, gziolo, jonsurrell.
See #61576.


git-svn-id: https://develop.svn.wordpress.org/trunk@58828 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 17:37:48 +00:00
Sergey Biryukov
883d9b6731 General: Memoize the return value in wp_get_wp_version().
This aims to optimize performance by saving the return value to a static variable, so that the `version.php` file is not unnecessarily required on each function call.

Follow-up to [58813].

Props Cybr, debarghyabanerjee, mukesh27.
Fixes #61782. See #61627.

git-svn-id: https://develop.svn.wordpress.org/trunk@58827 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 15:00:44 +00:00
Sergey Biryukov
3977e6281d General: Move wp_get_wp_version() to a more appropriate place.
This places the function in a more predictable location, next to the `is_wp_version_compatible()` and `is_php_version_compatible()` functions.

Follow-up to [58813].

See #61627.

git-svn-id: https://develop.svn.wordpress.org/trunk@58826 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 14:50:44 +00:00
luisherranz
679cc0c4a2 Interactivity API: Allow server derived state to appear in non-final position
In some cases, derived state returns an associative array. Directives may wish to continue to access properties of the associative array, when using the syntax `state.arrayReturnedByClosure.property`. This patch continues evaluating the path after the associative array has been returned by the Closure.

Props jonsurrell, luisherranz.

Fixes #61741.

git-svn-id: https://develop.svn.wordpress.org/trunk@58825 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 11:08:18 +00:00
Tammie Lister
907412bf98 Twenty Twenty: Fixes Table font size when custom showing on front.
The Table block was not reflecting the custom font size on the front. This solution now brings custom font sizes in for front the same as back in the editor.

Props umesh84, SergeyBiryukov, sabernhardt, shailu25.
Fixes #56157.


git-svn-id: https://develop.svn.wordpress.org/trunk@58824 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 10:08:22 +00:00
Tammie Lister
bc87db7201 Twenty Seventeen: Fixes floated images having an extra space when the first image.
The first image when floated in content had extra spacing. This was only for the first image in testing so the solution focuses on that.

Props kjellr, sabernhardt, hmbashar, shailu25.
Fixes #46785.


git-svn-id: https://develop.svn.wordpress.org/trunk@58823 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 09:30:34 +00:00
Peter Wilson
c1ffe3309a Users: Always use HTTPS URLs for Gravatar links.
Modifies gravatar image URLs to always use the HTTPS version from secure.gravatar.com. 

Gravatar now redirects HTTP image requests to their HTTPS equivalent, resulting in redirects for sites running over an HTTP connection (`is_ssl() === false`). Since the introduction of HTTP/2 the use of sub-domains for different hashes ([1-3].gravatar.com) now represents a performance hinderance rather than improvement.

The scheme passed to `get_avatar_data()` is now ignored for the generation of Gravatar URLs but the setting retained to avoid introducing bugs for sites using either local avatars or third party providers.

Props neoxx, SergeyBiryukov, sippis, peterwilsoncc, mukesh27, costdev, dd32.
Fixes #37454.



git-svn-id: https://develop.svn.wordpress.org/trunk@58822 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-29 01:57:11 +00:00
Sergey Biryukov
a3173b6506 Feeds: Introduce feed_links_args and feed_links_extra_args filters.
This allows for more flexibility in modifying how feed links are displayed by the `feed_links()` and `feed_links_extra()` functions, including, for example, a way to change the `&raquo;` separator to something else.

Follow-up to [10377], [33838], [33839], [53125], [54161].

Props topdownjimmy, tw2113, williampatton.
Fixes #43225.

git-svn-id: https://develop.svn.wordpress.org/trunk@58821 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-28 18:25:13 +00:00
Peter Wilson
b59bc83af4 Application Passwords: Open documentation link in same window.
Removes the `target` to to documentation for [https://developer.wordpress.org/apis/wp-config-php/#wp-environment-type setting the environment type] for applications passwords so the tabs open in the same window.

This follows [58137] which added a confirmation prompt for users navigating away from the profile edit screen if they have changed data without saving it.

Props sabernhardt, joedolson.
Fixes #60100.



git-svn-id: https://develop.svn.wordpress.org/trunk@58820 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 23:04:51 +00:00
Tammie Lister
defe4b0ec5 Twenty Twenty: Calendar and Table blocks do not apply custom font size.
This fixes adding a custom font size to a Calendar and Table block. This was only an issue for custom font size entering.

Props nidhidhandhukiya, yurajsinj2211, ankit-k-gupta, anveshika, sabernhardt, darshitrajyaguru97, shailu25, umesh84, SergeyBiryukov.
Fixes #59996, #56157.


git-svn-id: https://develop.svn.wordpress.org/trunk@58819 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 16:41:08 +00:00
Tammie Lister
859263db06 Twenty Twenty-Three: Fixes unnecessary borders for links images in Whisper variation.
This fixes the Whisper variation having borders for links images. Other styles did not have this.

Props colorful-tones, sabernhardt.
Fixes #57368.


git-svn-id: https://develop.svn.wordpress.org/trunk@58818 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 12:32:21 +00:00
Tammie Lister
5159e54b10 Twenty Twenty: Adds Plain Style into Quote block.
Plan style was missing for the Quote block. This brings it in as should have been originally.

Props kajalgohel, devtanbir, costdev, sabernhardt.
Fixes #56011.


git-svn-id: https://develop.svn.wordpress.org/trunk@58817 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 10:12:31 +00:00
Tammie Lister
a3e07a2ec0 Multiple themes: Fixes Code block not adjusting to font size changes.
This resolves the Code block not changing when the font sizes are switched in Twenty Eleven and Twenty Twelve. The solution is the same as used for other code block adjustments for font sizes.

Props viralsampat, sabernhardt.
Fixes #61753.


git-svn-id: https://develop.svn.wordpress.org/trunk@58816 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 09:35:19 +00:00
Tammie Lister
916a992530 Twenty Thirteen: Fixes Code block not adjusting to font size changes.
This resolves the Code block not changing when the font sizes are switched. This theme uses a 14 px size for both and this uses inherit when nested inside pre tag.

Props viralsampat, sabernhardt.
Fixes #61697.


git-svn-id: https://develop.svn.wordpress.org/trunk@58815 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 09:22:35 +00:00
Sergey Biryukov
d497e92424 Docs: Clarify the description for wp_strip_all_tags().
Follow-up to [11929], [27042].

Props coffee2code, krupalpanchal, mukesh27.
Fixes #61759.

git-svn-id: https://develop.svn.wordpress.org/trunk@58814 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 07:50:32 +00:00
Peter Wilson
c41304d73c General: Introduce wp_get_wp_version() to get unmodified version.
Introduces `wp_get_wp_version()` to get an unmodified value of `$wp_version` from `wp-includes/version.php`. Some plugins modify the global in an attempt to improve security through obscurity. This practice can cause errors in WordPress so the ability to get an unmodified version is needed.

Replaces instances within the code base in which `version.php` was required in order to get an unmodified value. `script-loader.php` is intentionally excluded from the replacements as the function is not always available to the file.

Props debarghyabanerjee, afragen, costdev.
See #61627.



git-svn-id: https://develop.svn.wordpress.org/trunk@58813 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-27 00:25:44 +00:00
Sergey Biryukov
ed59f778ba General: Cast $max_depth and $depth to an integer in the Walker class.
This ensures that the arguments are correctly interpreted when passed as a query string, i.e. when `wp_parse_args()` is involved. For example, `wp_list_pages( 'depth=0' )` should display a list of all pages to the maximum depth.

Follow-up to [57848].

Props freibergergarcia, peterwilsoncc, ahortin.
Fixes #61749.

git-svn-id: https://develop.svn.wordpress.org/trunk@58812 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-26 07:54:26 +00:00
Peter Wilson
b38541de39 Options, Meta APIs: Prevent Single Site installs using network notoptions cache.
Modifies the caching of `notoptions` in `delete_network_option()` to ensure that the network cache is bypassed on single site installs.

On single site installs the incorrect caching was causing the `notoptions` cache to remain populated once a deleted option was subsequently added or updated.

Follow up to [58782].

Props bjorsch, pbearne.
Fixes #61730.
See #61484.



git-svn-id: https://develop.svn.wordpress.org/trunk@58811 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-25 23:02:47 +00:00
Peter Wilson
4de5282f23 General: Update English Gravatar links.
Replace links to en.gravatar.com with links to gravatar.com as the english site now uses the base domain. This avoids an unnecessary redirect for english language sites.

The links remain translatable for non-english versions of WordPress.

Props narenin, knutsp.
Fixes #61424.


git-svn-id: https://develop.svn.wordpress.org/trunk@58810 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-25 22:38:01 +00:00
Sergey Biryukov
5ea8ba0bf0 Comments: Only type cast a scalar $comment_id in get_comment_author_link().
This aims to resolve a fatal error when the incoming `$comment_id` is an instance of `WP_Comment` (or any object) without a `comment_ID` property defined, or if it's empty:
{{{
Object of class WP_Comment could not be converted to string
}}}

This commit mirrors the changes previously made for a similar code fragment in `get_comment_author()`.

Includes:
* Unit tests to demonstrate the fatal error and validate the fix.
* Changing the default value for a non-existent comment ID in `get_comment_author()` from an empty string to zero as a numeric string, for consistency with `get_comment_ID()`.

Follow-up to [52818], [55289], [58335], [58755].

Props narenin, mukesh27, iflairwebtechnologies, umeshsinghin, SergeyBiryukov.
Fixes #61715.

git-svn-id: https://develop.svn.wordpress.org/trunk@58809 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-25 22:36:13 +00:00
Felix Arntz
4acefacbf6 Taxonomy: Ensure get_edit_term_link() produces the correct result when called without taxonomy.
This fixes an oversight missed in [36646].

Props debarghyabanerjee.
Fixes #61726.
See #35922.


git-svn-id: https://develop.svn.wordpress.org/trunk@58807 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-24 21:40:59 +00:00
Dennis Snell
5351cd20f3 HTML API: Add TABLE support in HTML Processor.
As part of work to add more spec support to the HTML API, this patch adds
support for various table-related insertion modes. This includes support
for tables, table rows, table cells, table column groups, etc...

Developed in https://github.com/wordpress/wordpress-develop/pull/6040
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell.
See #61576.


git-svn-id: https://develop.svn.wordpress.org/trunk@58806 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-24 18:39:46 +00:00