Skip to:
Content

BuddyPress.org

Changeset 3804


Ignore:
Timestamp:
01/21/2011 06:36:37 PM (14 years ago)
Author:
djpaul
Message:

Only load xprofile admin CSS/JS on the xprofile admin pages. Fixes #2973 (branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-xprofile/bp-xprofile-cssjs.php

    r3775 r3804  
    55    if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin()  )
    66        return false;
    7    
    8     wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css' );
     7
     8    if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false )
     9        wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css' );
    910}
    1011add_action( 'admin_menu', 'xprofile_add_admin_css' );
     
    1617        return false;
    1718
    18     if ( strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
     19    if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
    1920        wp_enqueue_script( array( "jquery-ui-sortable" ) );
    2021        wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . '/bp-xprofile/admin/js/admin.js', array( 'jquery' ) );
Note: See TracChangeset for help on using the changeset viewer.