Skip to content

Instantly share code, notes, and snippets.

@themeblvd
Last active August 29, 2015 14:04
Show Gist options
  • Save themeblvd/f26312fb3480ba9f846b to your computer and use it in GitHub Desktop.
Save themeblvd/f26312fb3480ba9f846b to your computer and use it in GitHub Desktop.
In framework 2.5, featured image size options were limited to show/hide. However, framework will still process options onto old content files (if theme has them). To put this all back in place, simply add the options back with the following.
<?php
/**
* In framework 2.5, featured image size options were
* limited to show/hide. However, framework will still
* process options onto old content files (if theme has them).
* To put this all back in place, simply add the options
* back with the following.
*/
function theme_featured_image_options( $options ) {
$items = array('single_thumbs', 'blog_thumbs', 'archive_thumbs');
foreach ( $items as $item ) {
$options[$item]['options'] = array(
'small' => __( 'Show small featured images', 'themeblvd' ),
'full' => __( 'Show full-width featured images', 'themeblvd' ),
'hide' => __( 'Hide featured images', 'themeblvd' )
);
}
return $options;
}
add_filter( 'themeblvd_formatted_options', 'theme_featured_image_options' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment