Changeset 3065294
- Timestamp:
- 04/05/2024 08:53:56 AM (2 years ago)
- Location:
- immotoolbox-connect/trunk
- Files:
-
- 5 edited
-
immotoolbox-connect.php (modified) (2 diffs)
-
includes/ITBConnectAPI.php (modified) (3 diffs)
-
public/ITBConnectPublic.php (modified) (1 diff)
-
readme.md (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
immotoolbox-connect/trunk/immotoolbox-connect.php
r2939285 r3065294 4 4 Plugin URI: https://www.immotoolbox.com/ 5 5 Description: Displays ImmoToolBox real estate listings in your website 6 Version: 1.3. 26 Version: 1.3.3 7 7 Author: ZebraSoft Monaco 8 8 Author URI: https://www.zebrasoft.mc … … 24 24 along with ImmoToolBox Connect. If not, see https://www.gnu.org/licenses/gpl.html. 25 25 */ 26 define('ITBCONNECT_VERSION', '1.3. 2');26 define('ITBCONNECT_VERSION', '1.3.3'); 27 27 28 28 /** -
immotoolbox-connect/trunk/includes/ITBConnectAPI.php
r2930754 r3065294 7 7 { 8 8 $options = get_option(ITBCONNECT_OPTION_NAME, []); 9 $private_key = empty($atts['private_key'])?$options['private_key']:$atts['private_key']; 9 10 $property_page_id = empty($atts['property_page_id'])?$options['property_page_id']:$atts['property_page_id']; 10 11 $property_page_id = apply_filters('wpml_object_id', $property_page_id, 'page', true); … … 82 83 } 83 84 } 85 if (!empty($atts['rooms_min'])) { 86 $get['num_rooms_min'] = $atts['rooms_min']; 87 } 88 if (!empty($atts['rooms_max'])) { 89 $get['num_rooms_max'] = $atts['rooms_max']; 90 } 91 92 if (!empty($atts['bedrooms'])) { 93 if (is_array($atts['bedrooms'])) { 94 $get['num_bedrooms'] = []; 95 foreach ($atts['bedrooms'] as $item) { 96 if ($item) $get['num_bedrooms'][] = $item; 97 } 98 if (!$get['num_bedrooms']) unset($get['num_bedrooms']); 99 else $get['num_bedrooms'] = implode(',', $get['num_bedrooms']); 100 } 101 else { 102 $get['num_bedrooms'] = $atts['bedrooms']; 103 } 104 } 105 if (!empty($atts['bedrooms_min'])) { 106 $get['num_bedrooms_min'] = $atts['bedrooms_min']; 107 } 108 if (!empty($atts['bedrooms_max'])) { 109 $get['num_bedrooms_max'] = $atts['bedrooms_max']; 110 } 111 112 if (!empty($atts['bathrooms'])) { 113 if (is_array($atts['bathrooms'])) { 114 $get['num_bathrooms'] = []; 115 foreach ($atts['bathrooms'] as $item) { 116 if ($item) $get['num_bathrooms'][] = $item; 117 } 118 if (!$get['num_bathrooms']) unset($get['num_bathrooms']); 119 else $get['num_bathrooms'] = implode(',', $get['num_bathrooms']); 120 } 121 else { 122 $get['num_bathrooms'] = $atts['bathrooms']; 123 } 124 } 125 if (!empty($atts['bathrooms_min'])) { 126 $get['num_bathrooms_min'] = $atts['bathrooms_min']; 127 } 128 if (!empty($atts['bathrooms_max'])) { 129 $get['num_bathrooms_max'] = $atts['bathrooms_max']; 130 } 131 132 if (!empty($atts['parkings'])) { 133 if (is_array($atts['parkings'])) { 134 $get['num_parkings'] = []; 135 foreach ($atts['parkings'] as $item) { 136 if ($item) $get['num_parkings'][] = $item; 137 } 138 if (!$get['num_parkings']) unset($get['num_parkings']); 139 else $get['num_parkings'] = implode(',', $get['num_parkings']); 140 } 141 else { 142 $get['num_parkings'] = $atts['parkings']; 143 } 144 } 145 if (!empty($atts['parkings_min'])) { 146 $get['num_parkings_min'] = $atts['parkings_min']; 147 } 148 if (!empty($atts['parkings_max'])) { 149 $get['num_parkings_max'] = $atts['parkings_max']; 150 } 151 152 if (!empty($atts['box'])) { 153 if (is_array($atts['box'])) { 154 $get['num_box'] = []; 155 foreach ($atts['box'] as $item) { 156 if ($item) $get['num_box'][] = $item; 157 } 158 if (!$get['num_box']) unset($get['num_box']); 159 else $get['num_box'] = implode(',', $get['num_box']); 160 } 161 else { 162 $get['num_box'] = $atts['box']; 163 } 164 } 165 if (!empty($atts['box_min'])) { 166 $get['num_box_min'] = $atts['box_min']; 167 } 168 if (!empty($atts['box_max'])) { 169 $get['num_box_max'] = $atts['box_max']; 170 } 171 172 if (!empty($atts['cellars'])) { 173 if (is_array($atts['cellars'])) { 174 $get['num_cellars'] = []; 175 foreach ($atts['cellars'] as $item) { 176 if ($item) $get['num_cellars'][] = $item; 177 } 178 if (!$get['num_cellars']) unset($get['num_cellars']); 179 else $get['num_cellars'] = implode(',', $get['num_cellars']); 180 } 181 else { 182 $get['num_cellars'] = $atts['cellars']; 183 } 184 } 185 if (!empty($atts['cellars_min'])) { 186 $get['num_cellars_min'] = $atts['cellars_min']; 187 } 188 if (!empty($atts['cellars_max'])) { 189 $get['num_cellars_max'] = $atts['cellars_max']; 190 } 84 191 85 192 if (!empty($atts['type_property'])) { … … 153 260 $return['atts'] = $atts; 154 261 $headers = [ 155 'X-AUTH-TOKEN: '.$ options['private_key']262 'X-AUTH-TOKEN: '.$private_key 156 263 , 'accept: application/ld+json' 157 264 ]; -
immotoolbox-connect/trunk/public/ITBConnectPublic.php
r2939285 r3065294 239 239 $data_view['selection_url'] = get_page_link(isset($atts['selection_page_id'])?$atts['selection_page_id']:$option['basket_page_id']); 240 240 $data_view['atts'] = $atts; 241 242 if (!empty($_REQUEST['nsearch'])) { 243 $atts = $atts + $_REQUEST['nsearch']; 244 } 241 245 $data_view['properties'] = ITBConnectAPI::properties($atts); 242 246 $twig = self::getTwig(); -
immotoolbox-connect/trunk/readme.md
r2939285 r3065294 4 4 Tags: immotoolbox, realestate, agency, property 5 5 Requires at least: 4.9 6 Tested up to: 6. 26 Tested up to: 6.5 7 7 Requires PHP: 5.9 8 Stable tag: 1.3. 28 Stable tag: 1.3.3 9 9 License: GPL3 10 10 License URI: https://www.gnu.org/licenses/gpl.html -
immotoolbox-connect/trunk/readme.txt
r2939285 r3065294 4 4 Tags: immotoolbox, realestate, agency, property 5 5 Requires at least: 4.9 6 Tested up to: 6. 26 Tested up to: 6.5 7 7 Requires PHP: 5.9 8 Stable tag: 1.3. 28 Stable tag: 1.3.3 9 9 License: GPL3 10 10 License URI: https://www.gnu.org/licenses/gpl.html
Note: See TracChangeset
for help on using the changeset viewer.