Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Forcing single thumbnail to be used on Facebook with "Facebook Like Thumbnail" plugin
<?php
/**
* Plugin Name: Facebook Like Thumbnail - Force Default Image everywhere
* Plugin URI: https://gist.github.com/ashfame/62f59587aaa5c8ecb1ce
* Description: Forces the default image to be used as FB Thumbnail for every page
* Author: Ashfame
* Author URI: http://ashfame.com/
*/
add_filter( 'fb_like_thumbnail_shortcircuit', 'force_single_fb_thumbnail' );
function force_single_fb_thumbnail( $shortcircuit ) {
if ( class_exists( 'Ashfame_Facebook_Like_Thumbnail' ) && ! empty( Ashfame_Facebook_Like_Thumbnail::$options['default'] ) ) {
return Ashfame_Facebook_Like_Thumbnail::$options['default'];
}
return $shortcircuit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.