Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#26378 closed defect (bug) (fixed)

Replace $.attr() with $.prop() in options-general.php to silence jQuery Migrate warning

Reported by: frank-klein's profile Frank Klein Owned by: nacin's profile nacin
Milestone: 3.8 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

When clicking in the form fields to set a custom time or date format in options-general.php, the radio input in front of the text field gets automatically selected with jQuery.

This results in a jQuery Migrate warning:

JQMIGRATE: jQuery.fn.attr('checked') may use property instead of attribute

The attached patch replaces the use of $.attr() with $.prop() which seems to be the preferred way according to the jQuery documentation. This silences the warning.

Attachments (1)

26378.patch (1.0 KB) - added by Frank Klein 10 years ago.

Download all attachments as: .zip

Change History (3)

@Frank Klein
10 years ago

#1 @nacin
10 years ago

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

In 26571:

Use jQuery.prop('checked') instead of jQuery.attr.

props Frank Klein.
fixes #26378.

#2 @nacin
10 years ago

  • Milestone changed from Awaiting Review to 3.8
Note: See TracTickets for help on using tickets.