and return the post
This commit is contained in:
parent
ca5d2708d7
commit
037669c63e
@ -54,6 +54,8 @@ class ComicPressTagBuilder {
|
||||
return strtotime($this->post->post_date);
|
||||
case 'permalink':
|
||||
return get_permalink($this->post->ID);
|
||||
case 'post':
|
||||
return $this->post;
|
||||
default:
|
||||
$methods = $this->parse_method($method);
|
||||
if (!empty($methods)) {
|
||||
|
@ -96,7 +96,13 @@ class ComicPressTagBuilderTest extends PHPUnit_Framework_TestCase {
|
||||
array('id', 1),
|
||||
array('title', 'Post title'),
|
||||
array('timestamp', strtotime('2010-01-01')),
|
||||
array('permalink', 'the-slug')
|
||||
array('permalink', 'the-slug'),
|
||||
array('post', (object)array(
|
||||
'ID' => 1,
|
||||
'post_title' => 'Post title',
|
||||
'post_date' => '2010-01-01',
|
||||
'guid' => 'the-slug',
|
||||
))
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user