Skip to content
Permalink
Browse files

Use name instead of id in js for forward compatibility with WordPress…

… 4.4
  • Loading branch information...
Luke Carbis
Luke Carbis committed Nov 6, 2015
1 parent b78d40a commit 2b2493ccb3ef6cba5aeb773433fdb5f0d414e8f3
Showing with 3 additions and 3 deletions.
  1. +3 −3 ui/js/admin.js
@@ -233,7 +233,7 @@ jQuery( function( $ ) {
var all_hidden = true;

// If all filters are hidden, hide the button
if ( $( 'div.metabox-prefs [id="date-hide"]' ).is( ':checked' ) ) {
if ( $( 'div.metabox-prefs [name="date-hide"]' ).is( ':checked' ) ) {
all_hidden = false;
}

@@ -255,7 +255,7 @@ jQuery( function( $ ) {
}
}

if ( $( 'div.metabox-prefs [id="date-hide"]' ).is( ':checked' ) ) {
if ( $( 'div.metabox-prefs [name="date-hide"]' ).is( ':checked' ) ) {
$( 'div.date-interval' ).show();
} else {
$( 'div.date-interval' ).hide();
@@ -264,7 +264,7 @@ jQuery( function( $ ) {
$( 'div.actions select.chosen-select' ).each( function() {
var name = $( this ).prop( 'name' );

if ( $( 'div.metabox-prefs [id="' + name + '-hide"]' ).is( ':checked' ) ) {
if ( $( 'div.metabox-prefs [name="' + name + '-hide"]' ).is( ':checked' ) ) {
$( this ).prev( '.select2-container' ).show();
} else {
$( this ).prev( '.select2-container' ).hide();

0 comments on commit 2b2493c

Please sign in to comment.
You can’t perform that action at this time.