diff --git wp-admin/includes/media.php wp-admin/includes/media.php
index 5e9912b..f45ac61 100644
|
|
|
function media_upload_form_handler() { |
| 445 | 445 | |
| 446 | 446 | if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { |
| 447 | 447 | $attachment = wp_unslash( $attachment ); |
| 448 | | |
| | 448 | |
| 449 | 449 | $post = $_post = get_post($attachment_id, ARRAY_A); |
| 450 | 450 | $post_type_object = get_post_type_object( $post[ 'post_type' ] ); |
| 451 | 451 | |
diff --git wp-includes/media-template.php wp-includes/media-template.php
index 7e79efd..61f1ee3 100644
|
|
|
function wp_print_media_templates() { |
| 353 | 353 | <option value="post"> |
| 354 | 354 | <?php esc_attr_e('Attachment Page'); ?> |
| 355 | 355 | </option> |
| | 356 | <option value="none"> |
| | 357 | <?php esc_attr_e('None'); ?> |
| | 358 | </option> |
| 356 | 359 | </select> |
| 357 | 360 | </label> |
| 358 | 361 | |
diff --git wp-includes/media.php wp-includes/media.php
index 2b770ce..db07c95 100644
|
|
|
function gallery_shortcode($attr) { |
| 763 | 763 | text-align: center; |
| 764 | 764 | width: {$itemwidth}%; |
| 765 | 765 | } |
| 766 | | #{$selector} img { |
| 767 | | border: 2px solid #cfcfcf; |
| 768 | | } |
| 769 | 766 | #{$selector} .gallery-caption { |
| 770 | 767 | margin-left: 0; |
| 771 | 768 | } |
| … |
… |
function gallery_shortcode($attr) { |
| 777 | 774 | |
| 778 | 775 | $i = 0; |
| 779 | 776 | foreach ( $attachments as $id => $attachment ) { |
| 780 | | $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); |
| | 777 | /* |
| | 778 | * Output image link. By default, image links to |
| | 779 | * attachment page. If link="file" is passed to |
| | 780 | * the shortcode, the image links directly to |
| | 781 | * the file. |
| | 782 | */ |
| | 783 | $image_link = isset( $attr['link'] ) && 'file' == $attr['link'] ? wp_get_attachment_link( $id, $size, false, false ) : wp_get_attachment_link( $id, $size, true, false ); |
| | 784 | /* |
| | 785 | * Output flat image. By default, image links to |
| | 786 | * attachment page. If link="none" is passed to |
| | 787 | * the shortcode, a flat (unlinked) image is |
| | 788 | * output. |
| | 789 | */ |
| | 790 | $flat_image = ( isset( $attr['link'] ) && 'none' == $attr['link'] ? wp_get_attachment_image( $id, $size, false ) : false ); |
| | 791 | // Determine whether to output a linked or flat image |
| | 792 | $image_output = ( $flat_image ? $flat_image : $image_link ); |
| 781 | 793 | |
| 782 | 794 | $output .= "<{$itemtag} class='gallery-item'>"; |
| 783 | 795 | $output .= " |
| 784 | 796 | <{$icontag} class='gallery-icon'> |
| 785 | | $link |
| | 797 | $image_output |
| 786 | 798 | </{$icontag}>"; |
| 787 | 799 | if ( $captiontag && trim($attachment->post_excerpt) ) { |
| 788 | 800 | $output .= " |