bp_get_messages_form_action
Filters the form action for Messages HTML forms.
Description
Parameters (1)
- 0. $trailingslashit (string) =>
trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) )
- The trailingslashit.
Usage
- To run the hook, copy the example below.
- $trailingslashit = apply_filters( 'bp_get_messages_form_action', $trailingslashit );
- if ( !empty( $trailingslashit ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_messages_form_action callback
- function filter_bp_get_messages_form_action( $trailingslashit ) {
- // make filter magic happen here...
- return $trailingslashit;
- };
- // add the filter
- add_filter( 'bp_get_messages_form_action', 'filter_bp_get_messages_form_action', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_messages_form_action', 'filter_bp_get_messages_form_action', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-messages/bp-messages-template.php
- return apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) );