@@ 113-123 (lines=11) @@ | ||
110 | $image_size = isset( $gallery['size'] ) ? $gallery['size'] : 'thumbnail'; |
|
111 | foreach ( $image_ids as $image_id ) { |
|
112 | $image = wp_get_attachment_image_src( $image_id, $image_size ); |
|
113 | if ( ! empty( $image[0] ) ) { |
|
114 | list( $raw_src ) = explode( '?', $image[0] ); // pull off any Query string (?w=250) |
|
115 | $raw_src = wp_specialchars_decode( $raw_src ); // rawify it |
|
116 | $raw_src = esc_url_raw( $raw_src ); // clean it |
|
117 | $images[] = array( |
|
118 | 'type' => 'image', |
|
119 | 'from' => 'gallery', |
|
120 | 'src' => $raw_src, |
|
121 | 'href' => $permalink, |
|
122 | ); |
|
123 | } |
|
124 | } |
|
125 | } elseif ( ! empty( $gallery['src'] ) ) { |
|
126 | foreach ( $gallery['src'] as $src ) { |
|
@@ 125-137 (lines=13) @@ | ||
122 | ); |
|
123 | } |
|
124 | } |
|
125 | } elseif ( ! empty( $gallery['src'] ) ) { |
|
126 | foreach ( $gallery['src'] as $src ) { |
|
127 | list( $raw_src ) = explode( '?', $src ); // pull off any Query string (?w=250) |
|
128 | $raw_src = wp_specialchars_decode( $raw_src ); // rawify it |
|
129 | $raw_src = esc_url_raw( $raw_src ); // clean it |
|
130 | $images[] = array( |
|
131 | 'type' => 'image', |
|
132 | 'from' => 'gallery', |
|
133 | 'src' => $raw_src, |
|
134 | 'href' => $permalink, |
|
135 | ); |
|
136 | } |
|
137 | } |
|
138 | } |
|
139 | ||
140 | return $images; |