| @@ 136-146 (lines=11) @@ | ||
| 133 | $image_size = isset( $gallery['size'] ) ? $gallery['size'] : 'thumbnail'; |
|
| 134 | foreach ( $image_ids as $image_id ) { |
|
| 135 | $image = wp_get_attachment_image_src( $image_id, $image_size ); |
|
| 136 | if ( ! empty( $image[0] ) ) { |
|
| 137 | list( $raw_src ) = explode( '?', $image[0] ); // pull off any Query string (?w=250) |
|
| 138 | $raw_src = wp_specialchars_decode( $raw_src ); // rawify it |
|
| 139 | $raw_src = esc_url_raw( $raw_src ); // clean it |
|
| 140 | $images[] = array( |
|
| 141 | 'type' => 'image', |
|
| 142 | 'from' => 'gallery', |
|
| 143 | 'src' => $raw_src, |
|
| 144 | 'href' => $permalink, |
|
| 145 | ); |
|
| 146 | } |
|
| 147 | } |
|
| 148 | } elseif ( ! empty( $gallery['src'] ) ) { |
|
| 149 | foreach ( $gallery['src'] as $src ) { |
|
| @@ 148-160 (lines=13) @@ | ||
| 145 | ); |
|
| 146 | } |
|
| 147 | } |
|
| 148 | } elseif ( ! empty( $gallery['src'] ) ) { |
|
| 149 | foreach ( $gallery['src'] as $src ) { |
|
| 150 | list( $raw_src ) = explode( '?', $src ); // pull off any Query string (?w=250) |
|
| 151 | $raw_src = wp_specialchars_decode( $raw_src ); // rawify it |
|
| 152 | $raw_src = esc_url_raw( $raw_src ); // clean it |
|
| 153 | $images[] = array( |
|
| 154 | 'type' => 'image', |
|
| 155 | 'from' => 'gallery', |
|
| 156 | 'src' => $raw_src, |
|
| 157 | 'href' => $permalink, |
|
| 158 | ); |
|
| 159 | } |
|
| 160 | } |
|
| 161 | } |
|
| 162 | ||
| 163 | return $images; |
|