PluginProbe
WPCasa – Real Estate for WordPress / trunk
WPCasa – Real Estate for WordPress vtrunk
1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.1.1 trunk 1.2.0 1.2.1 1.2.10 1.2.10.1 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.2.9.1 1.2.9.2 1.3.0 All 31 releases
wpcasa / templates / listings-panel-select.php

listings-panel-select.php in WPCasa – Real Estate for WordPress trunk, at templates/listings-panel-select.php

28 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
3 <?php
4 $_GET['orderby'] = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : false;
5 $_GET['order'] = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : false;
6 ?>
7
8 <div class="listings-sort">
9
10 <select name="listings-sort">
11
12 <option value=""><?php echo esc_html( $args['labels']['orderby'] ); ?></option>
13
14 <option<?php if ( $_GET['orderby'] == 'date' && $_GET['order'] == 'asc' ) echo ' selected="selected"'; ?> value="<?php echo esc_url( add_query_arg( array( 'orderby' => 'date', 'order' => 'asc' ) ) ); ?>"><?php echo esc_html( $args['labels']['date'] ); ?> (<?php echo esc_html( $args['labels']['asc'] ); ?>)</option>
15
16 <option<?php if ( $_GET['orderby'] == 'date' && $_GET['order'] == 'desc' ) echo ' selected="selected"'; ?> value="<?php echo esc_url( add_query_arg( array( 'orderby' => 'date', 'order' => 'desc' ) ) ); ?>"><?php echo esc_html( $args['labels']['date'] ); ?> (<?php echo esc_html( $args['labels']['desc'] ); ?>)</option>
17
18 <option<?php if ( $_GET['orderby'] == 'price' && $_GET['order'] == 'asc' ) echo ' selected="selected"'; ?> value="<?php echo esc_url( add_query_arg( array( 'orderby' => 'price', 'order' => 'asc' ) ) ); ?>"><?php echo esc_html( $args['labels']['price'] ); ?> (<?php echo esc_html( $args['labels']['asc'] ); ?>)</option>
19
20 <option<?php if ( $_GET['orderby'] == 'price' && $_GET['order'] == 'desc' ) echo ' selected="selected"'; ?> value="<?php echo esc_url( add_query_arg( array( 'orderby' => 'price', 'order' => 'desc' ) ) ); ?>"><?php echo esc_html( $args['labels']['price'] ); ?> (<?php echo esc_html( $args['labels']['desc'] ); ?>)</option>
21
22 <option<?php if ( $_GET['orderby'] == 'title' && $_GET['order'] == 'asc' ) echo ' selected="selected"'; ?> value="<?php echo esc_url( add_query_arg( array( 'orderby' => 'title', 'order' => 'asc' ) ) ); ?>"><?php echo esc_html( $args['labels']['title'] ); ?> (<?php echo esc_html( $args['labels']['asc'] ); ?>)</option>
23
24 <option<?php if ( $_GET['orderby'] == 'title' && $_GET['order'] == 'desc' ) echo ' selected="selected"'; ?> value="<?php echo esc_url( add_query_arg( array( 'orderby' => 'title', 'order' => 'desc' ) ) ); ?>"><?php echo esc_html( $args['labels']['title'] ); ?> (<?php echo esc_html( $args['labels']['desc'] ); ?>)</option>
25
26 </select>
27
28 </div><!-- .listings-sort -->