Skip to:
Content

BuddyPress.org

Changeset 9287


Ignore:
Timestamp:
12/29/2014 06:16:40 AM (6 years ago)
Author:
tw2113
Message:

Add hook docs and fix version numbers for bp-xprofile-cssjs.php and bp-xprofile-filters.php.

See #5949.

Location:
trunk/src/bp-xprofile
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-cssjs.php

    r8770 r9287  
    1414 * Enqueue the CSS for XProfile admin styling
    1515 *
    16  * @since BuddyPress (1.1)
     16 * @since BuddyPress (1.1.0)
    1717 */
    1818function xprofile_add_admin_css() {
     
    3333 * Enqueue the jQuery libraries for handling drag/drop/sort
    3434 *
    35  * @since BuddyPress (1.5)
     35 * @since BuddyPress (1.5.0)
    3636 */
    3737function xprofile_add_admin_js() {
  • trunk/src/bp-xprofile/bp-xprofile-filters.php

    r9178 r9287  
    7171    $xprofile_allowedtags['a']['rel'] = array();
    7272
     73    /**
     74     * Filters the allowed tags for use within xprofile_filter_kses().
     75     *
     76     * @since BuddyPress (1.5.0)
     77     *
     78     * @param array                   $xprofile_allowedtags Array of allowed tags for profile field values.
     79     * @param BP_XProfile_ProfileData $data_obj             The BP_XProfile_ProfileData object.
     80     */
    7381    $xprofile_allowedtags = apply_filters( 'xprofile_allowed_tags', $xprofile_allowedtags, $data_obj );
    7482    return wp_kses( $content, $xprofile_allowedtags );
     
    98106        $kses_field_value     = xprofile_filter_kses( $field_value, $data_obj );
    99107        $filtered_field_value = wp_rel_nofollow( force_balance_tags( $kses_field_value ) );
     108
     109        /**
     110         * Filters the kses-filtered data before saving to database.
     111         *
     112         * @since BuddyPress (1.5.0)
     113         *
     114         * @param string                  $filtered_field_value The filtered value.
     115         * @param string                  $field_value          The original value before filtering.
     116         * @param BP_XProfile_ProfileData $data_obj             The BP_XProfile_ProfileData object.
     117         */
    100118        $filtered_field_value = apply_filters( 'xprofile_filtered_data_value_before_save', $filtered_field_value, $field_value, $data_obj );
    101119
     
    106124            $kses_field_value       = xprofile_filter_kses( $value, $data_obj );
    107125            $filtered_value     = wp_rel_nofollow( force_balance_tags( $kses_field_value ) );
     126
     127            /** This filter is documented in bp-xprofile/bp-xprofile-filters.php */
    108128            $filtered_values[] = apply_filters( 'xprofile_filtered_data_value_before_save', $filtered_value, $value, $data_obj );
    109129
     
    201221 * Filter an Extended Profile field value, and attempt to make clickable links
    202222 * to members search results out of them.
    203  * 
     223 *
    204224 * - Not run on datebox field types
    205225 * - Not run on values without commas with less than 5 words
     
    207227 * - To disable: remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    208228 *
    209  * @since BuddyPress (1.1)
     229 * @since BuddyPress (1.1.0)
    210230 *
    211231 * @param string $field_value
     
    301321 * Filter BP_User_Query::populate_extras to override each queries users fullname
    302322 *
    303  * @since BuddyPress (1.7)
     323 * @since BuddyPress (1.7.0)
    304324 *
    305325 * @param BP_User_Query $user_query
Note: See TracChangeset for help on using the changeset viewer.