WordPress.org

Make WordPress Core

Ticket #6821: more_image_editor_docs.diff

File more_image_editor_docs.diff, 2.0 KB (added by mikeschroder, 7 years ago)

Fix multi_resize docs to describe array properly. Fix one mention of imagecopyresampled().

  • wp-includes/class-wp-image-editor-gd.php

    diff --git wp-includes/class-wp-image-editor-gd.php wp-includes/class-wp-image-editor-gd.php
    index 92dd287..82626a0 100644
    class WP_Image_Editor_GD extends WP_Image_Editor { 
    176176         * @since 3.5.0
    177177         * @access public
    178178         *
    179          * @param array $sizes { {width, height}, ... }
     179         * @param array $sizes { {'width'=>int, 'height'=>int, 'crop'=>bool}, ... }
    180180         * @return array
    181181         */
    182182        public function multi_resize( $sizes ) {
  • wp-includes/class-wp-image-editor-imagick.php

    diff --git wp-includes/class-wp-image-editor-imagick.php wp-includes/class-wp-image-editor-imagick.php
    index 02dfe03..a9982cd 100644
    class WP_Image_Editor_Imagick extends WP_Image_Editor { 
    248248         * @since 3.5.0
    249249         * @access public
    250250         *
    251          * @param array $sizes
     251         * @param array $sizes { {'width'=>int, 'height'=>int, 'crop'=>bool}, ... }
    252252         * @return array
    253253         */
    254254        public function multi_resize( $sizes ) {
  • wp-includes/class-wp-image-editor.php

    diff --git wp-includes/class-wp-image-editor.php wp-includes/class-wp-image-editor.php
    index dd4c678..481b2c1 100644
    abstract class WP_Image_Editor { 
    101101         * @access public
    102102         * @abstract
    103103         *
    104          * @param array $sizes
     104         * @param array $sizes { {'width'=>int, 'height'=>int, 'crop'=>bool}, ... }
    105105         * @return array
    106106         */
    107107        abstract public function multi_resize( $sizes );
  • wp-includes/media.php

    diff --git wp-includes/media.php wp-includes/media.php
    index d2ae633..cebdae7 100644
    function wp_constrain_dimensions( $current_width, $current_height, $max_width=0, 
    294294}
    295295
    296296/**
    297  * Retrieve calculated resized dimensions for use in imagecopyresampled().
     297 * Retrieve calculated resized dimensions for use in WP_Image_Editor.
    298298 *
    299299 * Calculate dimensions and coordinates for a resized image that fits within a
    300300 * specified width and height. If $crop is true, the largest matching central