WordPress.org

Ready to get started?Download WordPress

Codex

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

Plugin API/Filter Reference/get pung

Description

The "get_pung" filter is used to filter the list of URLs that have already been pinged for a post, after they have been retrieved from the database and before they are returned from the get_pung() function.

Usage

When the 'get_pung' filter is called, it is passed a single argument containing an array of URLs that have already been pinged. Functions attached to the filter can add or remove URLs from the array, then return the modified array.

function filter_function_name( $pung ) {
  # ...
}
add_filter( 'get_pung', 'filter_function_name' );

Where 'filter_function_name' is the function WordPress should call when the $pung array is being retrieved. Note that the filter function must return an array of URLs after it is finished processing, or any code using the $pung array will break, and other plugins also filtering the $pung array may generate errors.

filter_function_name should be unique function name. It cannot match any other function name already declared.

See Also