Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created October 11, 2013 18:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save cliffordp/6939316 to your computer and use it in GitHub Desktop.
Save cliffordp/6939316 to your computer and use it in GitHub Desktop.
<?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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment