WordPress at a glance

readonly() WP 1.0

Outputs the html readonly attribute.

Compares the first two arguments and if identical marks as readonly

No Hooks.

Return

String. html attribute or empty string

Usage

readonly( $readonly, $current, $echo );
$readonly(mixed) (required)
One of the values to compare
$current(mixed)
(true) The other value to compare if not just true
Default: true
$echo(true/false)
Whether to echo or just return the string
Default: true

Code of readonly: wp-includes/general-template.php VER 5.0.1

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

Related Functions

From tag: form functions

No comments
    Hello, !     Log In . Register