Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Multisite Language Switcher: Howto use the "msls_blog_collection_get"-filter
<?php
function my_msls_blog_collection_get( $objects ) {
$objects = array();
$blogs = array( 1 => 'Override English', 2 => 'Override Deutsch', );
foreach ( $blogs as $id => $description ) {
$details = get_blog_details( $id );
if ( is_object( $details ) ) {
$objects[$id] = new MslsBlog( $details, $description );
}
}
return $objects;
}
add_filter( 'msls_blog_collection_construct', 'my_msls_blog_collection_get' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.