Skip to:
Content

BuddyPress.org

Changeset 3591


Ignore:
Timestamp:
12/27/2010 08:50:28 PM (16 years ago)
Author:
djpaul
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-cssjs.php

    r3477 r3591  
    11<?php
    22function xprofile_add_admin_css() {
    3         if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
    4                 wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.dev.css' );
    5         else
    6                 wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css' );
     3        if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
     4                if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
     5                        wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.dev.css' );
     6                else
     7                        wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css' );
     8        }
    79}
    810add_action( 'admin_menu', 'xprofile_add_admin_css' );
Note: See TracChangeset for help on using the changeset viewer.