Skip to:
Content

BuddyPress.org

Changeset 9543


Ignore:
Timestamp:
02/24/2015 03:00:07 AM (7 years ago)
Author:
tw2113
Message:

Adds hooks documentation and cleanup to bp-core-admin-actions.php.

See #5940.

File:
1 edited

Legend:

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

    r9503 r9543  
    22
    33/**
    4  * BuddyPress Admin Actions
     4 * BuddyPress Admin Actions.
    55 *
    66 * This file contains the actions that are used through-out BuddyPress Admin. They
     
    88 * understand at a glance the order in which things occur.
    99 *
    10  * There are a few common places that additional actions can currently be found
     10 * There are a few common places that additional actions can currently be found.
    1111 *
    1212 *  - BuddyPress: In {@link BuddyPress::setup_actions()} in BuddyPress.php
     
    2323
    2424/**
    25  * Attach BuddyPress to WordPress
     25 * Attach BuddyPress to WordPress.
    2626 *
    2727 * BuddyPress uses its own internal actions to help aid in third-party plugin
     
    6161/**
    6262 * When a new site is created in a multisite installation, run the activation
    63  * routine on that site
    64  *
    65  * @since BuddyPress (1.7)
     63 * routine on that site.
     64 *
     65 * @since BuddyPress (1.7.0)
    6666 *
    6767 * @param int $blog_id
     
    7070 * @param string $path
    7171 * @param int $site_id
    72  * @param array() $meta
     72 * @param array $meta
    7373 */
    7474function bp_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
     
    8181    switch_to_blog( $blog_id );
    8282
    83     // Do the BuddyPress activation routine
     83    /**
     84     * Fires the activation routine for a new site created in a multisite installation.
     85     *
     86     * @since BuddyPress (1.7.0)
     87     *
     88     * @param int    $blog_id ID of the blog being installed to.
     89     * @param int    $user_id ID of the user the install is for.
     90     * @param string $domain  Domain to use with the install.
     91     * @param string $path    Path to use with the install.
     92     * @param int    $site_id ID of the site being installed to.
     93     * @param array  $meta    Metadata to use with the site creation.
     94     */
    8495    do_action( 'bp_new_site', $blog_id, $user_id, $domain, $path, $site_id, $meta );
    8596
     
    91102
    92103/**
    93  * Piggy back admin_init action
    94  *
    95  * @since BuddyPress (1.7)
    96  * @uses do_action() Calls 'bp_admin_init'
     104 * Piggy back admin_init action.
     105 *
     106 * @since BuddyPress (1.7.0)
     107 * @uses do_action() Calls 'bp_admin_init'.
    97108 */
    98109function bp_admin_init() {
     110
     111    /**
     112     * Fires inside the bp_admin_init function.
     113     *
     114     * @since BuddyPress (1.6.0)
     115     */
    99116    do_action( 'bp_admin_init' );
    100117}
    101118
    102119/**
    103  * Piggy back admin_menu action
    104  *
    105  * @since BuddyPress (1.7)
    106  * @uses do_action() Calls 'bp_admin_menu'
     120 * Piggy back admin_menu action.
     121 *
     122 * @since BuddyPress (1.7.0)
     123 * @uses do_action() Calls 'bp_admin_menu'.
    107124 */
    108125function bp_admin_menu() {
     126
     127    /**
     128     * Fires inside the bp_admin_menu function.
     129     *
     130     * @since BuddyPress (1.7.0)
     131     */
    109132    do_action( 'bp_admin_menu' );
    110133}
    111134
    112135/**
    113  * Piggy back admin_head action
    114  *
    115  * @since BuddyPress (1.7)
    116  * @uses do_action() Calls 'bp_admin_head'
     136 * Piggy back admin_head action.
     137 *
     138 * @since BuddyPress (1.7.0)
     139 * @uses do_action() Calls 'bp_admin_head'.
    117140 */
    118141function bp_admin_head() {
     142
     143    /**
     144     * Fires inside the bp_admin_head function.
     145     *
     146     * @since BuddyPress (1.6.0)
     147     */
    119148    do_action( 'bp_admin_head' );
    120149}
    121150
    122151/**
    123  * Piggy back admin_notices action
    124  *
    125  * @since BuddyPress (1.7)
    126  * @uses do_action() Calls 'bp_admin_notices'
     152 * Piggy back admin_notices action.
     153 *
     154 * @since BuddyPress (1.7.0)
     155 * @uses do_action() Calls 'bp_admin_notices'.
    127156 */
    128157function bp_admin_notices() {
     158
     159    /**
     160     * Fires inside the bp_admin_notices function.
     161     *
     162     * @since BuddyPress (1.5.0)
     163     */
    129164    do_action( 'bp_admin_notices' );
    130165}
     
    138173 *
    139174 * @param string $hook_suffix The current admin page, passed to
    140  *        'admin_enqueue_scripts'.
     175 *                            'admin_enqueue_scripts'.
    141176 */
    142177function bp_admin_enqueue_scripts( $hook_suffix = '' ) {
     178
     179    /**
     180     * Fires inside the bp_admin_enqueue_scripts function.
     181     *
     182     * @since BuddyPress (1.7.0)
     183     *
     184     * @param string $hook_suffix The current admin page, passed to admin_enqueue_scripts.
     185     */
    143186    do_action( 'bp_admin_enqueue_scripts', $hook_suffix );
    144187}
    145188
    146189/**
    147  * Dedicated action to register BuddyPress importers
    148  *
    149  * @since BuddyPress (1.7)
    150  * @uses do_action() Calls 'bp_admin_notices'
     190 * Dedicated action to register BuddyPress importers.
     191 *
     192 * @since BuddyPress (1.7.0)
     193 * @uses do_action() Calls 'bp_admin_notices'.
    151194 */
    152195function bp_register_importers() {
     196
     197    /**
     198     * Fires inside the bp_register_importers function.
     199     *
     200     * Used to register a BuddyPress importer.
     201     *
     202     * @since BuddyPress (1.7.0)
     203     */
    153204    do_action( 'bp_register_importers' );
    154205}
    155206
    156207/**
    157  * Dedicated action to register admin styles
    158  *
    159  * @since BuddyPress (1.7)
    160  * @uses do_action() Calls 'bp_admin_notices'
     208 * Dedicated action to register admin styles.
     209 *
     210 * @since BuddyPress (1.7.0)
     211 * @uses do_action() Calls 'bp_admin_notices'.
    161212 */
    162213function bp_register_admin_style() {
     214
     215    /**
     216     * Fires inside the bp_register_admin_style function.
     217     *
     218     * @since BuddyPress (1.7.0)
     219     */
    163220    do_action( 'bp_register_admin_style' );
    164221}
    165222
    166223/**
    167  * Dedicated action to register admin settings
    168  *
    169  * @since BuddyPress (1.7)
    170  * @uses do_action() Calls 'bp_register_admin_settings'
     224 * Dedicated action to register admin settings.
     225 *
     226 * @since BuddyPress (1.7.0)
     227 * @uses do_action() Calls 'bp_register_admin_settings'.
    171228 */
    172229function bp_register_admin_settings() {
     230
     231    /**
     232     * Fires inside the bp_register_admin_settings function.
     233     *
     234     * @since BuddyPress (1.6.0)
     235     */
    173236    do_action( 'bp_register_admin_settings' );
    174237}
Note: See TracChangeset for help on using the changeset viewer.