| @@ -2,13 +2,13 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Displays the Languages admin panel |
| 4 | 4 | * |
| 5 | 5 | * @package Polylang |
| 6 | + * | |
| 7 | + * @var string $active_tab Active Polylang settings page. | |
| 6 | 8 | */ |
| 7 | 9 | |
| 8 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 9 | - exit; // Don't access directly | |
| 10 | -}; | |
| 10 | +defined( 'ABSPATH' ) || exit; | |
| 11 | 11 | |
| 12 | 12 | require ABSPATH . 'wp-admin/options-head.php'; // Displays the errors messages as when we were a child of options-general.php |
| 13 | 13 | ?> |
| 14 | 14 | <div class="wrap"> |
| @@ -13,13 +13,13 @@ | ||
| 13 | 13 | ?> |
| 14 | 14 | <div class="wrap"> |
| 15 | 15 | <h1><?php echo esc_html( $GLOBALS['title'] ); ?></h1> |
| 16 | 16 | <?php |
| 17 | - switch ( $this->active_tab ) { | |
| 17 | + switch ( $active_tab ) { | |
| 18 | 18 | case 'lang': // Languages tab |
| 19 | 19 | case 'strings': // String translations tab |
| 20 | 20 | case 'settings': // Settings tab |
| 21 | - include __DIR__ . '/view-tab-' . $this->active_tab . '.php'; | |
| 21 | + include __DIR__ . '/view-tab-' . $active_tab . '.php'; | |
| 22 | 22 | // Intentional fall-through to upgrade to fire the action below. |
| 23 | 23 | |
| 24 | 24 | default: |
| 25 | 25 | /** |
| @@ -27,9 +27,9 @@ | ||
| 27 | 27 | * Allows plugins to add their own tab |
| 28 | 28 | * |
| 29 | 29 | * @since 1.5.1 |
| 30 | 30 | */ |
| 31 | - do_action( 'pll_settings_active_tab_' . $this->active_tab ); | |
| 31 | + do_action( 'pll_settings_active_tab_' . $active_tab ); | |
| 32 | 32 | break; |
| 33 | 33 | } |
| 34 | 34 | ?> |
| 35 | 35 | </div><!-- wrap --> |