generic_ping()WP 1.2.0

Sends pings to all of the ping site services.

Хуков нет.

Возвращает

int. Same post ID as provided.

Использование

generic_ping( $post_id );
$post_id(int)
Post ID.

Список изменений

С версии 1.2.0 Введена.

Код generic_ping() WP 6.6.2

function generic_ping( $post_id = 0 ) {
	$services = get_option( 'ping_sites' );

	$services = explode( "\n", $services );
	foreach ( (array) $services as $service ) {
		$service = trim( $service );
		if ( '' !== $service ) {
			weblog_ping( $service );
		}
	}

	return $post_id;
}