﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
12726	Add get_post_by_*() functions	mikeschinkel	sorich87	"Current there are get_page_by_path() and get_page_by_title() function but they hardcode the post_type of 'page'.  With support for new custom post types I'm finding a need for functionality to look up posts of custom post types:
{{{
$args = array('post_type','my_custom_post_type');
$path = 'foo-bar';
$post = get_post_by_path($path,$args);
$title = 'Foo Bar'
$post = get_post_by_title($title,$args);
}}}
Another option would be a simple get_post_by():
{{{
$args = array('post_type','my_custom_post_type');
$path = 'foo-bar';
$post = get_post_by('path',$path,$args);
$title = 'Foo Bar'
$post = get_post_by('title',$title,$args);
}}}
This code is not hard to write but looking at the functions in post.php there's not one consistent style so I'm not sure what the best approach would be to write it.  Further, I don't completely understand the significance of all the code in get_page_by_path() so wouldn't want to start with it (although I could see it being modified to use the more generic functions that I propose.)

I can make these updates if I get enough direction from the core team, or I'd happily just see them get done. :)
"	enhancement	accepted	normal	Future Release	Post Types	3.0	normal		has-patch needs-testing	kevinB sorich87@… admin@… Ken@…
