-
Notifications
You must be signed in to change notification settings - Fork 0
/
buddypress.php
123 lines (108 loc) · 4.36 KB
/
buddypress.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/**
* The template for displaying BuddyPress pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package BuddyBoss_Theme
*/
get_header();
$admin_custom_login = buddyboss_theme_get_option( 'boss_custom_login' );
$admin_login_background_text = buddyboss_theme_get_option( 'admin_login_background_text' );
$admin_login_background_textarea = buddyboss_theme_get_option( 'admin_login_background_textarea' );
$admin_login_heading_position = buddyboss_theme_get_option( 'admin_login_heading_position' );
$admin_login_background_switch = buddyboss_theme_get_option( 'admin_login_background_switch' );
if ( ( function_exists( 'bp_is_register_page' ) && bp_is_register_page() ) || ( function_exists( 'bp_is_activation_page' ) && bp_is_activation_page() ) ) {
$class_bp_register = 'bs-bp-container-reg';
if ( $admin_login_heading_position ) {
$heading_postion_style = 'padding-top: ' . $admin_login_heading_position . '%;';
} else {
$heading_postion_style = 'padding-top: 8%;';
}
if ( $admin_custom_login && $admin_login_background_switch ) {
echo '<div class="login-split"><div style="' . $heading_postion_style . '">';
if ( $admin_login_background_text ) {
echo wp_kses_post( sprintf( esc_html__( '%s', 'bfcommons-theme' ), $admin_login_background_text ) );
}
if ( $admin_login_background_textarea ) {
echo '<span>';
echo stripslashes($admin_login_background_textarea);
echo '</span>';
}
echo '</div><div class="split-overlay"></div></div>';
}
} else {
$class_bp_register = 'bs-bp-container';
}
?>
<div id="primary" class="content-area <?php echo $class_bp_register; ?>">
<main id="main" class="site-main">
<?php
if ( function_exists( 'bp_is_register_page' ) && bp_is_register_page() ) {
$logo_id = buddyboss_theme_get_option( 'admin_logo_media', 'id' );
$logo = ( $logo_id ) ? wp_get_attachment_image( $logo_id, 'full', '', array( 'class' => 'bb-logo' ) ) : get_bloginfo( 'name' );
$enable_private_network = bp_get_option( 'bp-enable-private-network' );
if ( '0' === $enable_private_network ) {
?>
<div class="register-section-logo private-on-div">
<?php echo $logo; ?>
</div>
<?php
} else {
?>
<div class="register-section-logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php echo $logo; ?>
</a>
</div>
<?php
}
} elseif ( function_exists( 'bp_is_activation_page' ) && bp_is_activation_page() ) {
$logo_id = buddyboss_theme_get_option( 'admin_logo_media', 'id' );
$logo = ( $logo_id ) ? wp_get_attachment_image( $logo_id, 'full', '', array( 'class' => 'bb-logo' ) ) : get_bloginfo( 'name' );
$enable_private_network = bp_get_option( 'bp-enable-private-network' );
if ( '0' === $enable_private_network ) {
?>
<div class="activate-section-logo">
<?php echo $logo; ?>
</div>
<?php
} else {
?>
<div class="activate-section-logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php echo $logo; ?>
</a>
</div>
<?php
}
}
?>
<?php if ( have_posts() ) : ?>
<?php
/* Start the Loop */
while ( have_posts() ) :
the_post();
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content', 'buddypress' );
endwhile;
?>
<?php
//buddyboss_pagination();
else :
get_template_part( 'template-parts/content', 'none' );
?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
if( !bp_is_group_create() && !bp_is_user_profile_edit() && !bp_is_user_change_avatar() && !bp_is_user_change_cover_image() ) {
get_sidebar( 'buddypress' );
}
?>
<?php
get_footer();