Plugin Directory

Changeset 2360915


Ignore:
Timestamp:
08/14/2020 08:51:11 AM (6 years ago)
Author:
teplosup
Message:

Improve WordPress 5.5 compatibility

Location:
shmapper-by-teplitsa
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • shmapper-by-teplitsa/tags/1.3.6/README.txt

    r2360804 r2360915  
    55Tags: map, OpenStreetMap, OSM, yandex.map, crowdsourcing, карта, Яндекс.карты, картирование, mapping, crowdsourced mapping, user mapping
    66Requires at least: 3.6.1
    7 Tested up to: 5.3
     7Tested up to: 5.5
    88Requires PHP: 5.6
    99Stable tag: trunk
  • shmapper-by-teplitsa/tags/1.3.6/class/ShMapper.class.php

    r2360804 r2360915  
    198198        wp_enqueue_style( "ShMapper");
    199199        //js
    200         wp_enqueue_script("jquery-core");
    201         wp_enqueue_script('jquery-migrate');
    202200        wp_register_script("inline", admin_url().'/js/inline-edit-post.js', array());
    203201        wp_enqueue_script("inline");
    204         wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array());
     202        wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array('jquery-migrate'));
    205203        wp_enqueue_script("ShMapper");
    206204        wp_register_script("ShMapper.admin", plugins_url( '../assets/js/ShMapper.admin.js', __FILE__ ), array());
     
    248246            wp_enqueue_script("ShMapper.osm"); 
    249247        }
    250         wp_localize_script( "jquery-core", "map_type", array(static::$options['map_api']) );
     248        wp_localize_script( "ShMapper", "map_type", array(static::$options['map_api']) );
    251249       
    252250        // load media library scripts
     
    254252        //ajax
    255253        wp_localize_script(
    256             'jquery-core',
     254            'ShMapper',
    257255            'myajax',
    258256            array(
     
    262260        ); 
    263261        wp_localize_script(
    264             'jquery-core',
     262            'ShMapper',
    265263            'myajax2',
    266264            array(
     
    269267        ); 
    270268       
    271         wp_localize_script( 'jquery-core', 'shm_maps', array() );
     269        wp_localize_script( 'ShMapper', 'shm_maps', array() );
    272270        wp_localize_script(
    273             'jquery-core',
     271            'ShMapper',
    274272            'voc',
    275273            array(
     
    289287        wp_enqueue_style( "ShMapper");
    290288       
    291         //js           
    292         wp_enqueue_script("jquery-core");
    293         wp_enqueue_script('jquery-migrate');
    294289        wp_enqueue_script('jquery-ui-core');
    295290        wp_enqueue_script('jquery-ui-draggable');
    296291        wp_register_script("touchpunch", plugins_url( '../assets/js/touchpunch.js', __FILE__ ), array());
    297292        wp_enqueue_script("touchpunch");   
    298         wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array());
     293        wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array( 'jquery-migrate'));
    299294        wp_enqueue_script("ShMapper"); 
    300295        wp_register_style("layerSwitcher", SHM_URLPATH . 'assets/css/layerSwitcher.css', array());
     
    341336
    342337        }
    343         wp_localize_script( 'jquery-core', 'map_type', array( static::$options['map_api'] ) );
     338        wp_localize_script( 'ShMapper', 'map_type', array( static::$options['map_api'] ) );
    344339
    345340        // ajax.
    346341        wp_localize_script(
    347             'jquery-core',
     342            'ShMapper',
    348343            'myajax',
    349344            array(
     
    353348        );
    354349        wp_localize_script(
    355             'jquery-core',
     350            'ShMapper',
    356351            'myajax2',
    357352            array(
     
    360355        );
    361356        wp_localize_script(
    362             'jquery-core',
     357            'ShMapper',
    363358            'shm_set_req',
    364359            array(
     
    366361            )
    367362        );
    368         wp_localize_script( 'jquery-core', 'shm_maps', array() );
     363        wp_localize_script( 'ShMapper', 'shm_maps', array() );
    369364        wp_localize_script(
    370             'jquery-core',
     365            'ShMapper',
    371366            'voc',
    372367            array(
  • shmapper-by-teplitsa/trunk/class/ShMapper.class.php

    r2360804 r2360915  
    198198        wp_enqueue_style( "ShMapper");
    199199        //js
    200         wp_enqueue_script("jquery-core");
    201         wp_enqueue_script('jquery-migrate');
    202200        wp_register_script("inline", admin_url().'/js/inline-edit-post.js', array());
    203201        wp_enqueue_script("inline");
    204         wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array());
     202        wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array('jquery-migrate'));
    205203        wp_enqueue_script("ShMapper");
    206204        wp_register_script("ShMapper.admin", plugins_url( '../assets/js/ShMapper.admin.js', __FILE__ ), array());
     
    248246            wp_enqueue_script("ShMapper.osm"); 
    249247        }
    250         wp_localize_script( "jquery-core", "map_type", array(static::$options['map_api']) );
     248        wp_localize_script( "ShMapper", "map_type", array(static::$options['map_api']) );
    251249       
    252250        // load media library scripts
     
    254252        //ajax
    255253        wp_localize_script(
    256             'jquery-core',
     254            'ShMapper',
    257255            'myajax',
    258256            array(
     
    262260        ); 
    263261        wp_localize_script(
    264             'jquery-core',
     262            'ShMapper',
    265263            'myajax2',
    266264            array(
     
    269267        ); 
    270268       
    271         wp_localize_script( 'jquery-core', 'shm_maps', array() );
     269        wp_localize_script( 'ShMapper', 'shm_maps', array() );
    272270        wp_localize_script(
    273             'jquery-core',
     271            'ShMapper',
    274272            'voc',
    275273            array(
     
    289287        wp_enqueue_style( "ShMapper");
    290288       
    291         //js           
    292         wp_enqueue_script("jquery-core");
    293         wp_enqueue_script('jquery-migrate');
    294289        wp_enqueue_script('jquery-ui-core');
    295290        wp_enqueue_script('jquery-ui-draggable');
    296291        wp_register_script("touchpunch", plugins_url( '../assets/js/touchpunch.js', __FILE__ ), array());
    297292        wp_enqueue_script("touchpunch");   
    298         wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array());
     293        wp_register_script("ShMapper", plugins_url( '../assets/js/ShMapper.js', __FILE__ ), array( 'jquery-migrate'));
    299294        wp_enqueue_script("ShMapper"); 
    300295        wp_register_style("layerSwitcher", SHM_URLPATH . 'assets/css/layerSwitcher.css', array());
     
    341336
    342337        }
    343         wp_localize_script( 'jquery-core', 'map_type', array( static::$options['map_api'] ) );
     338        wp_localize_script( 'ShMapper', 'map_type', array( static::$options['map_api'] ) );
    344339
    345340        // ajax.
    346341        wp_localize_script(
    347             'jquery-core',
     342            'ShMapper',
    348343            'myajax',
    349344            array(
     
    353348        );
    354349        wp_localize_script(
    355             'jquery-core',
     350            'ShMapper',
    356351            'myajax2',
    357352            array(
     
    360355        );
    361356        wp_localize_script(
    362             'jquery-core',
     357            'ShMapper',
    363358            'shm_set_req',
    364359            array(
     
    366361            )
    367362        );
    368         wp_localize_script( 'jquery-core', 'shm_maps', array() );
     363        wp_localize_script( 'ShMapper', 'shm_maps', array() );
    369364        wp_localize_script(
    370             'jquery-core',
     365            'ShMapper',
    371366            'voc',
    372367            array(
Note: See TracChangeset for help on using the changeset viewer.