Plugin Directory

Changeset 3395453


Ignore:
Timestamp:
11/14/2025 02:57:36 AM (5 months ago)
Author:
SimplyRETS
Message:

v3.1.1 release

Location:
simply-rets
Files:
1 deleted
5 edited
12 copied

Legend:

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

    r3386733 r3395453  
    55Requires at least: 3.0.1
    66Tested up to: 6.8
    7 Stable tag: 3.1.0
     7Stable tag: 3.1.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    237237
    238238== Changelog ==
     239
     240= 3.1.1 =
     241
     242* FIX: Fix "Contact us about this listing" link when using custom contact form
     243* FIX: Properly check user timezone setting when rendering open house times
    239244
    240245= 3.1.0 =
  • simply-rets/tags/3.1.1/simply-rets-api-helper.php

    r3386733 r3395453  
    11611161
    11621162            $upcoming_openhouses_text =
    1163                 $upcoming_openhouses === 1 ? "upcoming open house" : "upcoming open houses";
     1163                $upcoming_openhouses === 1 ? " upcoming open house" : " upcoming open houses";
    11641164
    11651165            $next_openhouses_banner = '<div class="sr-listing-openhouses-banner">'
     
    19441944        // Use custom form if configured
    19451945        if ($custom_form != false) {
    1946             return do_shortcode($custom_form);
     1946            return '<div id="sr-contact-form">'
     1947                 . do_shortcode($custom_form)
     1948                 . '</div>' ;
    19471949        }
    19481950
  • simply-rets/tags/3.1.1/simply-rets-openhouses.php

    r3219948 r3395453  
    4040         * house times for display.
    4141         */
    42         $default_time_zone = timezone_name_get(
    43             get_option("sr_date_default_timezone", wp_timezone())
    44         );
    45 
    46         $start_time_date = date_create(
    47             $openhouse->startTime,
    48             timezone_open($default_time_zone)
    49         );
    50 
    51         $end_time_date = date_create(
    52             $openhouse->endTime,
    53             timezone_open($default_time_zone)
    54         );
     42
     43        // 1. Get the setting.
     44        $timezone_setting = get_option("sr_date_default_timezone", wp_timezone());
     45        $timezone_name_string = '';
     46
     47        // 2. Reliably get the timezone *string* name
     48        if ($timezone_setting instanceof DateTimeZone) {
     49            $timezone_name_string = timezone_name_get($timezone_setting);
     50        } elseif (is_string($timezone_setting) && !empty($timezone_setting)) {
     51            $timezone_name_string = $timezone_setting;
     52        } else {
     53            $timezone_name_string = wp_timezone_string();
     54        }
     55
     56        // 3. Create a DateTimeZone object from the string
     57        $display_time_zone_object = timezone_open($timezone_name_string);
     58
     59        // 4. Validation
     60        if ($display_time_zone_object === false) {
     61            // Fall back to the default WP timezone object
     62            $display_time_zone_object = wp_timezone();
     63        }
     64
     65        // 5. Create DateTime objects FROM the UTC string.
     66        //    Since the string ends in 'Z', PHP correctly parses this as UTC.
     67        $start_time_date = date_create($openhouse->startTime);
     68        $end_time_date = date_create($openhouse->endTime);
     69
     70        $start_time_date->setTimezone($display_time_zone_object);
     71        $end_time_date->setTimezone($display_time_zone_object);
    5572
    5673        // Open house date information
     
    6077
    6178        // Open house time information
     79        // Example: 21:00Z will correctly become "3:00pm" (for UTC-6)
    6280        $start = $start_time_date->format("g:ia");
    6381        $end = $end_time_date->format("g:ia");
  • simply-rets/tags/3.1.1/simply-rets.php

    r3386733 r3395453  
    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: 3.1.0
     7Version: 3.1.1
    88License: GNU General Public License v3 or later
    99
     
    1313
    1414/* Code starts here */
    15 const SIMPLYRETSWP_VERSION = "v3.1.0";
     15const SIMPLYRETSWP_VERSION = "v3.1.1";
    1616
    1717$plugin = plugin_basename(__FILE__);
  • simply-rets/trunk/readme.txt

    r3386733 r3395453  
    55Requires at least: 3.0.1
    66Tested up to: 6.8
    7 Stable tag: 3.1.0
     7Stable tag: 3.1.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    237237
    238238== Changelog ==
     239
     240= 3.1.1 =
     241
     242* FIX: Fix "Contact us about this listing" link when using custom contact form
     243* FIX: Properly check user timezone setting when rendering open house times
    239244
    240245= 3.1.0 =
  • simply-rets/trunk/simply-rets-api-helper.php

    r3386733 r3395453  
    11611161
    11621162            $upcoming_openhouses_text =
    1163                 $upcoming_openhouses === 1 ? "upcoming open house" : "upcoming open houses";
     1163                $upcoming_openhouses === 1 ? " upcoming open house" : " upcoming open houses";
    11641164
    11651165            $next_openhouses_banner = '<div class="sr-listing-openhouses-banner">'
     
    19441944        // Use custom form if configured
    19451945        if ($custom_form != false) {
    1946             return do_shortcode($custom_form);
     1946            return '<div id="sr-contact-form">'
     1947                 . do_shortcode($custom_form)
     1948                 . '</div>' ;
    19471949        }
    19481950
  • simply-rets/trunk/simply-rets-openhouses.php

    r3219948 r3395453  
    4040         * house times for display.
    4141         */
    42         $default_time_zone = timezone_name_get(
    43             get_option("sr_date_default_timezone", wp_timezone())
    44         );
    45 
    46         $start_time_date = date_create(
    47             $openhouse->startTime,
    48             timezone_open($default_time_zone)
    49         );
    50 
    51         $end_time_date = date_create(
    52             $openhouse->endTime,
    53             timezone_open($default_time_zone)
    54         );
     42
     43        // 1. Get the setting.
     44        $timezone_setting = get_option("sr_date_default_timezone", wp_timezone());
     45        $timezone_name_string = '';
     46
     47        // 2. Reliably get the timezone *string* name
     48        if ($timezone_setting instanceof DateTimeZone) {
     49            $timezone_name_string = timezone_name_get($timezone_setting);
     50        } elseif (is_string($timezone_setting) && !empty($timezone_setting)) {
     51            $timezone_name_string = $timezone_setting;
     52        } else {
     53            $timezone_name_string = wp_timezone_string();
     54        }
     55
     56        // 3. Create a DateTimeZone object from the string
     57        $display_time_zone_object = timezone_open($timezone_name_string);
     58
     59        // 4. Validation
     60        if ($display_time_zone_object === false) {
     61            // Fall back to the default WP timezone object
     62            $display_time_zone_object = wp_timezone();
     63        }
     64
     65        // 5. Create DateTime objects FROM the UTC string.
     66        //    Since the string ends in 'Z', PHP correctly parses this as UTC.
     67        $start_time_date = date_create($openhouse->startTime);
     68        $end_time_date = date_create($openhouse->endTime);
     69
     70        $start_time_date->setTimezone($display_time_zone_object);
     71        $end_time_date->setTimezone($display_time_zone_object);
    5572
    5673        // Open house date information
     
    6077
    6178        // Open house time information
     79        // Example: 21:00Z will correctly become "3:00pm" (for UTC-6)
    6280        $start = $start_time_date->format("g:ia");
    6381        $end = $end_time_date->format("g:ia");
  • simply-rets/trunk/simply-rets.php

    r3386733 r3395453  
    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: 3.1.0
     7Version: 3.1.1
    88License: GNU General Public License v3 or later
    99
     
    1313
    1414/* Code starts here */
    15 const SIMPLYRETSWP_VERSION = "v3.1.0";
     15const SIMPLYRETSWP_VERSION = "v3.1.1";
    1616
    1717$plugin = plugin_basename(__FILE__);
Note: See TracChangeset for help on using the changeset viewer.