Changes from branches/1.2/bp-xprofile/bp-xprofile-cssjs.php at r4066 to trunk/bp-xprofile/bp-xprofile-cssjs.php at r1963
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-cssjs.php
r4066 r1963 2 2 3 3 function xprofile_add_admin_css() { 4 // If this is WP 3.1+ and multisite is enabled, only load on the Network Admin 5 if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin() ) 6 return false; 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' ); 4 wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . '/bp-xprofile/admin/css/admin.css' ); 10 5 } 11 add_action( is_multisite() ? 'network_admin_menu' :'admin_menu', 'xprofile_add_admin_css' );6 add_action( 'admin_menu', 'xprofile_add_admin_css' ); 12 7 13 8 function xprofile_add_admin_js() { 14 // If this is WP 3.1+ and multisite is enabled, only load on the Network Admin 15 if ( is_multisite() && function_exists( 'is_network_admin' ) && ! is_network_admin() ) 16 return false; 17 18 if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) { 9 if ( strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) { 19 10 wp_enqueue_script( array( "jquery-ui-sortable" ) ); 20 11 wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . '/bp-xprofile/admin/js/admin.js', array( 'jquery' ) ); 21 12 } 22 13 } 23 add_action( is_multisite() ? 'network_admin_menu' :'admin_menu', 'xprofile_add_admin_js', 1 );14 add_action( 'admin_menu', 'xprofile_add_admin_js', 1 ); 24 15 25 16 ?>
Note: See TracChangeset
for help on using the changeset viewer.