Support » Plugin: WP Google Maps » Autoptimze Conflict

  • Resolved CK MacLeod


    I’ve used both your plugin and Autoptimize at many sites, and oddly, despite the existence of a filter in WP Google Maps intended to disable Autoptimize CSS integration, I’ve had them working together before. Now, the apparently intended behavior, in which turning on WP Google Maps turns off Autoptimize CSS, has started working on several sites.

    To make a long story short, I’ve now commented out line 2552 of your legacy-core.php, restoring Autoptimize functionality. There doesn’t seem to be any problem with WPGM on that page either.

    I hate to have to hack and freeze a plugin that works as well as yours.Is there any chance you’ll refine the filter function to make it more susceptible to custom modification, or do you have any advice on doing so? I’ve already discussed the question at Autoptimize support:

Viewing 3 replies - 1 through 3 (of 3 total)
  • Correction: The line number given for the hack reflects an inadvertent compression of the file that occurred during upload/replacement (spaces between lines were eliminated). I believe the line in question will be 5103 of the unaltered file.

    As now noted in the conversation linked above, an alternative to commenting out the line invoking autoptimize_filter_css_noptimize will be to add an alternative shortcode function and related scripts via custom function, though doing so will remain sub-optimal compared to simpler solutions built into the WPGM code.

    Autoptimize provided some additional details explaining why the filter approach was implemented. Whether or not you choose to refine it, I wonder if you happen to have any additional details you could share regarding the failures that occurred when trying to use both plugins. So far, they seem to co-exist without problem: The WPGM map displays as expected and AO compresses and combines CSS files. I wonder if you isolated and defined a failure threshold in relation to server capacities and settings, or characteristics of specific implementations.

    Plugin Author perryrylance


    Hi there

    As per our discussion on their forum, we’ll be adding a setting for this which will be off by default.

    This should mitigate this issue where a large amount of inline JS is present.

    Kind regards
    – Perry

    Sounds great – thanks for your responsiveness on the issue, and in general for the great plug-in.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Autoptimze Conflict’ is closed to new replies.