Changeset 2889422
- Timestamp:
- 03/29/2023 06:33:54 PM (3 years ago)
- Location:
- simply-rets
- Files:
-
- 5 edited
- 9 copied
-
tags/2.9.13 (copied) (copied from simply-rets/trunk)
-
tags/2.9.13/assets/js/simply-rets-client.js (copied) (copied from simply-rets/trunk/assets/js/simply-rets-client.js)
-
tags/2.9.13/readme.txt (copied) (copied from simply-rets/trunk/readme.txt) (2 diffs)
-
tags/2.9.13/simply-rets-admin.php (copied) (copied from simply-rets/trunk/simply-rets-admin.php)
-
tags/2.9.13/simply-rets-api-helper.php (copied) (copied from simply-rets/trunk/simply-rets-api-helper.php) (6 diffs)
-
tags/2.9.13/simply-rets-post-pages.php (copied) (copied from simply-rets/trunk/simply-rets-post-pages.php)
-
tags/2.9.13/simply-rets-shortcode.php (copied) (copied from simply-rets/trunk/simply-rets-shortcode.php) (4 diffs)
-
tags/2.9.13/simply-rets-utils.php (copied) (copied from simply-rets/trunk/simply-rets-utils.php) (5 diffs)
-
tags/2.9.13/simply-rets.php (copied) (copied from simply-rets/trunk/simply-rets.php) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/simply-rets-api-helper.php (modified) (6 diffs)
-
trunk/simply-rets-shortcode.php (modified) (4 diffs)
-
trunk/simply-rets-utils.php (modified) (5 diffs)
-
trunk/simply-rets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simply-rets/tags/2.9.13/readme.txt
r2886096 r2889422 5 5 Requires at least: 3.0.1 6 6 Tested up to: 6.1 7 Stable tag: 2.9.1 27 Stable tag: 2.9.13 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 237 237 238 238 == Changelog == 239 240 = 2.9.13 = 241 * FEATURE: Add "Recently modified" sort option to search form 242 * FEATURE: Show contact information with list agent/office name in "above the fold" 243 compliance markup 244 * FIX: Fix error displaying "0 matching results" message 245 * FIX: Fix bug displaying list office phone number 239 246 240 247 = 2.9.12 = -
simply-rets/tags/2.9.13/simply-rets-api-helper.php
r2886096 r2889422 125 125 $site_url = get_site_url(); 126 126 127 $ua_string = "SimplyRETSWP/2.9.1 2Wordpress/{$wp_version} PHP/{$php_version}";127 $ua_string = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}"; 128 128 $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json"; 129 129 … … 246 246 $php_version = phpversion(); 247 247 248 $ua_string = "SimplyRETSWP/2.9.1 2Wordpress/{$wp_version} PHP/{$php_version}";248 $ua_string = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}"; 249 249 $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json"; 250 250 … … 1051 1051 1052 1052 // Office 1053 $has_office_contact_info = !empty($listing->agent->contact) 1054 AND !empty($listing->agent->contact->email); 1053 $has_office_contact_info = !empty($listing->office->contact); 1055 1054 1056 1055 $listing_office = $listing->office->name; … … 1116 1115 1117 1116 /** 1118 * Create the custom compliance markup 1117 * Create the custom compliance markup for map marker 1119 1118 */ 1120 1119 $compliance_markup = SrUtils::mkListingSummaryCompliance($listing_office, $listing_agent_name); … … 1122 1121 1123 1122 /** 1124 * Create the "Listing by" markup 1123 * Find available contact information to display 1124 * Then, create the "Listing by" markup 1125 1125 */ 1126 $attribution_contact = property_exists($complianceData, "attributionContact") 1127 ? $complianceData->attributionContact 1128 : NULL; 1129 $listing_by_contact = current(array_filter(array( 1130 $attribution_contact, 1131 $listing_agent_phone, 1132 $agent_email, 1133 $listing_office_phone, 1134 $listing_office_email, 1135 ))); 1136 1126 1137 $listing_by_markup = SrUtils::mkAgentOfficeAboveTheFold( 1127 1138 $listing_agent_name, 1128 $listing_office 1139 $listing_office, 1140 $listing_by_contact, 1129 1141 ); 1130 1131 1142 1132 1143 $galleria_theme = plugins_url('assets/galleria/themes/classic/galleria.classic.min.js', __FILE__); … … 1375 1386 $show_listing_meta = SrUtils::srShowListingMeta(); 1376 1387 1377 /* 1378 * Check for an `.error` in the response and return it if it 1379 * exists. Check for NULL is mostly just redundancy. 1380 */ 1388 /* Check for an and display any `.error` response */ 1381 1389 if(!is_array($response) && property_exists($response, "error")) { 1382 $error_message =SrMessages::noResultsMsg($response);1383 return $error_message;1384 } 1385 1386 if (!is_array($response)) {1387 $response = array($response);1390 return SrMessages::noResultsMsg($response); 1391 } 1392 1393 /* Check for 0 matching listings (no results) */ 1394 if (empty($response)) { 1395 return SrMessages::noResultsMsg($response); 1388 1396 } 1389 1397 -
simply-rets/tags/2.9.13/simply-rets-shortcode.php
r2886096 r2889422 166 166 <select class="select" name="sr_sort"> 167 167 <option value="">Sort Options</option> 168 <option value="-modified"> Recently modified</option> 168 169 <option value="-listprice"> Price - High to Low</option> 169 170 <option value="listprice"> Price - Low to High</option> … … 359 360 } 360 361 362 $sort_price_mod = ($sort == "-modified") ? "selected" : ''; 361 363 $sort_price_hl = ($sort == "-listprice") ? "selected" : ''; 362 364 $sort_price_lh = ($sort == "listprice") ? "selected" : ''; … … 580 582 <label for="sr_sort">Sort by: </label> 581 583 <select name="sr_sort"> 584 <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option> 582 585 <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option> 583 586 <option value="listprice" <?php echo $sort_price_lh ?>> Price - Low to High</option> … … 646 649 <label for="sr_sort">Sort by: </label> 647 650 <select class="select" name="sr_sort"> 651 <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option> 648 652 <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option> 649 653 <option value="listprice" <?php echo $sort_price_lh ?>> Price - Low to High</option> -
simply-rets/tags/2.9.13/simply-rets-utils.php
r2886096 r2889422 406 406 * office name is available. 407 407 */ 408 public static function mkAgentOfficeAboveTheFold($agent, $office) { 409 408 public static function mkAgentOfficeAboveTheFold($agent, $office, $contact = NULL) { 410 409 // Initialize variables 411 $listing_by; 410 $listing_by = ""; 411 $listing_by_contact = !empty($contact) ? ", $contact" : ""; 412 412 413 413 // Ensure we have all the info we need … … 427 427 $listing_by .= "<strong>$agent</strong>, "; 428 428 $listing_by .= "<strong>$office</strong>"; 429 $listing_by .= "<strong>$listing_by_contact</strong>"; 429 430 return "<p>$listing_by</p>"; 430 431 … … 434 435 * Only office name is available, show that 435 436 */ 436 $listing_by = "Listing by: <strong>$office</strong>"; 437 $listing_by .= "Listing by: <strong>$office</strong>"; 438 $listing_by .= "<strong>$listing_by_contact</strong>"; 437 439 return "<p>$listing_by</p>"; 438 440 … … 443 445 */ 444 446 $listing_by = "Listing by: <strong>$agent</strong>"; 447 $listing_by .= "<strong>$listing_by_contact</strong>"; 445 448 return "<p>$listing_by</p>"; 446 449 … … 552 555 } 553 556 554 $noResultsMsg = "<br><p><strong>There are 0 listings that match this search. " 555 . "Please try to broaden your search criteria or feel free to try again later.</p></strong>"; 557 $noResultsMsg = "<p><strong>" 558 . "0 listings matched your search. " 559 . "Please try to broaden your search criteria or try again later." 560 . "</strong></p>"; 556 561 return $noResultsMsg; 557 562 } -
simply-rets/tags/2.9.13/simply-rets.php
r2886096 r2889422 5 5 Description: Show your Real Estate listings on your Wordpress site. SimplyRETS provides a very simple set up and full control over your listings. 6 6 Author: SimplyRETS 7 Version: 2.9.1 27 Version: 2.9.13 8 8 License: GNU General Public License v3 or later 9 9 -
simply-rets/trunk/readme.txt
r2886096 r2889422 5 5 Requires at least: 3.0.1 6 6 Tested up to: 6.1 7 Stable tag: 2.9.1 27 Stable tag: 2.9.13 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 237 237 238 238 == Changelog == 239 240 = 2.9.13 = 241 * FEATURE: Add "Recently modified" sort option to search form 242 * FEATURE: Show contact information with list agent/office name in "above the fold" 243 compliance markup 244 * FIX: Fix error displaying "0 matching results" message 245 * FIX: Fix bug displaying list office phone number 239 246 240 247 = 2.9.12 = -
simply-rets/trunk/simply-rets-api-helper.php
r2886096 r2889422 125 125 $site_url = get_site_url(); 126 126 127 $ua_string = "SimplyRETSWP/2.9.1 2Wordpress/{$wp_version} PHP/{$php_version}";127 $ua_string = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}"; 128 128 $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json"; 129 129 … … 246 246 $php_version = phpversion(); 247 247 248 $ua_string = "SimplyRETSWP/2.9.1 2Wordpress/{$wp_version} PHP/{$php_version}";248 $ua_string = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}"; 249 249 $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json"; 250 250 … … 1051 1051 1052 1052 // Office 1053 $has_office_contact_info = !empty($listing->agent->contact) 1054 AND !empty($listing->agent->contact->email); 1053 $has_office_contact_info = !empty($listing->office->contact); 1055 1054 1056 1055 $listing_office = $listing->office->name; … … 1116 1115 1117 1116 /** 1118 * Create the custom compliance markup 1117 * Create the custom compliance markup for map marker 1119 1118 */ 1120 1119 $compliance_markup = SrUtils::mkListingSummaryCompliance($listing_office, $listing_agent_name); … … 1122 1121 1123 1122 /** 1124 * Create the "Listing by" markup 1123 * Find available contact information to display 1124 * Then, create the "Listing by" markup 1125 1125 */ 1126 $attribution_contact = property_exists($complianceData, "attributionContact") 1127 ? $complianceData->attributionContact 1128 : NULL; 1129 $listing_by_contact = current(array_filter(array( 1130 $attribution_contact, 1131 $listing_agent_phone, 1132 $agent_email, 1133 $listing_office_phone, 1134 $listing_office_email, 1135 ))); 1136 1126 1137 $listing_by_markup = SrUtils::mkAgentOfficeAboveTheFold( 1127 1138 $listing_agent_name, 1128 $listing_office 1139 $listing_office, 1140 $listing_by_contact, 1129 1141 ); 1130 1131 1142 1132 1143 $galleria_theme = plugins_url('assets/galleria/themes/classic/galleria.classic.min.js', __FILE__); … … 1375 1386 $show_listing_meta = SrUtils::srShowListingMeta(); 1376 1387 1377 /* 1378 * Check for an `.error` in the response and return it if it 1379 * exists. Check for NULL is mostly just redundancy. 1380 */ 1388 /* Check for an and display any `.error` response */ 1381 1389 if(!is_array($response) && property_exists($response, "error")) { 1382 $error_message =SrMessages::noResultsMsg($response);1383 return $error_message;1384 } 1385 1386 if (!is_array($response)) {1387 $response = array($response);1390 return SrMessages::noResultsMsg($response); 1391 } 1392 1393 /* Check for 0 matching listings (no results) */ 1394 if (empty($response)) { 1395 return SrMessages::noResultsMsg($response); 1388 1396 } 1389 1397 -
simply-rets/trunk/simply-rets-shortcode.php
r2886096 r2889422 166 166 <select class="select" name="sr_sort"> 167 167 <option value="">Sort Options</option> 168 <option value="-modified"> Recently modified</option> 168 169 <option value="-listprice"> Price - High to Low</option> 169 170 <option value="listprice"> Price - Low to High</option> … … 359 360 } 360 361 362 $sort_price_mod = ($sort == "-modified") ? "selected" : ''; 361 363 $sort_price_hl = ($sort == "-listprice") ? "selected" : ''; 362 364 $sort_price_lh = ($sort == "listprice") ? "selected" : ''; … … 580 582 <label for="sr_sort">Sort by: </label> 581 583 <select name="sr_sort"> 584 <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option> 582 585 <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option> 583 586 <option value="listprice" <?php echo $sort_price_lh ?>> Price - Low to High</option> … … 646 649 <label for="sr_sort">Sort by: </label> 647 650 <select class="select" name="sr_sort"> 651 <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option> 648 652 <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option> 649 653 <option value="listprice" <?php echo $sort_price_lh ?>> Price - Low to High</option> -
simply-rets/trunk/simply-rets-utils.php
r2886096 r2889422 406 406 * office name is available. 407 407 */ 408 public static function mkAgentOfficeAboveTheFold($agent, $office) { 409 408 public static function mkAgentOfficeAboveTheFold($agent, $office, $contact = NULL) { 410 409 // Initialize variables 411 $listing_by; 410 $listing_by = ""; 411 $listing_by_contact = !empty($contact) ? ", $contact" : ""; 412 412 413 413 // Ensure we have all the info we need … … 427 427 $listing_by .= "<strong>$agent</strong>, "; 428 428 $listing_by .= "<strong>$office</strong>"; 429 $listing_by .= "<strong>$listing_by_contact</strong>"; 429 430 return "<p>$listing_by</p>"; 430 431 … … 434 435 * Only office name is available, show that 435 436 */ 436 $listing_by = "Listing by: <strong>$office</strong>"; 437 $listing_by .= "Listing by: <strong>$office</strong>"; 438 $listing_by .= "<strong>$listing_by_contact</strong>"; 437 439 return "<p>$listing_by</p>"; 438 440 … … 443 445 */ 444 446 $listing_by = "Listing by: <strong>$agent</strong>"; 447 $listing_by .= "<strong>$listing_by_contact</strong>"; 445 448 return "<p>$listing_by</p>"; 446 449 … … 552 555 } 553 556 554 $noResultsMsg = "<br><p><strong>There are 0 listings that match this search. " 555 . "Please try to broaden your search criteria or feel free to try again later.</p></strong>"; 557 $noResultsMsg = "<p><strong>" 558 . "0 listings matched your search. " 559 . "Please try to broaden your search criteria or try again later." 560 . "</strong></p>"; 556 561 return $noResultsMsg; 557 562 } -
simply-rets/trunk/simply-rets.php
r2886096 r2889422 5 5 Description: Show your Real Estate listings on your Wordpress site. SimplyRETS provides a very simple set up and full control over your listings. 6 6 Author: SimplyRETS 7 Version: 2.9.1 27 Version: 2.9.13 8 8 License: GNU General Public License v3 or later 9 9
Note: See TracChangeset
for help on using the changeset viewer.