Plugin Directory

Changeset 3161191


Ignore:
Timestamp:
10/02/2024 03:28:25 AM (16 months ago)
Author:
g5theme
Message:

Released version 5.1.0

  • Fix function 'ere_image_resize_url'
  • Fix qr code in property print page
Location:
essential-real-estate/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • essential-real-estate/trunk/CHANGELOG.md

    r3152440 r3161191  
    11Changelog
    22=========
     3### 5.1.0 - October 02, 2024
     4* Fix function 'ere_image_resize_url'
     5
     6### 5.0.9 - September 27, 2024
     7* Fix qr code in property print page
     8
    39### 5.0.8 - September 16, 2024
    410* Fix enqueue js select2 in shortcode property search map
  • essential-real-estate/trunk/essential-real-estate.php

    r3152440 r3161191  
    44 * Plugin URI: https://wordpress.org/plugins/essential-real-estate
    55 * Description: The latest plugins Real Estate you want. Completely all features, easy customize and override layout, functions. Supported global payment, build market, single, list property, single agent...etc. All fields are defined dynamic, they will help you can build any kind of Real Estate website.
    6  * Version: 5.0.8
     6 * Version: 5.1.0
    77 * Author: G5Theme
    88 * Author URI: http://themeforest.net/user/g5theme
     
    2929
    3030if (!defined('ERE_PLUGIN_VER')) {
    31     define('ERE_PLUGIN_VER', '5.0.8');
     31    define('ERE_PLUGIN_VER', '5.1.0');
    3232}
    3333if (!defined('ERE_PLUGIN_FILE')) {
  • essential-real-estate/trunk/includes/ere-core-functions.php

    r3138823 r3161191  
    455455
    456456        $file_path = sanitize_text_field($_SERVER['DOCUMENT_ROOT']) . $file_path['path'];
    457         $wp_upload_folder = wp_upload_dir();
    458         $wp_upload_folder = $wp_upload_folder['basedir'];
     457        $wp_upload_dir = wp_upload_dir();
     458        $wp_upload_folder = $wp_upload_dir['basedir'];
    459459
    460460        $file_path = explode('/uploads/', $file_path);
     461
    461462        if (is_array($file_path)) {
    462463            if (count($file_path) > 1) {
     
    473474            global $blog_id;
    474475            $file_path = str_replace("/sites/{$blog_id}/sites/{$blog_id}/", "/sites/{$blog_id}/", $file_path);
    475         }
     476            $wp_upload_dir = wp_get_upload_dir();
     477        }
     478
    476479
    477480        // Destination width and height variables
     
    498501        // Get the destination file name
    499502        $dest_file_name = "{$dir}/{$file_name}";
    500 
    501503        if (!file_exists($dest_file_name)) {
    502504
     
    505507             *  We only want to resize Media Library images, so we can be sure they get deleted correctly when appropriate.
    506508             */
    507             $get_attachment = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE guid=%s", $url));
    508             if (!$get_attachment)
     509            $attachment = $wpdb->get_row(
     510                $wpdb->prepare(
     511                    "SELECT ID as post_id FROM $wpdb->posts WHERE guid = %s",
     512                    $url
     513                )
     514            );
     515            if (!$attachment) {
     516                $relative_file_path = str_replace($wp_upload_dir['baseurl'] . '/', '', $url);
     517                $attachment = $wpdb->get_row(
     518                    $wpdb->prepare(
     519                        "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = %s",
     520                        $relative_file_path
     521                    )
     522                );
     523            }
     524
     525            if ($attachment) {
     526                $attachment_id = $attachment->post_id;
     527            } else {
    509528                return array('url' => $url, 'width' => $width, 'height' => $height);
     529            }
     530
    510531
    511532            // Load WordPress Image Editor
     
    560581
    561582                // Add the resized dimensions to original image metadata (so we can delete our resized images when the original image is delete from the Media Library)
    562                 $metadata = wp_get_attachment_metadata($get_attachment[0]->ID);
     583                $metadata = wp_get_attachment_metadata($attachment_id);
    563584                if (isset($metadata['image_meta'])) {
    564585                    $metadata['image_meta']['resized_images'][] = $resized_width . 'x' . $resized_height;
    565                     wp_update_attachment_metadata($get_attachment[0]->ID, $metadata);
     586                    wp_update_attachment_metadata($attachment_id, $metadata);
    566587                }
    567588
  • essential-real-estate/trunk/public/templates/property/print/qr-image.php

    r3123067 r3161191  
    99?>
    1010<img class="ere__print-property-qr-image"
    11      src="https://chart.googleapis.com/chart?chs=100x100&cht=qr&chl=<?php echo esc_url(get_permalink($property_id)); ?>&choe=UTF-8"
     11     src="https://quickchart.io/qr?text=<?php echo esc_url(get_permalink($property_id)); ?>&size=100"
    1212     title="<?php echo esc_attr(get_the_title($property_id)); ?>"/>
  • essential-real-estate/trunk/public/templates/property/property-print.php

    r3123067 r3161191  
    2727remove_action( 'wp_head',             'wp_custom_css_cb',                101   );
    2828remove_action( 'wp_head',             'wp_site_icon',                    99    );
    29 add_action('wp_enqueue_scripts','ere_dequeue_assets_print_property',9999);
     29//add_action('wp_enqueue_scripts','ere_dequeue_assets_print_property',9999);
    3030function ere_dequeue_assets_print_property() {
    3131    foreach (wp_styles()->registered as $k => $v) {
  • essential-real-estate/trunk/readme.txt

    r3152440 r3161191  
    55Requires at least: 4.5
    66Tested up to: 6.6.2
    7 Stable tag: 5.0.8
     7Stable tag: 5.1.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9999
    100100== Changelog ==
     101= 5.1.0 =
     102* Fix function 'ere_image_resize_url'
     103
     104= 5.0.9 =
     105* Fix qr code in property print page
     106
    101107= 5.0.8 =
    102108* Fix enqueue js select2 in shortcode property search map
Note: See TracChangeset for help on using the changeset viewer.