Form Helpers (category)

checked()

Used in checkbox and radio fields of the form. Made for convenience, checks two values and if they match, outputs the attribute checked='checked' for the current form field.

disabled()

Compares two given values, and if they are the same, displays disabled = 'disabled' – an attribute for a form input field.

form_option()

Displays the sanitized option value. Used when displaying the wp option value for the value attribute of the <input> tag.

readonly()

Compares 2 values, if they match, outputs the string readonly='readonly'. Used for the tag <input>.

selected()

Outputs the string selected='selected' if the first two parameters of the function match.

wp_readonly()

Outputs readonly='readonly', if the first two parameters of the function match.