Commit c639cdc800 for wordpress.org
commit c639cdc800e71bbf0fe7f837e53160633894bc2e
Author: peterwilsoncc <peterwilsoncc@git.wordpress.org>
Date: Thu Sep 24 03:07:47 2026 +0000
KSES: Allow CSS anchor position properties.
Adds CSS anchoring properties to the `safecss_filter_attr()` allow list:
* `anchor-name`
* `anchor-scope`
* `position-anchor`
* `position-area`
* `position-try`
* `position-try-fallbacks`
* `position-try-order`
* `position-visibility`
Props deepakprajapati, wildworks, adrianduffell, dannyreaktiv, im3dabasia1, westonruter.
Fixes #64972.
Built from https://develop.svn.wordpress.org/trunk@63910
git-svn-id: http://core.svn.wordpress.org/trunk@63079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/kses.php b/wp-includes/kses.php
index 9394b75989..f6ef8a1ed1 100644
--- a/wp-includes/kses.php
+++ b/wp-includes/kses.php
@@ -2639,6 +2639,7 @@ function kses_init() {
* @since 7.1.0 Extended gradient support to allow any single-level nested function.
* Added support for transform functions, `clip-path` basic shapes,
* and URLs in the SVG element reference properties.
+ * @since 7.2.0 Added support for CSS anchor positioning properties.
*
* @param string $css A string of CSS rules, decoded from an HTML `style` attribute.
* @param string $deprecated Not used.
@@ -2885,6 +2886,15 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
'pointer-events',
'visibility',
+ 'anchor-name',
+ 'anchor-scope',
+ 'position-anchor',
+ 'position-area',
+ 'position-try',
+ 'position-try-fallbacks',
+ 'position-try-order',
+ 'position-visibility',
+
// Custom CSS properties.
'--*',
)
diff --git a/wp-includes/version.php b/wp-includes/version.php
index bdb8517726..28d7b225b4 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-63909';
+$wp_version = '7.2-alpha-63910';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.