Update expired properties.

This commit is contained in:
Hoang Huu
2019-11-04 08:28:41 +07:00
parent 09e5f5adfc
commit 943d5e20e4
5 changed files with 252 additions and 108 deletions

View File

@@ -27,6 +27,7 @@ class Opalestate_PostType_Property {
*/
public function __construct() {
add_action( 'init', [ __CLASS__, 'definition' ] );
add_action( 'init', [ __CLASS__, 'register_post_status' ] );
}
/**
@@ -74,6 +75,21 @@ class Opalestate_PostType_Property {
] )
);
}
/**
* Register post status.
*/
public static function register_post_status() {
register_post_status( 'expired', [
'label' => _x( 'Expired', 'Expired status', 'opalestate-pro' ),
'public' => false,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
/* translators: %s: number of orders */
'label_count' => _n_noop( 'Expired <span class="count">(%s)</span>', 'Expired <span class="count">(%s)</span>', 'opalestate-pro' ),
] );
}
}
new Opalestate_PostType_Property();