Plugin Directory

Changeset 2889422


Ignore:
Timestamp:
03/29/2023 06:33:54 PM (3 years ago)
Author:
SimplyRETS
Message:

v2.9.13 release

Location:
simply-rets
Files:
5 edited
9 copied

Legend:

Unmodified
Added
Removed
  • simply-rets/tags/2.9.13/readme.txt

    r2886096 r2889422  
    55Requires at least: 3.0.1
    66Tested up to: 6.1
    7 Stable tag: 2.9.12
     7Stable tag: 2.9.13
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    237237
    238238== 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
    239246
    240247= 2.9.12 =
  • simply-rets/tags/2.9.13/simply-rets-api-helper.php

    r2886096 r2889422  
    125125        $site_url = get_site_url();
    126126
    127         $ua_string     = "SimplyRETSWP/2.9.12 Wordpress/{$wp_version} PHP/{$php_version}";
     127        $ua_string     = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}";
    128128        $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json";
    129129
     
    246246        $php_version = phpversion();
    247247
    248         $ua_string     = "SimplyRETSWP/2.9.12 Wordpress/{$wp_version} PHP/{$php_version}";
     248        $ua_string     = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}";
    249249        $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json";
    250250
     
    10511051
    10521052        // 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);
    10551054
    10561055        $listing_office = $listing->office->name;
     
    11161115
    11171116        /**
    1118          * Create the custom compliance markup
     1117         * Create the custom compliance markup for map marker
    11191118         */
    11201119        $compliance_markup = SrUtils::mkListingSummaryCompliance($listing_office, $listing_agent_name);
     
    11221121
    11231122        /**
    1124          * Create the "Listing by" markup
     1123         * Find available contact information to display
     1124         * Then, create the "Listing by" markup
    11251125         */
     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
    11261137        $listing_by_markup = SrUtils::mkAgentOfficeAboveTheFold(
    11271138            $listing_agent_name,
    1128             $listing_office
     1139            $listing_office,
     1140            $listing_by_contact,
    11291141        );
    1130 
    11311142
    11321143        $galleria_theme = plugins_url('assets/galleria/themes/classic/galleria.classic.min.js', __FILE__);
     
    13751386        $show_listing_meta = SrUtils::srShowListingMeta();
    13761387
    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 */
    13811389        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);
    13881396        }
    13891397
  • simply-rets/tags/2.9.13/simply-rets-shortcode.php

    r2886096 r2889422  
    166166                              <select class="select" name="sr_sort">
    167167                                  <option value="">Sort Options</option>
     168                                  <option value="-modified"> Recently modified</option>
    168169                                  <option value="-listprice"> Price - High to Low</option>
    169170                                  <option value="listprice"> Price - Low to High</option>
     
    359360        }
    360361
     362        $sort_price_mod = ($sort == "-modified") ? "selected" : '';
    361363        $sort_price_hl = ($sort == "-listprice") ? "selected" : '';
    362364        $sort_price_lh = ($sort == "listprice")  ? "selected" : '';
     
    580582                        <label for="sr_sort">Sort by: </label>
    581583                        <select name="sr_sort">
     584                            <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option>
    582585                            <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option>
    583586                            <option value="listprice"  <?php echo $sort_price_lh ?>> Price - Low to High</option>
     
    646649                    <label for="sr_sort">Sort by: </label>
    647650                    <select class="select" name="sr_sort">
     651                        <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option>
    648652                        <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option>
    649653                        <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  
    406406     * office name is available.
    407407     */
    408     public static function mkAgentOfficeAboveTheFold($agent, $office) {
    409 
     408    public static function mkAgentOfficeAboveTheFold($agent, $office, $contact = NULL) {
    410409        // Initialize variables
    411         $listing_by;
     410        $listing_by = "";
     411        $listing_by_contact = !empty($contact) ? ", $contact" : "";
    412412
    413413        // Ensure we have all the info we need
     
    427427                $listing_by .= "<strong>$agent</strong>, ";
    428428                $listing_by .= "<strong>$office</strong>";
     429                $listing_by .= "<strong>$listing_by_contact</strong>";
    429430                return "<p>$listing_by</p>";
    430431
     
    434435                 * Only office name is available, show that
    435436                 */
    436                 $listing_by = "Listing by: <strong>$office</strong>";
     437                $listing_by .= "Listing by: <strong>$office</strong>";
     438                $listing_by .= "<strong>$listing_by_contact</strong>";
    437439                return "<p>$listing_by</p>";
    438440
     
    443445                 */
    444446                $listing_by = "Listing by: <strong>$agent</strong>";
     447                $listing_by .= "<strong>$listing_by_contact</strong>";
    445448                return "<p>$listing_by</p>";
    446449
     
    552555        }
    553556
    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>";
    556561        return $noResultsMsg;
    557562    }
  • simply-rets/tags/2.9.13/simply-rets.php

    r2886096 r2889422  
    55Description: Show your Real Estate listings on your Wordpress site. SimplyRETS provides a very simple set up and full control over your listings.
    66Author: SimplyRETS
    7 Version: 2.9.12
     7Version: 2.9.13
    88License: GNU General Public License v3 or later
    99
  • simply-rets/trunk/readme.txt

    r2886096 r2889422  
    55Requires at least: 3.0.1
    66Tested up to: 6.1
    7 Stable tag: 2.9.12
     7Stable tag: 2.9.13
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    237237
    238238== 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
    239246
    240247= 2.9.12 =
  • simply-rets/trunk/simply-rets-api-helper.php

    r2886096 r2889422  
    125125        $site_url = get_site_url();
    126126
    127         $ua_string     = "SimplyRETSWP/2.9.12 Wordpress/{$wp_version} PHP/{$php_version}";
     127        $ua_string     = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}";
    128128        $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json";
    129129
     
    246246        $php_version = phpversion();
    247247
    248         $ua_string     = "SimplyRETSWP/2.9.12 Wordpress/{$wp_version} PHP/{$php_version}";
     248        $ua_string     = "SimplyRETSWP/2.9.13 Wordpress/{$wp_version} PHP/{$php_version}";
    249249        $accept_header = "Accept: application/json; q=0.2, application/vnd.simplyrets-v0.1+json";
    250250
     
    10511051
    10521052        // 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);
    10551054
    10561055        $listing_office = $listing->office->name;
     
    11161115
    11171116        /**
    1118          * Create the custom compliance markup
     1117         * Create the custom compliance markup for map marker
    11191118         */
    11201119        $compliance_markup = SrUtils::mkListingSummaryCompliance($listing_office, $listing_agent_name);
     
    11221121
    11231122        /**
    1124          * Create the "Listing by" markup
     1123         * Find available contact information to display
     1124         * Then, create the "Listing by" markup
    11251125         */
     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
    11261137        $listing_by_markup = SrUtils::mkAgentOfficeAboveTheFold(
    11271138            $listing_agent_name,
    1128             $listing_office
     1139            $listing_office,
     1140            $listing_by_contact,
    11291141        );
    1130 
    11311142
    11321143        $galleria_theme = plugins_url('assets/galleria/themes/classic/galleria.classic.min.js', __FILE__);
     
    13751386        $show_listing_meta = SrUtils::srShowListingMeta();
    13761387
    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 */
    13811389        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);
    13881396        }
    13891397
  • simply-rets/trunk/simply-rets-shortcode.php

    r2886096 r2889422  
    166166                              <select class="select" name="sr_sort">
    167167                                  <option value="">Sort Options</option>
     168                                  <option value="-modified"> Recently modified</option>
    168169                                  <option value="-listprice"> Price - High to Low</option>
    169170                                  <option value="listprice"> Price - Low to High</option>
     
    359360        }
    360361
     362        $sort_price_mod = ($sort == "-modified") ? "selected" : '';
    361363        $sort_price_hl = ($sort == "-listprice") ? "selected" : '';
    362364        $sort_price_lh = ($sort == "listprice")  ? "selected" : '';
     
    580582                        <label for="sr_sort">Sort by: </label>
    581583                        <select name="sr_sort">
     584                            <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option>
    582585                            <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option>
    583586                            <option value="listprice"  <?php echo $sort_price_lh ?>> Price - Low to High</option>
     
    646649                    <label for="sr_sort">Sort by: </label>
    647650                    <select class="select" name="sr_sort">
     651                        <option value="-modified" <?php echo $sort_price_mod ?>> Recently modified</option>
    648652                        <option value="-listprice" <?php echo $sort_price_hl ?>> Price - High to Low</option>
    649653                        <option value="listprice"  <?php echo $sort_price_lh ?>> Price - Low to High</option>
  • simply-rets/trunk/simply-rets-utils.php

    r2886096 r2889422  
    406406     * office name is available.
    407407     */
    408     public static function mkAgentOfficeAboveTheFold($agent, $office) {
    409 
     408    public static function mkAgentOfficeAboveTheFold($agent, $office, $contact = NULL) {
    410409        // Initialize variables
    411         $listing_by;
     410        $listing_by = "";
     411        $listing_by_contact = !empty($contact) ? ", $contact" : "";
    412412
    413413        // Ensure we have all the info we need
     
    427427                $listing_by .= "<strong>$agent</strong>, ";
    428428                $listing_by .= "<strong>$office</strong>";
     429                $listing_by .= "<strong>$listing_by_contact</strong>";
    429430                return "<p>$listing_by</p>";
    430431
     
    434435                 * Only office name is available, show that
    435436                 */
    436                 $listing_by = "Listing by: <strong>$office</strong>";
     437                $listing_by .= "Listing by: <strong>$office</strong>";
     438                $listing_by .= "<strong>$listing_by_contact</strong>";
    437439                return "<p>$listing_by</p>";
    438440
     
    443445                 */
    444446                $listing_by = "Listing by: <strong>$agent</strong>";
     447                $listing_by .= "<strong>$listing_by_contact</strong>";
    445448                return "<p>$listing_by</p>";
    446449
     
    552555        }
    553556
    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>";
    556561        return $noResultsMsg;
    557562    }
  • simply-rets/trunk/simply-rets.php

    r2886096 r2889422  
    55Description: Show your Real Estate listings on your Wordpress site. SimplyRETS provides a very simple set up and full control over your listings.
    66Author: SimplyRETS
    7 Version: 2.9.12
     7Version: 2.9.13
    88License: GNU General Public License v3 or later
    99
Note: See TracChangeset for help on using the changeset viewer.