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 |
---|---|
6875 | return $this->pingback_error( 48, __( 'The pingback has already been registered.' ) ); |
6876 | } |
6877 |
|
6878 | // Very stupid, but gives time to the 'from' server to publish! |
6879 | sleep( 1 ); |
6880 |
|
6881 | $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ); |
6882 |
|
6883 | /** This filter is documented in wp-includes/class-http.php */ |
6884 | $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $pagelinkedfrom ); |
6885 |
|
6886 | // Let's check the remote site. |
6887 | $http_api_args = array( |
6888 | 'timeout' => 10, |
6889 | 'redirection' => 0, |
6890 | 'limit_response_size' => 153600, // 150 KB |
6891 | 'user-agent' => "$user_agent; verifying pingback from $remote_ip", |
6892 | 'headers' => array( |
6893 | 'X-Pingback-Forwarded-For' => $remote_ip, |