Forked from cliffordp/pagelines-dms-customize-image-sizes.php
Last active
December 26, 2015 02:18
-
-
Save schutzsmith/7077016 to your computer and use it in GitHub Desktop.
Pagelines customize image sizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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