diff --git a/inc/mixes-functions.php b/inc/mixes-functions.php index 9e510fe3..01f03a06 100755 --- a/inc/mixes-functions.php +++ b/inc/mixes-functions.php @@ -1147,3 +1147,18 @@ function opalestate_get_measurement_units() { 'm2' => esc_html__( 'm2', 'opalestate-pro' ), ] ); } + +/** + * Returns property statuses. + * + * @return array + */ +function opalestate_get_property_statuses() { + return apply_filters( 'opalestate_get_property_statuses', [ + 'all' => esc_html__( 'All', 'opalestate-pro' ), + 'publish' => esc_html__( 'Published', 'opalestate-pro' ), + 'published' => esc_html__( 'Published', 'opalestate-pro' ), + 'pending' => esc_html__( 'Pending', 'opalestate-pro' ), + 'expired' => esc_html__( 'Expired', 'opalestate-pro' ), + ] ); +} diff --git a/templates/user/content-property.php b/templates/user/content-property.php index 565d70db..f8dcea01 100755 --- a/templates/user/content-property.php +++ b/templates/user/content-property.php @@ -6,21 +6,13 @@ if ( ! defined( 'ABSPATH' ) ) { $property = opalesetate_property( get_the_ID() ); global $property, $post; - -$meta = $property->get_meta_shortinfo(); +$status = get_post_status( get_the_ID() ); +$statuses = opalestate_get_property_statuses(); +$meta = $property->get_meta_shortinfo(); ?>
>
-
- - featured != 1 ): ?> - - -
-
@@ -49,7 +41,10 @@ $meta = $property->get_meta_shortinfo();
- + +
    @@ -91,7 +86,6 @@ $meta = $property->get_meta_shortinfo(); -
diff --git a/templates/user/my-properties.php b/templates/user/my-properties.php index eff4dfa1..1dee0de6 100755 --- a/templates/user/my-properties.php +++ b/templates/user/my-properties.php @@ -1,54 +1,51 @@ - esc_html__( 'All' ,'opalestate-pro' ), - 'published' => esc_html__( 'Published' ,'opalestate-pro' ), - 'pending' => esc_html__( 'Pending' ,'opalestate-pro' ), - 'expired' => esc_html__( 'Expired' ,'opalestate-pro' ), - ); + esc_html__( 'All', 'opalestate-pro' ), + 'published' => esc_html__( 'Published', 'opalestate-pro' ), + 'pending' => esc_html__( 'Pending', 'opalestate-pro' ), + 'expired' => esc_html__( 'Expired', 'opalestate-pro' ), +]; - $gstatus = isset( $_GET['status'] )? $_GET['status']:'all'; +$gstatus = isset( $_GET['status'] ) ? $_GET['status'] : 'all'; ?> -
+
-
-
-
    - $label ): ?> -
  • class="active" > - -
  • - -
+
+
+
    + $label ): ?> +
  • class="active" > + +
  • + +
+
+
+ +
+
+ have_posts() ): ?> +
+
+ have_posts() ) : $loop->the_post(); + global $post; ?> +
+ +
+ +
+
+ max_num_pages ); ?> + + +
+ +
+ +
- -
- -
- - have_posts() ): ?> -
-
- have_posts() ) : $loop->the_post(); global $post; ?> - - -
- -
- - -
-
- max_num_pages ); ?> - - -
- -
- -
-
-
- \ No newline at end of file +