add_ping
Filters the new ping URL to add for the given post.
Description
Parameters (1)
- 0. $new (string)
- New ping URL to add.
Usage
- To run the hook, copy the example below.
- $new = apply_filters( 'add_ping', $new );
- if ( !empty( $new ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the add_ping callback
- function filter_add_ping( $new ) {
- // make filter magic happen here...
- return $new;
- };
- // add the filter
- add_filter( 'add_ping', 'filter_add_ping', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'add_ping', 'filter_add_ping', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/post.php
- $new = apply_filters( 'add_ping', $new );