Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: cf
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (14 sloc) 0.485 kB
<?php
class ScoperMU_Custom {
function current_user_logged_into_main( $wp_blogcaps, $orig_reqd_caps ) {
global $current_site, $current_blog;
$prev_blog = $current_blog->blog_id;
switch_to_blog( $current_site->blog_id );
global $current_user;
$is_logged = ( $current_user->ID > 0 );
switch_to_blog( $prev_blog );
if ( $is_logged )
return array_merge( $wp_blogcaps, array_fill_keys( $orig_reqd_caps, true ) );
}
} // end class
?>
Jump to Line
Something went wrong with that request. Please try again.