readonly() – Outputs the HTML readonly attribute.
You appear to be a bot. Output may be restricted
Description
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.
Usage
$string = readonly( $readonly_value, $current, $display );
Parameters
- $readonly_value
- ( mixed ) required – One of the values to compare.
- $current
- ( mixed ) optional default: 1 – Optional. The other value to compare if not just true. Default true.
- $display
- ( bool ) optional default: 1 – Optional. Whether to echo or just return the string. Default true.
Returns
string HTML attribute or empty string.
Source
File name: wordpress/wp-includes/php-compat/readonly.php
Lines:
1 to 4 of 4
function readonly( $readonly_value, $current = true, $display = true ) { _deprecated_function( readonly, '5.9.0', 'wp_readonly()' ); return wp_readonly( $readonly_value, $current, $display ); }