get_to_ping WordPress Filter Hook

The get_to_ping hook is used to modify the list of URLs that are pinged when a post is published. This hook is executed at the beginning of the do_pings() function, which is called when a post is published.

apply_filters( 'get_to_ping', string[] $to_ping ) #

Filters the list of URLs yet to ping for the given post.


Parameters

$to_ping

(string[])List of URLs yet to ping.


Top ↑

More Information

  • Callback functions applied to this filter should not ping the URLs. Instead, they may modify the array of URLs to be pinged, and WordPress will ping them automatically.
  • Note that each of the filter callback functions must return an array of URLs after it is finished processing. Otherwise, any code using the $to_ping array will break and other plugins also filtering the $to_ping array may generate errors.

Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More