wpseek.com
A WordPress-centric search engine for devs and theme authors



readonly › WordPress Function

Since4.9.0
Deprecated5.9.0
readonly ( $readonly, $current = true, $echo = true )
Parameters: (3)
  • (mixed) $readonly One of the values to compare.
    Required: Yes
  • (mixed) $current Optional. The other value to compare if not just true. Default true.
    Required: No
    Default: true
  • (bool) $echo Optional. Whether to echo or just return the string. Default true.
    Required: No
    Default: true
See:
Returns:
  • (string) HTML attribute or empty string.
Defined at:
Codex:

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.


Source

function readonly( $readonly, $current = true, $echo = true ) {
	_deprecated_function( __FUNCTION__, '5.9.0', 'wp_readonly()' );
	return wp_readonly( $readonly, $current, $echo );
}