Skip to:
Content

BuddyPress.org

Changeset 8319


Ignore:
Timestamp:
04/24/2014 09:59:14 PM (11 years ago)
Author:
boonebgorges
Message:

Improve inline documentation in Members component. See #5022.

Location:
trunk/bp-members
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-loader.php

    r8223 r8319  
    33 * BuddyPress Member Loader
    44 *
    5  * A members component to help contain all of the user specific slugs
    6  *
    75 * @package BuddyPress
    86 * @subpackage Members
     
    1513
    1614    /**
    17      * Start the members component creation process
    18      *
    19      * @since BuddyPress (1.5)
     15     * Start the members component creation process.
     16     *
     17     * @since BuddyPress (1.5.0)
    2018     */
    2119    public function __construct() {
     
    3129
    3230    /**
    33      * Include files
    34      *
    35      * @global BuddyPress $bp The one true BuddyPress instance
     31     * Include bp-members files.
     32     *
     33     * @see BP_Component::includes() for description of parameters.
     34     *
     35     * @param array $includes See {@link BP_Component::includes()}.
    3636     */
    3737    public function includes( $includes = array() ) {
     
    5656
    5757    /**
    58      * Setup globals
     58     * Set up bp-members global settings.
    5959     *
    6060     * The BP_MEMBERS_SLUG constant is deprecated, and only used here for
    6161     * backwards compatibility.
    6262     *
    63      * @since BuddyPress (1.5)
     63     * @since BuddyPress (1.5.0)
     64     *
     65     * @see BP_Component::setup_globals() for description of parameters.
     66     *
     67     * @param array $args See {@link BP_Component::setup_globals()}.
    6468     */
    6569    public function setup_globals( $args = array() ) {
     
    168172
    169173    /**
    170      * Setup BuddyBar navigation
     174     * Set up component navigation.
     175     *
     176     * @since BuddyPress (1.5.0)
     177     *
     178     * @see BP_Component::setup_nav() for a description of arguments.
     179     *
     180     * @param array $main_nav Optional. See BP_Component::setup_nav() for
     181     *        description.
     182     * @param array $sub_nav Optional. See BP_Component::setup_nav() for
     183     *        description.
    171184     */
    172185    public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
     
    209222
    210223    /**
    211      * Sets up the title for pages and <title>
    212      *
    213      * @global BuddyPress $bp The one true BuddyPress instance
     224     * Set up the title for pages and <title>.
    214225     */
    215226    public function setup_title() {
     
    231242}
    232243
     244/**
     245 * Set up the bp-members component.
     246 */
    233247function bp_setup_members() {
    234248    buddypress()->members = new BP_Members_Component();
  • trunk/bp-members/bp-members-notifications.php

    r7732 r8319  
    1515
    1616/**
    17  * Add a notification for a specific user, from a specific component
    18  *
    19  * @deprecated Deprecated since BuddyPress 1.9.0. Use
    20  *  bp_notifications_add_notification() instead.
    21  *
    22  * @since BuddyPress (1.0)
     17 * Add a notification for a specific user, from a specific component.
     18 *
     19 * @deprecated Deprecated since BuddyPress 1.9.0. Use
     20 *             bp_notifications_add_notification() instead.
     21 *
     22 * @since BuddyPress (1.0.0)
    2323 * @param string $item_id
    2424 * @param int $user_id
     
    2828 * @param string $date_notified
    2929 * @param int $is_new
    30  * @return boolean True on success, false on fail
     30 * @return boolean True on success, false on failure.
    3131 */
    3232function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false, $is_new = 1 ) {
     
    5858
    5959/**
    60  * Delete a specific notification by its ID
    61  *
    62  * @deprecated Deprecated since BuddyPress 1.9.0. Use
    63  *  bp_notifications_delete_notification() instead.
    64  *
    65  * @since BuddyPress (1.0)
    66  * @param int $id
    67  * @return boolean True on success, false on fail
     60 * Delete a specific notification by its ID.
     61 *
     62 * @deprecated Deprecated since BuddyPress 1.9.0. Use
     63 *             bp_notifications_delete_notification() instead.
     64 *
     65 * @since BuddyPress (1.0.0)
     66 * @param int $id ID of notification.
     67 * @return boolean True on success, false on failure.
    6868 */
    6969function bp_core_delete_notification( $id ) {
     
    8181
    8282/**
    83  * Get a specific notification by its ID
    84  *
    85  * @deprecated Deprecated since BuddyPress 1.9.0. Use
    86  *  bp_notifications_get_notification() instead.
    87  *
    88  * @since BuddyPress (1.0)
    89  * @param int $id
     83 * Get a specific notification by its ID.
     84 *
     85 * @deprecated Deprecated since BuddyPress 1.9.0. Use
     86 *             bp_notifications_get_notification() instead.
     87 *
     88 * @since BuddyPress (1.0.0)
     89 * @param int $id ID of notification.
    9090 * @return BP_Core_Notification
    9191 */
     
    104104
    105105/**
    106  * Get notifications for a specific user
    107  *
    108  * @deprecated Deprecated since BuddyPress 1.9.0. Use
    109  *  bp_notifications_get_notifications_for_user() instead.
    110  *
    111  * @since BuddyPress (1.0)
    112  * @global BuddyPress $bp
    113  * @param int $user_id
     106 * Get notifications for a specific user.
     107 *
     108 * @deprecated Deprecated since BuddyPress 1.9.0. Use
     109 *             bp_notifications_get_notifications_for_user() instead.
     110 *
     111 * @since BuddyPress (1.0.0)
     112 * @param int $user_id ID of user.
    114113 * @param string $format
    115  * @return boolean Object or array on success, false on fail
     114 * @return boolean Object or array on success, false on failure.
    116115 */
    117116function bp_core_get_notifications_for_user( $user_id, $format = 'string' ) {
     
    133132
    134133/**
    135  * Delete notifications for a user by type
     134 * Delete notifications for a user by type.
    136135 *
    137136 * Used when clearing out notifications for a specific component when the user
     
    139138 *
    140139 * @deprecated Deprecated since BuddyPress 1.9.0. Use
    141  *  bp_notifications_delete_notifications_by_type() instead.
    142  *
    143  * @since BuddyPress (1.0)
    144  * @param int $user_id
    145  * @param string $component_name
    146  * @param string $component_action
    147  * @return boolean True on success, false on fail
     140 *             bp_notifications_delete_notifications_by_type() instead.
     141 *
     142 * @since BuddyPress (1.0.0)
     143 * @param int $user_id
     144 * @param string $component_name
     145 * @param string $component_action
     146 * @return boolean True on success, false on failure.
    148147 */
    149148function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) {
     
    161160
    162161/**
    163  * Delete notifications for an item ID
     162 * Delete notifications for an item ID.
    164163 *
    165164 * Used when clearing out notifications for a specific component when the user
     
    167166 *
    168167 * @deprecated Deprecated since BuddyPress 1.9.0. Use
    169  *  bp_notifications_delete_notifications_by_item_id() instead.
    170  *
    171  * @since BuddyPress (1.0)
    172  * @param int $user_id
    173  * @param string $component_name
    174  * @param string $component_action
    175  * @return boolean True on success, false on fail
     168 *             bp_notifications_delete_notifications_by_item_id() instead.
     169 *
     170 * @since BuddyPress (1.0.0)
     171 * @param int $user_id
     172 * @param string $component_name
     173 * @param string $component_action
     174 * @return boolean True on success, false on failure.
    176175 */
    177176function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
     
    189188
    190189/**
    191  * Delete all notifications for by type
    192  *
    193  * @deprecated Deprecated since BuddyPress 1.9.0. Use
    194  *  bp_notifications_delete_all_notifications_by_type() instead.
    195  *
    196  * @since BuddyPress (1.0)
    197  * @param int $user_id
    198  * @param string $component_name
    199  * @param string $component_action
    200  * @return boolean True on success, false on fail
     190 * Delete all notifications for by type.
     191 *
     192 * @deprecated Deprecated since BuddyPress 1.9.0. Use
     193 *             bp_notifications_delete_all_notifications_by_type() instead.
     194 *
     195 * @since BuddyPress (1.0.0)
     196 * @param int $user_id
     197 * @param string $component_name
     198 * @param string $component_action
     199 * @return boolean True on success, false on failure.
    201200 */
    202201function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) {
     
    214213
    215214/**
    216  * Delete all notifications for a user
     215 * Delete all notifications for a user.
    217216 *
    218217 * Used when clearing out all notifications for a user, whene deleted or spammed
    219218 *
    220219 * @deprecated Deprecated since BuddyPress 1.9.0. Use
    221  *  bp_notifications_delete_notifications_from_user() instead.
    222  *
    223  * @since BuddyPress (1.0)
    224  * @param int $user_id
    225  * @param string $component_name
    226  * @param string $component_action
    227  * @return boolean True on success, false on fail
     220 *             bp_notifications_delete_notifications_from_user() instead.
     221 *
     222 * @since BuddyPress (1.0.0)
     223 * @param int $user_id
     224 * @param string $component_name
     225 * @param string $component_action
     226 * @return boolean True on success, false on failure.
    228227 */
    229228function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
     
    243242
    244243/**
    245  * Check if a user has access to a specific notification
    246  *
    247  * Used before deleting a notification for a user
    248  *
    249  * @deprecated Deprecated since BuddyPress 1.9.0. Use
    250  *  bp_notifications_check_notification_access() instead.
    251  *
    252  * @since BuddyPress (1.0)
     244 * Check if a user has access to a specific notification.
     245 *
     246 * Used before deleting a notification for a user.
     247 *
     248 * @deprecated Deprecated since BuddyPress 1.9.0. Use
     249 *             bp_notifications_check_notification_access() instead.
     250 *
     251 * @since BuddyPress (1.0.0)
    253252 * @param int $user_id
    254253 * @param int $notification_id
    255  * @return boolean True on success, false on fail
     254 * @return boolean True on success, false on failure.
    256255 */
    257256function bp_core_check_notification_access( $user_id, $notification_id ) {
Note: See TracChangeset for help on using the changeset viewer.