Changeset 3399822
- Timestamp:
- 11/20/2025 02:49:16 PM (4 months ago)
- Location:
- mlsimport
- Files:
-
- 8 edited
- 1 copied
-
tags/6.1.6 (copied) (copied from mlsimport/trunk)
-
tags/6.1.6/README.MD (modified) (1 diff)
-
tags/6.1.6/includes/ThemeImport.php (modified) (3 diffs)
-
tags/6.1.6/mlsimport.php (modified) (2 diffs)
-
tags/6.1.6/readme.txt (modified) (1 diff)
-
trunk/README.MD (modified) (1 diff)
-
trunk/includes/ThemeImport.php (modified) (3 diffs)
-
trunk/mlsimport.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mlsimport/tags/6.1.6/README.MD
r3398986 r3399822 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable Tag: 6.1. 57 Stable Tag: 6.1.6 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
mlsimport/tags/6.1.6/includes/ThemeImport.php
r3398577 r3399822 1211 1211 1212 1212 $propertyId = wp_insert_post($post); 1213 1213 1214 if (is_wp_error($propertyId)) { 1214 1215 $this->writeImportLogs('ERROR: on inserting ' . PHP_EOL, $tipImport); … … 1224 1225 1225 1226 } elseif ($propertyId !== 0) { 1227 1228 1226 1229 // Memory before checking existing property 1227 1230 $memBeforeCheck = memory_get_usage(true); 1228 1231 1229 $keep = $this->check_if_delete_when_status ($propertyId,$mlsImportItemStatus,$mlsImportItemStatusDelete);1232 $keep = $this->check_if_delete_when_status_on_manual_import($propertyId,$mlsImportItemStatus,$mlsImportItemStatusDelete); 1230 1233 1231 1234 1232 1235 if(!$keep){ 1233 1236 $log = 'Property with ID ' . $propertyId . ' and with name ' . get_the_title($propertyId) . ' has a status of <strong>' . $status . ' </strong> and will be deleted' . PHP_EOL; 1234 1237 1235 1238 // Memory before delete 1236 1239 $memBeforeDelete = memory_get_usage(true); … … 1467 1470 1468 1471 1472 public function check_if_delete_when_status_on_manual_import($property_id, $mlsImportItemStatus, $mlsImportItemStatusDelete) { 1473 // Normalize status arrays/strings to lowercase 1474 $mlsImportItemStatus = is_array($mlsImportItemStatus) 1475 ? array_map('strtolower', $mlsImportItemStatus) 1476 : strtolower($mlsImportItemStatus); 1477 1478 $mlsImportItemStatusDelete = is_array($mlsImportItemStatusDelete) 1479 ? array_map('strtolower', $mlsImportItemStatusDelete) 1480 : strtolower($mlsImportItemStatusDelete); 1481 1482 // Get post_status based on post type/taxonomy 1483 $post_status = ''; 1484 if (post_type_exists('estate_property')) { 1485 $terms = get_the_terms($property_id, 'property_status'); 1486 if (!empty($terms) && is_array($terms)) { 1487 $post_status = strtolower($terms[0]->name); 1488 } 1489 } elseif (post_type_exists('property') && taxonomy_exists('property_label')) { 1490 $terms = get_the_terms($property_id, 'property_label'); 1491 if (!empty($terms) && is_array($terms)) { 1492 $post_status = strtolower($terms[0]->name); 1493 } 1494 } else { 1495 $post_status = strtolower(get_post_meta($property_id, 'inspiry_property_label', true)); 1496 } 1497 1498 1499 1500 // Keep if status matches "keep" status 1501 if ((is_array($mlsImportItemStatus) && in_array($post_status, $mlsImportItemStatus, true)) || 1502 (!is_array($mlsImportItemStatus) && $post_status === $mlsImportItemStatus)) { 1503 1504 return true; 1505 } 1506 1507 1508 1509 // Default: keep 1510 return false; 1511 } 1469 1512 1470 1513 -
mlsimport/tags/6.1.6/mlsimport.php
r3398986 r3399822 4 4 * Plugin URI: https://mlsimport.com/ 5 5 * Description: MLS Import - The MLSImport plugin facilitates the connection to your real estate MLS database, allowing you to download and synchronize real estate property data from the MLS. 6 * Version: 6.1. 56 * Version: 6.1.6 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.4 … … 21 21 22 22 23 define( 'MLSIMPORT_VERSION', '6.1. 5' );23 define( 'MLSIMPORT_VERSION', '6.1.6' ); 24 24 define( 'MLSIMPORT_CLUBLINK', 'mlsimport.com' ); 25 25 define( 'MLSIMPORT_CLUBLINKSSL', 'https' ); -
mlsimport/tags/6.1.6/readme.txt
r3398986 r3399822 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable Tag: 6.1. 57 Stable Tag: 6.1.6 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
mlsimport/trunk/README.MD
r3398986 r3399822 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable Tag: 6.1. 57 Stable Tag: 6.1.6 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
mlsimport/trunk/includes/ThemeImport.php
r3398577 r3399822 1211 1211 1212 1212 $propertyId = wp_insert_post($post); 1213 1213 1214 if (is_wp_error($propertyId)) { 1214 1215 $this->writeImportLogs('ERROR: on inserting ' . PHP_EOL, $tipImport); … … 1224 1225 1225 1226 } elseif ($propertyId !== 0) { 1227 1228 1226 1229 // Memory before checking existing property 1227 1230 $memBeforeCheck = memory_get_usage(true); 1228 1231 1229 $keep = $this->check_if_delete_when_status ($propertyId,$mlsImportItemStatus,$mlsImportItemStatusDelete);1232 $keep = $this->check_if_delete_when_status_on_manual_import($propertyId,$mlsImportItemStatus,$mlsImportItemStatusDelete); 1230 1233 1231 1234 1232 1235 if(!$keep){ 1233 1236 $log = 'Property with ID ' . $propertyId . ' and with name ' . get_the_title($propertyId) . ' has a status of <strong>' . $status . ' </strong> and will be deleted' . PHP_EOL; 1234 1237 1235 1238 // Memory before delete 1236 1239 $memBeforeDelete = memory_get_usage(true); … … 1467 1470 1468 1471 1472 public function check_if_delete_when_status_on_manual_import($property_id, $mlsImportItemStatus, $mlsImportItemStatusDelete) { 1473 // Normalize status arrays/strings to lowercase 1474 $mlsImportItemStatus = is_array($mlsImportItemStatus) 1475 ? array_map('strtolower', $mlsImportItemStatus) 1476 : strtolower($mlsImportItemStatus); 1477 1478 $mlsImportItemStatusDelete = is_array($mlsImportItemStatusDelete) 1479 ? array_map('strtolower', $mlsImportItemStatusDelete) 1480 : strtolower($mlsImportItemStatusDelete); 1481 1482 // Get post_status based on post type/taxonomy 1483 $post_status = ''; 1484 if (post_type_exists('estate_property')) { 1485 $terms = get_the_terms($property_id, 'property_status'); 1486 if (!empty($terms) && is_array($terms)) { 1487 $post_status = strtolower($terms[0]->name); 1488 } 1489 } elseif (post_type_exists('property') && taxonomy_exists('property_label')) { 1490 $terms = get_the_terms($property_id, 'property_label'); 1491 if (!empty($terms) && is_array($terms)) { 1492 $post_status = strtolower($terms[0]->name); 1493 } 1494 } else { 1495 $post_status = strtolower(get_post_meta($property_id, 'inspiry_property_label', true)); 1496 } 1497 1498 1499 1500 // Keep if status matches "keep" status 1501 if ((is_array($mlsImportItemStatus) && in_array($post_status, $mlsImportItemStatus, true)) || 1502 (!is_array($mlsImportItemStatus) && $post_status === $mlsImportItemStatus)) { 1503 1504 return true; 1505 } 1506 1507 1508 1509 // Default: keep 1510 return false; 1511 } 1469 1512 1470 1513 -
mlsimport/trunk/mlsimport.php
r3398986 r3399822 4 4 * Plugin URI: https://mlsimport.com/ 5 5 * Description: MLS Import - The MLSImport plugin facilitates the connection to your real estate MLS database, allowing you to download and synchronize real estate property data from the MLS. 6 * Version: 6.1. 56 * Version: 6.1.6 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.4 … … 21 21 22 22 23 define( 'MLSIMPORT_VERSION', '6.1. 5' );23 define( 'MLSIMPORT_VERSION', '6.1.6' ); 24 24 define( 'MLSIMPORT_CLUBLINK', 'mlsimport.com' ); 25 25 define( 'MLSIMPORT_CLUBLINKSSL', 'https' ); -
mlsimport/trunk/readme.txt
r3398986 r3399822 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable Tag: 6.1. 57 Stable Tag: 6.1.6 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset
for help on using the changeset viewer.