Last active
December 20, 2015 11:09
-
-
Save Mamaduka/6120727 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Add specific thumbnail size for posts and pages. | |
*/ | |
function wysija_set_thumbnail_size() { | |
$model_config = WYSIJA::get( 'config', 'model' ); | |
// Holds arry of thumbnail sizes | |
$sizes = $model_config->getValue('thumb_size'); | |
add_image_size( 'single-post-thumbnail', $sizes['width'], $sizes['height'], true ); | |
} | |
add_action( 'after_setup_theme', 'wysija_set_thumbnail_size' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment