Core Function
View Source on Trac ↗ wp_readonly()
wp_readonly( mixed $readonly_value, mixed $current = true, mixed $display = true ) Outputs the HTML readonly attribute.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $readonly_value mixed | One of the values to compare. Required |
| mixed | $current Optional. The other value to compare if not just true. Default true. Required |
| bool | $display Optional. Whether to echo or just return the string. Default true. Required |
Return Value
(string)
HTML attribute or empty string.
Function Information
Since Version
5.9.0
Source File
wp-includes/general-template.php
Advertisement