Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (14 sloc) 0.485 kb
6478115 branch 1.3.55 from http://plugins.svn.wordpress.org/role-scoper/tags/…
Matt Richmond authored
1 <?php
2
3 class ScoperMU_Custom {
4 function current_user_logged_into_main( $wp_blogcaps, $orig_reqd_caps ) {
5 global $current_site, $current_blog;
6
7 $prev_blog = $current_blog->blog_id;
8
9 switch_to_blog( $current_site->blog_id );
10
11 global $current_user;
12
13 $is_logged = ( $current_user->ID > 0 );
14
15 switch_to_blog( $prev_blog );
16
17 if ( $is_logged )
18 return array_merge( $wp_blogcaps, array_fill_keys( $orig_reqd_caps, true ) );
19 }
20 } // end class
21
22 ?>
Something went wrong with that request. Please try again.