Skip to content

Commit d9c90b8

Browse files
author
Dave Bonds
committed
Merge pull request #72 in WP/wp-listings from release/2.3.1 to master
* commit '28c7ea08ac23e46a57ea1fcbe2f4adca0832242a': update version and readme add acres as available field Updated to font awesome to latest version and added a version suffix to the css handle Prefixed font-awesome css handle to avoid name collisions use propStatus for sold listings instead of archiveStatus change append param to false add delay to masonry layout
2 parents 321e1f8 + 28c7ea0 commit d9c90b8

File tree

7 files changed

+49
-26
lines changed

7 files changed

+49
-26
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77

88
**Tags:** real estate, listings, property, properties, listing search, idx, idx broker, mls, agentpress
99

10-
**Requires at least:** 3.7
10+
**Requires at least:** 4.0
1111

12-
**Tested up to:** 4.7.5
12+
**Tested up to:** 4.9.4
1313

14-
**Stable tag:** 2.3.0
14+
**Stable tag:** 2.3.1
15+
16+
**Requires PHP:** 5.4
1517

1618
**License:** GPLv2 or later
1719

@@ -192,6 +194,14 @@ function custom_default_property_type_terms() {
192194

193195
## Changelog ##
194196

197+
### 2.3.1 ###
198+
*Released 03-25-17*
199+
* Fix: Change font awesome handle to prevent collision with other loaded versions
200+
* Fix: Change sold listings to use propStatus instead of archiveStatus
201+
* Fix: Change listing importer to not append to status taxonomy when updating, only replace
202+
* Fix: Added delay to masonry script on listing importer page to allow everything to load before initializing
203+
* Fix: Added acres field in lieu of lot sq ft. Listing importer now respects this field.
204+
195205
### 2.3.0 ###
196206
*Released 05-25-17*
197207
* Feature: Added option to set title/permalink for imported listings

includes/class-listing-import.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -295,25 +295,22 @@ public static function wp_listings_idx_insert_post_meta($id, $idx_featured_listi
295295
update_post_meta($id, '_listing_gallery', apply_filters('wp_listings_imported_gallery', $imgs));
296296
}
297297

298-
if($sold == true) {
299-
$propstatus = ucfirst($idx_featured_listing_data['archiveStatus']);
298+
if ( $idx_featured_listing_data['propStatus'] == 'A' ) {
299+
$propstatus = 'Active';
300+
} elseif( $idx_featured_listing_data['propStatus'] == 'S' ) {
301+
$propstatus = 'Sold';
300302
} else {
301-
if ($idx_featured_listing_data['propStatus'] == 'A'){
302-
$propstatus = 'Active';
303-
} elseif($idx_featured_listing_data['propStatus'] == 'S') {
304-
$propstatus = 'Sold';
305-
} else {
306-
$propstatus = ucfirst($idx_featured_listing_data['propStatus']);
307-
}
303+
$propstatus = ucfirst( $idx_featured_listing_data['propStatus'] );
308304
}
309305

310306
// Add or reset taxonomies for property-types, locations, and status
311307
wp_set_object_terms($id, $idx_featured_listing_data['idxPropType'], 'property-types', true);
312308
wp_set_object_terms($id, $idx_featured_listing_data['cityName'], 'locations', true);
313-
wp_set_object_terms($id, $propstatus, 'status', true);
309+
wp_set_object_terms($id, $propstatus, 'status', false);
314310

315311
// Add post meta for existing WPL fields
316-
update_post_meta($id, '_listing_lot_sqft', $idx_featured_listing_data['acres'].' acres');
312+
update_post_meta($id, '_listing_lot_sqft', isset($idx_featured_listing_data['lotSqFt']) ? $idx_featured_listing_data['lotSqFt'] : $idx_featured_listing_data['acres'].' acres');
313+
update_post_meta($id, '_listing_acres', $idx_featured_listing_data['acres']);
317314
update_post_meta($id, '_listing_price', $idx_featured_listing_data['listingPrice']);
318315
update_post_meta($id, '_listing_address', $idx_featured_listing_data['address']);
319316
update_post_meta($id, '_listing_city', $idx_featured_listing_data['cityName']);

includes/class-listings.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function __construct() {
4444
__( 'Year Built:', 'wp-listings' ) => '_listing_year_built',
4545
__( 'Floors:', 'wp-listings' ) => '_listing_floors',
4646
__( 'Square Feet:', 'wp-listings' ) => '_listing_sqft',
47+
__( 'Acres:', 'wp-listings' ) => '_listing_acres',
4748
__( 'Lot Square Feet:', 'wp-listings' ) => '_listing_lot_sqft',
4849
__( 'Bedrooms:', 'wp-listings' ) => '_listing_bedrooms',
4950
__( 'Bathrooms:', 'wp-listings' ) => '_listing_bathrooms',

includes/js/admin-listing-import.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ jQuery(document).ready(function($) {
77
});
88
});
99

10-
jQuery('.grid').masonry({
11-
columnWidth: '.grid-sizer',
12-
itemSelector: '.grid-item'
13-
});
10+
setTimeout(function() {
11+
var grid = $('.grid').masonry({
12+
columnWidth: '.grid-sizer',
13+
itemSelector: '.grid-item'
14+
});
15+
grid.masonry('layout');
16+
}, 1000);
1417

1518
$(document).on( 'click', '.delete-post', function() {
1619
var id = $(this).data('id');

includes/views/single-listing.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
add_action('wp_enqueue_scripts', 'enqueue_single_listing_scripts');
1010
function enqueue_single_listing_scripts() {
1111
wp_enqueue_style( 'wp-listings-single' );
12-
wp_enqueue_style( 'font-awesome' );
12+
wp_enqueue_style( 'font-awesome-4.7.0' );
1313
wp_enqueue_script( 'jquery-validate', array('jquery'), true, true );
1414
wp_enqueue_script( 'fitvids', array('jquery'), true, true );
1515
wp_enqueue_script( 'wp-listings-single', array('jquery, jquery-ui-tabs', 'jquery-validate'), true, true );
@@ -67,6 +67,10 @@ function single_listing_post_content() {
6767
$listing_meta .= sprintf( '<li class="listing-lot-sqft"><span class="label">Lot Sq Ft: </span>%s</li>', get_post_meta( $post->ID, '_listing_lot_sqft', true ) );
6868
}
6969

70+
if ( '' != get_post_meta( $post->ID, '_listing_acres', true ) ) {
71+
$listing_meta .= sprintf( '<li class="listing-acres"><span class="label">Acres: </span>%s</li>', get_post_meta( $post->ID, '_listing_acres', true ) );
72+
}
73+
7074
$listing_meta .= sprintf( '</ul>');
7175

7276
echo $listing_meta;

plugin.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Author URI: http://agentevolution.com
88
Text Domain: wp-listings
99
10-
Version: 2.3.0
10+
Version: 2.3.1
1111
1212
License: GNU General Public License v2.0 (or later)
1313
License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -66,7 +66,7 @@ function wp_listings_init() {
6666

6767
define( 'WP_LISTINGS_URL', plugin_dir_url( __FILE__ ) );
6868
define( 'WP_LISTINGS_DIR', plugin_dir_path( __FILE__ ) );
69-
define( 'WP_LISTINGS_VERSION', '2.3.0' );
69+
define( 'WP_LISTINGS_VERSION', '2.3.1' );
7070

7171
/** Load textdomain for translation */
7272
load_plugin_textdomain( 'wp-listings', false, basename( dirname( __FILE__ ) ) . '/languages/' );
@@ -109,7 +109,7 @@ function add_wp_listings_main_styles() {
109109
wp_register_style('wp-listings-single', WP_LISTINGS_URL . 'includes/css/wp-listings-single.css', '', null, 'all');
110110

111111
/** Register Font Awesome icons but don't enqueue them */
112-
wp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', '', null, 'all');
112+
wp_register_style( 'font-awesome-4.7.0', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', array(), '4.7.0', 'all' );
113113

114114

115115
/** Register Properticons but don't enqueue them */
@@ -161,8 +161,7 @@ function wp_listings_admin_scripts_styles() {
161161

162162
/** Enqueue Font Awesome in the Admin if IDX Broker is not installed */
163163
if (!class_exists( 'Idx_Broker_Plugin' )) {
164-
wp_register_style('font-awesome-admin', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', '', null, 'all');
165-
wp_enqueue_style('font-awesome-admin');
164+
wp_enqueue_style( 'font-awesome-4.7.0', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', array(), '4.7.0' );
166165
wp_enqueue_style('upgrade-icon', WP_LISTINGS_URL . 'includes/css/wp-listings-upgrade.css');
167166
}
168167

readme.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ Author URL: http://www.agentevolution.com/
44
Contributors: agentevolution, davebonds, chadajohnson
55
Tags: real estate, listings, property, properties, listing search, idx, idx broker, mls, agentpress
66
Requires at least: 4.0
7-
Tested up to: 4.7.5
8-
Stable tag: 2.3.0
7+
Tested up to: 4.9.4
8+
Stable tag: 2.3.1
9+
Requires PHP: 5.4
910
License: GPLv2 or later
1011
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1112

@@ -206,6 +207,14 @@ function custom_default_property_type_terms() {
206207

207208
== Changelog ==
208209

210+
= 2.3.1 =
211+
*Released 03-25-17*
212+
* Fix: Change font awesome handle to prevent collision with other loaded versions
213+
* Fix: Change sold listings to use propStatus instead of archiveStatus
214+
* Fix: Change listing importer to not append to status taxonomy when updating, only replace
215+
* Fix: Added delay to masonry script on listing importer page to allow everything to load before initializing
216+
* Fix: Added acres field in lieu of lot sq ft. Listing importer now respects this field.
217+
209218
= 2.3.0 =
210219
*Released 05-25-17*
211220
* Feature: Added option to set title/permalink for imported listings

0 commit comments

Comments
 (0)