pingback_useragent filter-hookWP 2.9.0

Filters the user agent sent when pinging-back a URL.

Usage

add_filter( 'pingback_useragent', 'wp_kama_pingback_useragent_filter', 10, 5 );

/**
 * Function for `pingback_useragent` filter-hook.
 * 
 * @param string $concat_useragent    The user agent concatenated with ' -- WordPress/' and the WordPress version.
 * @param string $useragent           The useragent.
 * @param string $pingback_server_url The server URL being linked to.
 * @param string $pagelinkedto        URL of page linked to.
 * @param string $pagelinkedfrom      URL of page linked from.
 *
 * @return string
 */
function wp_kama_pingback_useragent_filter( $concat_useragent, $useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom ){

	// filter...
	return $concat_useragent;
}
$concat_useragent(string)
The user agent concatenated with ' -- WordPress/' and the WordPress version.
$useragent(string)
The useragent.
$pingback_server_url(string)
The server URL being linked to.
$pagelinkedto(string)
URL of page linked to.
$pagelinkedfrom(string)
URL of page linked from.

Changelog

Since 2.9.0 Introduced.

Where the hook is called

pingback()
pingback_useragent
wp-includes/comment.php 3138
$client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );

Where the hook is used in WordPress

Usage not found.