Skip to:
Content
Pages
Categories
Search
Top
Bottom

javascript precedence


  • bassjobsen
    Participant

    @bassjobsen

    Hello,

    1) in bp-templates/buddypress-legacy/buddypress-functions.php the function enqueue_scripts() enqueues buddypress.js. buddypress.js not only depends on jquery but also on jquery-cookie.
    Set the $deps Array of the handles in the wp_enqueue_script() call to array('jquery','jquery-cookie') will fix this

    2) ./buddypress/bp-core/bp-core-cssjs.php sets add_action( 'wp_head', bp_core_confirmation_js', 100 ); where bp_core_confirmation_js add javascript to the head which depends on jquery. This code should be enqueued with wp_enqueue_script() to set the jquery dependency. Localization can be add with: wp_localize_script().

    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/4

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘javascript precedence’ is closed to new replies.
Skip to toolbar