cliff
10/11/2013 - 6:03 PM

Custom stuff for PageLines DMS additional image sizes - http://forums.appthemes.com/classipress-general-discussion/removing-add_image_size-p

<?php
// PageLines references
// https://github.com/pagelines/DMS/blob/Dev/includes/library.wordpress.php#L54
// 'aspect-thumb' not in use -- https://github.com/pagelines/DMS/search?q=aspect-thumb&type=Code
// 'basic-thumb' might be used by PopThumbs -- https://github.com/pagelines/DMS/blob/Dev/sections/popthumbs/section.php#L143
// 'landscape-thumb' used when PL settings have featured image on top of posts -- https://github.com/pagelines/DMS/blob/Dev/includes/class.posts.php#L396

// WordPress references
// http://codex.wordpress.org/Function_Reference/add_image_size
// http://codex.wordpress.org/Plugin_API/Filter_Reference/image_size_names_choose


function pl_dms_disable_image_sizes($sizes) {

	unset( $sizes['aspect-thumb']);
	// unset( $sizes['basic-thumb']);
	// unset( $sizes['landscape-thumb']);

	return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'pl_dms_disable_image_sizes');


function pl_dms_lemme_use_image_sizes($sizes) {

	// $sizes['aspect-thumb'] = __( 'PL Aspect Thumb', 'pagelines' );
	$sizes['basic-thumb'] = __( 'PL Basic Thumb', 'pagelines' );
	$sizes['landscape-thumb'] = __( 'PL Landscape Thumb', 'pagelines' );

	return $sizes;
}
add_filter('image_size_names_choose', 'pl_dms_lemme_use_image_sizes');