Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 09:32:04 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Breathing room for cast variables.

File:
1 edited

Legend:

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

    r5683 r5729  
    598598
    599599    // Make sure we at least have a width and height for cropping
    600     if ( !(int)$crop_w )
     600    if ( !(int) $crop_w )
    601601        $crop_w = bp_core_avatar_full_width();
    602602
    603     if ( !(int)$crop_h )
     603    if ( !(int) $crop_h )
    604604        $crop_h = bp_core_avatar_full_height();
    605605
     
    609609
    610610    // Crop the image
    611     $full_cropped  = wp_crop_image( $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, bp_core_avatar_full_width(), bp_core_avatar_full_height(), false, $avatar_folder_dir . '/' . $full_filename );
    612     $thumb_cropped = wp_crop_image( $original_file, (int)$crop_x, (int)$crop_y, (int)$crop_w, (int)$crop_h, bp_core_avatar_thumb_width(), bp_core_avatar_thumb_height(), false, $avatar_folder_dir . '/' . $thumb_filename );
     611    $full_cropped  = wp_crop_image( $original_file, (int) $crop_x, (int) $crop_y, (int) $crop_w, (int) $crop_h, bp_core_avatar_full_width(), bp_core_avatar_full_height(), false, $avatar_folder_dir . '/' . $full_filename );
     612    $thumb_cropped = wp_crop_image( $original_file, (int) $crop_x, (int) $crop_y, (int) $crop_w, (int) $crop_h, bp_core_avatar_thumb_width(), bp_core_avatar_thumb_height(), false, $avatar_folder_dir . '/' . $thumb_filename );
    613613
    614614    // Check for errors
     
    808808    global $bp;
    809809   
    810     $dim = isset( $bp->avatar->{$type}->{$h_or_w} ) ? (int)$bp->avatar->{$type}->{$h_or_w} : false;
     810    $dim = isset( $bp->avatar->{$type}->{$h_or_w} ) ? (int) $bp->avatar->{$type}->{$h_or_w} : false;
    811811   
    812812    return apply_filters( 'bp_core_avatar_dimension', $dim, $type, $h_or_w );
     
    872872    global $bp;
    873873   
    874     return apply_filters( 'bp_core_avatar_original_max_width', (int)$bp->avatar->original_max_width );
     874    return apply_filters( 'bp_core_avatar_original_max_width', (int) $bp->avatar->original_max_width );
    875875}
    876876
     
    886886    global $bp;
    887887   
    888     return apply_filters( 'bp_core_avatar_original_max_filesize', (int)$bp->avatar->original_max_filesize );
     888    return apply_filters( 'bp_core_avatar_original_max_filesize', (int) $bp->avatar->original_max_filesize );
    889889}
    890890
Note: See TracChangeset for help on using the changeset viewer.