Skip to:
Content

BuddyPress.org

Ticket #6086: 6086-field-id-hook-params.diff

File 6086-field-id-hook-params.diff, 1.2 KB (added by tw2113, 8 years ago)
  • src/bp-xprofile/bp-xprofile-template.php

    diff --git src/bp-xprofile/bp-xprofile-template.php src/bp-xprofile/bp-xprofile-template.php
    index e233f23..10a983a 100644
    function bp_the_profile_field_is_required() { 
    802802                 * Filters whether or not a profile field is required.
    803803                 *
    804804                 * @since 1.1.0
     805                 * @since 2.7.0 Added field ID.
    805806                 *
    806807                 * @param bool $retval Whether or not the field is required.
     808                 * @param int  $value  Field ID that may be required.
    807809                 */
    808                 return apply_filters( 'bp_get_the_profile_field_is_required', (bool) $retval );
     810                return apply_filters( 'bp_get_the_profile_field_is_required', (bool) $retval, $field->id );
    809811        }
    810812
    811813/**
    function bp_the_profile_field_visibility_level() { 
    840842                 * Filters the profile field visibility level.
    841843                 *
    842844                 * @since 1.6.0
     845                 * @since 2.7.0 Added field ID.
    843846                 *
    844847                 * @param string $retval Field visibility level.
     848                 * @param int    $value  Field ID.
    845849                 */
    846                 return apply_filters( 'bp_get_the_profile_field_visibility_level', $retval );
     850                return apply_filters( 'bp_get_the_profile_field_visibility_level', $retval, $field->id );
    847851        }
    848852
    849853/**