public function remove_default_image_sizes($sizes = [])
    {
        $user_sizes_to_remove = \collect(Config::get('images.image_sizes'))
            ->filter(
                function ($value) {
                    return $value === false;
                }
            )
            ->all();

        $user_sizes_to_remove = \array_keys($user_sizes_to_remove);

        $sizes_to_remove = \array_merge($user_sizes_to_remove, self::DEFAULT_IMAGE_SIZES);

        if (\is_array(\current($sizes))) {
            $sizes = \array_keys($sizes);
        }

        return \array_diff($sizes, $sizes_to_remove);
    }
public function remove_default_image_sizes($sizes = [])
    {
        $user_sizes_to_remove = \collect(Config::get('images.image_sizes'))
            ->filter(
                function ($value) {
                    return $value === false;
                }
            )
            ->all();

        $user_sizes_to_remove = \array_keys($user_sizes_to_remove);

        $sizes_to_remove = \array_merge($user_sizes_to_remove, self::DEFAULT_IMAGE_SIZES);

        if (\is_array(\current($sizes))) {
            $sizes = \array_keys($sizes);
        }

        return \array_diff($sizes, $sizes_to_remove);
    }
public function remove_default_image_sizes ( $ sizes = [ ] ) { $ user_sizes_to_remove = \ collect ( Config :: get ( 'images.image_sizes' ) ) -> filter ( function ( $ value ) { return $ value === false ; } ) -> all ( ) ; $ user_sizes_to_remove = \ array_keys ( $ user_sizes_to_remove ) ; $ sizes_to_remove = \ array_merge ( $ user_sizes_to_remove , self :: DEFAULT_IMAGE_SIZES ) ; if ( \ is_array ( \ current ( $ sizes ) ) ) { $ sizes = \ array_keys ( $ sizes ) ; } return \ array_diff ( $ sizes , $ sizes_to_remove ) ; }
Removes all built in image sizes, leaving only full and thumbnail.

@since  1.0.0

@param  array $sizes Current registered sizes.
@return array Modified $sizes array.
Removes all built in image sizes leaving only full and thumbnail .