Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/23/2015 07:50:04 PM (11 years ago)
Author:
tw2113
Message:

Adds hooks documentation to bp-core-widgets.php.

See #5940.
Props jaimieolmstead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-widgets.php

    r9351 r9542  
    5151        public function widget( $args, $instance ) {
    5252                $title = isset( $instance['title'] ) ? $instance['title'] : '';
     53
     54                /**
     55                 * Filters the title of the Login widget.
     56                 *
     57                 * @since BuddyPress (1.9.0)
     58                 *
     59                 * @param string $title The widget title.
     60                 */
    5361                $title = apply_filters( 'widget_title', $title );
    5462
     
    5967                <?php if ( is_user_logged_in() ) : ?>
    6068
    61                         <?php do_action( 'bp_before_login_widget_loggedin' ); ?>
     69                        <?php
     70
     71                        /**
     72                         * Fires before the display of widget content if logged in.
     73                         *
     74                         * @since BuddyPress (1.9.0)
     75                         */
     76                        do_action( 'bp_before_login_widget_loggedin' ); ?>
    6277
    6378                        <div class="bp-login-widget-user-avatar">
     
    7287                        </div>
    7388
    74                         <?php do_action( 'bp_after_login_widget_loggedin' ); ?>
     89                        <?php
     90
     91                        /**
     92                         * Fires after the display of widget content if logged in.
     93                         *
     94                         * @since BuddyPress (1.9.0)
     95                         */
     96                        do_action( 'bp_after_login_widget_loggedin' ); ?>
    7597
    7698                <?php else : ?>
    7799
    78                         <?php do_action( 'bp_before_login_widget_loggedout' ); ?>
     100                        <?php
     101
     102                        /**
     103                         * Fires before the display of widget content if logged out.
     104                         *
     105                         * @since BuddyPress (1.9.0)
     106                         */
     107                        do_action( 'bp_before_login_widget_loggedout' ); ?>
    79108
    80109                        <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">
     
    97126                        </form>
    98127
    99                         <?php do_action( 'bp_after_login_widget_loggedout' ); ?>
     128                        <?php
     129
     130                        /**
     131                         * Fires after the display of widget content if logged out.
     132                         *
     133                         * @since BuddyPress (1.9.0)
     134                         */
     135                        do_action( 'bp_after_login_widget_loggedout' ); ?>
    100136
    101137                <?php endif;
Note: See TracChangeset for help on using the changeset viewer.