Changeset 373 for trunk/bp-xprofile/bp-xprofile-cssjs.php
- Timestamp:
- 10/07/2008 07:16:51 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-cssjs.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-cssjs.php
r309 r373 3 3 function xprofile_add_signup_css() { 4 4 if ( $_SERVER['SCRIPT_NAME'] == '/wp-signup.php' ) 5 echo '<link rel="stylesheet" href="' . get_option('siteurl') . '/wp-content/mu-plugins/bp-xprofile/css/signup.css" type="text/css" />';5 echo '<link rel="stylesheet" href="' . site_url() . '/wp-content/mu-plugins/bp-xprofile/css/signup.css" type="text/css" />'; 6 6 } 7 7 add_action( 'wp_head', 'xprofile_add_signup_css' ); … … 10 10 function xprofile_add_admin_css() { 11 11 if ( strpos( $_GET['page'], 'xprofile' ) !== false ) { 12 echo '<link rel="stylesheet" href="' . get_option('siteurl') . '/wp-content/mu-plugins/bp-xprofile/css/admin.css" type="text/css" />';12 echo '<link rel="stylesheet" href="' . site_url() . '/wp-content/mu-plugins/bp-xprofile/css/admin.css" type="text/css" />'; 13 13 } 14 14 } … … 18 18 function xprofile_add_admin_js() { 19 19 if ( strpos( $_GET['page'], 'xprofile' ) !== false ) { 20 wp_enqueue_script( 'bp-xprofile-admin-js', get_option('siteurl') . "/wp-content/mu-plugins/bp-xprofile/js/admin.js" );20 wp_enqueue_script( 'bp-xprofile-admin-js', site_url() . "/wp-content/mu-plugins/bp-xprofile/js/admin.js" ); 21 21 add_action( 'admin_head', 'bp_core_add_cropper_js' ); 22 22 } … … 24 24 add_action( 'admin_menu', 'xprofile_add_admin_js' ); 25 25 26 function xprofile_add_cropper_js() { 27 global $bp; 28 29 if ( $_SERVER['SCRIPT_NAME'] == '/wp-activate.php' || $bp['current_action'] == 'change-avatar' || ( isset($_GET['page']) && $_GET['page'] == 'bp-xprofile.php' ) ) { 30 wp_enqueue_script('jquery'); 31 wp_enqueue_script('prototype'); 32 wp_enqueue_script('scriptaculous-root'); 33 wp_enqueue_script('cropper'); 34 add_action( 'wp_head', 'bp_core_add_cropper_js' ); 35 } 36 37 if ( isset($_GET['page']) && $_GET['page'] == 'bp-xprofile.php' ) { 38 add_action( 'admin_head', 'bp_core_add_cropper_js' ); 39 } 40 } 41 add_action( 'activate_header', 'xprofile_add_cropper_js' ); 42 add_action( 'template_redirect', 'xprofile_add_cropper_js' ); 43 add_action( 'admin_menu', 'xprofile_add_cropper_js' ); 44 26 45 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)