• Hi Marcus,

    any updates about this

    how we can control the en-queued javascript files

    for example if i am using only the events calender i dont think i need 13 Javascript files

    i only need the main events-manager.js file

    which is not possible unless i edit the main plugin

    wp_enqueue_script('events-manager', plugins_url('includes/js/events-manager.js',__FILE__), array_values($script_deps));

    to

    wp_enqueue_script('events-manager', plugins_url('includes/js/events-manager.js',__FILE__), array_values($script_deps));

    i try to dequeue the extra files in function.php

    but that didnt work because dequeueing any one will remove all jquery-ui file including events-manager.js

    and then its not possible to enqueue anyone again

    any help is so appreciated

    Many Thanks,

    http://ww.wp.xz.cn/extend/plugins/events-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • try Events > Settings > General > Performance Optimization

    Thread Starter Mohammad Sabbagh

    (@sabbagh)

    Thanks agelonwl for reply

    on Events > Settings > General > Performance Optimization
    i changed “Limit JS file loading?” to yes

    the result is

    in the home page it loads events-manager.js which is fine because i use calender

    all other pages which doesn’t include anything related to events manager plugin, they load 6 js files

    events-manager.js
    jquery.ui.autocomplete.min.js
    jquery.ui.core.min.js
    jquery.ui.menu.min.js
    jquery.ui.position.min.js
    jquery.ui.widget.min.js

    i have checked Optimization recommendation but it didnt explain enough

    i am wonder if there is someway to stop loading extra js files for all pages

    any idea why the usual wp_dequeue_script , wp_deregister_script functions dont solve this problem

    Many Thanks

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    are you sure other plugins aren’t adding these too?

    if yes, what about leaving everyghing but ‘General JS’ field blank in those settings?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    or alternatively, make event General JS blank.

    Thread Starter Mohammad Sabbagh

    (@sabbagh)

    Hi Marcus

    it was other plugins which loading the extra js files

    the result is when i keep ‘General JS’ blank it wont load anything

    when its 0 it will load only events-manager.js

    Thank you very much and sorry that i didn’t check other plugins

    no problem, thanks for updating us.

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

The topic ‘control the enqueued javascript files’ is closed to new replies.