WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 3050 | * @since 2.9.0 |
| 3051 | * |
| 3052 | * @param string $concat_useragent The user agent concatenated with ' -- WordPress/' |
| 3053 | * and the WordPress version. |
| 3054 | * @param string $useragent The useragent. |
| 3055 | * @param string $pingback_server_url The server URL being linked to. |
| 3056 | * @param string $pagelinkedto URL of page linked to. |
| 3057 | * @param string $pagelinkedfrom URL of page linked from. |
| 3058 | */ |
| 3059 | $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom ); |
| 3060 | // When set to true, this outputs debug messages by itself. |
| 3061 | $client->debug = false; |
| 3062 | |
| 3063 | if ( $client->query( 'pingback.ping', $pagelinkedfrom, $pagelinkedto ) || ( isset( $client->error->code ) && 48 == $client->error->code ) ) { // Already registered. |
| 3064 | add_ping( $post, $pagelinkedto ); |
| 3065 | } |
| 3066 | } |
| 3067 | } |
| 3068 | } |