Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor-gd.php

    r46696 r47122  
    2424        public function __destruct() {
    2525                if ( $this->image ) {
    26                         // we don't need the original in memory anymore
     26                        // We don't need the original in memory anymore.
    2727                        imagedestroy( $this->image );
    2828                }
     
    4242                }
    4343
    44                 // On some setups GD library does not provide imagerotate() - Ticket #11536
     44                // On some setups GD library does not provide imagerotate() - Ticket #11536.
    4545                if ( isset( $args['methods'] ) &&
    4646                        in_array( 'rotate', $args['methods'], true ) &&
     
    308308         */
    309309        public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) {
    310                 // If destination width/height isn't specified, use same as
    311                 // width/height from source.
     310                // If destination width/height isn't specified,
     311                // use same as width/height from source.
    312312                if ( ! $dst_w ) {
    313313                        $dst_w = $src_w;
     
    433433                        }
    434434                } elseif ( 'image/png' === $mime_type ) {
    435                         // convert from full colors to index colors, like original PNG.
     435                        // Convert from full colors to index colors, like original PNG.
    436436                        if ( function_exists( 'imageistruecolor' ) && ! imageistruecolor( $image ) ) {
    437437                                imagetruecolortopalette( $image, false, imagecolorstotal( $image ) );
     
    449449                }
    450450
    451                 // Set correct file permissions
     451                // Set correct file permissions.
    452452                $stat  = stat( dirname( $filename ) );
    453                 $perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bits
     453                $perms = $stat['mode'] & 0000666; // Same permissions as parent folder, strip off the executable bits.
    454454                chmod( $filename, $perms );
    455455
Note: See TracChangeset for help on using the changeset viewer.