Merge pull request #218 from yajuve/master

Add match day to event api rest
This commit is contained in:
Brian Miyaji
2017-11-19 10:25:44 +11:00
committed by GitHub
2 changed files with 22 additions and 0 deletions

View File

@@ -702,4 +702,10 @@ class SP_Event extends SP_Custom_Post{
public function sort_timeline( $a, $b ) {
return $a['time'] - $b['time'];
}
public function day() {
$day = get_post_meta( $this->ID, 'sp_day', true );
if ( '' === $day ) $day = 'empty';
return $day;
}
}