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
/** | |
* Plugin Name: Web Stories Additional GA Tracking | |
* Description: Mini-plugin to add an additional Google Analytics tracking code to web stories | |
* Plugin URI: https://wp.stories.google/ | |
* Author: Pascal Birchler, Google | |
* Author URI: https://opensource.google.com/ | |
* Version: 0.0.1 | |
* License: Apache License 2.0 | |
* License URI: https://www.apache.org/licenses/LICENSE-2.0 |
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 | |
function remove_post_thumbnail($metadata, $object_id, $meta_key, $single){ | |
if( isset($meta_key) && '_thumbnail_id' === $meta_key && is_single() ) | |
return false; | |
else | |
return $metadata; | |
} | |
add_filter('get_post_metadata', 'remove_post_thumbnail', true, 4); |