Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2009 07:54:21 PM (16 years ago)
Author:
apeatling
Message:

Merging 1.1 branch changes and syncing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cssjs.php

    r2069 r2077  
    55 *
    66 * Add the CSS needed for the admin bar on blogs (other than the root) and in the admin area.
    7  * 
     7 *
    88 * @package BuddyPress Core
    99 * @uses get_option() Selects a site setting from the DB.
     
    1111function bp_core_add_admin_bar_css() {
    1212    global $current_blog;
    13    
     13
    1414    if ( defined( 'BP_DISABLE_ADMIN_BAR' ) )
    1515        return false;
     
    3232 *
    3333 * Add the minor JS needed for the admin bar.
    34  * 
     34 *
    3535 * @package BuddyPress Core
    3636 * @uses get_option() Selects a site setting from the DB.
     
    4646 *
    4747 * Add a hover-able icon to the "BuddyPress" wp-admin area menu.
    48  * 
     48 *
    4949 * @package BuddyPress Core
    5050 */
     
    6060}
    6161add_action( 'admin_head', 'bp_core_admin_menu_icon_css' );
    62    
     62
    6363function bp_core_confirmation_js() {
    6464?>
     
    7272 *
    7373 * Makes sure the jQuery jCrop library is loaded.
    74  * 
     74 *
    7575 * @package BuddyPress Core
    7676 */
    7777function bp_core_add_jquery_cropper() {
    7878    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' );
    8181}
    8282
     
    8585 *
    8686 * Adds the inline JS needed for the cropper to work on a per-page basis.
    87  * 
     87 *
    8888 * @package BuddyPress Core
    8989 */
    9090function bp_core_add_cropper_inline_js() {
    9191    global $bp;
    92    
     92
    9393    $image = apply_filters( 'bp_inline_cropper_image', getimagesize( $bp->avatar_admin->image->dir ) );
    9494
    95     $aspect_ratio = 1; 
    96    
     95    $aspect_ratio = 1;
     96
    9797    /* 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' ) ) )
    9999         $aspect_ratio = (int) constant( 'BP_AVATAR_FULL_WIDTH' ) / (int) constant( 'BP_AVATAR_FULL_HEIGHT' );
    100100?>
     
    131131                });
    132132            }
    133         }   
     133        }
    134134    </script>
    135135<?php
     
    140140 *
    141141 * Adds the inline CSS needed for the cropper to work on a per-page basis.
    142  * 
     142 *
    143143 * @package BuddyPress Core
    144144 */
     
    166166 *
    167167 * Adds AJAX target URL so themes can access the WordPress AJAX functionality.
    168  * 
     168 *
    169169 * @package BuddyPress Core
    170170 */
    171171function bp_core_add_ajax_url_js() {
    172172    global $bp;
    173    
    174     echo 
     173
     174    echo
    175175'<script type="text/javascript">var ajaxurl = "' . $bp->root_domain . str_replace( 'index.php', 'wp-load.php', $_SERVER['SCRIPT_NAME'] ) . '";</script>
    176176';
     
    182182 *
    183183 * Overrides the theme's admin bar CSS to hide the adminbar if disabled.
    184  * 
     184 *
    185185 * @package BuddyPress Core
    186186 */
    187 function bp_core_override_adminbar_css() { 
     187function bp_core_override_adminbar_css() {
    188188    if ( defined( 'BP_DISABLE_ADMIN_BAR' ) || ( get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) {
    189189    ?>
Note: See TracChangeset for help on using the changeset viewer.