sanitize_title
The BuddyPress sanitize title hook.
Description
Parameters (2)
- 0. $title (unknown)
- The title.
- 1. $raw_title (unknown)
- The raw title.
Usage
- To run the hook, copy the example below.
- $title = apply_filters( 'sanitize_title', $title, $raw_title );
- if ( !empty( $title ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the sanitize_title callback
- function filter_sanitize_title( $title, $raw_title ) {
- // make filter magic happen here...
- return $title;
- };
- // add the filter
- add_filter( 'sanitize_title', 'filter_sanitize_title', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'sanitize_title', 'filter_sanitize_title', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /bp-forums/bbpress/bb-includes/backpress/functions.formatting.php
- $title = apply_filters('sanitize_title', $title, $raw_title);