Created
December 18, 2014 13:54
-
-
Save thefuxia/70f4c4a67b4eb40132f3 to your computer and use it in GitHub Desktop.
Get translation from MultilingualPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_footer', function() { | |
$mlp_language_api = apply_filters( 'mlp_language_api', NULL ); | |
if ( is_a( $mlp_language_api, 'Mlp_Language_Api_Interface' ) ) { | |
$args = [ | |
'site_id' => get_current_blog_id(), | |
'content_id' => get_queried_object_id(), | |
'type' => 'post', | |
'strict' => TRUE, | |
'search_term' => '', | |
'post_type' => 'page', | |
'include_base' => TRUE | |
]; | |
//** @var Mlp_Language_Api_Interface $mlp_language_api | |
$translations = $mlp_language_api->get_translations( $args ); | |
print '<pre>' . print_r( $translations, 1 ) . '</pre>'; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment