Changeset 3136648
- Timestamp:
- 08/16/2024 02:46:27 PM (20 months ago)
- Location:
- devvn-image-hotspot
- Files:
-
- 1 deleted
- 4 edited
-
tags/1.2.4 (deleted)
-
trunk/admin/inc/add_shortcode_devvn_ihotspot.php (modified) (1 diff)
-
trunk/admin/js/maps_points.js (modified) (1 diff)
-
trunk/devvn-image-hotspot.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
devvn-image-hotspot/trunk/admin/inc/add_shortcode_devvn_ihotspot.php
r3136302 r3136648 12 12 13 13 $data_post = get_post_meta($idPost, 'hotspot_content', true); 14 15 if(!is_serialized($data_post) && !is_array($data_post) && is_string($data_post)){16 $data_post = json_decode($data_post, true);17 }18 14 19 15 if(!$data_post){ -
devvn-image-hotspot/trunk/admin/js/maps_points.js
r3136302 r3136648 125 125 source https://github.com/ccbgs/load_editor 126 126 */ 127 if(typeof quicktags != "undefined") { 128 quicktags({id: fullId}); 129 } 130 131 if(typeof tinymce != "undefined") { 132 tinymce.init({ 133 selector: "#" + fullId, 134 content_css: meta_image.editor_style, 135 min_height: 200, 136 textarea_name: "pointdata[content][]", 137 relative_urls: false, 138 remove_script_host: false, 139 convert_urls: false, 140 browser_spellcheck: false, 141 fix_list_elements: true, 142 entities: "38,amp,60,lt,62,gt", 143 entity_encoding: "raw", 144 keep_styles: false, 145 //paste_webkit_styles:"font-weight font-style color", 146 //preview_styles:"font-family font-size font-weight font-style text-decoration text-transform", 147 wpeditimage_disable_captions: false, 148 wpeditimage_html5_captions: true, 149 plugins: "charmap,hr,media,paste,tabfocus,textcolor,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpview", 150 resize: "vertical", 151 menubar: false, 152 wpautop: true, 153 indent: false, 154 toolbar1: "bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_adv", 155 toolbar2: "formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help", 156 toolbar3: "", 157 toolbar4: "", 158 tabfocus_elements: ":prev,:next", 159 }); 160 161 // this is needed for the editor to initiate 162 tinyMCE.execCommand('mceFocus', false, fullId); 163 tinyMCE.execCommand('mceRemoveEditor', false, fullId); 164 tinyMCE.execCommand('mceAddEditor', false, fullId); 165 166 } 127 quicktags({id : fullId}); 128 tinymce.init({ 129 selector:"#" + fullId, 130 content_css : meta_image.editor_style, 131 min_height: 200, 132 textarea_name: "pointdata[content][]", 133 relative_urls:false, 134 remove_script_host:false, 135 convert_urls:false, 136 browser_spellcheck:false, 137 fix_list_elements:true, 138 entities:"38,amp,60,lt,62,gt", 139 entity_encoding:"raw", 140 keep_styles:false, 141 //paste_webkit_styles:"font-weight font-style color", 142 //preview_styles:"font-family font-size font-weight font-style text-decoration text-transform", 143 wpeditimage_disable_captions:false, 144 wpeditimage_html5_captions:true, 145 plugins:"charmap,hr,media,paste,tabfocus,textcolor,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpview", 146 resize:"vertical", 147 menubar:false, 148 wpautop:true, 149 indent:false, 150 toolbar1:"bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,wp_adv", 151 toolbar2:"formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help", 152 toolbar3:"", 153 toolbar4:"", 154 tabfocus_elements:":prev,:next", 155 }); 156 157 // this is needed for the editor to initiate 158 tinyMCE.execCommand('mceFocus', false, fullId); 159 tinyMCE.execCommand('mceRemoveEditor', false, fullId); 160 tinyMCE.execCommand('mceAddEditor', false, fullId); 167 161 168 162 doDraggable(); -
devvn-image-hotspot/trunk/devvn-image-hotspot.php
r3136302 r3136648 5 5 Description: Image Hotspot help you add hotspot to your images. 6 6 Author: Le Van Toan 7 Version: 1.2. 47 Version: 1.2.3 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. 4');32 define('DEVVN_IHOTSPOT_VER', '1.2.3'); 33 33 define('DEVVN_IHOTSPOT_DEV_MOD', true); 34 35 34 if ( !defined( 'DEVVN_IHOTSPOT_BASENAME' ) ) 36 35 define( 'DEVVN_IHOTSPOT_BASENAME', plugin_basename( __FILE__ ) ); 37 36 38 define('DEVVN_IHOTSPOT_POINT_DEFAULT', json_encode(array(37 define('DEVVN_IHOTSPOT_POINT_DEFAULT',serialize(array( 39 38 'countPoint' => '', 40 39 'content' => '', … … 47 46 'pins_class' => '' 48 47 ))); 49 define('DEVVN_IHOTSPOT_PINS_DEFAULT', json_encode(array(48 define('DEVVN_IHOTSPOT_PINS_DEFAULT',serialize(array( 50 49 'countPoint' => '', 51 50 'imgPoint' => '', … … 99 98 100 99 $data_post = get_post_meta($post->ID, 'hotspot_content', true); 101 102 if(!is_serialized($data_post) && !is_array($data_post) && is_string($data_post)){103 $data_post = json_decode($data_post, true);104 }105 100 106 101 if(!$data_post){ … … 313 308 'data_points' => $dataPoints 314 309 ); 315 update_post_meta($post_id, 'hotspot_content', json_encode($data_post));310 update_post_meta($post_id, 'hotspot_content', $data_post); 316 311 /*remove_action( 'save_post', 'devvn_ihotspot_save_meta_box_data' ); 317 312 wp_update_post(array( … … 363 358 364 359 wp_enqueue_script( 'jquery-ui-core' ); 365 wp_enqueue_script('jquery-ui-droppable'); 366 367 wp_register_script( 'devvn-tinymce', home_url('/wp-includes/js/tinymce/wp-tinymce.js'), array(), DEVVN_IHOTSPOT_VER, true ); 368 369 wp_register_script( 'maps_points', plugin_dir_url( __FILE__ ) . 'admin/js/maps_points.js', array( 'jquery', 'quicktags', 'devvn-tinymce', 'editor'), DEVVN_IHOTSPOT_VER, true ); 360 wp_enqueue_script('jquery-ui-droppable'); 361 362 /*wp_register_script( 'bootstrap-js', plugin_dir_url( __FILE__ ) . 'admin/js/bootstrap.min.js', array( 'jquery' ), DEVVN_IHOTSPOT_VER, true ); 363 wp_enqueue_script( 'bootstrap-js' );*/ 364 365 wp_register_script( 'maps_points', plugin_dir_url( __FILE__ ) . 'admin/js/maps_points.js', array( 'jquery' ), DEVVN_IHOTSPOT_VER, true ); 370 366 wp_localize_script( 'maps_points', 'meta_image', 371 367 array( … … 409 405 function devvn_ihotspot_get_input_point_default($data = array()){ 410 406 if(!is_array($data)) $data = array(); 411 $data = wp_parse_args($data, json_decode(DEVVN_IHOTSPOT_POINT_DEFAULT, true));407 $data = wp_parse_args($data,unserialize(DEVVN_IHOTSPOT_POINT_DEFAULT)); 412 408 413 409 $countPoint = isset($data['countPoint'])?$data['countPoint']:''; … … 531 527 function devvn_ihotspot_get_pins_default($datapin = array()){ 532 528 if(!is_array($datapin)) $datapin = array(); 533 $datapin = wp_parse_args($datapin, json_decode(DEVVN_IHOTSPOT_PINS_DEFAULT, true));529 $datapin = wp_parse_args($datapin,unserialize(DEVVN_IHOTSPOT_PINS_DEFAULT)); 534 530 $countPoint = $datapin['countPoint']; 535 531 $imgPin = $datapin['imgPoint']; 536 532 $topPin = $datapin['top']; 537 533 $leftPin = $datapin['left']; 538 $pins_image_custom = isset($datapin['pins_image_custom']) && $datapin['pins_image_custom'] ? $datapin['pins_image_custom'] : '';534 $pins_image_custom = $datapin['pins_image_custom']; 539 535 if($pins_image_custom) $imgPin = $pins_image_custom; 540 536 ob_start(); -
devvn-image-hotspot/trunk/readme.txt
r3136302 r3136648 4 4 Tags: hotspot, points, image, maps, image hotspot 5 5 Requires at least: 4.3 6 Tested up to: 6.6.17 Stable tag: 1.2. 46 Tested up to: 5.9.1 7 Stable tag: 1.2.3 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.4 - 16/08/2024 =54 55 * FIX Authenticated (Author+) PHP Object Injection. Thanks to Lucio Sá56 * Add editor js and tinymce js57 52 58 53 = 1.2.2 - 05/03/2022 =
Note: See TracChangeset
for help on using the changeset viewer.