Changeset 1636 for trunk/bp-xprofile/bp-xprofile-cssjs.php
- Timestamp:
- 08/08/2009 05:25:01 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-cssjs.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-cssjs.php
r1366 r1636 1 1 <?php 2 3 function xprofile_add_js() {4 if ( $_SERVER['SCRIPT_NAME'] == '/wp-signup.php' )5 wp_enqueue_script( 'jquery' );6 }7 add_action( 'wp', 'xprofile_add_js' );8 9 function xprofile_add_css() {10 if ( $_SERVER['SCRIPT_NAME'] == '/wp-signup.php' )11 wp_enqueue_style( 'bp-xprofile-signup', BP_PLUGIN_URL . '/bp-xprofile/css/signup.css' );12 13 wp_print_styles();14 }15 add_action( 'wp_head', 'xprofile_add_css' );16 17 function xprofile_add_structure_css() {18 /* Enqueue the structure CSS file to give basic positional formatting for xprofile pages */19 wp_enqueue_style( 'bp-xprofile-structure', BP_PLUGIN_URL . '/bp-xprofile/css/structure.css' );20 }21 add_action( 'bp_styles', 'xprofile_add_structure_css' );22 2 23 3 function xprofile_add_admin_css() { … … 34 14 add_action( 'admin_head', 'xprofile_add_admin_js' ); 35 15 36 function xprofile_add_cropper_js() {37 global $bp;38 39 if ( $_SERVER['SCRIPT_NAME'] == '/wp-activate.php' || $bp->current_component == BP_ACTIVATION_SLUG || $bp->current_action == 'change-avatar' ) {40 //wp_enqueue_script('jquery');41 //wp_enqueue_script('prototype');42 wp_enqueue_script('scriptaculous-root');43 wp_enqueue_script('cropper');44 add_action( 'wp_head', 'bp_core_add_cropper_js' );45 }46 47 if ( isset($_GET['page']) && $_GET['page'] == 'bp-xprofile.php' ) {48 add_action( 'admin_head', 'bp_core_add_cropper_js' );49 }50 }51 add_action( 'activate_header', 'xprofile_add_cropper_js' );52 add_action( 'template_redirect', 'xprofile_add_cropper_js', 1 );53 add_action( 'admin_menu', 'xprofile_add_cropper_js' );54 55 16 ?>
Note: See TracChangeset
for help on using the changeset viewer.