Outputs the HTML readonly attribute.
Compares the first two arguments and if identical marks as readonly.
$readonly_valuemixedrequired
$currentmixedoptional
Default:true
$displaybooloptional
Default:true
function wp_readonly( $readonly_value, $current = true, $display = true ) {
return __checked_selected_helper( $readonly_value, $current, $display, 'readonly' );
}
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_readonly