Make WordPress Core

Ticket #51362: 51362.diff

File 51362.diff, 976 bytes (added by johnbillion, 4 years ago)
  • src/wp-includes/media.php

     
    379379
    380380        $title = $title ? 'title="' . esc_attr( $title ) . '" ' : '';
    381381
    382         $class = 'align' . esc_attr( $align ) . ' size-' . esc_attr( $size ) . ' wp-image-' . $id;
     382        $size_class = is_array( $size ) ? implode( 'x', $size ) : $size;
     383        $class      = 'align' . esc_attr( $align ) . ' size-' . esc_attr( $size_class ) . ' wp-image-' . $id;
    383384
    384385        /**
    385386         * Filters the value of the attachment's image tag class attribute.
     
    23372338                </style>\n\t\t";
    23382339        }
    23392340
    2340         $size_class  = sanitize_html_class( $atts['size'] );
     2341        $size_class  = sanitize_html_class( is_array( $atts['size'] ) ? implode( 'x', $atts['size'] ) : $atts['size'] );
    23412342        $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
    23422343
    23432344        /**