Dequeue ECP scripts

Home Forums Calendar Products Events Calendar PRO Dequeue ECP scripts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #219582
    Marty
    Participant

    I’m cleaning up the head of my site to improve performance. My implementation of ECP is heavily customized, so I don’t need most of the ECP scripts and styles. I’m removing them using wp_dequeue_style() and wp_dequeue_script().

    The styles were easy, ’cause their internal name is output right there as an ID. The scripts are more difficult, however, as their internal names are not output. I tried poking through the plugin directories, but was unable to locate the names.

    Can you tell me the internal names (used when enqueuing) of the following files?

    /wp-content/plugins/the-events-calendar/vendor/jquery-resize/jquery.ba-resize.min.js
    /wp-content/plugins/the-events-calendar/resources/tribe-events.min.js
    /wp-content/plugins/events-calendar-pro/resources/tribe-events-pro.min.js

    Thanks!

    #219657
    Marty
    Participant

    PS. Looking at the List view, there’s a few more I’d like to dequeue:

    /the-events-calendar/vendor/jquery-placeholder/jquery.placeholder.min.js
    /the-events-calendar/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js
    /the-events-calendar/resources/tribe-events-bar.min.js
    /events-calendar-pro/resources/tribe-events-ajax-maps.min.js
    /the-events-calendar/resources/tribe-events-ajax-list.min.js

    Thanks!

    #221218
    Brook
    Participant

    Howdy martyspellerberg,

    Those are a bit of a pain to find. I was able to find each of them by searching the plugins directory for “getMinFile”, which is the function we use to find the minified versions of our scripts. Here are your requests:

    1. /the-events-calendar/vendor/jquery-resize/jquery.ba-resize.min.js
    2. /the-events-calendar/resources/tribe-events.min.js
    3. /the-events-calendar/vendor/jquery-placeholder/jquery.placeholder.min.js
    4. /the-events-calendar/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js
    5. /the-events-calendar/resources/tribe-events-bar.min.js
    6. /the-events-calendar/resources/tribe-events-ajax-list.min.js
    7. /events-calendar-pro/resources/tribe-events-ajax-maps.min.js
    8. /events-calendar-pro/resources/tribe-events-pro.min.js

    Their corresponding handles:

    1. ‘tribe-events-jquery-resize’
    2. ‘tribe-events-calendar-script’
    3. ‘jquery-placeholder’, or if the WooCommerce plugin is active  ‘tribe-placeholder’
    4. ‘tribe-events-bootstrap-datepicker’
    5. ‘tribe-events-bar’
    6. ‘tribe-events-list’
    7. ‘tribe-events-pro-geoloc’
    8. ‘tribe-events-pro’

    We ought to put together a list of script and style handles for users like you. I will bring it up to the team.

    Did that work for you? It is possible that I misspelled one of these or grabbed the wrong handle. If so you can double check the code by performing that search, or post back and wait for me to respond. Thanks for posting! If the issue is now resolved, would you mind marking the topic as such? Cheers!

    – Brook

    #221291
    Marty
    Participant

    Hi these did the trick, thanks!

    I do expect there’ll be more scripts I’ll want to dequeue — I’ve only been looking at the List and Single templates so far, and Grid’s still on my list. I’ll follow your advise and search using “getMinFile.”

    That said a comprehensive list in the docs would certainly be helpful.

    #221490
    Brook
    Participant

    The team just discussed making a list of these and posting it to the website. We are going to do it here soon when we start updating our tutorials for this release. I am glad you brought this to our attention, it was a bit of a pain to track those names down. We certainly don’t want our users to go through pains!

    If you have a minute or two, we would love it if you could write a few words about the plugin here. Happy developing!

    – Brook

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Dequeue ECP scripts’ is closed to new replies.