• librazh

    (@librazh)


    1. The ‘init’ hook is not recommended while registering the script libraries. So I updated the plugin by myself, and it works. Please refer to http://codex.wordpress.org/Function_Reference/wp_enqueue_script which mentioned that “by using the wp_enqueue_scripts hook (instead of the init hook which many articles reference), we avoid registering the alternate jQuery on admin pages, which will cause post editing (amongst other things) to break after upgrades often.”

    2. There is no way in the plugin to add my own jQuery library served on another CDN, so I have to modify the plugin by myself. It may cause setting losing if the plugin is being upgraded. Can you add a feature to let the user input the library URL by themselves?

    http://wordpress.org/extend/plugins/wp-jquery-cdn/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter librazh

    (@librazh)

    One more problem, the plugin is generating below URL for script, is it correct?

    <script type=’text/javascript’ src=’http://ajax.googleapis.com/ajax/libs/jquery//jquery.min.js?ver=3.3.1′></script&gt;

    Plugin Author InertiaInMotion

    (@inertiainmotion)

    Hi Librazh,

    Thanks for the suggestions, And sorry about the HUGE! delay in this response, We have become quite busy this year and have had very little time to tinker with other little side projects such as this plugin.

    Also in regards to the problem you are experiencing.
    I gather you have selected the Google CDN option,
    Are you able to provide me with some more information?

    Such as.
    What version of the plugin are you running?
    What is entered in the jQuery Version input field?
    Have you modified the plugin in any way?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP jQuery CDN] init hook is not recommended and can you add a feature to setup user library’ is closed to new replies.