Changeset 22847 for trunk/wp-admin/includes/ajax-actions.php
- Timestamp:
- 11/26/2012 10:08:50 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/ajax-actions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r22845 r22847 1948 1948 } 1949 1949 1950 $html = isset( $attachment['title'] ) ? $attachment['title'] : ''; 1950 $rel = $url = ''; 1951 $html = $title = isset( $attachment['post_title'] ) ? $attachment['post_title'] : ''; 1951 1952 if ( ! empty( $attachment['url'] ) ) { 1952 $ rel = '';1953 if ( strpos( $attachment['url'], 'attachment_id') || get_attachment_link( $id ) == $attachment['url'])1953 $url = $attachment['url']; 1954 if ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ) 1954 1955 $rel = ' rel="attachment wp-att-' . $id . '"'; 1955 $html = '<a href="' . esc_url( $ attachment['url']) . '"' . $rel . '>' . $html . '</a>';1956 $html = '<a href="' . esc_url( $url ) . '"' . $rel . '>' . $html . '</a>'; 1956 1957 } 1957 1958 … … 1959 1960 1960 1961 if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) { 1961 $url = $attachment['url']; 1962 $align = isset( $attachment['image-align'] ) ? $attachment['image-align'] : 'none'; 1962 $align = isset( $attachment['align'] ) ? $attachment['align'] : 'none'; 1963 1963 $size = isset( $attachment['image-size'] ) ? $attachment['image-size'] : 'medium'; 1964 $alt = isset( $attachment['image -alt'] ) ? $attachment['image-alt'] : '';1965 $caption = isset( $attachment[' caption'] ) ? $attachment['caption'] : '';1964 $alt = isset( $attachment['image_alt'] ) ? $attachment['image_alt'] : ''; 1965 $caption = isset( $attachment['post_excerpt'] ) ? $attachment['post_excerpt'] : ''; 1966 1966 $title = ''; // We no longer insert title tags into <img> tags, as they are redundant. 1967 1967 $html = get_image_send_to_editor( $id, $caption, $title, $align, $url, (bool) $rel, $size, $alt );
Note: See TracChangeset
for help on using the changeset viewer.