Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Echoes the first blog created by the user. If no blog yet, no button will show */
- $current_user = wp_get_current_user();
- $userID = $current_user->ID;
- $user_blogs = get_blogs_of_user( $userID );
- foreach ( $user_blogs as $user_blog ) {
- if (( $user_blog->userblog_id != 1 ) && ( !isset( $usersite ) )) {
- $usersite = $user_blog->userblog_id;
- echo '<a class="button bp-menu-button" href="' . esc_url( "${user_blog->path}/wp-admin" ) . '">Go to your dashboard</a>';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement