diff --git wp-includes/media.php wp-includes/media.php
index 974aa79..f1f4574 100644
|
|
function gallery_shortcode( $attr ) { |
952 | 952 | 'size' => 'thumbnail', |
953 | 953 | 'include' => '', |
954 | 954 | 'exclude' => '', |
955 | | 'link' => '' |
| 955 | 'link' => '', |
| 956 | 'linksize' => '' |
956 | 957 | ), $attr, 'gallery')); |
957 | 958 | |
958 | 959 | $id = intval($id); |
… |
… |
function gallery_shortcode( $attr ) { |
1047 | 1048 | |
1048 | 1049 | $i = 0; |
1049 | 1050 | foreach ( $attachments as $id => $attachment ) { |
1050 | | if ( ! empty( $link ) && 'file' === $link ) |
1051 | | $image_output = wp_get_attachment_link( $id, $size, false, false ); |
1052 | | elseif ( ! empty( $link ) && 'none' === $link ) |
| 1051 | if ( ! empty( $link ) && 'file' === $link ) { |
| 1052 | if ( ! empty( $linksize ) ) { |
| 1053 | $image_src = wp_get_attachment_image_src( $id, $linksize ); |
| 1054 | $image_output = "<a href='" . $image_src[0]. "'>" . wp_get_attachment_image( $id, $size, false ) . "</a>"; |
| 1055 | } else { |
| 1056 | $image_output = wp_get_attachment_link( $id, $size, false, false ); |
| 1057 | } |
| 1058 | } elseif ( ! empty( $link ) && 'none' === $link ) { |
1053 | 1059 | $image_output = wp_get_attachment_image( $id, $size, false ); |
1054 | | else |
| 1060 | } else { |
1055 | 1061 | $image_output = wp_get_attachment_link( $id, $size, true, false ); |
| 1062 | } |
1056 | 1063 | |
1057 | 1064 | $image_meta = wp_get_attachment_metadata( $id ); |
1058 | 1065 | |