This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
programmieren:wordpress:image_sizes_und_compression [2020/10/09 07:10] – created jgehrke | programmieren:wordpress:image_sizes_und_compression [2022/12/17 12:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 27: | Line 27: | ||
*/ | */ | ||
function image_sizes() { | function image_sizes() { | ||
- | | + | add_image_size( ' |
- | add_image_size( ' | + | add_image_size( ' |
- | add_image_size( ' | + | add_image_size( ' |
- | add_image_size( ' | + | add_image_size( ' |
} | } | ||
add_action( ' | add_action( ' | ||
Line 38: | Line 38: | ||
*/ | */ | ||
function image_sizes_admin_names( $sizes ) { | function image_sizes_admin_names( $sizes ) { | ||
- | return | + | if( is_array( $sizes ) ) { // Kann auch String sein manchmal, dann kommt ne Warning. |
- | ' | + | $sizes = array_merge( $sizes, array( |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ) ); | + | ' |
+ | ) ); | ||
+ | } | ||
+ | return $sizes; | ||
} | } | ||
add_filter( ' | add_filter( ' | ||
</ | </ |