json-endpoints/class.wpcom-json-api-site-settings-endpoint.php 1 location
|
@@ 282-292 (lines=11) @@
|
| 279 |
|
|
| 280 |
|
} |
| 281 |
|
|
| 282 |
|
protected function get_locale( $key ) { |
| 283 |
|
if ( 'lang' == $key ) { |
| 284 |
|
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
| 285 |
|
return (string) get_blog_lang_code(); |
| 286 |
|
} else { |
| 287 |
|
return get_locale(); |
| 288 |
|
} |
| 289 |
|
} |
| 290 |
|
|
| 291 |
|
return false; |
| 292 |
|
} |
| 293 |
|
|
| 294 |
|
protected function get_google_analytics () { |
| 295 |
|
$option_name = defined( 'IS_WPCOM' ) && IS_WPCOM ? 'wga' : 'jetpack_wga'; |
json-endpoints/class.wpcom-json-api-site-settings-v1-2-endpoint.php 1 location
|
@@ 24-34 (lines=11) @@
|
| 21 |
|
} |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
protected function get_locale( $key ) { |
| 25 |
|
if ( 'locale' == $key ) { |
| 26 |
|
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
| 27 |
|
return (string) get_blog_lang_code(); |
| 28 |
|
} else { |
| 29 |
|
return get_locale(); |
| 30 |
|
} |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
return false; |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
public function return_locale( $settings ) { |
| 37 |
|
return $settings + array( 'locale' => $this->get_locale( 'locale' ) ); |