add minutes function to event class
This commit is contained in:
@@ -26,6 +26,12 @@ class SP_Event extends SP_Custom_Post{
|
|||||||
return $post_status;
|
return $post_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function minutes() {
|
||||||
|
$minutes = get_post_meta( $this->ID, 'sp_minutes', true );
|
||||||
|
if ( '' === $minutes ) $minutes = 90;
|
||||||
|
return $minutes;
|
||||||
|
}
|
||||||
|
|
||||||
public function results( $admin = false ) {
|
public function results( $admin = false ) {
|
||||||
$teams = (array)get_post_meta( $this->ID, 'sp_team', false );
|
$teams = (array)get_post_meta( $this->ID, 'sp_team', false );
|
||||||
$results = (array)get_post_meta( $this->ID, 'sp_results', true );
|
$results = (array)get_post_meta( $this->ID, 'sp_results', true );
|
||||||
|
|||||||
Reference in New Issue
Block a user