mirror of
https://gh.wpcy.net/https://github.com/buddypress/buddypress.git
synced 2026-05-31 05:04:29 +08:00
git-svn-id: https://buddypress.svn.wordpress.org/branches/1.2@4066 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
25 lines
No EOL
1.1 KiB
PHP
25 lines
No EOL
1.1 KiB
PHP
<?php
|
|
|
|
function xprofile_add_admin_css() {
|
|
// If this is WP 3.1+ and multisite is enabled, only load on the Network Admin
|
|
if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin() )
|
|
return false;
|
|
|
|
if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false )
|
|
wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css' );
|
|
}
|
|
add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'xprofile_add_admin_css' );
|
|
|
|
function xprofile_add_admin_js() {
|
|
// If this is WP 3.1+ and multisite is enabled, only load on the Network Admin
|
|
if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin() )
|
|
return false;
|
|
|
|
if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
|
|
wp_enqueue_script( array( "jquery-ui-sortable" ) );
|
|
wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . '/bp-xprofile/admin/js/admin.js', array( 'jquery' ) );
|
|
}
|
|
}
|
|
add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'xprofile_add_admin_js', 1 );
|
|
|
|
?>
|