Add expiry date column

This commit is contained in:
Hoang Huu
2020-02-10 10:33:37 +07:00
parent dd9163a00f
commit 50c6d4d421
5 changed files with 30 additions and 7 deletions

View File

@@ -740,4 +740,11 @@ class Opalestate_Property {
public function get_posted() {
return human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . esc_html__( 'ago' );
}
public function get_expiry_date() {
$expired_activated = get_post_meta( $this->get_id(), OPALESTATE_PROPERTY_PREFIX . 'expired_activated', true );
$expired_time = get_post_meta( $this->get_id(), OPALESTATE_PROPERTY_PREFIX . 'expired_time', true );
return ( $expired_activated && $expired_time ) ? $expired_time : '';
}
}