| @@ -1,5 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * @package Polylang | |
| 4 | + */ | |
| 2 | 5 | |
| 3 | 6 | /** |
| 4 | 7 | * The language switcher widget |
| 5 | 8 | * |
| @@ -134,9 +137,9 @@ | ||
| 134 | 137 | |
| 135 | 138 | // Remove all options if dropdown is checked |
| 136 | 139 | $( '.widgets-sortables,.control-section-sidebar' ).on( 'change', '.pll-dropdown', function() { |
| 137 | 140 | var this_id = $( this ).parent().parent().parent().children( '.widget-id' ).attr( 'value' ); |
| 138 | - pll_toggle( $( '.no-dropdown-' + this_id ), 'checked' != $( this ).attr( 'checked' ) ); | |
| 141 | + pll_toggle( $( '.no-dropdown-' + this_id ), true != $( this ).prop( 'checked' ) ); | |
| 139 | 142 | } ); |
| 140 | 143 | |
| 141 | 144 | // Disallow unchecking both show names and show flags |
| 142 | 145 | var options = ['-show_flags', '-show_names']; |
| @@ -142,9 +145,9 @@ | ||
| 142 | 145 | var options = ['-show_flags', '-show_names']; |
| 143 | 146 | $.each( options, function( i, v ) { |
| 144 | 147 | $( '.widgets-sortables,.control-section-sidebar' ).on( 'change', '.pll' + v, function() { |
| 145 | 148 | var this_id = $( this ).parent().parent().parent().children( '.widget-id' ).attr( 'value' ); |
| 146 | - if ( 'checked' != $( this ).attr( 'checked' ) ) { | |
| 149 | + if ( true != $( this ).prop( 'checked' ) ) { | |
| 147 | 150 | $( '#widget-' + this_id + options[ 1-i ] ).prop( 'checked', true ); |
| 148 | 151 | } |
| 149 | 152 | } ); |
| 150 | 153 | } ); |