Skip to:
Content

BuddyPress.org

Changeset 9154


Ignore:
Timestamp:
11/18/2014 01:07:17 PM (12 years ago)
Author:
boonebgorges
Message:

Hook documentation for part of the Friends component.

Includes bp-friends-activity, bp-friends-widgets, and bp-friends-screens.

Props tw2113.
See #5942.

Location:
trunk/src/bp-friends
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-friends/bp-friends-activity.php

    r8428 r9154  
    114114        bp_activity_set_action( $bp->friends->id, 'friends_register_activity_action', __( 'New friendship created', 'buddypress' ) );
    115115
     116        /**
     117         * Fires after all default bp-friends activity actions have been registered.
     118         *
     119         * @since BuddyPress (1.1.0)
     120         */
    116121        do_action( 'friends_register_activity_actions' );
    117122}
    … …  
    140145        }
    141146
     147        /**
     148         * Filters the 'friendship_accepted' activty action format.
     149         *
     150         * @since BuddyPress (2.0.0)
     151         *
     152         * @param string $action String text for the 'friendship_accepted' action.
     153         * @param object $activity Activity data.
     154         */
    142155        return apply_filters( 'bp_friends_format_activity_action_friendship_accepted', $action, $activity );
    143156}
    … …  
    166179        }
    167180
     181        /**
     182         * Filters the 'friendship_created' activty action format.
     183         *
     184         * @since BuddyPress (2.0.0)
     185         *
     186         * @param string $action String text for the 'friendship_created' action.
     187         * @param object $activity Activity data.
     188         */
    168189        return apply_filters( 'bp_friends_format_activity_action_friendship_created', $action, $activity );
    169190}
  • trunk/src/bp-friends/bp-friends-screens.php

    r8705 r9154  
    2020function friends_screen_my_friends() {
    2121
     22        /**
     23         * Fires before the loading of template for the My Friends page.
     24         *
     25         * @since BuddyPress (1.0.0)
     26         */
    2227        do_action( 'friends_screen_my_friends' );
    2328
     29        /**
     30         * Filters the template used to display the My Friends page.
     31         *
     32         * @since BuddyPress (1.0.0)
     33         *
     34         * @param string $template Path to the my friends template to load.
     35         */
    2436        bp_core_load_template( apply_filters( 'friends_template_my_friends', 'members/single/home' ) );
    2537}
    … …  
    6375        }
    6476
     77        /**
     78         * Fires before the loading of template for the friends requests page.
     79         *
     80         * @since BuddyPress (1.0.0)
     81         */
    6582        do_action( 'friends_screen_requests' );
    6683
     84        /**
     85         * Filters the template used to display the My Friends page.
     86         *
     87         * @since BuddyPress (1.0.0)
     88         *
     89         * @param string $template Path to the friends request template to load.
     90         */
    6791        bp_core_load_template( apply_filters( 'friends_template_requests', 'members/single/home' ) );
    6892}
    … …  
    103127                        </tr>
    104128
    105                         <?php do_action( 'friends_screen_notification_settings' ); ?>
     129                        <?php
     130
     131                        /**
     132                         * Fires after the last table row on the friends notification screen.
     133                         *
     134                         * @since BuddyPress (1.0.0)
     135                         */
     136                        do_action( 'friends_screen_notification_settings' ); ?>
    106137
    107138                </tbody>
  • trunk/src/bp-friends/bp-friends-widgets.php

    r8958 r9154  
    7777                }
    7878
     79                /**
     80                 * Filters the Friends widget title.
     81                 *
     82                 * @since BuddyPress (1.8.0)
     83                 *
     84                 * @param string $title The widget title.
     85                 */
    7986                $title = apply_filters( 'widget_title', $instance['title'] );
    8087
Note: See TracChangeset for help on using the changeset viewer.