Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pingback_useragent

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2659                 * @since 2.9.0
2660                 *
2661                 * @param string $concat_useragent    The user agent concatenated with ' -- WordPress/'
2662                 *                                    and the WordPress version.
2663                 * @param string $useragent           The useragent.
2664                 * @param string $pingback_server_url The server URL being linked to.
2665                 * @param string $pagelinkedto        URL of page linked to.
2666                 * @param string $pagelinkedfrom      URL of page linked from.
2667                 */
2668                $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );
2669                // when set to true, this outputs debug messages by itself
2670                $client->debug = false;
2671
2672                if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered
2673                     add_ping( $post, $pagelinkedto );
2674           }
2675      }
2676 }
2677