PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/widget-languages.php +5 -2 2.72.8 View file →
@@ -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 } );