HTTP/2 301
server: nginx
date: Fri, 10 Oct 2025 11:51:28 GMT
content-type: text/html; charset=UTF-8
location: https://developer.wordpress.org/reference/functions/disabled/
x-content-type-options: nosniff
content-language: en
x-ua-compatible: IE=Edge
vary: Accept-Encoding, Cookie
expires: Thu, 01 Jan 1970 00:00:00 GMT
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
alt-svc: h3=":443"; ma=86400
strict-transport-security: max-age=31536000
HTTP/2 200
server: nginx
date: Fri, 10 Oct 2025 11:51:30 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
disabled() – Function | Developer.WordPress.org
disabled( mixed $disabled, mixed $current = true, bool $display = true ): string
Outputs the HTML disabled attribute.
Compares the first two arguments and if identical marks as disabled.
$disabled
mixedrequiredOne of the values to compare.
$current
mixedoptionalThe other value to compare if not just true.
Default:true
$display
booloptionalWhether to echo or just return the string.
Default:true
string HTML attribute or empty string.
Version | Description |
---|
3.0.0 | Introduced. |
Enable/disable text field according to the given value.