Plugin Directory

Changeset 344598


Ignore:
Timestamp:
02/12/2011 06:56:30 PM (15 years ago)
Author:
gesman
Message:

1.302, bug fix: Jquery conflicts with admin panel and widgets

Location:
j-shortcodes/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • j-shortcodes/trunk/j-shortcodes.php

    r344369 r344598  
    33Plugin Name: J Shortcodes
    44Plugin URI: http://www.jshortcodes.com/
    5 Version: 1.301
     5Version: 1.302
    66Author: Gleb Esman, http://www.jshortcodes.com/
    77Author URI: http://www.jshortcodes.com/
     
    99*/
    1010
    11 define('J_SHORTCODES_VERSION',  '1.301');
     11define('J_SHORTCODES_VERSION',  '1.302');
    1212
    1313include (dirname(__FILE__) . '/j-include-all.php');
     
    101101   $jquery_ui_version   = "1.8.9";
    102102
     103   // Load only for non-admin pages or for admin pages belonging to J Shortcodes plugin. Otherwise - conflicts.
     104   global $plugin_page;
     105   if (!is_admin() || ($plugin_page == 'j-shortcodes-settings'))
     106      {
    103107   //---------------------------------------
    104108   // Make sure jQuery is properly loaded.
    105    wp_deregister_script ('jquery');             // using wp_deregister_script() to disable the version that comes packaged with WordPress
    106    wp_deregister_script ('jquery-ui-core');
    107    wp_deregister_script ('jquery-ui-tabs');
    108 
    109    wp_register_script   ('jquery',           "http://ajax.googleapis.com/ajax/libs/jquery/{$jquery_version}/jquery.min.js");         // using wp_register_script() to register updated libraries (this example uses the CDN from Google but you can use any other CDN or host the scripts yourself)
    110    wp_register_script   ('jquery-ui-core',   "http://ajax.googleapis.com/ajax/libs/jqueryui/{$jquery_ui_version}/jquery-ui.min.js");
     109      wp_deregister_script ('jquery');             // using wp_deregister_script() to disable the version that comes packaged with WordPress
     110      wp_deregister_script ('jquery-ui-core');
     111      wp_deregister_script ('jquery-ui-tabs');
     112
     113      wp_register_script   ('jquery',           "http://ajax.googleapis.com/ajax/libs/jquery/{$jquery_version}/jquery.min.js");         // using wp_register_script() to register updated libraries (this example uses the CDN from Google but you can use any other CDN or host the scripts yourself)
     114      wp_register_script   ('jquery-ui-core',   "http://ajax.googleapis.com/ajax/libs/jqueryui/{$jquery_ui_version}/jquery-ui.min.js");
     115      }
    111116
    112117   wp_enqueue_script    ('jquery');          // using wp_enqueue_script() to load the updated libraries
  • j-shortcodes/trunk/readme.txt

    r344369 r344598  
    6565== Changelog ==
    6666
     67= 1.302 =
     68* Fixed bug causing conflicts with widgets and admin panels.
     69
    6770= 1.301 =
    6871* Added shortcodes to support Jquery accordion and tabs panels: [jaccordion], [jtabs].
Note: See TracChangeset for help on using the changeset viewer.