Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpc_remove_parent_theme_function() {
- remove_action( 'after_setup_theme', 'extra_add_image_sizes' );
- }
- function wpc_extra_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' => 9999,
- 'height' => 9999,
- 'crop' => false,
- ),
- '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' => 50,
- 'height' => 50,
- 'crop' => true,
- ),
- 'extra-image-730' => array(
- 'width' => 730,
- 'height' => 450,
- 'crop' => true,
- ),
- 'extra-image-220' => array(
- 'width' => 220,
- 'height' => 132,
- 'crop' => true,
- ),
- 'extra-image-150' => array(
- 'width' => 150,
- 'height' => 90,
- 'crop' => true,
- ),
- );
- foreach ( $sizes as $name => $size_info ) {
- add_image_size( $name, $size_info['width'], $size_info['height'], $size_info['crop'] );
- }
- }
- add_action( 'after_setup_theme', 'wpc_remove_parent_theme_function', 0 );
- add_action('after_setup_theme' , 'wpc_extra_add_image_sizes');
Advertisement
Add Comment
Please, Sign In to add comment