Add expiry date column
This commit is contained in:
parent
dd9163a00f
commit
50c6d4d421
@ -1,3 +1,6 @@
|
|||||||
|
= 1.3 - 2020-02-10 =
|
||||||
|
* Added - Expiry date column.
|
||||||
|
|
||||||
= 1.2.9.4 - 2020-02-05 =
|
= 1.2.9.4 - 2020-02-05 =
|
||||||
* Fixes - Login with Edior role.
|
* Fixes - Login with Edior role.
|
||||||
|
|
||||||
|
@ -103,6 +103,7 @@ class Opalestate_Admin_Property {
|
|||||||
$columns['comments'] = $comments;
|
$columns['comments'] = $comments;
|
||||||
$columns['author'] = esc_html__( 'Author', 'opalestate-pro' );
|
$columns['author'] = esc_html__( 'Author', 'opalestate-pro' );
|
||||||
$columns['date'] = esc_html__( 'Date', 'opalestate-pro' );
|
$columns['date'] = esc_html__( 'Date', 'opalestate-pro' );
|
||||||
|
$columns['expiry_date'] = esc_html__( 'Expiry Date', 'opalestate-pro' );
|
||||||
|
|
||||||
return $columns;
|
return $columns;
|
||||||
}
|
}
|
||||||
@ -148,6 +149,15 @@ class Opalestate_Admin_Property {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'expiry_date':
|
||||||
|
if ( $property->get_expiry_date() ) {
|
||||||
|
$expired_time = $property->get_expiry_date();
|
||||||
|
echo date_i18n( __( 'Y/m/d g:i:s a', 'opalestate-pro' ), $expired_time );
|
||||||
|
} else {
|
||||||
|
echo esc_html_x( '---', 'expired property', 'opalestate-pro' );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
# code...
|
# code...
|
||||||
break;
|
break;
|
||||||
|
@ -740,4 +740,11 @@ class Opalestate_Property {
|
|||||||
public function get_posted() {
|
public function get_posted() {
|
||||||
return human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . esc_html__( 'ago' );
|
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 : '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: Opal Estate Pro
|
* Plugin Name: Opal Estate Pro
|
||||||
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/
|
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/
|
||||||
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
||||||
* Version: 1.2.9.4
|
* Version: 1.3
|
||||||
* Author: WPOPAL
|
* Author: WPOPAL
|
||||||
* Author URI: http://www.wpopal.com
|
* Author URI: http://www.wpopal.com
|
||||||
* Requires at least: 4.9
|
* Requires at least: 4.9
|
||||||
@ -150,7 +150,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
|||||||
*/
|
*/
|
||||||
public function __clone() {
|
public function __clone() {
|
||||||
// Cloning instances of the class is forbidden
|
// Cloning instances of the class is forbidden
|
||||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.2.9.4' );
|
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.3' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,7 +159,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
|||||||
public function setup_constants() {
|
public function setup_constants() {
|
||||||
// Plugin version
|
// Plugin version
|
||||||
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
|
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
|
||||||
define( 'OPALESTATE_VERSION', '1.2.9.4' );
|
define( 'OPALESTATE_VERSION', '1.3' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugin Folder Path
|
// Plugin Folder Path
|
||||||
|
@ -4,7 +4,7 @@ Donate link: https://wpdocs.gitbook.io/opal-estate/
|
|||||||
Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
|
Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
|
||||||
Requires at least: 4.9
|
Requires at least: 4.9
|
||||||
Tested up to: 5.3.2
|
Tested up to: 5.3.2
|
||||||
Stable tag: 1.2.9.4
|
Stable tag: 1.3
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
@ -156,6 +156,9 @@ This section describes how to install the plugin and get it working.
|
|||||||
* System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
|
* System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
= 1.3 - 2020-02-10 =
|
||||||
|
* Added - Expiry date column.
|
||||||
|
|
||||||
= 1.2.9.4 - 2020-02-05 =
|
= 1.2.9.4 - 2020-02-05 =
|
||||||
* Fixes - Login with Edior role.
|
* Fixes - Login with Edior role.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user