@@ 455-464 (lines=10) @@ | ||
452 | ||
453 | } |
|
454 | ||
455 | protected function process_locale( $key, $is_user_logged_in ) { |
|
456 | if ( $is_user_logged_in && 'lang' == $key ) { |
|
457 | if ( is_jetpack_site() ) { |
|
458 | return (string) get_bloginfo( 'language' ); |
|
459 | } elseif ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
|
460 | return (string) get_blog_lang_code(); |
|
461 | } |
|
462 | } |
|
463 | return false; |
|
464 | } |
|
465 | ||
466 | function force_http( $url, $scheme, $orig_scheme ) { |
|
467 | return preg_replace('/^https:\/\//', 'http://', $url, 1 ); |
@@ 222-232 (lines=11) @@ | ||
219 | ||
220 | } |
|
221 | ||
222 | protected function get_locale( $key ) { |
|
223 | if ( 'lang' == $key ) { |
|
224 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
|
225 | return (string) get_blog_lang_code(); |
|
226 | } else { |
|
227 | return get_locale(); |
|
228 | } |
|
229 | } |
|
230 | ||
231 | return false; |
|
232 | } |
|
233 | ||
234 | ||
235 | /** |