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
/** | |
* MyBookTable: use book image as post thumbnail | |
*/ | |
//Find Book Image ID | |
add_filter( 'get_post_metadata', 'mbt_use_book_image_as_thumbnail', 10, 4 ); | |
function mbt_use_book_image_as_thumbnail( $null, $object_id, $meta_key, $single ) { | |
if ( '_thumbnail_id' !== $meta_key ) { | |
return $null; | |
} |