﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
12727	Allow get_post*() and get_page*() functions to query by more than ID or using an post object.	mikeschinkel		"This is similar to ticket #12726 which I just submitted but is broader.  There are many functions in post.php (and probably elsewhere) that accept a $post as a lookup parameter where $post is either an ID or an object with an attribute of ""ID"" containing a post ID, i.e. $post->ID.  It would be nice if they could optionally accept other lookup criteria such as 'path' and 'title.'  

It could be something like this:
{{{
$post = get_post(new WP_PostBy('path','mypath'));
class WP_PostBy {
	var $field;
	var $value;
	function __construct($field,$value) {
		$this->field = $field;
		$this->value = $value;
	}
}
}}}
Or it could be just as simple as a two element array, i.e.
{{{
$post = get_post(array('path','mypath'));
}}}
I'll be happy to do the coding if the task is 'blessed' and any special cases that I need to handle are identified.
"	enhancement	closed	normal		Post Types	3.0	normal	duplicate		mikeschinkel@…
