Skip to:
Content

BuddyPress.org

Changeset 9551


Ignore:
Timestamp:
02/24/2015 03:52:54 AM (10 years ago)
Author:
tw2113
Message:

Adds hooks documentation for bp-core-admin-settings.php.

See #5940.

File:
1 edited

Legend:

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

    r9503 r9551  
    1414 * Main settings section description for the settings page
    1515 *
    16  * @since BuddyPress (1.6)
     16 * @since BuddyPress (1.6.0)
    1717 */
    1818function bp_admin_setting_callback_main_section() { }
     
    2121 * Admin bar for logged out users setting field
    2222 *
    23  * @since BuddyPress (1.6)
     23 * @since BuddyPress (1.6.0)
    2424 *
    2525 * @uses bp_form_option() To output the option value
     
    3737 * Allow members to delete their accounts setting field
    3838 *
    39  * @since BuddyPress (1.6)
     39 * @since BuddyPress (1.6.0)
    4040 *
    4141 * @uses checked() To display the checked attribute
     
    5555 * Groups settings section description for the settings page
    5656 *
    57  * @since BuddyPress (1.6)
     57 * @since BuddyPress (1.6.0)
    5858 */
    5959function bp_admin_setting_callback_activity_section() { }
     
    6262 * Allow Akismet setting field
    6363 *
    64  * @since BuddyPress (1.6)
     64 * @since BuddyPress (1.6.0)
    6565 *
    6666 * @uses checked() To display the checked attribute
     
    7878 * Allow activity comments on blog posts and forum posts
    7979 *
    80  * @since BuddyPress (1.6)
     80 * @since BuddyPress (1.6.0)
    8181 */
    8282function bp_admin_setting_callback_blogforum_comments() {
     
    110110 * function to flip the boolean before saving the intval.
    111111 *
    112  * @since BuddyPress (1.6)
     112 * @since BuddyPress (1.6.0)
    113113 */
    114114function bp_admin_sanitize_callback_blogforum_comments( $value = false ) {
     
    121121 * Profile settings section description for the settings page
    122122 *
    123  * @since BuddyPress (1.6)
     123 * @since BuddyPress (1.6.0)
    124124 */
    125125function bp_admin_setting_callback_xprofile_section() { }
     
    128128 * Enable BP->WP profile syncing field
    129129 *
    130  * @since BuddyPress (1.6)
     130 * @since BuddyPress (1.6.0)
    131131 *
    132132 * @uses bp_form_option() To output the option value
     
    144144 * Allow members to upload avatars field
    145145 *
    146  * @since BuddyPress (1.6)
     146 * @since BuddyPress (1.6.0)
    147147 *
    148148 * @uses checked() To display the checked attribute
     
    162162 * Groups settings section description for the settings page
    163163 *
    164  * @since BuddyPress (1.6)
     164 * @since BuddyPress (1.6.0)
    165165 */
    166166function bp_admin_setting_callback_groups_section() { }
     
    169169 * Allow all users to create groups field
    170170 *
    171  * @since BuddyPress (1.6)
     171 * @since BuddyPress (1.6.0)
    172172 *
    173173 * @uses checked() To display the checked attribute
     
    188188 * Forums settings section description for the settings page
    189189 *
    190  * @since BuddyPress (1.6)
     190 * @since BuddyPress (1.6.0)
    191191 */
    192192function bp_admin_setting_callback_bbpress_section() { }
     
    195195 * bb-config.php location field
    196196 *
    197  * @since BuddyPress (1.6)
     197 * @since BuddyPress (1.6.0)
    198198 * @uses checked() To display the checked attribute
    199199 * @uses bp_get_option() To get the config location
     
    224224 * The main settings page
    225225 *
    226  * @since BuddyPress (1.6)
     226 * @since BuddyPress (1.6.0)
    227227 *
    228228 * @uses screen_icon() To display the screen icon
     
    261261 * Save our settings
    262262 *
    263  * @since BuddyPress (1.6)
     263 * @since BuddyPress (1.6.0)
    264264 */
    265265function bp_core_admin_settings_save() {
     
    307307 * Output settings API option
    308308 *
    309  * @since BuddyPress (1.6)
     309 * @since BuddyPress (1.6.0)
    310310 *
    311311 * @uses bp_get_bp_form_option()
     
    321321     * Return settings API option
    322322     *
    323      * @since BuddyPress (1.6)
     323     * @since BuddyPress (1.6.0)
    324324     *
    325325     * @uses bp_get_option()
     
    337337
    338338        // Slug?
    339         if ( true === $slug )
     339        if ( true === $slug ) {
     340
     341            /**
     342             * Filters the slug value in the form field.
     343             *
     344             * @since BuddyPress (1.6.0)
     345             *
     346             * @param string $value Value being returned for the requested option.
     347             */
    340348            $value = esc_attr( apply_filters( 'editable_slug', $value ) );
    341 
    342         // Not a slug
    343         else
     349        } else { // Not a slug
    344350            $value = esc_attr( $value );
     351        }
    345352
    346353        // Fallback to default
     
    348355            $value = $default;
    349356
    350         // Allow plugins to further filter the output
     357        /**
     358         * Filters the settings API option.
     359         *
     360         * @since BuddyPress (1.6.0)
     361         *
     362         * @param string $value  Value being returned for the requested option.
     363         * @param string $option Option whose value is being requested.
     364         */
    351365        return apply_filters( 'bp_get_form_option', $value, $option );
    352366    }
Note: See TracChangeset for help on using the changeset viewer.