Plugin Directory

Changeset 3481358


Ignore:
Timestamp:
03/12/2026 04:52:44 PM (3 weeks ago)
Author:
SimplyRETS
Message:

v3.2.1 release

Location:
simply-rets
Files:
1 deleted
13 edited
25 copied

Legend:

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

    r3477656 r3481358  
    55Requires at least: 3.0.1
    66Tested up to: 6.9
    7 Stable tag: 3.2.0
     7Stable tag: 3.2.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    237237
    238238== Changelog ==
     239
     240= 3.2.1 =
     241
     242* IMPROVE: Add direct access protection to all files
     243* IMPROVE: Use wp_safe_redirect() instead of wp_redirect()
    239244
    240245= 3.2.0 =
  • simply-rets/tags/3.2.1/simply-rets-admin.php

    r3477656 r3481358  
    66 *
    77*/
     8if (! defined('ABSPATH')) {
     9    exit;
     10}
    811
    912
     
    133136                $permalink = get_post_permalink($post_id);
    134137                update_option("sr_demo_page_created", true);
    135                 wp_redirect($permalink);
     138                wp_safe_redirect($permalink);
    136139                exit();
    137140            }
  • simply-rets/tags/3.2.1/simply-rets-comments-template.php

    r1072117 r3481358  
    11<?php
    22// Override any themes comments template to ensure nothing appears.
    3 ?>
     3if (! defined('ABSPATH')) {
     4    exit;
     5}
  • simply-rets/tags/3.2.1/simply-rets-maps.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013
  • simply-rets/tags/3.2.1/simply-rets-post-pages.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013
  • simply-rets/tags/3.2.1/simply-rets-shortcode.php

    r3477656 r3481358  
    88 *
    99*/
     10if (! defined('ABSPATH')) {
     11    exit;
     12}
    1013
    1114/* Code starts here */
  • simply-rets/tags/3.2.1/simply-rets-utils.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013
     
    1619        $vendors = (array)get_option('sr_adv_search_meta_vendors', array());
    1720
    18         if(count($vendors) > 1) {
     21        if (count($vendors) > 1) {
    1922            return false;
    2023        }
     
    3336        if (!empty($v)) {
    3437            $types = get_option("sr_adv_search_meta_types_$v", $def_types);
    35 
    3638        } elseif (!empty($vendors[0])) {
    3739            $vendor = $vendors[0];
    3840            $types = get_option("sr_adv_search_meta_types_$vendor", $def_types);
    39 
    4041        } else {
    4142            $types = $def_types;
     
    4748    public static function srShowListingMeta() {
    4849
    49         if( get_option('sr_show_listingmeta') ) {
     50        if (get_option('sr_show_listingmeta')) {
    5051            $show_listing_meta = false;
    5152        } else {
     
    6263    public static function showAgentContact() {
    6364
    64         if( get_option('sr_show_agent_contact') ) {
     65        if (get_option('sr_show_agent_contact')) {
    6566            $show = false;
    6667        } else {
     
    7778        $normalized_type = null;
    7879
    79         switch($type) {
     80        switch ($type) {
    8081            case "RES":
    8182                $normalized_type = "Residential";
     
    113114                $normalized_type = "Mobile Home";
    114115                break;
    115 
    116116        }
    117117
     
    138138        $idxAddress = $listing->internetAddressDisplay;
    139139        $address = $idxAddress === false
    140                  ? $idxAddressReplacement = get_option(
    141                      "sr_idx_address_display_text",
    142                      "Undisclosed address"
    143                  ) : $listing->address->full;
     140            ? $idxAddressReplacement = get_option(
     141                "sr_idx_address_display_text",
     142                "Undisclosed address"
     143            ) : $listing->address->full;
    144144
    145145        $city = $listing->address->city;
     
    150150        // exclude city, state, and zip. This ensures that commas are
    151151        // only used when these fields exist.
    152         $comma1 = ($address AND ($city OR $state OR $zip)) ? ', ' : '';
     152        $comma1 = ($address and ($city or $state or $zip)) ? ', ' : '';
    153153        $comma2 = $city ? ', ' : '';
    154154
     
    226226        );
    227227
    228         if($prettify && $custom_permalink_struct === "pretty_extra") {
     228        if ($prettify && $custom_permalink_struct === "pretty_extra") {
    229229
    230230            $url .= "/listings/$listing_city/$listing_state/$listing_zip/$listing_address_full/$listing_id";
    231231
    232             if(!empty($query)) {
     232            if (!empty($query)) {
    233233                $url .= "?" . $query;
    234234            }
    235 
    236         } elseif($prettify && $custom_permalink_struct === "pretty") {
     235        } elseif ($prettify && $custom_permalink_struct === "pretty") {
    237236
    238237            $url .= "/listings/$listing_id/$listing_address_full";
    239238
    240             if(!empty($query)) {
     239            if (!empty($query)) {
    241240                $url .= "?" . $query;
    242241            }
    243 
    244242        } else {
    245243
    246244            $url .= "?sr-listings=sr-single"
    247                  .  "&listing_id=$listing_id"
    248                  .  "&listing_title=$listing_address_full";
    249 
    250             if(!empty($query)) {
     245                .  "&listing_id=$listing_id"
     246                .  "&listing_title=$listing_address_full";
     247
     248            if (!empty($query)) {
    251249                $url .= "&" . $query;
    252250            }
    253 
    254251        }
    255252
     
    262259    }
    263260
    264     public static function buildPaginationLinks( $pagination ) {
     261    public static function buildPaginationLinks($pagination) {
    265262        $prevPagination = $pagination["prev"];
    266263        $nextPagination = $pagination["next"];
    267264        $destination = $prevPagination && strpos($prevPagination, "/openhouses") ||
    268                        $nextPagination && strpos($nextPagination, "/openhouses")
    269                      ? "sr-openhouses"
    270                      : "sr-search";
     265            $nextPagination && strpos($nextPagination, "/openhouses")
     266            ? "sr-openhouses"
     267            : "sr-search";
    271268
    272269        $siteUrl = get_home_url() . "/?sr-listings={$destination}&";
     
    278275
    279276
    280         if($prevPagination !== null && !empty($prevPagination)) {
     277        if ($prevPagination !== null && !empty($prevPagination)) {
    281278            $prev = str_replace($apiUrls, $siteUrl, $prevPagination);
    282279            $prev_link = "<a href='{$prev}'>Prev</a>";
     
    284281        }
    285282
    286         if($nextPagination !== null && !empty($nextPagination)) {
     283        if ($nextPagination !== null && !empty($nextPagination)) {
    287284            $next = str_replace($apiUrls, $siteUrl, $nextPagination);
    288285            $maybe_pipe = $prevPagination && !empty($prevPagination) ? "|" : "";
     
    318315            }
    319316
    320             list($name,$value) = explode('=', $i, 2);
    321 
    322             if( isset($arr[$name]) ) {
    323 
    324                 if( is_array($arr[$name]) ) {
     317            list($name, $value) = explode('=', $i, 2);
     318
     319            if (isset($arr[$name])) {
     320
     321                if (is_array($arr[$name])) {
    325322                    $arr[$name][] = $value;
    326                 }
    327                 else {
     323                } else {
    328324                    $arr[$name] = array($arr[$name], $value);
    329325                }
    330             }
    331             else {
     326            } else {
    332327                $arr[$name] = $value;
    333328            }
     
    366361
    367362    public static function ordinalSuffix($number) {
    368         $ends = array('th','st','nd','rd','th','th','th','th','th','th');
    369         if ((($number % 100) >= 11) && (($number%100) <= 13)) {
    370             return $number. 'th';
    371         } else {
    372             return $number. $ends[$number % 10];
     363        $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th');
     364        if ((($number % 100) >= 11) && (($number % 100) <= 13)) {
     365            return $number . 'th';
     366        } else {
     367            return $number . $ends[$number % 10];
    373368        }
    374369    }
     
    434429                . "</span>";
    435430        }
    436 
    437431    }
    438432
     
    456450
    457451            return html_entity_decode($built_disclaimer);
    458 
    459452        } else {
    460453
    461454            return "This information is believed to be accurate, but without any warranty.";
    462 
    463455        }
    464456    }
     
    483475        if ($agentOfficeAboveTheFoldEnabled) {
    484476
    485             if (!empty($agent) AND !empty($office)) {
     477            if (!empty($agent) and !empty($office)) {
    486478
    487479                /**
     
    493485                $listing_by .= "<strong>$listing_by_contact</strong>";
    494486                return "<p>$listing_by</p>";
    495 
    496             } elseif (empty($agent) AND !empty($office)) {
     487            } elseif (empty($agent) and !empty($office)) {
    497488
    498489                /**
     
    502493                $listing_by .= "<strong>$listing_by_contact</strong>";
    503494                return "<p>$listing_by</p>";
    504 
    505             } elseif (!empty($agent) AND empty($office)) {
     495            } elseif (!empty($agent) and empty($office)) {
    506496
    507497                /**
     
    511501                $listing_by .= "<strong>$listing_by_contact</strong>";
    512502                return "<p>$listing_by</p>";
    513 
    514503            } else {
    515504                return "";
     
    534523        }
    535524    }
    536 
    537525}
    538526
     
    541529
    542530    public static $default_photo =
    543         "https://s3-us-west-2.amazonaws.com/simplyrets/trial/properties/defprop.jpg";
     531    "https://s3-us-west-2.amazonaws.com/simplyrets/trial/properties/defprop.jpg";
    544532
    545533    public static function normalizeListingPhotoUrl($url) {
     
    613601
    614602        $response = (array)$response;
    615         if(array_key_exists("message", $response)) {
     603        if (array_key_exists("message", $response)) {
    616604            return (
    617605                '<br><p><strong>'
     
    628616
    629617        $noResultsMsg = "<p><strong>"
    630                       . "0 listings matched your search. "
    631                       . "Please try to broaden your search criteria or try again later."
    632                       . "</strong></p>";
     618            . "0 listings matched your search. "
     619            . "Please try to broaden your search criteria or try again later."
     620            . "</strong></p>";
    633621        return $noResultsMsg;
    634622    }
    635 
    636623}
    637624
     
    644631 */
    645632if (!function_exists('http_parse_headers')) {
    646     function http_parse_headers ($raw_headers) {
     633    function http_parse_headers($raw_headers) {
    647634        $headers = array(); // $headers = [];
    648635
     
    651638
    652639            if (isset($h[1])) {
    653                 if(!isset($headers[$h[0]])) {
     640                if (!isset($headers[$h[0]])) {
    654641                    $headers[$h[0]] = trim($h[1]);
    655                 } else if(is_array($headers[$h[0]])) {
    656                     $tmp = array_merge($headers[$h[0]],array(trim($h[1])));
     642                } else if (is_array($headers[$h[0]])) {
     643                    $tmp = array_merge($headers[$h[0]], array(trim($h[1])));
    657644                    $headers[$h[0]] = $tmp;
    658645                } else {
    659                     $tmp = array_merge(array($headers[$h[0]]),array(trim($h[1])));
     646                    $tmp = array_merge(array($headers[$h[0]]), array(trim($h[1])));
    660647                    $headers[$h[0]] = $tmp;
    661648                }
  • simply-rets/tags/3.2.1/simply-rets-widgets.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013/*
     
    4447
    4548        // Add all available property types to query string
    46         foreach ($ptypes as $k=>$type) {
     49        foreach ($ptypes as $k => $type) {
    4750            $qs .= "&type={$type}";
    4851        }
    4952
    5053        // Add configured parameters to query string
    51         foreach((array)$params as $key=>$value) {
     54        foreach ((array)$params as $key => $value) {
    5255            $qs .= "&{$key}={$value}";
    5356        }
  • simply-rets/tags/3.2.1/simply-rets.php

    r3477656 r3481358  
    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.2.0
     7Version: 3.2.1
    88License: GNU General Public License v3 or later
    99
     
    1111
    1212*/
     13if (! defined('ABSPATH')) {
     14    exit;
     15}
    1316
    1417/* Code starts here */
    15 const SIMPLYRETSWP_VERSION = "v3.2.0";
     18const SIMPLYRETSWP_VERSION = "v3.2.1";
    1619
    1720$plugin = plugin_basename(__FILE__);
  • simply-rets/tags/3.2.1/tests/bootstrap.php

    r2328109 r3481358  
    11<?php
     2if (! defined('ABSPATH')) {
     3    exit;
     4}
    25
    36$_tests_dir = getenv('WP_TESTS_DIR');
    4 if ( !$_tests_dir ) $_tests_dir = '/tmp/wordpress-tests-lib';
     7if (!$_tests_dir) $_tests_dir = '/tmp/wordpress-tests-lib';
    58
    69require_once $_tests_dir . '/includes/functions.php';
    710
    811function _manually_load_plugin() {
    9     require dirname( __FILE__ ) . '/../simply-rets.php';
     12    require dirname(__FILE__) . '/../simply-rets.php';
    1013}
    1114
    12 tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
     15tests_add_filter('muplugins_loaded', '_manually_load_plugin');
    1316
    1417require $_tests_dir . '/includes/bootstrap.php';
  • simply-rets/tags/3.2.1/tests/test-plugin.php

    r3477656 r3481358  
    11<?php
     2if (! defined('ABSPATH')) {
     3    exit;
     4}
    25
    36class SampleTest extends WP_UnitTestCase {
     
    710    // sample tests
    811    function testCreatePost() {
    9         $this->factory->post->create_many( 5 );
     12        $this->factory->post->create_many(5);
    1013    }
    1114
  • simply-rets/trunk/readme.txt

    r3477656 r3481358  
    55Requires at least: 3.0.1
    66Tested up to: 6.9
    7 Stable tag: 3.2.0
     7Stable tag: 3.2.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    237237
    238238== Changelog ==
     239
     240= 3.2.1 =
     241
     242* IMPROVE: Add direct access protection to all files
     243* IMPROVE: Use wp_safe_redirect() instead of wp_redirect()
    239244
    240245= 3.2.0 =
  • simply-rets/trunk/simply-rets-admin.php

    r3477656 r3481358  
    66 *
    77*/
     8if (! defined('ABSPATH')) {
     9    exit;
     10}
    811
    912
     
    133136                $permalink = get_post_permalink($post_id);
    134137                update_option("sr_demo_page_created", true);
    135                 wp_redirect($permalink);
     138                wp_safe_redirect($permalink);
    136139                exit();
    137140            }
  • simply-rets/trunk/simply-rets-comments-template.php

    r1072117 r3481358  
    11<?php
    22// Override any themes comments template to ensure nothing appears.
    3 ?>
     3if (! defined('ABSPATH')) {
     4    exit;
     5}
  • simply-rets/trunk/simply-rets-maps.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013
  • simply-rets/trunk/simply-rets-post-pages.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013
  • simply-rets/trunk/simply-rets-shortcode.php

    r3477656 r3481358  
    88 *
    99*/
     10if (! defined('ABSPATH')) {
     11    exit;
     12}
    1013
    1114/* Code starts here */
  • simply-rets/trunk/simply-rets-utils.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013
     
    1619        $vendors = (array)get_option('sr_adv_search_meta_vendors', array());
    1720
    18         if(count($vendors) > 1) {
     21        if (count($vendors) > 1) {
    1922            return false;
    2023        }
     
    3336        if (!empty($v)) {
    3437            $types = get_option("sr_adv_search_meta_types_$v", $def_types);
    35 
    3638        } elseif (!empty($vendors[0])) {
    3739            $vendor = $vendors[0];
    3840            $types = get_option("sr_adv_search_meta_types_$vendor", $def_types);
    39 
    4041        } else {
    4142            $types = $def_types;
     
    4748    public static function srShowListingMeta() {
    4849
    49         if( get_option('sr_show_listingmeta') ) {
     50        if (get_option('sr_show_listingmeta')) {
    5051            $show_listing_meta = false;
    5152        } else {
     
    6263    public static function showAgentContact() {
    6364
    64         if( get_option('sr_show_agent_contact') ) {
     65        if (get_option('sr_show_agent_contact')) {
    6566            $show = false;
    6667        } else {
     
    7778        $normalized_type = null;
    7879
    79         switch($type) {
     80        switch ($type) {
    8081            case "RES":
    8182                $normalized_type = "Residential";
     
    113114                $normalized_type = "Mobile Home";
    114115                break;
    115 
    116116        }
    117117
     
    138138        $idxAddress = $listing->internetAddressDisplay;
    139139        $address = $idxAddress === false
    140                  ? $idxAddressReplacement = get_option(
    141                      "sr_idx_address_display_text",
    142                      "Undisclosed address"
    143                  ) : $listing->address->full;
     140            ? $idxAddressReplacement = get_option(
     141                "sr_idx_address_display_text",
     142                "Undisclosed address"
     143            ) : $listing->address->full;
    144144
    145145        $city = $listing->address->city;
     
    150150        // exclude city, state, and zip. This ensures that commas are
    151151        // only used when these fields exist.
    152         $comma1 = ($address AND ($city OR $state OR $zip)) ? ', ' : '';
     152        $comma1 = ($address and ($city or $state or $zip)) ? ', ' : '';
    153153        $comma2 = $city ? ', ' : '';
    154154
     
    226226        );
    227227
    228         if($prettify && $custom_permalink_struct === "pretty_extra") {
     228        if ($prettify && $custom_permalink_struct === "pretty_extra") {
    229229
    230230            $url .= "/listings/$listing_city/$listing_state/$listing_zip/$listing_address_full/$listing_id";
    231231
    232             if(!empty($query)) {
     232            if (!empty($query)) {
    233233                $url .= "?" . $query;
    234234            }
    235 
    236         } elseif($prettify && $custom_permalink_struct === "pretty") {
     235        } elseif ($prettify && $custom_permalink_struct === "pretty") {
    237236
    238237            $url .= "/listings/$listing_id/$listing_address_full";
    239238
    240             if(!empty($query)) {
     239            if (!empty($query)) {
    241240                $url .= "?" . $query;
    242241            }
    243 
    244242        } else {
    245243
    246244            $url .= "?sr-listings=sr-single"
    247                  .  "&listing_id=$listing_id"
    248                  .  "&listing_title=$listing_address_full";
    249 
    250             if(!empty($query)) {
     245                .  "&listing_id=$listing_id"
     246                .  "&listing_title=$listing_address_full";
     247
     248            if (!empty($query)) {
    251249                $url .= "&" . $query;
    252250            }
    253 
    254251        }
    255252
     
    262259    }
    263260
    264     public static function buildPaginationLinks( $pagination ) {
     261    public static function buildPaginationLinks($pagination) {
    265262        $prevPagination = $pagination["prev"];
    266263        $nextPagination = $pagination["next"];
    267264        $destination = $prevPagination && strpos($prevPagination, "/openhouses") ||
    268                        $nextPagination && strpos($nextPagination, "/openhouses")
    269                      ? "sr-openhouses"
    270                      : "sr-search";
     265            $nextPagination && strpos($nextPagination, "/openhouses")
     266            ? "sr-openhouses"
     267            : "sr-search";
    271268
    272269        $siteUrl = get_home_url() . "/?sr-listings={$destination}&";
     
    278275
    279276
    280         if($prevPagination !== null && !empty($prevPagination)) {
     277        if ($prevPagination !== null && !empty($prevPagination)) {
    281278            $prev = str_replace($apiUrls, $siteUrl, $prevPagination);
    282279            $prev_link = "<a href='{$prev}'>Prev</a>";
     
    284281        }
    285282
    286         if($nextPagination !== null && !empty($nextPagination)) {
     283        if ($nextPagination !== null && !empty($nextPagination)) {
    287284            $next = str_replace($apiUrls, $siteUrl, $nextPagination);
    288285            $maybe_pipe = $prevPagination && !empty($prevPagination) ? "|" : "";
     
    318315            }
    319316
    320             list($name,$value) = explode('=', $i, 2);
    321 
    322             if( isset($arr[$name]) ) {
    323 
    324                 if( is_array($arr[$name]) ) {
     317            list($name, $value) = explode('=', $i, 2);
     318
     319            if (isset($arr[$name])) {
     320
     321                if (is_array($arr[$name])) {
    325322                    $arr[$name][] = $value;
    326                 }
    327                 else {
     323                } else {
    328324                    $arr[$name] = array($arr[$name], $value);
    329325                }
    330             }
    331             else {
     326            } else {
    332327                $arr[$name] = $value;
    333328            }
     
    366361
    367362    public static function ordinalSuffix($number) {
    368         $ends = array('th','st','nd','rd','th','th','th','th','th','th');
    369         if ((($number % 100) >= 11) && (($number%100) <= 13)) {
    370             return $number. 'th';
    371         } else {
    372             return $number. $ends[$number % 10];
     363        $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th');
     364        if ((($number % 100) >= 11) && (($number % 100) <= 13)) {
     365            return $number . 'th';
     366        } else {
     367            return $number . $ends[$number % 10];
    373368        }
    374369    }
     
    434429                . "</span>";
    435430        }
    436 
    437431    }
    438432
     
    456450
    457451            return html_entity_decode($built_disclaimer);
    458 
    459452        } else {
    460453
    461454            return "This information is believed to be accurate, but without any warranty.";
    462 
    463455        }
    464456    }
     
    483475        if ($agentOfficeAboveTheFoldEnabled) {
    484476
    485             if (!empty($agent) AND !empty($office)) {
     477            if (!empty($agent) and !empty($office)) {
    486478
    487479                /**
     
    493485                $listing_by .= "<strong>$listing_by_contact</strong>";
    494486                return "<p>$listing_by</p>";
    495 
    496             } elseif (empty($agent) AND !empty($office)) {
     487            } elseif (empty($agent) and !empty($office)) {
    497488
    498489                /**
     
    502493                $listing_by .= "<strong>$listing_by_contact</strong>";
    503494                return "<p>$listing_by</p>";
    504 
    505             } elseif (!empty($agent) AND empty($office)) {
     495            } elseif (!empty($agent) and empty($office)) {
    506496
    507497                /**
     
    511501                $listing_by .= "<strong>$listing_by_contact</strong>";
    512502                return "<p>$listing_by</p>";
    513 
    514503            } else {
    515504                return "";
     
    534523        }
    535524    }
    536 
    537525}
    538526
     
    541529
    542530    public static $default_photo =
    543         "https://s3-us-west-2.amazonaws.com/simplyrets/trial/properties/defprop.jpg";
     531    "https://s3-us-west-2.amazonaws.com/simplyrets/trial/properties/defprop.jpg";
    544532
    545533    public static function normalizeListingPhotoUrl($url) {
     
    613601
    614602        $response = (array)$response;
    615         if(array_key_exists("message", $response)) {
     603        if (array_key_exists("message", $response)) {
    616604            return (
    617605                '<br><p><strong>'
     
    628616
    629617        $noResultsMsg = "<p><strong>"
    630                       . "0 listings matched your search. "
    631                       . "Please try to broaden your search criteria or try again later."
    632                       . "</strong></p>";
     618            . "0 listings matched your search. "
     619            . "Please try to broaden your search criteria or try again later."
     620            . "</strong></p>";
    633621        return $noResultsMsg;
    634622    }
    635 
    636623}
    637624
     
    644631 */
    645632if (!function_exists('http_parse_headers')) {
    646     function http_parse_headers ($raw_headers) {
     633    function http_parse_headers($raw_headers) {
    647634        $headers = array(); // $headers = [];
    648635
     
    651638
    652639            if (isset($h[1])) {
    653                 if(!isset($headers[$h[0]])) {
     640                if (!isset($headers[$h[0]])) {
    654641                    $headers[$h[0]] = trim($h[1]);
    655                 } else if(is_array($headers[$h[0]])) {
    656                     $tmp = array_merge($headers[$h[0]],array(trim($h[1])));
     642                } else if (is_array($headers[$h[0]])) {
     643                    $tmp = array_merge($headers[$h[0]], array(trim($h[1])));
    657644                    $headers[$h[0]] = $tmp;
    658645                } else {
    659                     $tmp = array_merge(array($headers[$h[0]]),array(trim($h[1])));
     646                    $tmp = array_merge(array($headers[$h[0]]), array(trim($h[1])));
    660647                    $headers[$h[0]] = $tmp;
    661648                }
  • simply-rets/trunk/simply-rets-widgets.php

    r3477656 r3481358  
    77 *
    88*/
     9if (! defined('ABSPATH')) {
     10    exit;
     11}
    912
    1013/*
     
    4447
    4548        // Add all available property types to query string
    46         foreach ($ptypes as $k=>$type) {
     49        foreach ($ptypes as $k => $type) {
    4750            $qs .= "&type={$type}";
    4851        }
    4952
    5053        // Add configured parameters to query string
    51         foreach((array)$params as $key=>$value) {
     54        foreach ((array)$params as $key => $value) {
    5255            $qs .= "&{$key}={$value}";
    5356        }
  • simply-rets/trunk/simply-rets.php

    r3477656 r3481358  
    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.2.0
     7Version: 3.2.1
    88License: GNU General Public License v3 or later
    99
     
    1111
    1212*/
     13if (! defined('ABSPATH')) {
     14    exit;
     15}
    1316
    1417/* Code starts here */
    15 const SIMPLYRETSWP_VERSION = "v3.2.0";
     18const SIMPLYRETSWP_VERSION = "v3.2.1";
    1619
    1720$plugin = plugin_basename(__FILE__);
  • simply-rets/trunk/tests/bootstrap.php

    r2328109 r3481358  
    11<?php
     2if (! defined('ABSPATH')) {
     3    exit;
     4}
    25
    36$_tests_dir = getenv('WP_TESTS_DIR');
    4 if ( !$_tests_dir ) $_tests_dir = '/tmp/wordpress-tests-lib';
     7if (!$_tests_dir) $_tests_dir = '/tmp/wordpress-tests-lib';
    58
    69require_once $_tests_dir . '/includes/functions.php';
    710
    811function _manually_load_plugin() {
    9     require dirname( __FILE__ ) . '/../simply-rets.php';
     12    require dirname(__FILE__) . '/../simply-rets.php';
    1013}
    1114
    12 tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
     15tests_add_filter('muplugins_loaded', '_manually_load_plugin');
    1316
    1417require $_tests_dir . '/includes/bootstrap.php';
  • simply-rets/trunk/tests/test-plugin.php

    r3477656 r3481358  
    11<?php
     2if (! defined('ABSPATH')) {
     3    exit;
     4}
    25
    36class SampleTest extends WP_UnitTestCase {
     
    710    // sample tests
    811    function testCreatePost() {
    9         $this->factory->post->create_many( 5 );
     12        $this->factory->post->create_many(5);
    1013    }
    1114
Note: See TracChangeset for help on using the changeset viewer.