Support » Fixing WordPress » JQuery datepicker in custom plugin break other wp stuffs

  • stalvatero

    (@stalvatero)


    Hi all,
    i’m writing a plugin in which is integrated a JQuery datepicker.
    So i’ve

    function my_init() {
    	$pluginfolder = get_bloginfo('url') . '/' . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));
    	wp_enqueue_script('jquery');
    	wp_enqueue_script('jquery-ui-core');
    	wp_enqueue_script('jquery-ui-datepicker');
    	wp_enqueue_style('jquery-style', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css');
    }
    add_action('admin_init', 'my_init');

    The datepicker is working fine in my plugin, but something strange happens to WP core, because with the plugin activated a wrong graphic affect other stuff for example while writing a post, if i click on “insert a link” the popup windows has wrong colors (the same of the style enqueued in my plugin and the “X” for close popup is misaligned.

    Deactivating my plugin, all it’s correct. So something i miss in the code of my plugin. Can someone help me?

    Thanks

  • The topic ‘JQuery datepicker in custom plugin break other wp stuffs’ is closed to new replies.