Support » Plugin: The Events Calendar » Register for the assets to be available everywhere

  • Resolved ioannup


    Register for the assets to be available everywhere is 303rd line of the-events-calendar/common/src/Tribe/Main.php file which includes 21 JS- and CSS-files for EACH page. Do you know about PageSpeed Tools: or ? They don’t like your “available everywhere”!!!
    I hope you can include your files only if it needs.
    Best regards,

Viewing 1 replies (of 1 total)
  • Plugin Author András Guseo


    Hi @ioannup,

    Thanks for reaching out with your question.

    I checked the file you are referencing and for TEC 4.6.6 this is line 303 for me:
    'prevText' => esc_html__( 'Prev', 'the-events-calendar' ),

    A bit up from there is a function “load_assets”, maybe that’s the one you are referring to.

    I see there a bunch of assets, which according to a dev comment “are only registered” so they will be available when needed, but not loaded everywhere.

    There are some more below which are “admin_enqueue_scripts”, so they should not be visible on the frontend, thus wouldn’t influence pagespeed results.

    And at the end there seems to be one asset called for front- and back-end: “tribe-common.js”

    If you see something else or referring to something else, please let me know so we can investigate. We definitely do not want to make resources available where they are not needed. We have made progress on this front this year, but there still might be some left. Your input is much appreciated.

    Thanks and cheers,

Viewing 1 replies (of 1 total)
  • The topic ‘Register for the assets to be available everywhere’ is closed to new replies.