Plugin Directory

Changeset 2360804


Ignore:
Timestamp:
08/14/2020 06:47:36 AM (6 years ago)
Author:
teplosup
Message:

WordPress 5.5 compatibility.

Location:
shmapper-by-teplitsa
Files:
236 added
2 edited

Legend:

Unmodified
Added
Removed
  • shmapper-by-teplitsa/trunk/class/ShMapper.class.php

    r2359189 r2360804  
    198198        wp_enqueue_style( "ShMapper");
    199199        //js
    200         wp_enqueue_script("jquery");
     200        wp_enqueue_script("jquery-core");
     201        wp_enqueue_script('jquery-migrate');
    201202        wp_register_script("inline", admin_url().'/js/inline-edit-post.js', array());
    202203        wp_enqueue_script("inline");
     
    247248            wp_enqueue_script("ShMapper.osm"); 
    248249        }
    249         wp_localize_script( "jquery", "map_type", array(static::$options['map_api']) );
     250        wp_localize_script( "jquery-core", "map_type", array(static::$options['map_api']) );
    250251       
    251252        // load media library scripts
     
    253254        //ajax
    254255        wp_localize_script(
    255             'jquery',
     256            'jquery-core',
    256257            'myajax',
    257258            array(
     
    261262        ); 
    262263        wp_localize_script(
    263             'jquery',
     264            'jquery-core',
    264265            'myajax2',
    265266            array(
     
    268269        ); 
    269270       
    270         wp_localize_script( 'jquery', 'shm_maps', array() );
     271        wp_localize_script( 'jquery-core', 'shm_maps', array() );
    271272        wp_localize_script(
    272             'jquery',
     273            'jquery-core',
    273274            'voc',
    274275            array(
     
    289290       
    290291        //js           
    291         wp_enqueue_script("jquery");
     292        wp_enqueue_script("jquery-core");
    292293        wp_enqueue_script('jquery-migrate');
    293294        wp_enqueue_script('jquery-ui-core');
     
    335336            wp_enqueue_script("layerSwitcher");
    336337            wp_register_script("Leaflet.fs", plugins_url( '../assets/js/Leaflet.fullscreen.min.js', __FILE__ ), array());
    337             wp_enqueue_script("Leaflet.fs");       
     338            wp_enqueue_script("Leaflet.fs");
    338339            wp_register_script("ShMapper.osm", plugins_url( '../assets/js/ShMapper_osm.js', __FILE__ ), array());
    339             wp_enqueue_script("ShMapper.osm");         
    340            
     340            wp_enqueue_script("ShMapper.osm");
     341
    341342        }
    342         wp_localize_script( "jquery", "map_type", array(static::$options['map_api']) );
    343        
    344         //ajax
    345         wp_localize_script( 
    346             'jquery',
    347             'myajax', 
     343        wp_localize_script( 'jquery-core', 'map_type', array( static::$options['map_api'] ) );
     344
     345        // ajax.
     346        wp_localize_script(
     347            'jquery-core',
     348            'myajax',
    348349            array(
    349                 'url' => admin_url('admin-ajax.php'),
    350                 'nonce' => wp_create_nonce('myajax-nonce')
     350                'url' => admin_url( 'admin-ajax.php' ),
     351                'nonce' => wp_create_nonce( 'myajax-nonce' ),
    351352            )
    352353        );
    353         wp_localize_script( 
    354             'jquery',
    355             'myajax2', 
     354        wp_localize_script(
     355            'jquery-core',
     356            'myajax2',
    356357            array(
    357358                'url' => admin_url('admin-ajax.php')
    358359            )
    359         );     
    360         wp_localize_script( 
    361             'jquery',
    362             'shm_set_req', 
     360        );
     361        wp_localize_script(
     362            'jquery-core',
     363            'shm_set_req',
    363364            array(
    364365                'url' => admin_url('admin-ajax.php')
    365366            )
    366         ); 
    367         wp_localize_script( 'jquery', 'shm_maps', array() );
     367        );
     368        wp_localize_script( 'jquery-core', 'shm_maps', array() );
    368369        wp_localize_script(
    369             'jquery',
     370            'jquery-core',
    370371            'voc',
    371372            array(
  • shmapper-by-teplitsa/trunk/shmapper.php

    r2359193 r2360804  
    44 * Plugin URI: http://genagl.ru/?p=652
    55 * Description: Location and logistics services for NKO
    6  * Version: 1.3.5.1
     6 * Version: 1.3.6
    77 * Author: Teplitsa. Technologies for Social Good
    88 * Author URI:  https://te-st.ru
Note: See TracChangeset for help on using the changeset viewer.