Skip to:
Content

BuddyPress.org

Changeset 10829


Ignore:
Timestamp:
05/31/2016 06:25:55 AM (8 years ago)
Author:
r-a-y
Message:

Embeds: Introduce 'bp_enqueue_embed_scripts' hook.

This will be used to enqueue scripts on embed pages.

See #6772.

Location:
trunk/src/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-actions.php

    r10719 r10829  
    4141add_action( 'after_setup_theme',       'bp_after_setup_theme',      100   ); // After WP themes.
    4242add_action( 'wp_enqueue_scripts',      'bp_enqueue_scripts',        10    );
     43add_action( 'enqueue_embed_scripts',   'bp_enqueue_embed_scripts',  10    );
    4344add_action( 'admin_bar_menu',          'bp_setup_admin_bar',        20    ); // After WP core.
    4445add_action( 'template_redirect',       'bp_template_redirect',      10    );
  • trunk/src/bp-core/bp-core-dependency.php

    r10825 r10829  
    476476
    477477/**
     478 * Fires the 'bp_enqueue_embed_scripts' action in the <head> for BP oEmbeds.
     479 *
     480 * @since 2.6.0
     481 */
     482function bp_enqueue_embed_scripts() {
     483    if ( ! is_buddypress() ) {
     484        return;
     485    }
     486
     487    /**
     488     * Enqueue CSS and JS files for BuddyPress embeds.
     489     *
     490     * @since 2.6.0
     491     */
     492    do_action ( 'bp_enqueue_embed_scripts' );
     493}
     494
     495/**
    478496 * Fire the 'bp_add_rewrite_tag' action, where BP adds its custom rewrite tags.
    479497 *
Note: See TracChangeset for help on using the changeset viewer.