| @@ 2243-2252 (lines=10) @@ | ||
| 2240 | } |
|
| 2241 | $primary = true; |
|
| 2242 | array_unshift( $default_types, 'src' ); |
|
| 2243 | } else { |
|
| 2244 | foreach ( $default_types as $ext ) { |
|
| 2245 | if ( ! empty( $atts[ $ext ] ) ) { |
|
| 2246 | $type = wp_check_filetype( $atts[ $ext ], wp_get_mime_types() ); |
|
| 2247 | if ( strtolower( $type['ext'] ) === $ext ) { |
|
| 2248 | $primary = true; |
|
| 2249 | } |
|
| 2250 | } |
|
| 2251 | } |
|
| 2252 | } |
|
| 2253 | ||
| 2254 | if ( ! $primary ) { |
|
| 2255 | $audios = get_attached_media( 'audio', $post_id ); |
|
| @@ 2480-2489 (lines=10) @@ | ||
| 2477 | ||
| 2478 | $primary = true; |
|
| 2479 | array_unshift( $default_types, 'src' ); |
|
| 2480 | } else { |
|
| 2481 | foreach ( $default_types as $ext ) { |
|
| 2482 | if ( ! empty( $atts[ $ext ] ) ) { |
|
| 2483 | $type = wp_check_filetype( $atts[ $ext ], wp_get_mime_types() ); |
|
| 2484 | if ( strtolower( $type['ext'] ) === $ext ) { |
|
| 2485 | $primary = true; |
|
| 2486 | } |
|
| 2487 | } |
|
| 2488 | } |
|
| 2489 | } |
|
| 2490 | ||
| 2491 | if ( ! $primary ) { |
|
| 2492 | $videos = get_attached_media( 'video', $post_id ); |
|