Make WordPress Core

Ticket #47364: 47364.patch

File 47364.patch, 7.4 KB (added by dilipbheda, 6 years ago)

Changed few functions description.

  • src/wp-admin/includes/image.php

    diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php
    index 951f51fc60..d26b7d37fd 100644
    a b function file_is_displayable_image( $path ) { 
    728728 *
    729729 * @since 2.9.0
    730730 *
    731  * @param string $attachment_id Attachment ID.
     731 * @param int $attachment_id Attachment ID.
    732732 * @param string $mime_type Image mime type.
    733  * @param string $size Optional. Image size, defaults to 'full'.
     733 * @param string|array $size Optional. Image size, defaults to 'full'.
    734734 * @return resource|false The resulting image resource on success, false on failure.
    735735 */
    736736function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) {
    function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { 
    760760                 * @since 2.9.0
    761761                 *
    762762                 * @param resource $image         Current image.
    763                  * @param string   $attachment_id Attachment ID.
    764                  * @param string   $size          Image size.
     763                 * @param int   $attachment_id Attachment ID.
     764                 * @param string|array   $size          Image size.
    765765                 */
    766766                $image = apply_filters( 'load_image_to_edit', $image, $attachment_id, $size );
    767767                if ( function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
    function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { 
    781781 * @since 3.4.0
    782782 * @access private
    783783 *
    784  * @param string $attachment_id Attachment ID.
    785  * @param string $size Optional. Image size, defaults to 'full'.
    786  * @return string|false File path or url on success, false on failure.
     784 * @param int $attachment_id Attachment ID.
     785 * @param string|array $size Optional. Image size, defaults to 'full'.
     786 * @return string|bool File path or url on success, false on failure.
    787787 */
    788788function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
    789789        $filepath = get_attached_file( $attachment_id );
    function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { 
    803803                                 * @since 3.1.0
    804804                                 *
    805805                                 * @param string $path          Path to the current image.
    806                                  * @param string $attachment_id Attachment ID.
    807                                  * @param string $size          Size of the image.
     806                                 * @param int $attachment_id Attachment ID.
     807                                 * @param string|array $size          Size of the image.
    808808                                 */
    809809                                $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size );
    810810                        }
    function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { 
    818818                 * @since 3.1.0
    819819                 *
    820820                 * @param string $image_url     Current image URL.
    821                  * @param string $attachment_id Attachment ID.
    822                  * @param string $size          Size of the image.
     821                 * @param int $attachment_id Attachment ID.
     822                 * @param string|array $size          Size of the image.
    823823                 */
    824824                $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size );
    825825        }
    function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { 
    830830         * @since 2.9.0
    831831         *
    832832         * @param string|bool $filepath      File path or URL to current image, or false.
    833          * @param string      $attachment_id Attachment ID.
    834          * @param string      $size          Size of the image.
     833         * @param int      $attachment_id Attachment ID.
     834         * @param string|array      $size          Size of the image.
    835835         */
    836836        return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size );
    837837}
  • src/wp-includes/media.php

    diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
    index 30fadcbeb4..d2fff51f7c 100644
    a b function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image 
    13321332                absint( $image[2] ),
    13331333        );
    13341334
     1335        /**
     1336         * Filters the current image sizes.
     1337         *
     1338         * @since 5.2
     1339         *
     1340         * @param array $size_array         Image height and width.
     1341         * @param string   $image_src           Image src.
     1342         * @param array|bool   $image_meta  Attachment meta field. False on failure..
     1343         * @param int   $attachment_id      Attachment ID.
     1344         */
    13351345        return wp_calculate_image_sizes( $size_array, $image_src, $image_meta, $attachment_id );
    13361346}
    13371347
    function next_image_link( $size = 'thumbnail', $text = false ) { 
    29132923 *
    29142924 * @since 2.5.0
    29152925 *
    2916  * @param bool        $prev Optional. Whether to display the next (false) or previous (true) link. Default true.
    2917  * @param string|array $size Optional. Image size. Accepts any valid image size, or an array of width and height
    2918  *                          values in pixels (in that order). Default 'thumbnail'.
    2919  * @param bool        $text Optional. Link text. Default false.
     2926 * @param       bool $prev Optional. Whether to display the next (false) or previous (true) link. Default true.
     2927 * @param       string|array $size Optional. Image size. Accepts any valid image size, or an array of width and
     2928 *                      height values in pixels (in that order). Default 'thumbnail'.
     2929 * @param       bool $text Optional. Link text. Default false.
    29202930 */
    29212931function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
    29222932        $post        = get_post();
    function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) 
    29632973         *
    29642974         * @param string $output        Adjacent image HTML markup.
    29652975         * @param int    $attachment_id Attachment ID
    2966          * @param string $size          Image size.
     2976         * @param string|array $size    Image size.
    29672977         * @param string $text          Link text.
    29682978         */
    29692979        echo apply_filters( "{$adjacent}_image_link", $output, $attachment_id, $size, $text );
  • src/wp-includes/post-thumbnail-template.php

    diff --git a/src/wp-includes/post-thumbnail-template.php b/src/wp-includes/post-thumbnail-template.php
    index 3293a98d77..09ac59d42c 100644
    a b function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = 
    159159                 * @since 2.9.0
    160160                 *
    161161                 * @param int          $post_id           The post ID.
    162                  * @param string       $post_thumbnail_id The post thumbnail ID.
     162                 * @param int          $post_thumbnail_id The post thumbnail ID.
    163163                 * @param string|array $size              The post thumbnail size. Image size or array of width
    164164                 *                                        and height values (in that order). Default 'post-thumbnail'.
    165165                 */
    function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = 
    175175                 * @since 2.9.0
    176176                 *
    177177                 * @param int          $post_id           The post ID.
    178                  * @param string       $post_thumbnail_id The post thumbnail ID.
     178                 * @param int          $post_thumbnail_id The post thumbnail ID.
    179179                 * @param string|array $size              The post thumbnail size. Image size or array of width
    180180                 *                                        and height values (in that order). Default 'post-thumbnail'.
    181181                 */
    function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = 
    191191         *
    192192         * @param string       $html              The post thumbnail HTML.
    193193         * @param int          $post_id           The post ID.
    194          * @param string       $post_thumbnail_id The post thumbnail ID.
     194         * @param int          $post_thumbnail_id The post thumbnail ID.
    195195         * @param string|array $size              The post thumbnail size. Image size or array of width and height
    196196         *                                        values (in that order). Default 'post-thumbnail'.
    197197         * @param string       $attr              Query string of attributes.