-
-
Save zzfortezz/77500ee9ea73ac21c48d6539453b755e to your computer and use it in GitHub Desktop.
Get default language of sub-site Wordpress multisite
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 | |
subsites = get_sites(); | |
foreach( $subsites as $subsite ): | |
switch_to_blog( $subsite->blog_id ); | |
$default_lang = pll_default_language(); | |
restore_current_blog(); | |
endforeach; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sai tên biến kìa