Uses
Uses | Description |
---|---|
wp-includes/general-template.php: __checked_selected_helper() | Private helper function for checked, selected, disabled and readonly. |
Outputs the HTML readonly attribute.
Compares the first two arguments and if identical marks as readonly
(mixed) (Required) One of the values to compare
(mixed) (Optional) (true) The other value to compare if not just true
Default value: true
(bool) (Optional) Whether to echo or just return the string
Default value: true
(string) HTML attribute or empty string
File: wp-includes/general-template.php
function readonly( $readonly, $current = true, $echo = true ) { return __checked_selected_helper( $readonly, $current, $echo, 'readonly' ); }
Version | Description |
---|---|
4.9.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/readonly