On this page
generic_ping( int $post_id ): int
Sends pings to all of the ping site services.
Parameters
$post_idint Required-
Post ID.
Return
int Same post ID as provided.
Source
File: wp-includes/comment.php. View all references
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;
}
Related
Uses
| Uses | Description |
|---|---|
| weblog_ping() wp-includes/comment.php | Sends a pingback. |
| get_option() wp-includes/option.php | Retrieves an option value based on an option name. |
Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/generic_ping