The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. boonjackmedia
    Posted 5 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 );

    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.



  2. w3prodigy
    Plugin Author

    Posted 5 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

  • Google Hosted AJAX Libraries
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic