Skip to:
Content
Pages
Categories
Search
Top
Bottom

Extending bp-xprofile filter/hook


  • ddur
    Participant

    @ddur

    It would be great if you could add filter/hook to dynamically override required attribute.

    FILE /wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php

    FUNCTION xprofile_check_is_required_field

    LINE TO REPLACE: (587)
    return (bool) $retval;

    REPLACEMENT CODE LIKE:
    return (bool) apply_filters( ‘xprofile_check_is_required_field’, $retval, $field_id );

    Thanks

  • You must be logged in to reply to this topic.
Skip to toolbar