From 0f0c850723d34deb7f56af8ddddb9679d4e1d8d4 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Fri, 12 May 2017 20:52:09 +0000 Subject: [PATCH] Media: Fix improper use of jQuery `hasClass` method. The jQuery `hasClass` method accepts a class name without a prefix '.' (period). Remove an errant class name with a '.' in `wp-mediaelement.js` that broke the selector in certain circumstances. Props kostasx, Presskopp. Fixes #40354. git-svn-id: https://develop.svn.wordpress.org/trunk@40659 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/mediaelement/wp-mediaelement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/mediaelement/wp-mediaelement.js b/src/wp-includes/js/mediaelement/wp-mediaelement.js index 17f80519a2..db1bccd4d2 100644 --- a/src/wp-includes/js/mediaelement/wp-mediaelement.js +++ b/src/wp-includes/js/mediaelement/wp-mediaelement.js @@ -44,7 +44,7 @@ $( '.wp-audio-shortcode, .wp-video-shortcode' ) .not( '.mejs-container' ) .filter(function () { - return ! $( this ).parent().hasClass( '.mejs-mediaelement' ); + return ! $( this ).parent().hasClass( 'mejs-mediaelement' ); }) .mediaelementplayer( settings ); }