wppaste
WordPress

weblog_ping( string $server = '', string $path = '' )

Since
1.2.0
Source
wp-includes/comment.php:3690
Sends a pingback.

Parameters

$serverstringoptional
Host of blog to connect to.Default: ''
$pathstringoptional
Path to send the ping.Default: ''

Uses · 5

Used by · 1

Source

function weblog_ping( $server = '', $path = '' ) {	require_once ABSPATH . WPINC . '/class-IXR.php';	require_once ABSPATH . WPINC . '/class-wp-http-ixr-client.php'; 	// Using a timeout of 3 seconds should be enough to cover slow servers.	$client             = new WP_HTTP_IXR_Client( $server, ( ( ! strlen( trim( $path ) ) || ( '/' === $path ) ) ? false : $path ) );	$client->timeout    = 3;	$client->useragent .= ' -- WordPress/' . get_bloginfo( 'version' ); 	// When set to true, this outputs debug messages by itself.	$client->debug = false;	$home          = trailingslashit( home_url() );	if ( ! $client->query( 'weblogUpdates.extendedPing', get_option( 'blogname' ), $home, get_bloginfo( 'rss2_url' ) ) ) { // Then try a normal ping.		$client->query( 'weblogUpdates.ping', get_option( 'blogname' ), $home );	}}

History

Introduced in 1.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/comment.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.