• Resolved pascalroget

    (@pascalroget)


    Hi,

    Having an issue where MMR generates JS files which contain the source code of the PHP file that produces the JS.

    This happens when a plugin enqueues a script at /wp-admin/admin-ajax.php?action={{action}}&t={{time()}}

    In this instance LiveChatInc’s plugin so the script’s URL looks like admin-ajax.php?action=wc-livechat-script&t=1492128160

    How do I make MMR ignore it?

    • This topic was modified 9 years, 5 months ago by pascalroget.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pascalroget

    (@pascalroget)

    For now, I’ve added the handle of my script to the conditions on line 396 like this:

    if( $this->host_match($wp_scripts->registered[$handle]->src) && !in_array($wp_scripts->registered[$handle]->src, $this->ignore) && !isset($wp_scripts->registered[$handle]->extra["conditional"]) && $handle != 'wc-livechat-script' ) { //is a local script

    but I think you should update MMR so that it ignores scripts if the file extension is PHP

    • This reply was modified 9 years, 5 months ago by pascalroget.
    • This reply was modified 9 years, 5 months ago by pascalroget.
    • This reply was modified 9 years, 5 months ago by pascalroget.
    Plugin Author launchinteractive

    (@launchinteractive)

    Good idea. I’ll make sure this gets added in the next update.

    Plugin Author launchinteractive

    (@launchinteractive)

    Hi @pascalroget,

    We’ve just released version 1.8 of MMR that should now fix your issue. Let me know how you go.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Ignore admin-ajax.php?script=XXX&parameter=YY’ is closed to new replies.