Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/generic ping

This page redirects to an external site: https://developer.wordpress.org/reference/functions/generic_ping/

Description

Sends pings to all of the ping site services.

Usage

<code style="color: #000000"><span style="color: #0000BB"><?php generic_ping</span><span style="color: #007700">( </span><span style="color: #0000BB">$post_id </span><span style="color: #007700">) </span><span style="color: #0000BB">?></span></code>

Parameters

$post_id
(integer) (optional) Post ID. Only used as a return velue.
Default: 0

Return Values

(integer) 
Returns $post_id unaltered.

Examples

Notes

  • The $post_id and return values do not have to be an integer data types, but in WordPress $post_id is always an integer data type.
  • Uses: get_option() to get all ping sites.
  • Uses: weblog_ping() for each ping site.

Change Log

Since: 1.2.0

Source File

generic_ping() is located in wp-includes/comment.php.

Related

See also index of Function Reference and index of Template Tags.