A WordPress-centric search engine for devs and theme authors



readonly ›

Since4.9.0
Deprecatedn/a
readonly ( $readonly, $current = true, $echo = true )
Parameters: (3)
  • (mixed) $readonly One of the values to compare
    Required: Yes
  • (mixed) $current (true) The other value to compare if not just true
    Required: No
    Default: true
  • (bool) $echo Whether to echo or just return the string
    Required: No
    Default: true
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



Source

function readonly( $readonly, $current = true, $echo = true ) {
	return __checked_selected_helper( $readonly, $current, $echo, 'readonly' );
}