Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#24568 closed feature request (duplicate)

Modernizr a part of WordPress?

Reported by: Looimaster Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: External Libraries Keywords:
Focuses: Cc:


I think that Modernizr is currently the best and highly useful library for detecting browser features. Something as useful as jQuery or Iris Colorpicker.

Shouldn't it become a part of WordPress? Many plugins and themes add it and developers need to use "function_exists" checks to prevent conflicts.


if ( Modernizr.touch ) {


instead of for instance:

if ( wp_is_mobile() ) {


would be great!

Change History (4)

comment:1 @Looimaster2 years ago

And also in case of CSS styling I can think of many advantages:

.touch .element { display: none; }

comment:2 @nofearinc2 years ago

  • Cc mario@… added

comment:3 @johnbillion2 years ago

  • Type changed from defect (bug) to feature request

Related discussion: #24541

comment:4 @ocean902 years ago

  • Component changed from General to External Libraries
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23739.

jQuery and Iris Colorpicker are both used in core. Modernizr not.

If Modernizr should be used in core, then there should be a discussion first, which explains the benefits of using Modernizr instead of our current feature detection.

Note: See TracTickets for help on using tickets.