This commit is contained in:
Alpha
2020-07-13 09:41:00 +07:00
parent 6298197d8f
commit a5a053b025
10 changed files with 30 additions and 13 deletions

View File

@@ -198,6 +198,9 @@ class Opalestate_Query {
'post_type' => 'opalestate_property',
'posts_per_page' => isset( $args['posts_per_page'] ) ? $args['posts_per_page'] : 5,
'paged' => isset( $args['paged'] ) ? $args['paged'] : 1,
'post_status' => 'publish',
'order_by' => isset( $args['orderby'] ) ? $args['orderby'] : 'post_date',
'order' => isset( $args['order'] ) ? $args['order'] : 'DESC',
];
$condition = array_merge( $condition, $args );

View File

@@ -43,18 +43,14 @@ class OpalEstate_Shortcodes {
* defined list of shortcode and functions of this for each.
*/
public function __construct() {
$this->shortcodes = [
'search_properties_form' => [ 'code' => 'search_properties_form', 'label' => esc_html__( 'Search Properties Form', 'opalestate-pro' ) ],
'properties' => [ 'code' => 'properties', 'label' => esc_html__( 'Properties', 'opalestate-pro' ) ],
'search_properties_result' => [ 'code' => 'search_properties_result', 'label' => esc_html__( 'Search Properties Result', 'opalestate-pro' ) ],
'search_properties' => [ 'code' => 'search_properties', 'label' => esc_html__( 'Search Properties', 'opalestate-pro' ) ],
'search_split_maps' => [ 'code' => 'search_split_maps', 'label' => esc_html__( 'Search Split Maps', 'opalestate-pro' ) ],
'search_map_properties' => [ 'code' => 'search_map_properties', 'label' => esc_html__( 'Show Map + Search Box and Properties', 'opalestate-pro' ) ],
'ajax_map_search' => [ 'code' => 'ajax_map_search', 'label' => esc_html__( 'Ajax Search Map Properties And Horizontal Search', 'opalestate-pro' ) ],
'register_form' => [ 'code' => 'register_form', 'label' => esc_html__( 'Register User Form', 'opalestate-pro' ) ],
'login_form' => [ 'code' => 'login_form', 'label' => esc_html__( 'Login Form', 'opalestate-pro' ) ],
];
@@ -66,7 +62,6 @@ class OpalEstate_Shortcodes {
if ( is_admin() ) {
add_action( 'media_buttons', [ $this, 'shortcode_button' ] );
}
}
/**
@@ -220,4 +215,4 @@ class OpalEstate_Shortcodes {
}
OpalEstate_Shortcodes::get_instance();
OpalEstate_Shortcodes::get_instance();