Plugin Directory

Changeset 2634712


Ignore:
Timestamp:
11/24/2021 11:38:42 AM (4 years ago)
Author:
zebrasoft
Message:

Update for 1.2.21

Location:
immotoolbox-connect/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • immotoolbox-connect/trunk/admin/ITBConnectAdmin.php

    r2049606 r2634712  
    9292                $data['include_bootstrap_css'] = (bool)$_POST['itbconnect_include_bootstrap_css'];
    9393            }
     94            if (isset($_POST['itbconnect_nocheck_ssl'])) {
     95                $data['nocheck_ssl'] = (bool)$_POST['itbconnect_nocheck_ssl'];
     96            }
    9497            update_option(ITBCONNECT_OPTION_NAME, $data);
    9598            flush_rewrite_rules();
     
    137140            , 'accept: application/ld+json'
    138141        ];
    139         $response = ITBConnect::getRemoteUrl($url, [], [], $headers, 60);
     142        $response = ITBConnect::getRemoteUrl($url, [], [], $headers, 60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    140143
    141144        return $response?json_decode($response):null;
  • immotoolbox-connect/trunk/admin/partials/settings.php

    r2118203 r2634712  
    157157                    </select>
    158158                    <p class="description" id="tagline-description"><?php _e( 'The WordPress page used to display client selection', 'itbconnect' ); ?></p>
     159                </td>
     160            </tr>
     161            <tr>
     162                <th scope="row">
     163                    <label for="itbconnect_include_bootstrap_js"><?php _e( 'Check SSL certificate', 'itbconnect' ); ?></label>
     164                </th>
     165                <td>
     166                    <select name="itbconnect_nocheck_ssl"
     167                            id="itbconnect_nocheck_ssl"
     168                            class="regular-text"
     169                    >
     170                        <option value="0"><?php _e( 'Check SSL', 'itbconnect' ); ?> : <?php _e('Yes'); ?></option>
     171                        <option value="1" <?=isset($data['nocheck_ssl'])&&$data['nocheck_ssl']?"selected":""; ?>><?php _e( 'Check SSL', 'itbconnect' ); ?> : <?php _e('No'); ?></option>
     172                    </select>
     173                    <p class="description" id="tagline-description"><?php _e( 'You can set this option to "No" if the connection to ImmoToolBox fails (can happen on old server)' ); ?></p>
    159174                </td>
    160175            </tr>
  • immotoolbox-connect/trunk/immotoolbox-connect.php

    r2453844 r2634712  
    44Plugin URI: https://www.immotoolbox.com/
    55Description: Displays ImmoToolBox real estate listings in your website
    6 Version: 1.2.20
     6Version: 1.2.21
    77Author: ZebraSoft Monaco
    88Author URI: https://www.zebrasoft.mc
     
    2424along with ImmoToolBox Connect. If not, see https://www.gnu.org/licenses/gpl.html.
    2525*/
    26 define('ITBCONNECT_VERSION', '1.2.20');
     26define('ITBCONNECT_VERSION', '1.2.21');
    2727
    2828/**
  • immotoolbox-connect/trunk/includes/ITBConnect.php

    r2028439 r2634712  
    9494    }
    9595
    96     static function getRemoteUrl($url, $get = null, $post = null, $headers = null, $cachetime = 300)
     96    static function getRemoteUrl($url, $get = null, $post = null, $headers = null, $cachetime = 300, $nocheck_ssl = false)
    9797    {
    9898        global $wp_version;
     
    111111            )
    112112        );
     113        if ($nocheck_ssl) {
     114            $opts['ssl'] = array(
     115                "verify_peer"=>false,
     116                "verify_peer_name"=>false,
     117            );
     118        }
    113119        $get['ori'] = $_SERVER['SERVER_NAME'];
    114120        $get['wp_version'] = $wp_version;
  • immotoolbox-connect/trunk/includes/ITBConnectAPI.php

    r2151810 r2634712  
    145145
    146146//        print_r($get);die($apiurl);
    147         $response = ITBConnect::getRemoteUrl($apiurl, $get, [], $headers);
     147        $response = ITBConnect::getRemoteUrl($apiurl, $get, [], $headers, 300, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    148148
    149149        if ($response) {
     
    254254        ];
    255255        $get['locale'] = current(explode('_', get_locale()));
    256         $response = ITBConnect::getRemoteUrl($apiurl, $get, [], $headers, 60*60);
     256        $response = ITBConnect::getRemoteUrl($apiurl, $get, [], $headers, 60*60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    257257        if ($response) {
    258258            $return = json_decode( $response, true );
     
    309309        $get['page'] = get_query_var('npage', 1);
    310310        $return['get'] = $get;
    311         $response = ITBConnect::getRemoteUrl($apiurl, $get, [], $headers, 60*60);
     311        $response = ITBConnect::getRemoteUrl($apiurl, $get, [], $headers, 60*60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    312312
    313313        if ($response) {
  • immotoolbox-connect/trunk/public/ITBConnectPublic.php

    r2151823 r2634712  
    327327            , 'accept: application/ld+json'
    328328        ];
    329         $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60);
     329        $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    330330
    331331        if ($response) {
     
    643643        ];
    644644        $get['locale'] = current(explode('_', get_locale()));
    645         $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60);
     645        $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    646646
    647647        if ($response) {
     
    679679        ];
    680680        $get['locale'] = current(explode('_', get_locale()));
    681         $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60);
     681        $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    682682
    683683        if ($response) {
     
    709709        $get['locale'] = current(explode('_', get_locale()));
    710710        $get['nbpp'] = 1000;
    711         $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60);
     711        $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    712712
    713713        if ($response) {
     
    730730        $get['locale'] = current(explode('_', get_locale()));
    731731        $get['nbpp'] = 1000;
    732         $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60);
     732        $response = ITBConnect::getRemoteUrl($url, $get, [], $headers, 60*60, isset($option['nocheck_ssl'])&&$option['nocheck_ssl']);
    733733
    734734        if ($response) {
  • immotoolbox-connect/trunk/readme.md

    r2453844 r2634712  
    44Tags: immotoolbox, realestate, agency, property
    55Requires at least: 4.9
    6 Tested up to: 5.6
    7 Requires PHP: 5.6
    8 Stable tag: 1.2.20
     6Tested up to: 5.9
     7Requires PHP: 5.9
     8Stable tag: 1.2.21
    99License: GPL3
    1010License URI: https://www.gnu.org/licenses/gpl.html
     
    4545* Sort by Type,Country, City
    4646* Fix contact button on mobile
     47* Option to disable SSL verification
    4748
    4849
  • immotoolbox-connect/trunk/readme.txt

    r2453844 r2634712  
    44Tags: immotoolbox, realestate, agency, property
    55Requires at least: 4.9
    6 Tested up to: 5.6
    7 Requires PHP: 5.6
    8 Stable tag: 1.2.20
     6Tested up to: 5.9
     7Requires PHP: 5.9
     8Stable tag: 1.2.21
    99License: GPL3
    1010License URI: https://www.gnu.org/licenses/gpl.html
     
    4545* Sort by Type,Country, City
    4646* Fix contact button on mobile
     47* Option to disable SSL verification
    4748
    4849
Note: See TracChangeset for help on using the changeset viewer.