| @@ -66,10 +66,8 @@ | ||
| 66 | 66 | * Displays the javascript to handle dynamically the change in url modifications |
| 67 | 67 | * as the preferred browser language is not used when the language is set from different domains |
| 68 | 68 | * |
| 69 | 69 | * @since 1.8 |
| 70 | - * | |
| 71 | - * @return void | |
| 72 | 70 | */ |
| 73 | 71 | public function print_js() { |
| 74 | 72 | wp_enqueue_script( 'jquery' ); |
| 75 | 73 | |
| @@ -86,21 +84,19 @@ | ||
| 86 | 84 | |
| 87 | 85 | ?> |
| 88 | 86 | <script type='text/javascript'> |
| 89 | 87 | //<![CDATA[ |
| 90 | - jQuery( | |
| 91 | - function( $ ){ | |
| 92 | - $( "input[name='force_lang']" ).on( 'change', function() { | |
| 93 | - var value = $( this ).val(); | |
| 94 | - if ( 3 > value ) { | |
| 95 | - $( "#pll-module-browser" ).<?php echo $func; // phpcs:ignore WordPress.Security.EscapeOutput ?>.children( "td" ).children( ".row-actions" ).html( '<?php echo $link; // phpcs:ignore WordPress.Security.EscapeOutput ?>' ); | |
| 96 | - } | |
| 97 | - else { | |
| 98 | - $( "#pll-module-browser" ).removeClass( "active" ).addClass( "inactive" ).children( "td" ).children( ".row-actions" ).html( '<?php echo $deactivated; // phpcs:ignore WordPress.Security.EscapeOutput ?>' ); | |
| 99 | - } | |
| 100 | - } ); | |
| 101 | - } | |
| 102 | - ); | |
| 88 | + ( function( $ ){ | |
| 89 | + $( "input[name='force_lang']" ).change( function() { | |
| 90 | + var value = $( this ).val(); | |
| 91 | + if ( 3 > value ) { | |
| 92 | + $( "#pll-module-browser" ).<?php echo $func; // phpcs:ignore WordPress.Security.EscapeOutput ?>.children( "td" ).children( ".row-actions" ).html( '<?php echo $link; // phpcs:ignore WordPress.Security.EscapeOutput ?>' ); | |
| 93 | + } | |
| 94 | + else { | |
| 95 | + $( "#pll-module-browser" ).removeClass( "active" ).addClass( "inactive" ).children( "td" ).children( ".row-actions" ).html( '<?php echo $deactivated; // phpcs:ignore WordPress.Security.EscapeOutput ?>' ); | |
| 96 | + } | |
| 97 | + } ); | |
| 98 | + } )( jQuery ); | |
| 103 | 99 | // ]]> |
| 104 | 100 | </script> |
| 105 | 101 | <?php |
| 106 | 102 | } |