Changeset 3328430
- Timestamp:
- 07/15/2025 05:53:57 PM (9 months ago)
- Location:
- devvn-image-hotspot
- Files:
-
- 29 added
- 3 edited
-
tags/1.2.9 (added)
-
tags/1.2.9/admin (added)
-
tags/1.2.9/admin/css (added)
-
tags/1.2.9/admin/css/bootstrap.css (added)
-
tags/1.2.9/admin/css/maps_points_style.css (added)
-
tags/1.2.9/admin/inc (added)
-
tags/1.2.9/admin/inc/add_shortcode_devvn_ihotspot.php (added)
-
tags/1.2.9/admin/inc/cpt-ihotspot.php (added)
-
tags/1.2.9/admin/inc/metabox-donate.php (added)
-
tags/1.2.9/admin/inc/settings.php (added)
-
tags/1.2.9/admin/js (added)
-
tags/1.2.9/admin/js/bootstrap.min.js (added)
-
tags/1.2.9/admin/js/maps_points.js (added)
-
tags/1.2.9/devvn-image-hotspot.php (added)
-
tags/1.2.9/frontend (added)
-
tags/1.2.9/frontend/css (added)
-
tags/1.2.9/frontend/css/ihotspot.min.css (added)
-
tags/1.2.9/frontend/css/jquery.powertip.min.css (added)
-
tags/1.2.9/frontend/css/maps_points.css (added)
-
tags/1.2.9/frontend/js (added)
-
tags/1.2.9/frontend/js/jquery.ihotspot.min.js (added)
-
tags/1.2.9/frontend/js/jquery.powertip.min.js (added)
-
tags/1.2.9/frontend/js/maps_points.js (added)
-
tags/1.2.9/languages (added)
-
tags/1.2.9/languages/devvn-image-hotspot.pot (added)
-
tags/1.2.9/license.txt (added)
-
tags/1.2.9/readme.txt (added)
-
tags/1.2.9/screenshot-1.png (added)
-
tags/1.2.9/screenshot-2.png (added)
-
trunk/admin/inc/add_shortcode_devvn_ihotspot.php (modified) (1 diff)
-
trunk/devvn-image-hotspot.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
devvn-image-hotspot/trunk/admin/inc/add_shortcode_devvn_ihotspot.php
r3157769 r3328430 66 66 <div class="wrap_svl" id="body_drag_<?php echo esc_attr($idPost);?>"> 67 67 <div class="images_wrap"> 68 <img src="<?php echo esc_attr($maps_images); ?>"> 68 <?php 69 if($maps_images): 70 $image_info = get_image_info_from_url($maps_images); 71 $alt = isset($image_info['alt']) ? sanitize_text_field($image_info['alt']) : ''; 72 ?> 73 <img src="<?php echo esc_attr($maps_images); ?>" alt="<?php echo esc_attr($alt);?>"> 74 <?php endif;?> 69 75 </div> 70 76 <?php if(is_array($data_points)):?> -
devvn-image-hotspot/trunk/devvn-image-hotspot.php
r3157769 r3328430 5 5 Description: Image Hotspot help you add hotspot to your images. 6 6 Author: Le Van Toan 7 Version: 1.2. 87 Version: 1.2.9 8 8 Author URI: https://levantoan.com/ 9 9 Text Domain: devvn-image-hotspot … … 30 30 defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); 31 31 32 define('DEVVN_IHOTSPOT_VER', '1.2. 8');32 define('DEVVN_IHOTSPOT_VER', '1.2.9'); 33 33 define('DEVVN_IHOTSPOT_DEV_MOD', true); 34 34 … … 229 229 <div class="wrap_svl view-has-value" id="body_drag"> 230 230 <div class="images_wrap"> 231 <?php if($maps_images):?> 232 <img src="<?php echo esc_attr($maps_images); ?>"> 231 <?php 232 if($maps_images): 233 $image_info = get_image_info_from_url($maps_images); 234 $alt = isset($image_info['alt']) ? sanitize_text_field($image_info['alt']) : ''; 235 ?> 236 <img src="<?php echo esc_attr($maps_images); ?>" alt="<?php echo esc_attr($alt);?>"> 233 237 <?php endif;?> 234 238 </div> … … 674 678 } 675 679 680 if(!function_exists('get_image_info_from_url')){ 681 function get_image_info_from_url($image_url) { 682 global $wpdb; 683 684 $upload_dir = wp_upload_dir(); 685 $relative_path = str_replace($upload_dir['baseurl'] . '/', '', $image_url); 686 687 $attachment_id = $wpdb->get_var( $wpdb->prepare( " 688 SELECT post_id FROM {$wpdb->postmeta} 689 WHERE meta_key = '_wp_attached_file' 690 AND meta_value = %s 691 LIMIT 1 692 ", $relative_path ) ); 693 694 if (!$attachment_id) return false; 695 696 $alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true); 697 $title = get_the_title($attachment_id); 698 $caption = wp_get_attachment_caption($attachment_id); 699 $desc = get_post_field('post_content', $attachment_id); 700 701 return [ 702 'ID' => $attachment_id, 703 'alt' => $alt, 704 'title' => $title, 705 'caption' => $caption, 706 'desc' => $desc, 707 ]; 708 } 709 } -
devvn-image-hotspot/trunk/readme.txt
r3157771 r3328430 4 4 Tags: hotspot, points, image, maps, image hotspot 5 5 Requires at least: 4.6 6 Tested up to: 6. 6.17 Stable tag: 1.2. 86 Tested up to: 6.8.2 7 Stable tag: 1.2.9 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0 … … 50 50 51 51 For more information, see [Releases](https://levantoan.com/devvn-image-hotspot). 52 53 = 1.2.9 - 16/07/2025 = 54 55 * Add ALT to main image 52 56 53 57 = 1.2.8 - 26/09/2024 =
Note: See TracChangeset
for help on using the changeset viewer.