PluginProbe
Polylang / 2.0.12
Polylang v2.0.12
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 | settings/view-languages.php +22 -13 2.7.32.0.12 View file →
@@ -1,25 +1,34 @@
1 1 <?php
2 2
3 3 /**
4 - * Displays the Languages admin panel
4 + * displays the Languages admin panel
5 5 */
6 6
7 7 if ( ! defined( 'ABSPATH' ) ) {
8 - exit; // Don't access directly
8 + exit; // don't access directly
9 9 };
10 -
11 -require ABSPATH . 'wp-admin/options-head.php'; // Displays the errors messages as when we were a child of options-general.php
12 10 ?>
13 11 <div class="wrap">
14 - <h1><?php echo esc_html( $GLOBALS['title'] ); ?></h1>
15 - <?php
12 + <h1><?php esc_html_e( 'Languages', 'polylang' ); ?></h1>
13 + <h2 class="nav-tab-wrapper"><?php
14 + // display tabs
15 + foreach ( $tabs as $key => $name ) {
16 + printf(
17 + '<a href="options-general.php?page=mlang&amp;tab=%1$s" id="nav-tab-%1$s" class="nav-tab %2$s">%3$s</a>',
18 + esc_attr( $key ),
19 + $key == $this->active_tab ? 'nav-tab-active' : '',
20 + esc_html( $name )
21 + );
22 + }?>
23 + </h2><?php
24 +
16 25 switch ( $this->active_tab ) {
17 26 case 'lang': // Languages tab
18 - case 'strings': // String translations tab
19 - case 'settings': // Settings tab
20 - include PLL_SETTINGS_INC . '/view-tab-' . $this->active_tab . '.php';
21 - // Intentional fall-through to upgrade to fire the action below.
27 + case 'strings': // string translations tab
28 + case 'settings': // settings tab
29 + include( PLL_SETTINGS_INC.'/view-tab-' . $this->active_tab . '.php' );
30 + break;
22 31
23 32 default:
24 33 /**
25 34 * Fires when loading the active Polylang settings tab
@@ -27,8 +36,8 @@
27 36 *
28 37 * @since 1.5.1
29 38 */
30 39 do_action( 'pll_settings_active_tab_' . $this->active_tab );
31 - break;
32 - }
33 - ?>
40 + break;
41 + }?>
42 +
34 43 </div><!-- wrap -->