IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 945 | 945 | return false; |
| 946 | 946 | } |
| 947 | 947 | |
| 948 | | foreach ( array( 'png', 'gif', 'jpg', 'jpeg' ) as $ext ) { |
| | 948 | foreach ( wp_get_image_extensions() as $ext ) { |
| 949 | 949 | if ( file_exists( $this->get_stylesheet_directory() . "/screenshot.$ext" ) ) { |
| 950 | 950 | $this->cache_add( 'screenshot', 'screenshot.' . $ext ); |
| 951 | 951 | if ( 'relative' == $uri ) |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 5007 | 5007 | |
| 5008 | 5008 | switch ( $type ) { |
| 5009 | 5009 | case 'image': |
| 5010 | | $image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ); |
| 5011 | | return in_array( $ext, $image_exts ); |
| | 5010 | return in_array( $ext, wp_get_image_extensions() ); |
| 5012 | 5011 | |
| 5013 | 5012 | case 'audio': |
| 5014 | 5013 | return in_array( $ext, wp_get_audio_extensions() ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 6 | 6 | * @subpackage Media |
| 7 | 7 | */ |
| 8 | 8 | |
| | 9 | |
| | 10 | /** |
| | 11 | * Returns a filtered list of WP-supported image formats. |
| | 12 | * |
| | 13 | * @since 4.5.0 |
| | 14 | * |
| | 15 | * @return array Supported image formats. |
| | 16 | */ |
| | 17 | function wp_get_image_extensions() { |
| | 18 | /** |
| | 19 | * Filter the list of supported image formats. |
| | 20 | * |
| | 21 | * @since 4.5.0 |
| | 22 | * |
| | 23 | * @param array $extensions An array of support audio formats. Defaults are |
| | 24 | * 'jpg', 'jpeg', 'jpe', 'gif', 'png'. |
| | 25 | */ |
| | 26 | return apply_filters( 'wp_image_extensions', array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ) ); |
| | 27 | } |
| | 28 | |
| 9 | 29 | /** |
| 10 | 30 | * Scale down the default size of an image. |
| 11 | 31 | * |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 2375 | 2375 | |
| 2376 | 2376 | $matches = array(); |
| 2377 | 2377 | $ext = preg_match( '/\.([^.]+)$/', $img, $matches ) ? strtolower( $matches[1] ) : false; |
| 2378 | | $image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ); |
| 2379 | 2378 | |
| 2380 | 2379 | // Don't convert smilies that aren't images - they're probably emoji. |
| 2381 | | if ( ! in_array( $ext, $image_exts ) ) { |
| | 2380 | if ( ! in_array( $ext, wp_get_image_extensions() ) ) { |
| 2382 | 2381 | return $img; |
| 2383 | 2382 | } |
| 2384 | 2383 | |
| | 2384 | No newline at end of file |