-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGSJQueryMigrate.php
37 lines (29 loc) · 1.41 KB
/
GSJQueryMigrate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/*
Plugin Name: GSJQueryMigrate
Description: implements jquery Migrate for backwards compatability of jquery code older than 1.9
Version: 1.0
Author: getSimpleCMS
Author URI: http://get-simple.info
*/
$thisfile_GSJQM = basename(__FILE__, ".php");
function jQuery_migrate_init(){
GLOBAL $thisfile_GSJQM, $SITEURL;
i18n_merge($thisfile_GSJQM ) || i18n_merge($thisfile_GSJQM , GSDEFAULTLANG);
# register plugin
register_plugin(
$thisfile_GSJQM , # ID of plugin, should be filename minus php
i18n_r($thisfile_GSJQM .'/GSJQMigrate_TITLE'), # Title of plugin
'1.0', # Version of plugin
'GetSimpleCMS', # Author of plugin
'http://get-simple.info', # Author URL
i18n_r($thisfile_GSJQM .'/GSJQMigrate_DESC'), # Plugin Description
'', # Page type of plugin
'' # Function that displays content
);
$asset = isDebug() ? 'jquery-migrate-1.2.1.js' : 'jquery-migrate-1.2.1.min.js'; // when debug is on, migrate will output to console with deprecated notices.
$url = $SITEURL.'plugins/'.$thisfile_GSJQM.'/assets/js/'.$asset;
register_script('jquerymigrate', $url, '', FALSE);
queue_script('jquerymigrate',GSBACK);
}
jQuery_migrate_init();