Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2015 07:57:03 PM (9 years ago)
Author:
tw2113
Message:

[Samus Aran]
I first battled the documentation inconsistencies on planet Zebes. It was there that I foiled the plans of the
Space Pirate leader Mother Brain to use the issues to attack galactic civilization...

I next fought the inconsistencies on their homeworld SR388. I completely eradicated them except for an @since tag,
which after hatching followed me like a confused child...

I personally delivered it to the Galactic Research Station at Ceres so scientists could study its energy production qualities...

The scientists' findings were astounding! They discovered that the powers of the docs inconsistencies
might be harnessed for the good of galactic civilization!

Satisfied that all was well, I left the station to seek a new bounty to hunt. But, I had hardly gone beyond the asteroid
belt when I picked up a distress signal!

Ceres station was under attack!

More documentation cleanup for part of BP-Core component.

See #6398.

File:
1 edited

Legend:

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

    r10155 r10356  
    2828    $scripts = apply_filters( 'bp_core_register_common_scripts', array(
    2929
    30         // Legacy
     30        // Legacy.
    3131        'bp-confirm'        => array( 'file' => "{$url}confirm{$min}.js",        'dependencies' => array( 'jquery' ), 'footer' => false ),
    3232        'bp-widget-members' => array( 'file' => "{$url}widget-members{$min}.js", 'dependencies' => array( 'jquery' ), 'footer' => false ),
     
    133133    }
    134134
    135     // Enqueue the Attachments scripts for the Avatar UI
     135    // Enqueue the Attachments scripts for the Avatar UI.
    136136    bp_attachments_enqueue_scripts( 'BP_Attachment_Avatar' );
    137137
    138     // Add Some actions for Theme backcompat
     138    // Add Some actions for Theme backcompat.
    139139    add_action( 'bp_after_profile_avatar_upload_content', 'bp_avatar_template_check' );
    140140    add_action( 'bp_after_group_admin_content',           'bp_avatar_template_check' );
     
    153153    }
    154154
    155     // Enqueue the Attachments scripts for the Cover Image UI
     155    // Enqueue the Attachments scripts for the Cover Image UI.
    156156    bp_attachments_enqueue_scripts( 'BP_Attachment_Cover_Image' );
    157157}
     
    185185    }
    186186
    187     // Get avatar full width and height
     187    // Get avatar full width and height.
    188188    $full_height = bp_core_avatar_full_height();
    189189    $full_width  = bp_core_avatar_full_width();
    190190
    191     // Calculate Aspect Ratio
     191    // Calculate Aspect Ratio.
    192192    if ( !empty( $full_height ) && ( $full_width != $full_height ) ) {
    193193        $aspect_ratio = $full_width / $full_height;
     
    196196    }
    197197
    198     // Default cropper coordinates
    199 
    200     // Smaller than full-width: cropper defaults to entire image
     198    // Default cropper coordinates.
     199    // Smaller than full-width: cropper defaults to entire image.
    201200    if ( $image[0] < $full_width ) {
    202201        $crop_left  = 0;
    203202        $crop_right = $image[0];
    204203
    205     // Less than 2x full-width: cropper defaults to full-width
     204    // Less than 2x full-width: cropper defaults to full-width.
    206205    } elseif ( $image[0] < ( $full_width * 2 ) ) {
    207206        $padding_w  = round( ( $image[0] - $full_width ) / 2 );
     
    209208        $crop_right = $image[0] - $padding_w;
    210209
    211     // Larger than 2x full-width: cropper defaults to 1/2 image width
     210    // Larger than 2x full-width: cropper defaults to 1/2 image width.
    212211    } else {
    213212        $crop_left  = round( $image[0] / 4 );
     
    215214    }
    216215
    217     // Smaller than full-height: cropper defaults to entire image
     216    // Smaller than full-height: cropper defaults to entire image.
    218217    if ( $image[1] < $full_height ) {
    219218        $crop_top    = 0;
    220219        $crop_bottom = $image[1];
    221220
    222     // Less than double full-height: cropper defaults to full-height
     221    // Less than double full-height: cropper defaults to full-height.
    223222    } elseif ( $image[1] < ( $full_height * 2 ) ) {
    224223        $padding_h   = round( ( $image[1] - $full_height ) / 2 );
     
    226225        $crop_bottom = $image[1] - $padding_h;
    227226
    228     // Larger than 2x full-height: cropper defaults to 1/2 image height
     227    // Larger than 2x full-height: cropper defaults to 1/2 image height.
    229228    } else {
    230229        $crop_top    = round( $image[1] / 4 );
     
    273272/**
    274273 * Output the inline CSS for the BP image cropper.
    275  *
    276  * @package BuddyPress Core
    277274 */
    278275function bp_core_add_cropper_inline_css() {
     
    362359 * @since 2.4.0
    363360 *
    364  * @param  bool $return true to get the inline css
     361 * @param  bool $return True to get the inline css.
    365362 * @return string|array the inline css or an associative array containing
    366363 *                      the css rules and the style handle
     
    369366    $bp = buddypress();
    370367
    371     // Find the component of the current item
     368    // Find the component of the current item.
    372369    if ( bp_is_user() ) {
    373370
    374371        // User is not allowed to upload cover images
    375         // no need to carry on
     372        // no need to carry on.
    376373        if ( bp_disable_cover_image_uploads() ) {
    377374            return;
     
    385382
    386383        // Users are not allowed to upload cover images for their groups
    387         // no need to carry on
     384        // no need to carry on.
    388385        if ( bp_disable_group_cover_image_uploads() ) {
    389386            return;
     
    403400    }
    404401
    405     // Get the settings of the cover image feature for the current component
     402    // Get the settings of the cover image feature for the current component.
    406403    $params = bp_attachments_get_cover_image_settings( $cover_image_object['component'] );
    407404
     
    411408    }
    412409
    413     // Try to call the callback
     410    // Try to call the callback.
    414411    if ( is_callable( $params['callback'] ) ) {
    415412
     
    439436        ) ) );
    440437
    441         // Finally add the inline css to the handle
     438        // Finally add the inline css to the handle.
    442439        if ( ! empty( $inline_css ) ) {
    443440
    444             // Used to get the css when Ajax setting the cover image
     441            // Used to get the css when Ajax setting the cover image.
    445442            if ( true === $return ) {
    446443                return array(
Note: See TracChangeset for help on using the changeset viewer.