Outputs the HTML readonly attribute.
Compares the first two arguments and if identical marks as readonly.
This function is deprecated, and cannot be used on PHP >= 8.1.
$readonly_valuemixedrequired
$currentmixedoptional
Default:true
$displaybooloptional
Default:true
function readonly( $readonly_value, $current = true, $display = true ) {
_deprecated_function( __FUNCTION__, '5.9.0', 'wp_readonly()' );
return wp_readonly( $readonly_value, $current, $display );
}
| Version | Description |
|---|---|
| 5.9.0 | Use wp_readonly() introduced in 5.9.0. |
| 4.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/readonly