Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Adapt code to new MultilingualPress functions. #206
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrommen committed Sep 27, 2016
1 parent 31740ed commit 11c254c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/inc/Multilingual_Press.php
Expand Up @@ -300,7 +300,7 @@ public function delete_blog( $blog_id ) {
*/
public function language_attributes( $output ) {

$site_language = Mlp_Helpers::get_current_blog_language();
$site_language = \Inpsyde\MultilingualPress\get_current_site_language();
if ( ! $site_language ) {
return $output;
}
Expand Down
2 changes: 1 addition & 1 deletion src/inc/feature.language_column.php
Expand Up @@ -19,7 +19,7 @@ function mlp_feature_language_column() {
function ( $id, $site_id ) {

switch_to_blog( $site_id );
$language = (array) Mlp_Helpers::get_current_blog_language();
$language = \Inpsyde\MultilingualPress\get_current_site_language();
restore_current_blog();

return '' === $language
Expand Down
3 changes: 1 addition & 2 deletions src/inc/redirect/Mlp_Redirect_Frontend.php
Expand Up @@ -92,8 +92,7 @@ public function is_redirectable() {
}

if ( isset( $_SESSION['noredirect'] ) ) {
$current_site_language = mlp_get_current_blog_language();

$current_site_language = \Inpsyde\MultilingualPress\get_current_site_language();
if ( in_array( $current_site_language, (array) $_SESSION['noredirect'], true ) ) {
return false;
}
Expand Down
Expand Up @@ -247,7 +247,7 @@ private function show_blog_relationships( $site_option ) {
type="checkbox" name="related_blogs[]" value="<?php echo esc_attr( $blog_id ) ?>" />
<?php echo esc_html( $blog_name ); ?>
-
<?php echo esc_html( Mlp_Helpers::get_blog_language( $blog_id, false ) ); ?>
<?php echo esc_html( \Inpsyde\MultilingualPress\get_site_language( $blog_id, false ) ); ?>
</label>
</p>
<?php
Expand Down
2 changes: 1 addition & 1 deletion src/inc/site-settings/Mlp_New_Site_View.php
Expand Up @@ -193,7 +193,7 @@ private function render_relationships() {
id="<?php echo esc_attr( $id ); ?>">
<?php echo esc_html( $blog_name ); ?>
-
<?php echo esc_html( Mlp_Helpers::get_blog_language( $site_id, false ) ); ?>
<?php echo esc_html( \Inpsyde\MultilingualPress\get_site_language( $site_id, false ) ); ?>
</label>
</p>
<?php
Expand Down

0 comments on commit 11c254c

Please sign in to comment.