コード例 #1
0
if (bp_is_group() || bp_is_user()) {
    // allow for different structure of home & help pages
    ?>
 		 	<div class="col-md-9 col-sm-8">
 	<?php 
}
?>
            
					<div class="member-courses-header"><img src="<?php 
echo get_stylesheet_directory_uri();
?>
/assets/images/banners/translation-banner-transparent.png" class="creative-writing-banner"></div>
							
					<?php 
//$lab_home_link = get_site_url();
$lab_home_link = get_translation_home();
// translation redirection function may mean we can revert to get_site_url();
$user_profile_link = bp_core_get_user_domain(bp_loggedin_user_id());
$user_courses_link = $user_profile_link . 'groups/';
?>
					<div class="trans-subheader container clearfix">
						<?php 
$home_active_class = '';
$profile_active_class = '';
$group_active_class = '';
if (is_front_page() || is_translation_home()) {
    echo "<h2>Welcome!</h2>";
    $home_active_class = 'trans-active';
} elseif (bp_is_group()) {
    echo "<h2>Your Courses</h2>";
    $group_active_class = 'trans-active';
コード例 #2
0
ファイル: functions.php プロジェクト: samoakley/labtheme
function translation_user_login_redirect()
{
    global $bp;
    if (is_user_logged_in() && bp_is_front_page()) {
        if (!is_super_admin() && member_is_in_translation_group()) {
            $redirect_page = get_translation_home();
            bp_core_redirect($redirect_page);
        } else {
        }
    }
}