Skip to content

Commit 38d3d6e

Browse files
committed
EscapingFunctionsTrait: add wp_readonly() to the list of auto-escaped functions
This function was added in WP 5.9 to replace the `readonly()` function as `readonly` became a reserved keyword in PHP 8.1 (though only partially to allow the WP community some time to catch up). I'm leaving `readonly()` in the list. While it shouldn't be used anymore, if it is, it still is a valid auto-escaped function. Ref: https://core.trac.wordpress.org/ticket/53858
1 parent ed8c30d commit 38d3d6e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WordPress/Helpers/EscapingFunctionsTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ trait EscapingFunctionsTrait {
162162
'wp_login_form' => true,
163163
'wp_loginout' => true,
164164
'wp_nav_menu' => true,
165+
'wp_readonly' => true,
165166
'wp_register' => true,
166167
'wp_tag_cloud' => true,
167168
'wp_timezone_choice' => true,

0 commit comments

Comments
 (0)