generic_ping() WordPress Function
The generic_ping() function is used to send pings to other blogs and websites. Pings are used to notify other websites that your website has been updated.
generic_ping( int $post_id ) #
Sends pings to all of the ping site services.
Parameters
- $post_id
(int)(Required)Post ID.
Return
(int) Same as Post ID from parameter
Source
File: wp-includes/comment.php
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;
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |