Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ec_after_setup() {
- remove_action( 'after_setup_theme', 'extra_add_image_sizes' );
- add_action( 'after_setup_theme', 'ec_add_image_sizes' );
- }
- add_action( 'after_setup_theme', 'ec_after_setup', 1 );
- function ec_add_image_sizes() {
- $sizes = array(
- 'extra-image-huge' => array(
- 'width' => 1280,
- 'height' => 768,
- 'crop' => true,
- ),
- 'extra-image-single-post' => array(
- 'width' => 1280,
- 'height' => 640,
- 'crop' => true,
- ),
- 'extra-image-medium' => array(
- 'width' => 627,
- 'height' => 999,
- 'crop' => true,
- ),
- 'extra-image-small' => array(
- 'width' => 440,
- 'height' => 264,
- 'crop' => true,
- ),
- 'extra-image-square-medium' => array(
- 'width' => 440,
- 'height' => 440,
- 'crop' => true,
- ),
- 'extra-image-square-small' => array(
- 'width' => 150,
- 'height' => 150,
- 'crop' => true,
- ),
- );
- foreach ( $sizes as $name => $size_info ) {
- add_image_size( $name, $size_info['width'], $size_info['height'], $size_info['crop'] );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement