Changeset 2077 for trunk/bp-core/bp-core-cssjs.php
- Timestamp:
- 11/02/2009 07:54:21 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-cssjs.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-cssjs.php
r2069 r2077 5 5 * 6 6 * Add the CSS needed for the admin bar on blogs (other than the root) and in the admin area. 7 * 7 * 8 8 * @package BuddyPress Core 9 9 * @uses get_option() Selects a site setting from the DB. … … 11 11 function bp_core_add_admin_bar_css() { 12 12 global $current_blog; 13 13 14 14 if ( defined( 'BP_DISABLE_ADMIN_BAR' ) ) 15 15 return false; … … 32 32 * 33 33 * Add the minor JS needed for the admin bar. 34 * 34 * 35 35 * @package BuddyPress Core 36 36 * @uses get_option() Selects a site setting from the DB. … … 46 46 * 47 47 * Add a hover-able icon to the "BuddyPress" wp-admin area menu. 48 * 48 * 49 49 * @package BuddyPress Core 50 50 */ … … 60 60 } 61 61 add_action( 'admin_head', 'bp_core_admin_menu_icon_css' ); 62 62 63 63 function bp_core_confirmation_js() { 64 64 ?> … … 72 72 * 73 73 * Makes sure the jQuery jCrop library is loaded. 74 * 74 * 75 75 * @package BuddyPress Core 76 76 */ 77 77 function bp_core_add_jquery_cropper() { 78 78 wp_enqueue_script( 'jcrop', array( 'jquery' ) ); 79 add_action( 'wp_head', 'bp_core_add_cropper_inline_js' ); 80 add_action( 'wp_head', 'bp_core_add_cropper_inline_css' ); 79 add_action( 'wp_head', 'bp_core_add_cropper_inline_js' ); 80 add_action( 'wp_head', 'bp_core_add_cropper_inline_css' ); 81 81 } 82 82 … … 85 85 * 86 86 * Adds the inline JS needed for the cropper to work on a per-page basis. 87 * 87 * 88 88 * @package BuddyPress Core 89 89 */ 90 90 function bp_core_add_cropper_inline_js() { 91 91 global $bp; 92 92 93 93 $image = apply_filters( 'bp_inline_cropper_image', getimagesize( $bp->avatar_admin->image->dir ) ); 94 94 95 $aspect_ratio = 1; 96 95 $aspect_ratio = 1; 96 97 97 /* Calculate Aspect Ratio */ 98 if ( (int) constant( 'BP_AVATAR_FULL_HEIGHT' ) && ( (int) constant( 'BP_AVATAR_FULL_WIDTH' ) != (int) constant( 'BP_AVATAR_FULL_HEIGHT' ) ) ) 98 if ( (int) constant( 'BP_AVATAR_FULL_HEIGHT' ) && ( (int) constant( 'BP_AVATAR_FULL_WIDTH' ) != (int) constant( 'BP_AVATAR_FULL_HEIGHT' ) ) ) 99 99 $aspect_ratio = (int) constant( 'BP_AVATAR_FULL_WIDTH' ) / (int) constant( 'BP_AVATAR_FULL_HEIGHT' ); 100 100 ?> … … 131 131 }); 132 132 } 133 } 133 } 134 134 </script> 135 135 <?php … … 140 140 * 141 141 * Adds the inline CSS needed for the cropper to work on a per-page basis. 142 * 142 * 143 143 * @package BuddyPress Core 144 144 */ … … 166 166 * 167 167 * Adds AJAX target URL so themes can access the WordPress AJAX functionality. 168 * 168 * 169 169 * @package BuddyPress Core 170 170 */ 171 171 function bp_core_add_ajax_url_js() { 172 172 global $bp; 173 174 echo 173 174 echo 175 175 '<script type="text/javascript">var ajaxurl = "' . $bp->root_domain . str_replace( 'index.php', 'wp-load.php', $_SERVER['SCRIPT_NAME'] ) . '";</script> 176 176 '; … … 182 182 * 183 183 * Overrides the theme's admin bar CSS to hide the adminbar if disabled. 184 * 184 * 185 185 * @package BuddyPress Core 186 186 */ 187 function bp_core_override_adminbar_css() { 187 function bp_core_override_adminbar_css() { 188 188 if ( defined( 'BP_DISABLE_ADMIN_BAR' ) || ( get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) { 189 189 ?>
Note: See TracChangeset
for help on using the changeset viewer.