remove_image_size

Remove a new image size.

Description

remove_image_size( (string) $name ); 

Parameters (1)

0. $name (string)
The image size to remove.

Usage

  1. if ( !function_exists( 'remove_image_size' ) ) { 
  2. require_once ABSPATH . WPINC . '/media.php'; 
  3.  
  4. // The image size to remove. 
  5. $name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = remove_image_size($name); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/media.php  
  1. function remove_image_size( $name ) { 
  2. global $_wp_additional_image_sizes; 
  3.  
  4. if ( isset( $_wp_additional_image_sizes[ $name ] ) ) { 
  5. unset( $_wp_additional_image_sizes[ $name ] ); 
  6. return true; 
  7.  
  8. return false;