WordPress.org

Ready to get started?Download WordPress

Forums

Google Hosted AJAX Libraries
Admin Menu WP 3+ (2 posts)

  1. boonjackmedia
    Member
    Posted 3 years ago #

    I had an issue with a client which had this google hosted ajax libraries plugin installed, their Menu buttons in the Admin on WordPress version 3.0.1 (and after upgrade to current version) wasn't working as should, they couldn't use the drag and drop feature.

    I found that load-scripts.php was returning an error: jquery not defined, http://itservicecorporation.us/wp-admin/load-scripts.php?c=0&load=utils,nav-menu&ver=b4ab61fe95b1fa1cf903d335317681e9

    There wasn't anything that looked funky with this plugin. It also it provides support for Admin functions. However, I read on Stack Exchange that WP Admin concatenates scripts in admin area by default.

    Here's the simple and easy fix, in your WordPress Admin, goto the Plugin page, find the google-hosted-ajax-libraries plugin then click editor.

    On line 37 to 39 replace this:
    `foreach($this->settings as $slug => $url) {
    wp_deregister_script( $slug );
    wp_register_script($slug,$url);`

    With this:
    `global $concatenate_scripts;
    $concatenate_scripts = false;
    foreach($this->settings as $slug => $url) {
    wp_deregister_script( $slug );
    wp_register_script( $slug,$url );`

    Click save and now your're set.

    Mike

    http://wordpress.org/extend/plugins/google-hosted-ajax-libraries/

  2. w3prodigy
    Member
    Plugin Author

    Posted 3 years ago #

    Hey Mike, sorry for the delay and thanks for the update - I didn't even think about how my plugin interacted with the admin, complete fail on my part.

    I've actually made an update to fix this, different than your proposal, which simply stops my the plugin from affecting the admin section. After all, my plugin is meant for the front-end loading optimization so I believe letting the admin run naturally would be the best scenario.

    Thanks again for pointing this out and sorry for the delay.

    - Jay

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic