wordpress/wp-content/plugins/simple-image-sizes/classes/Main.php
/**
	 * Override the images by the plugin images
	 *
	 * @access public
	 * @return void
	 * @author Nicolas Juen
	 */
Override the images by the plugin images
@access public
@return void
@author Nicolas Juen
Override the images by the plugin images @access public @return void @author Nicolas Juen
public static function after_setup_theme() {
		$sizes = get_option( SIS_OPTION, [] );
		if ( empty( $sizes ) || ! is_array( $sizes ) ) {
			return;
		}
		foreach ( $sizes as $name => $size ) {
			if ( empty( $size ) || ! isset( $size['w'] ) || ! isset( $size['h'] ) ) {
				continue;
			}
			$crop = ( isset( $size['c'] ) && ! empty( $size['c'] ) ) ? $size['c'] : false;
			if ( is_bool( $crop ) || is_numeric( $crop ) ) {
				$crop = ( 0 === absint( $crop ) ) ? false : true;
			} elseif ( is_string( $crop ) ) {
				$crop = explode( '_', $crop );
			}
			add_image_size( $name, $size['w'], $size['h'], $crop );
		}
	}
public static function after_setup_theme ( ) { $ sizes = get_option ( SIS_OPTION , [ ] ) ; if ( empty ( $ sizes ) || ! is_array ( $ sizes ) ) { return ; } foreach ( $ sizes as $ name => $ size ) { if ( empty ( $ size ) || ! isset ( $ size [ 'w' ] ) || ! isset ( $ size [ 'h' ] ) ) { continue ; } $ crop = ( isset ( $ size [ 'c' ] ) && ! empty ( $ size [ 'c' ] ) ) ? $ size [ 'c' ] : false ; if ( is_bool ( $ crop ) || is_numeric ( $ crop ) ) { $ crop = ( 0 === absint ( $ crop ) ) ? false : true ; } elseif ( is_string ( $ crop ) ) { $ crop = explode ( '_' , $ crop ) ; } add_image_size ( $ name , $ size [ 'w' ] , $ size [ 'h' ] , $ crop ) ; } }
Override the images by the plugin images
 @access public
 @return void
 @author Nicolas Juen
Override the images by the plugin images @access public @return void @author Nicolas Juen
// Get initial options. // Return false if empty. // Set the new sizes. // Add the images sizes.