Tweak match day in REST API

This commit is contained in:
Brian Miyaji
2017-11-19 10:59:37 +11:00
parent 61f74c15d9
commit ad31a812a6
2 changed files with 21 additions and 22 deletions

View File

@@ -25,6 +25,11 @@ class SP_Event extends SP_Custom_Post{
}
return $post_status;
}
public function day() {
$day = get_post_meta( $this->ID, 'sp_day', true );
return $day;
}
public function minutes() {
$minutes = get_post_meta( $this->ID, 'sp_minutes', true );
@@ -702,10 +707,4 @@ 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;
}
}