Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#12581 closed enhancement (fixed)

Add disabled() form helper

Reported by: nacin's profile nacin Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Formatting Keywords:
Focuses: Cc:

Description

We should add disabled() as a form helper to echo ' disabled="disabled"'.

We should also consider moving selected(), checked(), and disabled() (and the helper function) into wp-includes/general-template.php, out of wp-admin/includes/template.php, as a plugin author may find use for them outside of wp-admin.

readonly() wouldn't be a bad idea either, though usually that isn't based on a condition (and we never use it conditionally in core).

Attachments (1)

12581.diff (10.5 KB) - added by nacin 15 years ago.

Download all attachments as: .zip

Change History (7)

#1 in reply to: ↑ description @scribu
15 years ago

Replying to nacin:

We should add disabled() as a form helper to echo ' disabled="disabled"'.

+1

We should also consider moving selected(), checked(), and disabled() (and the helper function) into wp-includes/general-template.php, out of wp-admin/includes/template.php, as a plugin author may find use for them outside of wp-admin.

+1.5 :)

#2 @nacin
15 years ago

(In [13658]) Introduce the disabled() form helper. Move selected() and checked() out of wp-admin and into full scope. see #12581

@nacin
15 years ago

#3 @nacin
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13661]) Use disabled() form helper. fixes #12581

#4 @nacin
15 years ago

(In [13662]) Fix logic and pull static code out of a loop. fixes #12581

#5 @nacin
15 years ago

(In [13663]) Simplify hackish logic. props miqrogroove. fixes #12581

#6 @scribu
15 years ago

Related: #12598

Note: See TracTickets for help on using tickets.