Ticket #5940: bp-core-widgets-5940.diff
| File bp-core-widgets-5940.diff, 2.3 KB (added by , 11 years ago) |
|---|
-
src/bp-core/bp-core-widgets.php
50 50 */ 51 51 public function widget( $args, $instance ) { 52 52 $title = isset( $instance['title'] ) ? $instance['title'] : ''; 53 54 /** 55 * Filters the title of the Messages widget. 56 * 57 * @since BuddyPress (1.9.0) 58 * 59 * @param string $title The widget title. 60 */ 53 61 $title = apply_filters( 'widget_title', $title ); 54 62 55 63 echo $args['before_widget']; … … 58 66 59 67 <?php if ( is_user_logged_in() ) : ?> 60 68 61 <?php do_action( 'bp_before_login_widget_loggedin' ); ?> 69 <?php 70 /** 71 * Fires before the display of widget content if logged in. 72 * 73 * @since BuddyPress (1.9.0) 74 */ 75 do_action( 'bp_before_login_widget_loggedin' ); ?> 62 76 63 77 <div class="bp-login-widget-user-avatar"> 64 78 <a href="<?php echo bp_loggedin_user_domain(); ?>"> … … 71 85 <div class="bp-login-widget-user-logout"><a class="logout" href="<?php echo wp_logout_url( bp_get_requested_url() ); ?>"><?php _e( 'Log Out', 'buddypress' ); ?></a></div> 72 86 </div> 73 87 74 <?php do_action( 'bp_after_login_widget_loggedin' ); ?> 88 <?php 89 /** 90 * Fires after the display of widget content if logged in. 91 * 92 * @since BuddyPress (1.9.0) 93 */ 94 do_action( 'bp_after_login_widget_loggedin' ); ?> 75 95 76 96 <?php else : ?> 77 97 78 <?php do_action( 'bp_before_login_widget_loggedout' ); ?> 98 <?php 99 /** 100 * Fires before the display of widget content if logged out. 101 * 102 * @since BuddyPress (1.9.0) 103 */ 104 do_action( 'bp_before_login_widget_loggedout' ); ?> 79 105 80 106 <form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"> 81 107 <label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label> … … 96 122 97 123 </form> 98 124 99 <?php do_action( 'bp_after_login_widget_loggedout' ); ?> 125 <?php 126 /** 127 * Fires after the display of widget content if logged out. 128 * 129 * @since BuddyPress (1.9.0) 130 */ 131 do_action( 'bp_after_login_widget_loggedout' ); ?> 100 132 101 133 <?php endif; 102 134