PluginProbe
Bogo / 2.6
Bogo v2.6
3.9.3 trunk 1.0 1.1 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.6 2.6.1 2.7 2.8 2.8.1 2.9 3.0 3.0.1 All 52 releases
← All changes | includes/user.php +3 -9 2.92.6 View file →
@@ -14,11 +14,9 @@
14 14
15 15 $wp_admin_bar->add_menu( array(
16 16 'parent' => 'top-secondary',
17 17 'id' => 'bogo-user-locale',
18 - 'title' => sprintf(
19 - '<span class="ab-icon"></span><span class="ab-label">%s</span>',
20 - esc_html( $current_language ) ) ) );
18 + 'title' => '&#10004; ' . $current_language ) );
21 19
22 20 $available_languages = bogo_available_languages( array(
23 21 'exclude' => array( $current_locale ),
24 22 'exclude_enus_if_inactive' => true,
@@ -43,21 +41,17 @@
43 41
44 42 add_action( 'admin_init', 'bogo_switch_user_locale' );
45 43
46 44 function bogo_switch_user_locale() {
47 - if ( empty( $_REQUEST['action'] )
48 - || 'bogo-switch-locale' != $_REQUEST['action'] ) {
45 + if ( empty( $_REQUEST['action'] ) || 'bogo-switch-locale' != $_REQUEST['action'] )
49 46 return;
50 - }
51 47
52 48 check_admin_referer( 'bogo-switch-locale' );
53 49
54 50 $locale = isset( $_REQUEST['locale'] ) ? $_REQUEST['locale'] : '';
55 51
56 - if ( ! bogo_is_available_locale( $locale )
57 - || $locale == bogo_get_user_locale() ) {
52 + if ( ! bogo_is_available_locale( $locale ) || $locale == bogo_get_user_locale() )
58 53 return;
59 - }
60 54
61 55 update_user_option( get_current_user_id(), 'locale', $locale, true );
62 56
63 57 if ( ! empty( $_REQUEST['redirect_to'] ) ) {