Plugin Directory

Changeset 3136648


Ignore:
Timestamp:
08/16/2024 02:46:27 PM (20 months ago)
Author:
levantoan
Message:

revert to 1.2.3

Location:
devvn-image-hotspot
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • devvn-image-hotspot/trunk/admin/inc/add_shortcode_devvn_ihotspot.php

    r3136302 r3136648  
    1212   
    1313    $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     }
    1814
    1915    if(!$data_post){
  • devvn-image-hotspot/trunk/admin/js/maps_points.js

    r3136302 r3136648  
    125125                    source https://github.com/ccbgs/load_editor
    126126                    */
    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);                     
    167161                   
    168162                    doDraggable();
  • devvn-image-hotspot/trunk/devvn-image-hotspot.php

    r3136302 r3136648  
    55Description: Image Hotspot help you add hotspot to your images.
    66Author: Le Van Toan
    7 Version: 1.2.4
     7Version: 1.2.3
    88Author URI: https://levantoan.com/
    99Text Domain: devvn-image-hotspot
     
    3030defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    3131
    32 define('DEVVN_IHOTSPOT_VER', '1.2.4');
     32define('DEVVN_IHOTSPOT_VER', '1.2.3');
    3333define('DEVVN_IHOTSPOT_DEV_MOD', true);
    34 
    3534if ( !defined( 'DEVVN_IHOTSPOT_BASENAME' ) )
    3635    define( 'DEVVN_IHOTSPOT_BASENAME', plugin_basename( __FILE__ ) );
    3736
    38 define('DEVVN_IHOTSPOT_POINT_DEFAULT', json_encode(array(
     37define('DEVVN_IHOTSPOT_POINT_DEFAULT',serialize(array(
    3938    'countPoint'    =>  '',
    4039    'content'       =>  '',
     
    4746    'pins_class'    =>  ''
    4847)));
    49 define('DEVVN_IHOTSPOT_PINS_DEFAULT', json_encode(array(
     48define('DEVVN_IHOTSPOT_PINS_DEFAULT',serialize(array(
    5049    'countPoint'    =>  '',
    5150    'imgPoint'      =>  '',
     
    9998
    10099    $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     }
    105100
    106101    if(!$data_post){
     
    313308        'data_points'       =>  $dataPoints
    314309    );
    315     update_post_meta($post_id, 'hotspot_content', json_encode($data_post));
     310    update_post_meta($post_id, 'hotspot_content', $data_post);
    316311    /*remove_action( 'save_post', 'devvn_ihotspot_save_meta_box_data' );
    317312    wp_update_post(array(
     
    363358       
    364359        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 );
    370366        wp_localize_script( 'maps_points', 'meta_image',
    371367            array(
     
    409405function devvn_ihotspot_get_input_point_default($data = array()){
    410406    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));
    412408       
    413409    $countPoint                 = isset($data['countPoint'])?$data['countPoint']:'';
     
    531527function devvn_ihotspot_get_pins_default($datapin = array()){
    532528    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));
    534530    $countPoint = $datapin['countPoint'];
    535531    $imgPin = $datapin['imgPoint'];
    536532    $topPin = $datapin['top'];
    537533    $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'];
    539535    if($pins_image_custom) $imgPin = $pins_image_custom;
    540536    ob_start();
  • devvn-image-hotspot/trunk/readme.txt

    r3136302 r3136648  
    44Tags: hotspot, points, image, maps, image hotspot
    55Requires at least: 4.3
    6 Tested up to: 6.6.1
    7 Stable tag: 1.2.4
     6Tested up to: 5.9.1
     7Stable tag: 1.2.3
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0
     
    5050
    5151For 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 js
    5752
    5853= 1.2.2 - 05/03/2022 =
Note: See TracChangeset for help on using the changeset viewer.