| @@ -14,18 +14,14 @@ | ||
| 14 | 14 | * |
| 15 | 15 | * @param object $polylang polylang object |
| 16 | 16 | */ |
| 17 | 17 | public function __construct( &$polylang ) { |
| 18 | - $this->options = &$polylang->options; | |
| 19 | - parent::__construct( | |
| 20 | - $polylang, | |
| 21 | - array( | |
| 22 | - 'module' => 'browser', | |
| 23 | - 'title' => __( 'Detect browser language', 'polylang' ), | |
| 24 | - 'description' => __( 'When the front page is visited, set the language according to the browser preference', 'polylang' ), | |
| 25 | - 'active_option' => $this->is_available() ? 'browser' : false, | |
| 26 | - ) | |
| 27 | - ); | |
| 18 | + parent::__construct( $polylang, array( | |
| 19 | + 'module' => 'browser', | |
| 20 | + 'title' => __( 'Detect browser language', 'polylang' ), | |
| 21 | + 'description' => __( 'When the front page is visited, set the language according to the browser preference', 'polylang' ), | |
| 22 | + 'active_option' => $this->is_available() ? 'browser' : false, | |
| 23 | + ) ); | |
| 28 | 24 | |
| 29 | 25 | if ( ! class_exists( 'PLL_Xdata_Domain', true ) ) { |
| 30 | 26 | add_action( 'admin_print_footer_scripts', array( $this, 'print_js' ) ); |
| 31 | 27 | } |
| @@ -79,12 +75,12 @@ | ||
| 79 | 75 | ( function( $ ){ |
| 80 | 76 | $( "input[name='force_lang']" ).change( function() { |
| 81 | 77 | var value = $( this ).val(); |
| 82 | 78 | if ( 3 > value ) { |
| 83 | - $( "#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 ?>' ); | |
| 79 | + $( "#pll-module-browser" ).<?php echo $func; ?>.children( "td" ).children( ".row-actions" ).html( '<?php echo $link; ?>' ); | |
| 84 | 80 | } |
| 85 | 81 | else { |
| 86 | - $( "#pll-module-browser" ).removeClass( "active" ).addClass( "inactive" ).children( "td" ).children( ".row-actions" ).html( '<?php echo $deactivated; // phpcs:ignore WordPress.Security.EscapeOutput ?>' ); | |
| 82 | + $( "#pll-module-browser" ).removeClass( "active" ).addClass( "inactive" ).children( "td" ).children( ".row-actions" ).html( '<?php echo $deactivated; ?>' ); | |
| 87 | 83 | } |
| 88 | 84 | } ); |
| 89 | 85 | } )( jQuery ); |
| 90 | 86 | // ]]> |