WPDev.one

readonly()

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
4.9.0
Source File
wp-includes/php-compat/readonly.php
Advertisement