﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
18506,"Filter to allow pingback URLs to be added (from custom fields, etc.)",alexkingorg,nacin,"The current pingback code does not allow for this URL to be added to the pingback stack programatically - there are no filters to use. The attached patch allows URLs to be filtered into the list, before they are compared against the ""pung"" list. This means nothing else needs to change in the code flow, and the feature should ""just work"".

This would be useful in a number of scenarios, here is one:

> plugin/theme stores a URL value as structured data in a custom field (post meta) for a link post. This URL is the focus of the post and should generate a pingback.

Example code that would use this filter:

{{{
function pingback_format_link_url($post_links, $post_id) {
	$url = get_post_meta($post_id, '_format_link_url', true);
	if (!empty($url) && !in_array($url, $post_links)) {
		$post_links[] = $url;
	}
	return $post_links;
}
add_filter('pre_ping_post_links', 'pingback_format_link_url', 10, 2);
}}}",enhancement,closed,normal,3.4,Pings/Trackbacks,3.2.1,normal,fixed,3.4-early has-patch,dromsey@… 21cdb
