Plugin Directory

Changeset 3399822


Ignore:
Timestamp:
11/20/2025 02:49:16 PM (4 months ago)
Author:
mlsimport
Message:

Update to version 6.1.6 from GitHub

Location:
mlsimport
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • mlsimport/tags/6.1.6/README.MD

    r3398986 r3399822  
    55Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable Tag: 6.1.5
     7Stable Tag: 6.1.6
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • mlsimport/tags/6.1.6/includes/ThemeImport.php

    r3398577 r3399822  
    12111211
    12121212        $propertyId = wp_insert_post($post);
     1213   
    12131214        if (is_wp_error($propertyId)) {
    12141215            $this->writeImportLogs('ERROR: on inserting ' . PHP_EOL, $tipImport);
     
    12241225
    12251226    } elseif ($propertyId !== 0) {
     1227
     1228           
    12261229        // Memory before checking existing property
    12271230        $memBeforeCheck = memory_get_usage(true);
    12281231
    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);
    12301233
    12311234
    12321235        if(!$keep){
    12331236            $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   
    12351238            // Memory before delete
    12361239            $memBeforeDelete = memory_get_usage(true);
     
    14671470
    14681471
     1472public 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}
    14691512
    14701513
  • mlsimport/tags/6.1.6/mlsimport.php

    r3398986 r3399822  
    44 * Plugin URI:        https://mlsimport.com/
    55 * 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.5
     6 * Version:           6.1.6
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.4
     
    2121
    2222
    23 define( 'MLSIMPORT_VERSION', '6.1.5' );
     23define( 'MLSIMPORT_VERSION', '6.1.6' );
    2424define( 'MLSIMPORT_CLUBLINK', 'mlsimport.com' );
    2525define( 'MLSIMPORT_CLUBLINKSSL', 'https' );
  • mlsimport/tags/6.1.6/readme.txt

    r3398986 r3399822  
    55Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable Tag: 6.1.5
     7Stable Tag: 6.1.6
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • mlsimport/trunk/README.MD

    r3398986 r3399822  
    55Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable Tag: 6.1.5
     7Stable Tag: 6.1.6
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • mlsimport/trunk/includes/ThemeImport.php

    r3398577 r3399822  
    12111211
    12121212        $propertyId = wp_insert_post($post);
     1213   
    12131214        if (is_wp_error($propertyId)) {
    12141215            $this->writeImportLogs('ERROR: on inserting ' . PHP_EOL, $tipImport);
     
    12241225
    12251226    } elseif ($propertyId !== 0) {
     1227
     1228           
    12261229        // Memory before checking existing property
    12271230        $memBeforeCheck = memory_get_usage(true);
    12281231
    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);
    12301233
    12311234
    12321235        if(!$keep){
    12331236            $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   
    12351238            // Memory before delete
    12361239            $memBeforeDelete = memory_get_usage(true);
     
    14671470
    14681471
     1472public 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}
    14691512
    14701513
  • mlsimport/trunk/mlsimport.php

    r3398986 r3399822  
    44 * Plugin URI:        https://mlsimport.com/
    55 * 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.5
     6 * Version:           6.1.6
    77 * Requires at least: 5.2
    88 * Requires PHP:      7.4
     
    2121
    2222
    23 define( 'MLSIMPORT_VERSION', '6.1.5' );
     23define( 'MLSIMPORT_VERSION', '6.1.6' );
    2424define( 'MLSIMPORT_CLUBLINK', 'mlsimport.com' );
    2525define( 'MLSIMPORT_CLUBLINKSSL', 'https' );
  • mlsimport/trunk/readme.txt

    r3398986 r3399822  
    55Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable Tag: 6.1.5
     7Stable Tag: 6.1.6
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.