Skip to:
Content
Pages
Categories
Search
Top
Bottom

javascript precedence


  • bassjobsen
    Participant

    @bassjobsen

    BBPress adds some jQuery dependent javascript to the header which breaks the defer loading (cause a javascript error).
    Javascript will be insert by setup_actions in bbpress/templates/default/bbpress-functions.php

    add_action( 'bbp_head', array( $this, 'head_scripts' ) );

    Would it be possible to make this script independent of jQuery or otherwise insert it with wp_enqueue_script and set its dependency of jQuery?

    I also want to know how to remove this action. I tried:

    global $BBP_Default;
    remove_action( ‘bbp_head’, array( $BBP_Default, ‘head_scripts’ ) );

    Thanks for your attention. I will need this fixes to get WP Defer Loading work with BuddyPress, see: https://github.com/bassjobsen/wp-defer-loading/issues/5

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar