bp_members_suggestions_validate_args
Filters the validation status for the suggestion service query.
Description
Parameters (2)
- 0. $parent (bool|WP_Error) =>
parent::validate()
- Results of validation check.
- 1. $instance (BP_Members_Suggestions)
- Current
BP_Members_Suggestions
instance.
Usage
- To run the hook, copy the example below.
- $parent = apply_filters( 'bp_members_suggestions_validate_args', $parent, $instance );
- if ( !empty( $parent ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_members_suggestions_validate_args callback
- function filter_bp_members_suggestions_validate_args( $parent, $instance ) {
- // make filter magic happen here...
- return $parent;
- };
- // add the filter
- add_filter( 'bp_members_suggestions_validate_args', 'filter_bp_members_suggestions_validate_args', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_members_suggestions_validate_args', 'filter_bp_members_suggestions_validate_args', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /bp-core/classes/class-bp-members-suggestions.php
- return apply_filters( 'bp_members_suggestions_validate_args', parent::validate(), $this );