Skip to:
Content

BuddyPress.org

Changeset 9215


Ignore:
Timestamp:
12/06/2014 09:19:03 PM (6 years ago)
Author:
tw2113
Message:

Add hook documentation for the Settings component.

Fixes #5947

Location:
trunk/src/bp-settings
Files:
4 edited

Legend:

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

    r9198 r9215  
    129129                     * @since BuddyPress (2.1.0)
    130130                     *
    131                      * @param string $email_text Text of the email.
    132                      * @param string $new_user_email New user email that
    133                      *        the current user has changed to.
    134                      * @param string $old_user_email Existing email addres
    135                      *        for the current user.
    136                      * @param object $update_user Userdata for the current user.
     131                     * @param string  $email_text    Text of the email.
     132                     * @param string  $new_user_email New user email that the
     133                     *                                current user has changed to.
     134                     * @param string  $old_user_email Existing email address
     135                     *                                for the current user.
     136                     * @param WP_User $update_user    Userdata object for the current user.
    137137                     */
    138138                    $content = apply_filters( 'bp_new_user_email_content', $email_text, $user_email, $old_user_email, $update_user );
     
    258258    bp_core_add_message( implode( '</p><p>', $feedback ), $feedback_type );
    259259
    260     // Execute additional code
     260    /**
     261     * Fires after the general settings have been saved, and before redirect.
     262     *
     263     * @since BuddyPress (1.5.0)
     264     */
    261265    do_action( 'bp_core_general_settings_after_save' );
    262266
     
    304308    }
    305309
     310    /**
     311     * Fires after the notificaton settings have been saved, and before redirect.
     312     *
     313     * @since BuddyPress (1.5.0)
     314     */
    306315    do_action( 'bp_core_notification_settings_after_save' );
    307316
     
    342351    check_admin_referer( 'capabilities' );
    343352
     353    /**
     354     * Fires before the capabilities settings have been saved.
     355     *
     356     * @since BuddyPress (1.6.0)
     357     */
    344358    do_action( 'bp_settings_capabilities_before_save' );
    345359
     
    351365        $status = ( true == $is_spammer ) ? 'spam' : 'ham';
    352366        bp_core_process_spammer_status( bp_displayed_user_id(), $status );
     367
     368        /**
     369         * Fires after processing a user as a spammer.
     370         *
     371         * @since BuddyPress (1.1.0)
     372         *
     373         * @param int    $value  ID of the currently displayed user.
     374         * @param string $status Determined status of "spam" or "ham" for the displayed user.
     375         */
    353376        do_action( 'bp_core_action_set_spammer_status', bp_displayed_user_id(), $status );
    354377    }
     
    356379    /** Other *************************************************************/
    357380
     381    /**
     382     * Fires after the capabilities settings have been saved and before redirect.
     383     *
     384     * @since BuddyPress (1.6.0)
     385     */
    358386    do_action( 'bp_settings_capabilities_after_save' );
    359387
  • trunk/src/bp-settings/bp-settings-loader.php

    r9128 r9215  
    1616     * Start the settings component creation process
    1717     *
    18      * @since BuddyPress (1.5)
     18     * @since BuddyPress (1.5.0)
    1919     */
    2020    public function __construct() {
     
    4949     * backwards compatibility.
    5050     *
    51      * @since BuddyPress (1.5)
     51     * @since BuddyPress (1.5.0)
    5252     */
    5353    public function setup_globals( $args = array() ) {
  • trunk/src/bp-settings/bp-settings-screens.php

    r7228 r9215  
    1414 * Show the general settings template
    1515 *
    16  * @since BuddyPress (1.5)
     16 * @since BuddyPress (1.5.0)
    1717 */
    1818function bp_settings_screen_general() {
     
    2323    }
    2424
     25    /**
     26     * Filters the template file path to use for the general settings screen.
     27     *
     28     * @since BuddyPress (1.6.0)
     29     *
     30     * @param string $value Directory path to look in for the template file.
     31     */
    2532    bp_core_load_template( apply_filters( 'bp_settings_screen_general_settings', 'members/single/settings/general' ) );
    2633}
     
    2936 * Show the notifications settings template
    3037 *
    31  * @since BuddyPress (1.5)
     38 * @since BuddyPress (1.5.0)
    3239 */
    3340function bp_settings_screen_notification() {
     
    3845    }
    3946
     47    /**
     48     * Filters the template file path to use for the notification settings screen.
     49     *
     50     * @since BuddyPress (1.6.0)
     51     *
     52     * @param string $value Directory path to look in for the template file.
     53     */
    4054    bp_core_load_template( apply_filters( 'bp_settings_screen_notification_settings', 'members/single/settings/notifications' ) );
    4155}
     
    4458 * Show the delete-account settings template
    4559 *
    46  * @since BuddyPress (1.5)
     60 * @since BuddyPress (1.5.0)
    4761 */
    4862function bp_settings_screen_delete_account() {
     
    5367    }
    5468
    55     // Load the template
     69    /**
     70     * Filters the template file path to use for the delete-account settings screen.
     71     *
     72     * @since BuddyPress (1.6.0)
     73     *
     74     * @param string $value Directory path to look in for the template file.
     75     */
    5676    bp_core_load_template( apply_filters( 'bp_settings_screen_delete_account', 'members/single/settings/delete-account' ) );
    5777}
     
    6080 * Show the capabilities settings template
    6181 *
    62  * @since BuddyPress (1.6)
     82 * @since BuddyPress (1.6.0)
    6383 */
    6484function bp_settings_screen_capabilities() {
     
    6989    }
    7090
    71     // Load the template
     91    /**
     92     * Filters the template file path to use for the capabilities settings screen.
     93     *
     94     * @since BuddyPress (1.6.0)
     95     *
     96     * @param string $value Directory path to look in for the template file.
     97     */
    7298    bp_core_load_template( apply_filters( 'bp_settings_screen_capabilities', 'members/single/settings/capabilities' ) );
    7399}
  • trunk/src/bp-settings/bp-settings-template.php

    r8560 r9215  
    1616 * @package BuddyPress
    1717 * @subpackage SettingsTemplate
    18  * @since BuddyPress (1.5)
     18 * @since BuddyPress (1.5.0)
    1919 *
    2020 * @uses bp_get_settings_slug()
     
    2828     * @package BuddyPress
    2929     * @subpackage SettingsTemplate
    30      * @since BuddyPress (1.5)
     30     * @since BuddyPress (1.5.0)
    3131     */
    3232    function bp_get_settings_slug() {
     33
     34        /**
     35         * Filters the Settings component slug.
     36         *
     37         * @since BuddyPress (1.5.0)
     38         *
     39         * @param string $slug Settings component slug.
     40         */
    3341        return apply_filters( 'bp_get_settings_slug', buddypress()->settings->slug );
    3442    }
     
    3947 * @package BuddyPress
    4048 * @subpackage SettingsTemplate
    41  * @since BuddyPress (1.5)
     49 * @since BuddyPress (1.5.0)
    4250 *
    4351 * @uses bp_get_settings_root_slug()
     
    5159     * @package BuddyPress
    5260     * @subpackage SettingsTemplate
    53      * @since BuddyPress (1.5)
     61     * @since BuddyPress (1.5.0)
    5462     */
    5563    function bp_get_settings_root_slug() {
     64
     65        /**
     66         * Filters the Settings component root slug.
     67         *
     68         * @since BuddyPress (1.5.0)
     69         *
     70         * @param string $root_slug Settings component root slug.
     71         */
    5672        return apply_filters( 'bp_get_settings_root_slug', buddypress()->settings->root_slug );
    5773    }
Note: See TracChangeset for help on using the changeset viewer.