WordPress.org

Plugin Directory

Changeset 1695009


Ignore:
Timestamp:
07/12/17 08:41:14 (3 months ago)
Author:
mikeyott
Message:

Fixed Facebook scraping issue caused by double quotes in excerpts.
Pages now use truncated main content when excerpt does not exist.
Added media galley browsing button for when choosing a default image.
Added plugin activation message prompting users to set default thumbnail image.
Added translation support.

Location:
facebook-thumb-fixer
Files:
6 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • facebook-thumb-fixer/trunk/_facebook-thumb-fixer.php

    r1469119 r1695009  
    33Plugin Name: Facebook Thumb Fixer 
    44Plugin URI: https://wordpress.org/support/plugin/facebook-thumb-fixer 
    5 Description: Fixes the problem of the missing (or wrong) thumbnail when a post is shared on Facebook and Google+. 
     5Description: Control how your thumbnails are viewed when a post is shared on Facebook, Twitter and Google+. 
    66Author: Michael Ott 
    7 Version: 1.6 
     7Version: 1.7 
    88Author URI: http://michaelott.id.au 
     9Text Domain: fb-thumb-fixer 
     10Domain Path: /languages/ 
    911*/ 
    1012 
    11 // Additional contribution by MutebiRoy for Google+ full bleed image support (http://profiles.wordpress.org/mutebiroy/) 
    12  
     13// Look for translation file. 
     14function load_fbtf_textdomain() { 
     15    load_plugin_textdomain( 'facebook-thumbnail-fixer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 
     16} 
     17add_action( 'plugins_loaded', 'load_fbtf_textdomain' ); 
    1318// Add HELP link from the plugin page 
    1419add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'link_action_on_plugin' ); 
    1520function link_action_on_plugin( $links ) { 
    16     return array_merge(array('settings' => '<a href="' . admin_url( '/options-general.php' ) . '">' . __( 'Settings', 'domain' ) . '</a> | <a href="' . admin_url( '/options-general.php?page=facebook-thumb-fixer' ) . '">' . __( 'Help', 'domain' ) . '</a>'), $links); 
     21    return array_merge(array('settings' => '<a href="' . admin_url( '/options-general.php' ) . '">' . __( 'Settings', 'facebook-thumbnail-fixer' ) . '</a> | <a href="' . admin_url( '/options-general.php?page=facebook-thumb-fixer' ) . '">' . __( 'Help', 'facebook-thumbnail-fixer' ) . '</a>'), $links); 
    1722} 
    1823 
     
    2429add_action('admin_enqueue_scripts', 'admin_load_fbf_css'); 
    2530 
     31// Show message upon plugin activation 
     32register_activation_hook( __FILE__, 'ftf_admin_notice_activation_hook' ); 
     33  
     34// Runs only when the plugin is activated 
     35function ftf_admin_notice_activation_hook() { 
     36  
     37    /* Create transient data */ 
     38    set_transient( 'ftf-admin-notice', true, 1000 ); 
     39} 
     40 
     41/* Add admin notice */ 
     42add_action( 'admin_notices', 'ftf_admin_notice' ); 
     43  
     44// Admin Notice on Activation 
     45function ftf_admin_notice(){ 
     46  
     47    /* Check transient, if available display notice */ 
     48    if( get_transient( 'ftf-admin-notice' ) ){ 
     49        ?> 
     50        <div class="updated notice is-dismissible ir-admin-message"> 
     51            <?php $presentation_options_url = admin_url() . 'options-general.php#dfb'; ?> 
     52            <p><?php printf( __( "Awesome! Don't forget to set a default facebook thumbnail  <a href='%s'>here</a>.", "facebook-thumbnail-fixer" ), $presentation_options_url); ?></p> 
     53        </div> 
     54        <?php 
     55        /* Delete transient, only display this notice once. */ 
     56        delete_transient( 'ftf-admin-notice' ); 
     57    } 
     58} 
     59 
    2660// Add image path field into the general settings page 
    27 $general_setting_default_fb_thumb = new general_setting_default_fb_thumb(); 
     61$setting_default_fb_thumb = new general_setting_default_fb_thumb(); 
    2862class general_setting_default_fb_thumb { 
    2963    function general_setting_default_fb_thumb( ) { 
     
    3266    function register_fields() { 
    3367        register_setting( 'general', 'default_fb_thumb', 'esc_attr' ); 
    34         add_settings_field('dft', '<label for="default_fb_thumb" id="dfb">'.__('Default Facebook Thumb' , 'default_fb_thumb' ).'</label>' , array(&$this, 'fields_html') , 'general' ); 
     68        add_settings_field('dft', '<label for="default_fb_thumb" id="dfb">' . __('Default Facebook Thumb' , 'facebook-thumbnail-fixer' ) . '</label>' , array(&$this, 'fields_html') , 'general' ); 
    3569    } 
    3670    function fields_html() { 
    37         $fbt_value = get_option( 'default_fb_thumb', 'medium' ); 
    38         if ($fbt_value) { ?> 
    39  
    40         <input type="text" id="default_fb_thumb" class="regular-text ltr" name="default_fb_thumb" value="<?php echo $fbt_value; ?>" /> 
    41  
    42         <?php } else { ?> 
    43  
    44         <input type="text" id="default_fb_thumb" class="regular-text no-fb-thumb ltr" name="default_fb_thumb" value="<?php echo $fbt_value; ?>" /> 
    45  
    46         <?php } ?> 
     71        $fbt_value = get_option( 'default_fb_thumb');?> 
     72 
     73        <input id="default_fb_thumb" name="default_fb_thumb" type="text" value="<?php if($fbt_value) { esc_attr_e( $fbt_value ); } ?>" /> 
     74        <input id="default_fb_thumb_button" class="upload-button button" name="default_fb_thumb_button" type="text" value="<?php _e( 'Browse', 'facebook-thumbnail-fixer' ); ?>" /> 
     75        <script> 
     76            // Media uploader 
     77            jQuery(document).ready(function($) { 
     78            var _custom_media = true, 
     79            _orig_send_attachment = wp.media.editor.send.attachment; 
     80 
     81            $('.upload-button').click(function(e) { 
     82                var send_attachment_bkp = wp.media.editor.send.attachment; 
     83                var button = $(this); 
     84                var id = button.attr('id').replace('_button', ''); 
     85                _custom_media = true; 
     86                wp.media.editor.send.attachment = function(props, attachment){ 
     87                    if ( _custom_media ) { 
     88                        $("#"+id).val(attachment.url); 
     89                    } else { 
     90                        return _orig_send_attachment.apply( this, [props, attachment] ); 
     91                    }; 
     92                } 
     93 
     94                wp.media.editor.open(button); 
     95                return false; 
     96            }); 
     97 
     98            $('.add_media').on('click', function(){ 
     99                _custom_media = false; 
     100            }); 
     101        }); 
     102        </script> 
     103        <?php wp_enqueue_media(); ?> 
    47104 
    48105        <?php if ($fbt_value) { 
    49         list($width, $height) = @getimagesize($fbt_value); 
    50         echo '<span class="ftf-tick">&#10004;</span>'; 
    51         } 
    52         echo '<p class="description">This is the full path to your default thumb. Facebook <a href="https://developers.facebook.com/docs/sharing/best-practices#images" target="_blank">recommends</a> your image be 1200x630 or 600x315. View help topics <a href="' . admin_url( '/options-general.php?page=facebook-thumb-fixer' ) . '">here</a>.</p>'; 
    53         if ($fbt_value) { 
    54         echo '<a href="' . $fbt_value . '?TB_iframe=true&width=600&height=550" class="thickbox" title="Your default open graph image is ' . $width . ' x ' . $height . ' pixels."><img src="' . $fbt_value . '" title="Default Facebook Thumb" class="thickbox ftf-preview" /></a>'; 
    55         echo '<p class="description">Note: The image shown above is scaled down. The real dimensions are actually '; 
    56         echo $width . ' x ' . $height . '.</p>'; 
    57         if ($width < 600 || $height < 315) { 
    58             echo '<p class="ftf-warning"><strong>WARNING:</strong> Your default Facebook thumbnail image dimensions are smaller than the minimum 600 x 315 <a href="https://developers.facebook.com/docs/sharing/best-practices#images" target="_blank">recommended</a> by Facebook.</p>'; 
    59         } 
     106            list($width, $height) = @getimagesize($fbt_value); 
     107        } ?> 
     108 
     109        <p class="description"> 
     110            <?php  
     111                $fb_URL       = 'https://developers.facebook.com/docs/sharing/best-practices#images'; 
     112                $settings_URL = admin_url( '/options-general.php?page=facebook-thumb-fixer' ); 
     113            ?> 
     114            <?php echo sprintf( __( 'Browse to the preferred Facebook image for your homepage. Facebook <a href="%1$s" target="_blank">recommends</a> your image be 1200 x 630 or 600 x 315.', 'facebook-thumbnail-fixer' ), $fb_URL) ?> 
     115        </p> 
     116         
     117        <?php if ($fbt_value) { ?> 
     118        <a href="<?php echo $fbt_value; ?>?TB_iframe=true&width=600&height=550" class="thickbox"> 
     119        <img src="<?php echo $fbt_value; ?>" class="thickbox ftf-preview" /></a> 
     120 
     121        <p class="description"> 
     122            <?php echo sprintf( __( ' Note: The image shown above is scaled down. The real dimensions are actually %1$s x %2$s.', 'facebook-thumbnail-fixer' ), $width, $height) ?> 
     123        </p> 
     124        <?php if ($width < 600 || $height < 315) { ?> 
     125            <p class="ftf-warning"> 
     126                <?php echo sprintf( __( ' <strong>WARNING: </strong>Your default Facebook thumbnail image dimensions are smaller than the minimum 600 x 315 <a href="%1$s" target="_blank">recommended</a> by Facebook.', 'facebook-thumbnail-fixer' ), $fb_URL) ?> 
     127            </p> 
     128        <?php } 
    60129        } 
    61130    } 
     
    70139    function register_fields() { 
    71140        register_setting( 'general', 'fb_app_ID', 'esc_attr' ); 
    72         add_settings_field('faid', '<label for="fb_app_ID" id="fb_app_ID">'.__('Facebook App ID' , 'fb_app_ID' ).'</label>' , array(&$this, 'fb_app_ID_field') , 'general' ); 
     141        add_settings_field('faid', '<label for="fb_app_ID" id="fb_app_ID">' . __('Facebook App ID' , 'facebook-thumbnail-fixer' ).'</label>' , array(&$this, 'fb_app_ID_field') , 'general' ); 
    73142    } 
    74143    function fb_app_ID_field() { 
     
    76145         
    77146    <input type="text" id="fb_app_ID" class="regular-text ltr" name="fb_app_ID" value="<?php echo $fbaid_value; ?>" /> 
    78     <p class="description">Find your Facebook App ID <a href="https://developers.facebook.com/apps/" target="_blank">here</a>.</p> 
     147    <?php $fb_app_ID_URL = 'https://developers.facebook.com/apps/'; ?> 
     148    <p class="description"><?php echo sprintf( __( 'Find your Facebook App ID <a href="%1$s" target="_blank">here</a>.', 'facebook-thumbnail-fixer' ), $fb_app_ID_URL); ?></p> 
     149     
    79150    <?php } 
    80151} 
     
    89160    function register_object_type() { 
    90161        register_setting( 'general', 'homepage_object_type', 'esc_attr' ); 
    91         add_settings_field('object_type', '<label for="homepage_object_type">'.__('Homepage Object Type' , 'homepage_object_type' ).'</label>' , array(&$this, 'ot_fields_html') , 'general' ); 
     162        add_settings_field('object_type', '<label for="homepage_object_type">' . __('Homepage Object Type' , 'facebook-thumbnail-fixer' ) . '</label>' , array(&$this, 'ot_fields_html') , 'general' ); 
    92163    } 
    93164    function ot_fields_html() { ?> 
    94165 
    95         <?php   // Object Types 
    96                 // TODO: additional fields for specific object types (commented out below). 
     166        <?php 
     167             $hpot = get_option( 'homepage_object_type', ''); 
    97168        ?> 
    98         <select value="homepage_object_type" name="homepage_object_type"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "") { echo " class='no-object-type'"; } ?>> 
     169        <select value="homepage_object_type" name="homepage_object_type"<?php if($hpot == "") { echo " class='no-object-type'"; } ?>> 
    99170            <option></option> 
    100             <option value="article"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "article") { echo " selected"; } ?>>article</option> 
    101             <option value="book"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "book") { echo " selected"; } ?>>book</option> 
    102             <option value="books.author"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "books.author") { echo " selected"; } ?>>books.author</option> 
    103             <!--option value="books.book"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "books.book") { echo " selected"; } ?>>books.book</option--> 
    104             <!--option value="books.genre"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "books.genre") { echo " selected"; } ?>>books.genre</option--> 
    105             <!--option value="business.business"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "business.business") { echo " selected"; } ?>>business.business</option--> 
    106             <option value="fitness.course"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "fitness.course") { echo " selected"; } ?>>fitness.course</option> 
    107             <option value="fitness.unit"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "fitness.unit") { echo " selected"; } ?>>fitness.unit</option> 
    108             <option value="music.album"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "music.album") { echo " selected"; } ?>>music.album</option> 
    109             <option value="music.playlist"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "music.playlist") { echo " selected"; } ?>>music.playlist</option> 
    110             <option value="music.radio_station"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "music.radio_station") { echo " selected"; } ?>>music.radio_station</option> 
    111             <option value="music.song"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "music.song") { echo " selected"; } ?>>music.song</option> 
    112             <option value="object"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "object") { echo " selected"; } ?>>object</option> 
    113             <!--option value="place"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "place") { echo " selected"; } ?>>place</option--> 
    114             <option value="product"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "product") { echo " selected"; } ?>>product</option> 
    115             <option value="product.group"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "product.group") { echo " selected"; } ?>>product.group</option> 
    116             <!--option value="product.item"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "product.item") { echo " selected"; } ?>>product.item</option--> 
    117             <option value="profile"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "profile") { echo " selected"; } ?>>profile</option> 
    118             <!--option value="restaurant.menu"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "restaurant.menu") { echo " selected"; } ?>>restaurant.menu</option--> 
    119             <!--option value="restaurant.menu_item"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "restaurant.menu_item") { echo " selected"; } ?>>restaurant.menu_item</option--> 
    120             <!--option value="restaurant.menu_section"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "restaurant.menu_section") { echo " selected"; } ?>>restaurant.menu_section</option--> 
    121             <option value="restaurant.restaurant"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "restaurant.restaurant") { echo " selected"; } ?>>restaurant.restaurant</option> 
    122             <option value="video.episode"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "video.episode") { echo " selected"; } ?>>video.episode</option> 
    123             <option value="video.movie"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "video.movie") { echo " selected"; } ?>>video.movie</option> 
    124             <option value="video.other"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "video.other") { echo " selected"; } ?>>video.other</option> 
    125             <option value="video.tv_show"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "video.tv_show") { echo " selected"; } ?>>video.tv_show</option> 
    126             <option value="website"<?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "website") { echo " selected"; } ?>>website</option> 
     171            <option value="article"<?php if($hpot == "article") { echo " selected"; } ?>>article</option> 
     172            <option value="book"<?php if($hpot == "book") { echo " selected"; } ?>>book</option> 
     173            <option value="books.author"<?php if($hpot == "books.author") { echo " selected"; } ?>>books.author</option> 
     174            <option value="fitness.course"<?php if($hpot == "fitness.course") { echo " selected"; } ?>>fitness.course</option> 
     175            <option value="fitness.unit"<?php if($hpot == "fitness.unit") { echo " selected"; } ?>>fitness.unit</option> 
     176            <option value="music.album"<?php if($hpot == "music.album") { echo " selected"; } ?>>music.album</option> 
     177            <option value="music.playlist"<?php if($hpot == "music.playlist") { echo " selected"; } ?>>music.playlist</option> 
     178            <option value="music.radio_station"<?php if($hpot == "music.radio_station") { echo " selected"; } ?>>music.radio_station</option> 
     179            <option value="music.song"<?php if($hpot == "music.song") { echo " selected"; } ?>>music.song</option> 
     180            <option value="object"<?php if($hpot == "object") { echo " selected"; } ?>>object</option> 
     181            <option value="product"<?php if($hpot == "product") { echo " selected"; } ?>>product</option> 
     182            <option value="product.group"<?php if($hpot == "product.group") { echo " selected"; } ?>>product.group</option> 
     183            <option value="profile"<?php if($hpot == "profile") { echo " selected"; } ?>>profile</option> 
     184            <option value="restaurant.restaurant"<?php if($hpot == "restaurant.restaurant") { echo " selected"; } ?>>restaurant.restaurant</option> 
     185            <option value="video.episode"<?php if($hpot == "video.episode") { echo " selected"; } ?>>video.episode</option> 
     186            <option value="video.movie"<?php if($hpot == "video.movie") { echo " selected"; } ?>>video.movie</option> 
     187            <option value="video.other"<?php if($hpot == "video.other") { echo " selected"; } ?>>video.other</option> 
     188            <option value="video.tv_show"<?php if($hpot == "video.tv_show") { echo " selected"; } ?>>video.tv_show</option> 
     189            <option value="website"<?php if($hpot == "website") { echo " selected"; } ?>>website</option> 
    127190        </select> 
    128         <p>Learn about Object Types <a href="https://developers.facebook.com/docs/reference/opengraph" target="_blank">here</a>.</p> 
    129         <?php $hpot = get_option( 'homepage_object_type', ''); if($hpot == "") { ?> 
    130             <p class="howto"><strong>Note:</strong> When no selction is made, the Object Type for your home page will be 'website'.</p> 
    131  
    132             <?php require("inc-preview.php"); ?> 
    133  
    134         <?php } ?> 
     191 
     192        <?php $fb_object_types_URL = 'https://developers.facebook.com/docs/reference/opengraph'; ?> 
     193        <p><?php echo sprintf( __( 'Learn about Object Types <a href="%1$s" target="_blank">here</a>.', 'facebook-thumbnail-fixer' ), $fb_object_types_URL); ?></p> 
     194 
     195     
     196        <?php  
     197            $fbt_value = get_option( 'default_fb_thumb');  
     198            list($width, $height) = @getimagesize($fbt_value); 
     199            if($fbt_value && ($width >= 600 || $height >= 315)) { ?> 
     200            <?php include(locate_template(plugin_basename( __FILE__ ))) . 'home-preview.php'; ?> 
     201        <?php } else {  ?> 
     202            <p class="howto"><?php _e( '<strong>Note: </strong>If no selction is made, the Object Type for your home page will be "website".', 'facebook-thumbnail-fixer' ); ?></p> 
     203        <?php } ?> 
    135204 
    136205<?php } 
     
    179248        wp_nonce_field( plugin_basename( __FILE__ ), 'ftf_open_type__nounce' ); ?> 
    180249 
    181         <?php   // Object Types 
    182                 // TODO: additional fields for specific object types (commented out below). 
     250        <?php 
     251            $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); 
    183252        ?> 
    184253        <p><strong>Object Type</strong></p> 
    185254        <select value="ftf_open_type_field" name="ftf_open_type_field" style="width:100%;"> 
    186255            <option></option> 
    187             <option value="article"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "article") { echo " selected"; } ?>>article</option> 
    188             <option value="book"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "book") { echo " selected"; } ?>>book</option> 
    189             <option value="books.author"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "books.author") { echo " selected"; } ?>>books.author</option> 
    190             <!--option value="books.book"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "books.book") { echo " selected"; } ?>>books.book</option--> 
    191             <!--option value="books.genre"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "books.genre") { echo " selected"; } ?>>books.genre</option--> 
    192             <!--option value="business.business"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "business.business") { echo " selected"; } ?>>business.business</option--> 
    193             <option value="fitness.course"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "fitness.course") { echo " selected"; } ?>>fitness.course</option> 
    194             <option value="fitness.unit"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "fitness.unit") { echo " selected"; } ?>>fitness.unit</option> 
    195             <option value="music.album"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "music.album") { echo " selected"; } ?>>music.album</option> 
    196             <option value="music.playlist"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "music.playlist") { echo " selected"; } ?>>music.playlist</option> 
    197             <option value="music.radio_station"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "music.radio_station") { echo " selected"; } ?>>music.radio_station</option> 
    198             <option value="music.song"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "music.song") { echo " selected"; } ?>>music.song</option> 
    199             <option value="object"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "object") { echo " selected"; } ?>>object</option> 
    200             <!--option value="place"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "place") { echo " selected"; } ?>>place</option--> 
    201             <option value="product"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "product") { echo " selected"; } ?>>product</option> 
    202             <option value="product.group"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "product.group") { echo " selected"; } ?>>product.group</option> 
    203             <!--option value="product.item"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "product.item") { echo " selected"; } ?>>product.item</option--> 
    204             <option value="profile"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "profile") { echo " selected"; } ?>>profile</option> 
    205             <!--option value="restaurant.menu"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "restaurant.menu") { echo " selected"; } ?>>restaurant.menu</option--> 
    206             <!--option value="restaurant.menu_item"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "restaurant.menu_item") { echo " selected"; } ?>>restaurant.menu_item</option--> 
    207             <!--option value="restaurant.menu_section"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "restaurant.menu_section") { echo " selected"; } ?>>restaurant.menu_section</option--> 
    208             <option value="restaurant.restaurant"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "restaurant.restaurant") { echo " selected"; } ?>>restaurant.restaurant</option> 
    209             <option value="video.episode"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "video.episode") { echo " selected"; } ?>>video.episode</option> 
    210             <option value="video.movie"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "video.movie") { echo " selected"; } ?>>video.movie</option> 
    211             <option value="video.other"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "video.other") { echo " selected"; } ?>>video.other</option> 
    212             <option value="video.tv_show"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "video.tv_show") { echo " selected"; } ?>>video.tv_show</option> 
    213             <option value="website"<?php $ot = get_post_meta($post->ID, "ftf_open_type", TRUE); if($ot == "website") { echo " selected"; } ?>>website</option> 
     256            <option value="article"<?php if($ot == "article") { echo " selected"; } ?>>article</option> 
     257            <option value="book"<?php if($ot == "book") { echo " selected"; } ?>>book</option> 
     258            <option value="books.author"<?php if($ot == "books.author") { echo " selected"; } ?>>books.author</option> 
     259            <option value="fitness.course"<?php if($ot == "fitness.course") { echo " selected"; } ?>>fitness.course</option> 
     260            <option value="fitness.unit"<?php if($ot == "fitness.unit") { echo " selected"; } ?>>fitness.unit</option> 
     261            <option value="music.album"<?php if($ot == "music.album") { echo " selected"; } ?>>music.album</option> 
     262            <option value="music.playlist"<?php if($ot == "music.playlist") { echo " selected"; } ?>>music.playlist</option> 
     263            <option value="music.radio_station"<?php if($ot == "music.radio_station") { echo " selected"; } ?>>music.radio_station</option> 
     264            <option value="music.song"<?php if($ot == "music.song") { echo " selected"; } ?>>music.song</option> 
     265            <option value="object"<?php if($ot == "object") { echo " selected"; } ?>>object</option> 
     266            <option value="product"<?php if($ot == "product") { echo " selected"; } ?>>product</option> 
     267            <option value="product.group"<?php if($ot == "product.group") { echo " selected"; } ?>>product.group</option> 
     268            <option value="profile"<?php if($ot == "profile") { echo " selected"; } ?>>profile</option> 
     269            <option value="restaurant.restaurant"<?php if($ot == "restaurant.restaurant") { echo " selected"; } ?>>restaurant.restaurant</option> 
     270            <option value="video.episode"<?php if($ot == "video.episode") { echo " selected"; } ?>>video.episode</option> 
     271            <option value="video.movie"<?php if($ot == "video.movie") { echo " selected"; } ?>>video.movie</option> 
     272            <option value="video.other"<?php if($ot == "video.other") { echo " selected"; } ?>>video.other</option> 
     273            <option value="video.tv_show"<?php if($ot == "video.tv_show") { echo " selected"; } ?>>video.tv_show</option> 
     274            <option value="website"<?php if($ot == "website") { echo " selected"; } ?>>website</option> 
    214275        </select> 
    215         <p>If no selection is made, the Object Type for this post/page will be 'article'. Learn about Object Types <a href="https://developers.facebook.com/docs/reference/opengraph" target="_blank">here</a>.</p> 
    216  
    217         <?php require("inc-preview.php"); ?> 
     276 
     277        <p class="howto"><?php _e( '<strong>Note: </strong>If no selction is made, the Object Type for this post/page will be "article".', 'facebook-thumbnail-fixer' ); ?></p> 
     278         
     279        <?php $fb_object_types_URL = 'https://developers.facebook.com/docs/reference/opengraph/'; ?> 
     280        <p><?php echo sprintf( __( 'Learn about Object Types <a href="%1$s" target="_blank">here</a>.', 'facebook-thumbnail-fixer' ), $fb_object_types_URL); ?></p> 
     281     
     282        <?php include(locate_template(plugin_basename( __FILE__ ))) . 'post-preview.php'; ?> 
    218283 
    219284<?php  } 
     
    246311add_action( 'admin_menu', 'ftfixer_menu' ); 
    247312function ftfixer_menu() { 
    248     $icon_path = get_option('siteurl').'/wp-content/plugins/'.basename(dirname(__FILE__)).'/images/facebook-admin.png'; 
     313    $icon_path = plugins_url('images/', __FILE__ ) . 'facebook-admin.png'; 
    249314    add_menu_page( __( 'FB Thumb Fixer' ), __( 'FB Thumb Fixer' ), 'manage_options', 'facebook-thumb-fixer', 'myfbft_plugin_options' ,$icon_path); 
    250315} 
    251316function myfbft_plugin_options() { 
    252317    if ( !current_user_can( 'read' ) )  { // This help page is accessible to anyone 
    253         wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); 
     318        wp_die( __( 'You do not have sufficient permissions to access this page.', 'facebook-thumb-fixer' ) ); 
    254319} ?> 
    255320 
    256 <div class="task-rocket"> 
    257     <h3>Task Rocket</h3> 
    258     <p style="color:#fff; text-align:center;">The awesomest front-end project management theme built on WordPress.</p> 
    259     <p><a href="https://taskrocket.info/?source=ftf" target="_blank">Take it for a test flight</a></p> 
    260 </div> 
     321<a href="https://taskrocket.info/?source=ftf" target="_blank" class="task-rocket">Try</a></p> 
    261322 
    262323<div class="wrap ftf-wrap"> 
     
    266327    if ($fbt_value) { 
    267328    list($width, $height) = @getimagesize($fbt_value); ?> 
    268     <p class="ftf-good">Well done! You have a default Facebook thumbnail set. This will be used when a page or post you share doesn't already have a featured image. You can change the default image <a href="<?php echo get_admin_url(); ?>/options-general.php#dfb">here</a>.</p> 
     329 
     330    <?php $settings_URL = get_admin_url() . 'options-general.php#dfb'; ?> 
     331    <p class="ftf-good"><?php echo sprintf( __( 'Well done! You have a default Facebook thumbnail set. You can change it any time <a href="%1$s">here</a>.', 'facebook-thumbnail-fixer' ), $settings_URL); ?></p> 
    269332     
    270     <h2>Homepage Preview</h2> 
    271     <p>This is an approximate preview of your homepage when shared on Facebook:</p> 
     333    <h2><?php _e( 'Homepage Preview', 'facebook-thumbnail-fixer' ); ?></h2> 
     334    <p><?php _e( 'This is an approximate preview of your homepage when shared on Facebook:', 'facebook-thumbnail-fixer' ); ?></p> 
    272335     
    273336    <div class="ftf-live-home-preview"> 
    274         <img src="<?php echo get_option('siteurl').'/wp-content/plugins/'.basename(dirname(__FILE__)).'/images/preview-top.png'; ?>" /> 
    275      
     337        <img src="<?php echo plugins_url('images/', __FILE__ ) . 'preview-top.png'; ?>" /> 
     338 
    276339        <div class="ftf-preview-details"> 
    277      
    278             <a href="<?php echo $fbt_value; ?>?TB_iframe=true&width=600&height=550" class="thickbox" title="Your default open graph image is <?php echo $width . " x " . $height; ?> pixels."> 
    279             <img src="<?php echo $fbt_value; ?>" class="thickbox" /></a> 
    280      
    281             <h1><?php echo get_bloginfo( 'name' ); ?> <a href="<?php echo get_admin_url(); ?>/options-general.php" class="edit">(edit)</a></h1> 
    282      
     340 
     341            <div class="overflow home-thumb-image"> 
     342                <img src="<?php if($fbt_value) { esc_attr_e( $fbt_value ); } ?>" /> 
     343            </div> 
     344 
     345            <h1><?php echo get_bloginfo( 'name' ); ?></h1> 
     346 
    283347            <p> 
    284348                <?php 
    285                     $tagline = get_bloginfo( 'description' ); 
    286                     $tagline_chars = substr($tagline, 0, 150); 
    287                     echo strip_tags($tagline_chars); 
    288                 ?> <a href="<?php echo get_admin_url(); ?>/options-general.php" class="edit">(edit)</a> 
     349                    $description = get_bloginfo( 'description' ); 
     350                    if ( $description ) { 
     351                        $excerpt_chars = substr($description, 0, 150); 
     352                        echo strip_tags($excerpt_chars); 
     353                    } 
     354                ?> 
    289355            </p> 
    290356            <span class="ftf-domain"><?php echo $_SERVER['SERVER_NAME']; ?></span> 
     
    292358    </div> 
    293359     
    294     <p class="description">Note: Facebook <a href="https://developers.facebook.com/docs/sharing/best-practices#images" target="_blank">recommends</a> your image be 1200x630 or 600x315. Your image (show here scaled down) is <?php echo $width . " x " . $height; ?>.</p> 
    295     <?php 
    296     if ($width < 600 || $height < 315) { 
    297         echo '<p class="ftf-warning"><strong>WARNING:</strong> Although you do have a default Facebook thumbnail, the dimensions are smaller than the minimum 600 x 315 <a href="https://developers.facebook.com/docs/sharing/best-practices#images" target="_blank">recommended</a> by Facebook.</p>'; 
    298     } 
     360    <?php  
     361        $fb_URL       = 'https://developers.facebook.com/docs/sharing/best-practices#images'; 
    299362    ?> 
    300     <?php } else { ?> 
    301     <p class="ftf-bad">You currently do not have a Default Facebook Thumbnail set. Set one <a href="<?php echo get_admin_url(); ?>/options-general.php#dfb">here</a>. Facebook <a href="https://developers.facebook.com/docs/sharing/best-practices#images" target="_blank">recommends</a> your image be 1200x630 or 600x315.</p> 
     363    <p class="description"><?php echo sprintf( __( '<strong>Note:</strong> Facebook <a href="%1$s" target="_blank">recommends</a> your image be 1200 x 630 or 600 x 315. Your image (show here scaled down) is %2$s x %3$s.', 'facebook-thumbnail-fixer' ), $fb_URL, $width, $height) ?></p> 
     364 
     365    <?php $fb_URL     = 'https://developers.facebook.com/docs/sharing/best-practices#images';  
     366    if ($width < 600 || $height < 315) { ?> 
     367        <p class="ftf-warning"> 
     368            <?php echo sprintf( __( '<strong>WARNING:</strong> Although you do have a default Facebook thumbnail, the dimensions are smaller than the minimum 600 x 315 <a href="%1$s" target="_blank">recommended</a> by Facebook.', 'facebook-thumbnail-fixer' ), $fb_URL) ?> 
     369        </p> 
     370    <?php }  
     371    } else {  
     372        $settings_URL = get_admin_url() . 'options-general.php#dfb'; 
     373    ?> 
     374 
     375        <p class="ftf-bad"><?php echo sprintf( __( 'You currently do not have a Default Facebook Thumbnail set. Set one <a href="%1$s">here</a>.', 'facebook-thumbnail-fixer' ), $settings_URL) ?></p> 
     376 
    302377    <?php } ?> 
    303378 
     
    320395    }); 
    321396    </script> 
    322     <div class="ftf-help"> 
    323     <h3 class="ftf-header">Help Topics</h3> 
    324         <p class="topic">What does this plug-in do?</p> 
    325         <div class="help-answer"> 
    326             <p>This plug-in will place the appropriate  <a href="http://ogp.me/" target="_blank">Open Graph</a> meta properties into the &lt;head&gt; of your web pages, so that when someone links to your page on Facebook (or any other service that utilises the Open Graph protocol) the correct thumbnail and other information will show.</p> 
    327             <p>The thumbnail is derived from the featured image of your post (or page).</p> 
    328             <p>If your post does not have a featured image, then the <a href="<?php echo get_admin_url(); ?>/options-general.php#dfb">default thumbnail</a> will be used.</p> 
    329             <p>If someone links to your home page (which traditionally doesn't have a featured image) then the default image is used.</p> 
    330         </div> 
    331  
    332         <p class="topic">How does it work?</p> 
    333         <div class="help-answer"> 
    334             <p>Whenever anyone posts a website link to Facebook, the Facebook system searches the source code for the <a href="https://developers.facebook.com/docs/concepts/opengraph/" target="_blank">Open Graph</a>  meta properties. If they are not found, then it will instead pull (several) images (if any) contained within the web page. If there are multiple images pulled then the user can select one of the many presented (though the one they choose might not be the one you are happy to have as the primary image shown on Facebook, hence this plug-in).</p> 
    335             <p>This plug-in gets around that problem but taking  that choice away from the Facebook user, so only the thumbnail you want is displayed. This is also good in a situation where - for example - many different Facebook users share your web page,  you can trust the same thumbnail will always be used (the thumbnail might be of your brand for example).</p> 
    336         </div> 
    337  
    338         <p class="topic">How do I specify Object Types?</p> 
    339         <div class="help-answer"> 
    340             <h4>Posts and Pages</h4> 
    341             <p>On each page or post you edit there is an 'Open Graph Object Type' meta box. Simply make a section from there to specify what Object Type the page or post is. Example: If the it's an article, then choose 'article'. If it's a product, choose 'product'. To help you decide what Object Type to choose, go <a href="https://developers.facebook.com/docs/reference/opengraph" target="_blank">here</a> to learn the differences between them all.</p> 
    342             <p><strong>Note: </strong>If no selection is made for posts or pages then the Object Type will be 'article'.</p> 
    343             <h4>Homepage</h4> 
    344             <p>To specify what Object Type your homepage is, go to the Wordpress<strong> Settings -&gt; General</strong> page <a href="<?php echo get_admin_url(); ?>options-general.php">here</a> and make a selection from the 'Homepage Object Type' field.</p> 
    345             <p><strong>Note: </strong>If no selection is made for the homepage then the Object Type will be 'webpage'.</p> 
    346         </div> 
    347          
    348         <p class="topic">Where can I find my Facebook App ID</p> 
    349         <div class="help-answer"> 
    350             <p>If you have a Facebook App, you can get the App ID from <a href="https://developers.facebook.com/apps/" target="_blank">your developer dashboard</a>.</p> 
    351             <p>You can specify your Facebook App ID <a href="<?php echo get_admin_url(); ?>/options-general.php#fb_app_ID">here</a>.</p> 
    352         </div> 
    353  
    354         <p class="topic">How do I customise the text shown when a post is shared on Facebook?</p> 
    355         <div class="help-answer"> 
    356             <p>By default the description is derived from the content, but if you want to customise it then simply add content into the excerpt field.</p> 
    357         </div> 
    358          
    359         <p class="topic">How do I customise the text shown when the homepage is shared on Facebook?</p> 
    360         <div class="help-answer"> 
    361             <p>When your homepage is shared on Facebook, the content from the <a href="<?php echo get_admin_url(); ?>/options-general.php">tagline</a> is used.</p> 
    362         </div> 
    363  
    364         <p class="topic">How can I test a post/page without sharing it on Facebook first?</p> 
    365         <div class="help-answer"> 
    366             <p>Run the URL through the <a href='http://developers.facebook.com/tools/debug' target='_blank'>Facebook debugger</a> tool and examine the information that is returned. It's a good idea to hit the <strong>Scrape Again</strong> button to force Facebook to see the latest version of your page.</p> 
    367         </div> 
    368  
    369         <p class="topic">What if I don't use Featured Images?</p> 
    370         <div class="help-answer"> 
    371             <p>If you don't have featured images attached to your posts, then you can still use this plug-in just to show a default thumbnail on Facebook (as opposed to no thumbnail). This plug-in has been engineered so that if you don't use a featured image on posts then a default thumbnail is used instead. You can set a <strong>Default Facebook Thumb</strong> in the Wordpress<strong> Settings -&gt; General</strong> page <a href="<?php echo get_admin_url(); ?>options-general.php">here</a>.</p> 
    372         </div> 
    373  
    374         <p class="topic">Conflicts with other plug-ins</p> 
    375         <div class="help-answer"> 
    376             <p>Any other plug-in that inserts the open graph properties into the &lt;head&gt; of your website may cause a conflict and failure to work properly.</p> 
    377             <p>To test if you have a conflict, simply view the source code of your home page and search for any instances of <strong>og:</strong> within. Typically a plug-in will output the meta tags into it's own group. For this plug-in, they will be directly below the comment <strong>&lt;!--/ Facebook Thumb Fixer Open Graph /--&gt;</strong> but other plug-ins will output differently.</p> 
    378             <p>The only solution to resolve a conflict is to disable one of the plug-ins.</p> 
    379         </div> 
    380  
    381         <p class="topic">What if some posts use featured images and some don't?</p> 
    382         <div class="help-answer"> 
    383             <p>The <strong>Default Facebook Thumb</strong> is used  to fall back on in the event your post doesn't have a featured image. Ideally the <strong>Default Facebook Thumb</strong> image would be of your logo or brand. You can set a <strong>Default Facebook Thumb</strong> in the Wordpress <strong>Settings -&gt; General</strong> page <a href="<?php echo get_admin_url(); ?>options-general.php">here</a>.</p> 
    384         </div> 
    385  
    386         <p class="topic">Occasionally it doesn't work. What's going on?</p> 
    387         <div class="help-answer"> 
    388             <p>Blame Facebook for that. Even though their system searches for the og:image meta property, for different reasons (outside the control of this plug-in) sometimes  the thumbnail doesn't load on the Facebook post.</p> 
    389             <p>But don't fret, it's easy to get around. Using the official <a href='http://developers.facebook.com/tools/debug' target='_blank'>Facebook debugger</a> tool, paste in the URL of your post, hit the <strong>Debug</strong> button and see if the image thumb loads (scroll down to <strong>Object Properties</strong>). If it doesn't try hitting the <strong>Fetch new scrape information</strong> button.</p> 
    390         </div> 
    391  
    392         <p class="topic">The settings page isn't showing the dimensions of my image. What's up with that?</p> 
    393         <div class="help-answer"> 
    394             <p>This is extremely rare, and won't prevent the plug-in from doing it's job. But the most likely cause is a server side setting in php.ini that needs to be changed: <code>allow_url_fopen = On</code></p> 
    395         </div> 
    396  
    397         <p class="topic">Where can I get support?</p> 
    398         <div class="help-answer"> 
    399             <p>Reach for support at the <a href="https://wordpress.org/support/plugin/facebook-thumb-fixer">Wordpress plug-in repo</a>.</p> 
    400         </div> 
    401  
    402     </div> 
     397    <h3><?php _e( 'Where can I get support?', 'facebook-thumbnail-fixer' ); ?></h3> 
     398    <?php $support_URL = 'https://wordpress.org/support/plugin/facebook-thumb-fixer'; ?> 
     399    <p><?php echo sprintf( __( 'Reach for support at the <a href="%1$s" target="_blank">Wordpress plug-in repo</a>.', 'facebook-thumbnail-fixer' ), $support_URL) ?></p> 
    403400 
    404401</div> 
     
    412409 
    413410     // If BuddyPress is active 
    414     if ( is_plugin_active( 'buddypress/bp-loader.php' ) ) { 
     411    if ( is_plugin_active( 'buddypress/bp-loader.php' ) ) {          
    415412 
    416413        // If not on a BuddyPress members page 
    417414        if (!bp_current_component('members')) { 
    418  
    419              // If not the homepage 
    420             if ( !is_home() ) { 
    421  
    422                 // If there is a post image... 
    423                 if (has_post_thumbnail()) { 
    424                 // Set '$featuredimg' variable for the featured image. 
    425                 $featuredimg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "Full"); 
    426                 $ftf_description = get_the_excerpt($post); 
    427                 global $post; 
    428                 $ot = get_post_meta($post->ID, 'ftf_open_type', true); 
    429                 if($ot == "") { $default = "article"; } else $default = get_post_meta($post->ID, 'ftf_open_type', true); 
    430                 $ftf_head = ' 
    431                 <!--/ Facebook Thumb Fixer Open Graph /--> 
    432                 <meta property="og:type" content="'. $default . '" /> 
    433                 <meta property="og:url" content="' . get_permalink() . '" /> 
    434                 <meta property="og:title" content="' . wp_kses_data(get_the_title($post->ID)) . '" /> 
    435                 <meta property="og:description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    436                 <meta property="og:site_name" content="' . wp_kses_data(get_bloginfo('name')) . '" /> 
    437                 <meta property="og:image" content="' . $featuredimg[0] . '" /> 
    438  
    439                 <meta itemscope itemtype="'. $default . '" /> 
    440                 <meta itemprop="description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    441                 <meta itemprop="image" content="' . $featuredimg[0] . '" /> 
    442                 '; 
    443                 } //...otherwise, if there is no post image. 
    444                 else { 
    445                 $ftf_description = get_the_excerpt($post); 
    446                 global $post; 
    447                 $ot = get_post_meta($post->ID, 'ftf_open_type', true); 
    448                 if($ot == "") { $default = "article"; } else $default = get_post_meta($post->ID, 'ftf_open_type', true); 
    449                 $ftf_head = ' 
    450                 <!--/ Facebook Thumb Fixer Open Graph /--> 
    451                 <meta property="og:type" content="'. $default . '" /> 
    452                 <meta property="og:url" content="' . get_permalink() . '" /> 
    453                 <meta property="og:title" content="' . wp_kses_data(get_the_title($post->ID)) . '" /> 
    454                 <meta property="og:description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    455                 <meta property="og:site_name" content="' . wp_kses_data(get_bloginfo('name')) . '" /> 
    456                 <meta property="og:image" content="' . get_option('default_fb_thumb') . '" /> 
    457  
    458                 <meta itemscope itemtype="'. $default . '" /> 
    459                 <meta itemprop="description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    460                 <meta itemprop="image" content="' . get_option('default_fb_thumb') . '" /> 
    461                 '; 
    462                 } 
    463                 } //...otherwise, it must be the homepage so do this: 
    464                 else { 
    465                 $ftf_name = get_bloginfo('name'); 
    466                 $ftf_description = get_bloginfo('description'); 
    467                 $ot = get_option( 'homepage_object_type', ''); 
    468                 if($ot == "") { $default = "website"; } else $default = get_option( 'homepage_object_type', ''); 
    469                 $ftf_head = ' 
    470                 <!--/ Facebook Thumb Fixer Open Graph /--> 
    471                 <meta property="og:type" content="' . $default . '" /> 
    472                 <meta property="og:url" content="' . get_option('home') . '" /> 
    473                 <meta property="og:title" content="' . wp_kses($ftf_name, array ()) . '" /> 
    474                 <meta property="og:description" content="' . wp_kses_data($ftf_description, array ()) . '" /> 
    475                 <meta property="og:site_name" content="' . wp_kses($ftf_name, array ()) . '" /> 
    476                 <meta property="og:image" content="' . get_option('default_fb_thumb') . '" /> 
    477  
    478                 <meta itemscope itemtype="'. $default . '" /> 
    479                 <meta itemprop="description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    480                 <meta itemprop="image" content="' . get_option('default_fb_thumb') . '" /> 
    481                 '; 
    482             } 
     415            require('output-logic.php'); 
    483416        } 
    484     } // Otherwie, if BuddyPress is NOT active... 
     417         
     418    }  
     419     
     420    // Otherwie, if BuddyPress is NOT active... 
    485421    else if ( !is_plugin_active( 'buddypress/bp-loader.php' ) ) { 
    486  
    487         // If not the homepage 
    488         global $post; 
    489         if ( !is_home() ) { 
    490  
    491             // If there is a post image... 
    492             if (has_post_thumbnail()) { 
    493             // Set '$featuredimg' variable for the featured image. 
    494             $featuredimg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "Full"); 
    495             $ftf_description = get_the_excerpt($post); 
    496             global $post; 
    497             $ot = get_post_meta($post->ID, 'ftf_open_type', true); 
    498             if($ot == "") { $default = "article"; } else $default = get_post_meta($post->ID, 'ftf_open_type', true); 
    499             $ftf_head = ' 
    500             <!--/ Facebook Thumb Fixer Open Graph /--> 
    501             <meta property="og:type" content="'. $default . '" /> 
    502             <meta property="og:url" content="' . get_permalink() . '" /> 
    503             <meta property="og:title" content="' . wp_kses_data(get_the_title($post->ID)) . '" /> 
    504             <meta property="og:description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    505             <meta property="og:site_name" content="' . wp_kses_data(get_bloginfo('name')) . '" /> 
    506             <meta property="og:image" content="' . $featuredimg[0] . '" /> 
    507  
    508             <meta itemscope itemtype="'. $default . '" /> 
    509             <meta itemprop="description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    510             <meta itemprop="image" content="' . $featuredimg[0] . '" /> 
    511             '; 
    512             } //...otherwise, if there is no post image. 
    513             else { 
    514             $ftf_description = get_the_excerpt($post); 
    515             global $post; 
    516             $ot = get_post_meta($post->ID, 'ftf_open_type', true); 
    517             if($ot == "") { $default = "article"; } else $default = get_post_meta($post->ID, 'ftf_open_type', true); 
    518             $ftf_head = ' 
    519             <!--/ Facebook Thumb Fixer Open Graph /--> 
    520             <meta property="og:type" content="'. $default . '" /> 
    521             <meta property="og:url" content="' . get_permalink() . '" /> 
    522             <meta property="og:title" content="' . wp_kses_data(get_the_title($post->ID)) . '" /> 
    523             <meta property="og:description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    524             <meta property="og:site_name" content="' . wp_kses_data(get_bloginfo('name')) . '" /> 
    525             <meta property="og:image" content="' . get_option('default_fb_thumb') . '" /> 
    526  
    527             <meta itemscope itemtype="'. $default . '" /> 
    528             <meta itemprop="description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    529             <meta itemprop="image" content="' . get_option('default_fb_thumb') . '" /> 
    530             '; 
    531             } 
    532             } //...otherwise, it must be the homepage so do this: 
    533             else { 
    534             $ftf_name = get_bloginfo('name'); 
    535             $ftf_description = get_bloginfo('description'); 
    536             $ot = get_option( 'homepage_object_type', ''); 
    537             if($ot == "") { $default = "website"; } else $default = get_option( 'homepage_object_type', ''); 
    538             $ftf_head = ' 
    539                 <!--/ Facebook Thumb Fixer Open Graph /--> 
    540                 <meta property="og:type" content="' . $default . '" /> 
    541                 <meta property="og:url" content="' . get_option('home') . '" /> 
    542                 <meta property="og:title" content="' . wp_kses($ftf_name, array ()) . '" /> 
    543                 <meta property="og:description" content="' . wp_kses_data($ftf_description, array ()) . '" /> 
    544                 <meta property="og:site_name" content="' . wp_kses($ftf_name, array ()) . '" /> 
    545                 <meta property="og:image" content="' . get_option('default_fb_thumb') . '" /> 
    546  
    547                 <meta itemscope itemtype="'. $default . '" /> 
    548                 <meta itemprop="description" content="' . wp_kses($ftf_description, array ()) . '" /> 
    549                 <meta itemprop="image" content="' . get_option('default_fb_thumb') . '" /> 
    550             '; 
    551         } 
     422        require('output-logic.php'); 
    552423    } 
    553424         
    554   echo $ftf_head; 
    555   print "\n"; 
    556  $fbaid_value = get_option('fb_app_ID'); 
    557  if (!empty($fbaid_value)) { ?> 
    558                 <meta property="fb:app_id" content="<?php echo get_option('fb_app_ID'); ?>" /> 
    559   <?php } 
    560   print "\n"; 
    561 } 
     425    echo $ftf_head; 
     426    print "\n"; 
     427    $fbaid_value = get_option('fb_app_ID'); 
     428    if (!empty($fbaid_value)) { ?> 
     429    <meta property="fb:app_id" content="<?php echo get_option('fb_app_ID'); ?>" /> 
     430    <?php } 
     431    print "\n"; 
     432} 
  • facebook-thumb-fixer/trunk/css/ftf.css

    r1469119 r1695009  
    1 #dfb { 
    2   position: relative; 
    3 } 
    4  
    5 #default_fb_thumb { 
    6   width: 50%; 
    7 } 
    8  
    9 .no-fb-thumb, 
    10 .no-object-type { 
    11   border-bottom: solid 2px #e34c6b !important; 
    12 } 
    13  
    14 .ftf-tick { 
    15   font-size: 25px; 
    16   color: #7ad03a; 
    17 } 
    18  
    19 .ftf-preview { 
    20   width: 315px !important; 
    21   height: auto !important; 
    22   margin: 15px 0; 
    23   display: block; 
    24 } 
    25  
    26 .ftf-header { 
    27   padding: 25px 0 0 0; 
    28   margin: 25px 0 20px 0; 
    29 } 
    30  
    31 #toplevel_page_facebook-thumb-fixer img { 
    32   width: 16px; 
    33   height: 16px; 
    34 } 
    35  
    36 .ftf-live-preview, 
    37 .ftf-live-home-preview { 
    38   display: none; 
    39   width: 470px; 
    40   padding: 18px; 
    41   background: #fff; 
    42   position: fixed; 
    43   left: calc(50% - 235px); 
    44   top: 50%; 
    45   -webkit-transform: translateY(-50%); 
    46       -ms-transform: translateY(-50%); 
    47           transform: translateY(-50%); 
    48   z-index: 9999999; 
    49   box-shadow: 0 0 30px rgba(0, 0, 0, 0.4); 
    50 } 
    51  
    52 .ftf-live-preview.show-ftf-live-preview, 
    53 .ftf-live-home-preview.show-ftf-live-preview { 
    54   display: block; 
    55 } 
    56  
    57 .ftf-live-preview .wp-post-image, 
    58 .ftf-live-home-preview .wp-post-image { 
    59   width: 468px; 
    60   height: auto; 
    61   display: block; 
    62 } 
    63  
    64 .ftf-live-preview .ftf-preview-details, 
    65 .ftf-live-home-preview .ftf-preview-details { 
    66   padding: 10px; 
    67   border: solid 1px #e5e5e5; 
    68 } 
    69  
    70 .ftf-live-preview .ftf-preview-details h1, 
    71 .ftf-live-home-preview .ftf-preview-details h1 { 
    72   font-weight: normal; 
    73   font-size: 18px; 
    74   font-family: Georgia, 'lucida grande',tahoma,verdana,arial,sans-serif; 
    75   margin: 0 0 10px 0; 
    76   color: #000; 
    77   padding: 0; 
    78 } 
    79  
    80 .ftf-live-preview .ftf-preview-details p, 
    81 .ftf-live-home-preview .ftf-preview-details p { 
    82   font-size: 12px; 
    83   line-height: 16px; 
    84   font-family: helvetica, arial, 'lucida grande', sans-serif; 
    85   margin: 0; 
    86   color: #000; 
    87 } 
    88  
    89 .ftf-live-preview .ftf-preview-details .ftf-domain, 
    90 .ftf-live-home-preview .ftf-preview-details .ftf-domain { 
    91   font-size: 11px; 
    92   line-height: 11px; 
    93   text-transform: uppercase; 
    94   display: block; 
    95   margin: 10px 0 0 0; 
    96   color: #9197a3; 
    97 } 
    98  
    99 .ftf-live-preview .ftf-preview-details .overflow, 
    100 .ftf-live-home-preview .ftf-preview-details .overflow { 
    101   width: 468px; 
    102   max-height: 235px; 
    103   overflow: hidden; 
    104   margin: 0 0 5px 0; 
    105   border-bottom: solid 1px #e5e5e5; 
    106   position: relative; 
    107   top: -10px; 
    108   left: -10px; 
    109 } 
    110  
    111 .ftf-live-home-preview { 
    112   display: block; 
    113   position: relative; 
    114   top: auto; 
    115   left: auto; 
    116   -webkit-transform: translateY(0); 
    117       -ms-transform: translateY(0); 
    118           transform: translateY(0); 
    119   z-index: 2; 
    120   box-shadow: none; 
    121   margin: 25px 0; 
    122 } 
    123  
    124 .ftf-live-home-preview .edit { 
    125   display: none; 
    126   line-height: 1em; 
    127 } 
    128  
    129 .ftf-live-home-preview:hover .edit { 
    130   display: inline-block; 
    131   position: relative; 
    132 } 
    133  
    134 .ftf-live-home-preview .thickbox img { 
    135   width: calc(100% + 20px); 
    136   padding: 0; 
    137   margin: 0; 
    138   position: relative; 
    139   top: -10px; 
    140   left: -10px; 
    141   display: block; 
    142 } 
    143  
    144 .ftf-live-home-preview h1 a { 
    145   font-size: .65em; 
    146   font-family: sans-serif; 
    147 } 
    148  
    149 .open-ftf-preview, 
    150 .no-thumb-set, 
    151 .debugger-button { 
    152   background: #3b5998; 
    153   color: #fff; 
    154   padding: 5px 10px; 
    155   text-decoration: none; 
    156   border-radius: 3px; 
    157   text-align: center; 
    158   cursor: pointer; 
    159   display: inline-block; 
    160 } 
    161  
    162 .open-ftf-preview:hover, 
    163 .no-thumb-set:hover, 
    164 .debugger-button:hover { 
    165   color: #fff; 
    166   background: #00a0d2; 
    167 } 
    168  
    169 .open-ftf-preview:active, 
    170 .no-thumb-set:active, 
    171 .debugger-button:active { 
    172   color: #fff; 
    173 } 
    174  
    175 .open-ftf-preview::-moz-selection, 
    176 .no-thumb-set::-moz-selection, 
    177 .debugger-button::-moz-selection { 
    178   color: #fff; 
    179 } 
    180  
    181 .open-ftf-preview::selection, 
    182 .no-thumb-set::selection, 
    183 .debugger-button::selection { 
    184   color: #fff; 
    185 } 
    186  
    187 .debugger-button { 
    188   width: 67px; 
    189   background: #ce3895; 
    190   box-sizing: border-box; 
    191 } 
    192  
    193 .debugger-button:hover { 
    194   background: #f058b6; 
    195 } 
    196  
    197 .ftf-rule { 
    198   margin: 15px 0; 
    199   height: 1px; 
    200   border-top: dashed 1px #ccc; 
    201 } 
    202  
    203 .ftf-warning strong { 
    204   color: #ff0000; 
    205 } 
    206  
    207 .no-thumb-set { 
    208   background: #ccc; 
    209 } 
    210  
    211 .ftf-mask { 
    212   position: fixed; 
    213   top: 0; 
    214   left: 0; 
    215   width: 100%; 
    216   height: 100%; 
    217   background: #3b5998; 
    218   opacity: .7; 
    219   z-index: 999999 !important; 
    220   display: none; 
    221 } 
    222  
    223 .ftf-mask.show-ftf-mask { 
    224   display: block; 
    225 } 
    226  
    227 .ftf-help { 
    228   margin: 0 340px 0 0; 
    229 } 
    230  
    231 .topic { 
    232   padding: 5px 0; 
    233   margin: 0; 
    234   font-weight: bold; 
    235   cursor: pointer; 
    236 } 
    237  
    238 .open-help { 
    239   color: #0074a2; 
    240 } 
    241  
    242 .help-answer { 
    243   border-bottom: dashed 1px #ccc; 
    244   padding: 0 0 20px 25px; 
    245   margin: 0 0 20px 0; 
    246 } 
    247  
    248 .help-answer h4 { 
    249   color: #0074a2; 
    250 } 
    251  
    252 .task-rocket { 
    253   position: fixed; 
    254   bottom: 0; 
    255   right: -5px; 
    256   width: 300px; 
    257   padding: 35px 20px 35px 20px; 
    258   background: #f09950; 
    259   /* Old browsers */ 
    260   /* FF3.6-15 */ 
    261   /* Chrome10-25,Safari5.1-6 */ 
    262   background: linear-gradient(to bottom, #f09950 0%, #1d005c 100%); 
    263   /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ 
    264   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09950', endColorstr='#1d005c',GradientType=0 ); 
    265   /* IE6-9 */ 
    266   box-shadow: rgba(0, 0, 0, 0.0980392) 0px 1px 1px 0px; 
    267   margin: 55px 25px 0 0; 
    268   z-index: 9; 
    269   box-sizing: border-box; 
    270 } 
    271  
    272 .task-rocket:after { 
    273   content: ""; 
    274   display: block; 
    275   width: 260px; 
    276   height: 152px; 
    277   background: url(../images/tr-promo-background.png) no-repeat bottom; 
    278   background-size: 100%; 
    279 } 
    280  
    281 .task-rocket h3 { 
    282   color: #fff; 
    283   text-align: center; 
    284   text-transform: uppercase; 
    285   font-size: 2em; 
    286   margin: 0; 
    287 } 
    288  
    289 .task-rocket p { 
    290   margin: 25px 0; 
    291 } 
    292  
    293 .task-rocket a { 
    294   display: block; 
    295   width: 195px; 
    296   margin: 10px auto 0 auto; 
    297   font-weight: bold; 
    298   text-transform: uppercase; 
    299   color: #fff; 
    300   background: #fab13f; 
    301   border-bottom: solid 3px #e89b22; 
    302   padding: 14px 0; 
    303   text-decoration: none; 
    304   text-align: center; 
    305   border-radius: 3px; 
    306 } 
    307  
    308 .ftf-good { 
    309   background: #2CBB5F; 
    310   color: #fff; 
    311   padding: 15px; 
    312 } 
    313  
    314 .ftf-good a { 
    315   color: #fff; 
    316 } 
    317  
    318 .ftf-bad { 
    319   background: #e34c6b; 
    320   color: #fff; 
    321   padding: 15px; 
    322 } 
    323  
    324 .ftf-bad a { 
    325   color: #fff; 
    326 } 
     1#dfb{position:relative}#default_fb_thumb{width:50%}.no-fb-thumb,.no-object-type{border-bottom:solid 2px #e34c6b!important}.ftf-tick{font-size:25px;color:#7ad03a}.ftf-preview{width:315px!important;height:auto!important;margin:15px 0;display:block}.ftf-header{padding:25px 0 0 0;margin:25px 0 20px 0}#toplevel_page_facebook-thumb-fixer img{width:16px;height:16px}.home-thumb-image{display:block;height:250px}.home-thumb-image img{width:100%;height:auto;display:block;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ftf-live-home-preview,.ftf-live-preview{display:none;width:470px;padding:18px;background:#fff;position:fixed;left:calc(50% - 235px);top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:9999999;-webkit-box-shadow:0 0 30px rgba(0, 0, 0, 0.4);box-shadow:0 0 30px rgba(0, 0, 0, 0.4)}.ftf-live-home-preview.show-ftf-live-preview,.ftf-live-preview.show-ftf-live-preview{display:block}.ftf-live-home-preview .wp-post-image,.ftf-live-preview .wp-post-image{width:468px;height:auto;display:block}.ftf-live-home-preview .ftf-preview-details,.ftf-live-preview .ftf-preview-details{padding:10px;border:solid 1px #e5e5e5}.ftf-live-home-preview .ftf-preview-details h1,.ftf-live-preview .ftf-preview-details h1{font-weight:normal;font-size:18px;font-family:Georgia, 'lucida grande',tahoma,verdana,arial,sans-serif;margin:0 0 10px 0;color:#000;padding:0}.ftf-live-home-preview .ftf-preview-details img,.ftf-live-preview .ftf-preview-details img{display:block;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ftf-live-home-preview .ftf-preview-details p,.ftf-live-preview .ftf-preview-details p{font-size:12px;line-height:16px;font-family:helvetica, arial, 'lucida grande', sans-serif;margin:0;color:#000}.ftf-live-home-preview .ftf-preview-details .ftf-domain,.ftf-live-preview .ftf-preview-details .ftf-domain{font-size:11px;line-height:11px;text-transform:uppercase;display:block;margin:10px 0 0 0;color:#9197a3}.ftf-live-home-preview .ftf-preview-details .overflow,.ftf-live-preview .ftf-preview-details .overflow{width:468px;height:235px;overflow:hidden;margin:0 0 5px 0;border-bottom:solid 1px #e5e5e5;position:relative;top:-10px;left:-10px}#default_fb_thumb_button{width:80px;text-align:center}.ftf-live-home-preview{display:block;position:relative;top:auto;left:auto;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);z-index:2;-webkit-box-shadow:none;box-shadow:none;margin:25px 0}.ftf-live-home-preview .edit{display:none;line-height:1em}.ftf-live-home-preview:hover .edit{display:inline-block;position:relative}.ftf-live-home-preview .thickbox img{width:calc(100% + 20px);padding:0;margin:0;position:relative;top:-10px;left:-10px;display:block}.ftf-live-home-preview h1 a{font-size:.65em;font-family:sans-serif}.debugger-button,.no-thumb-set,.open-ftf-preview{background:#3b5998;color:#fff;padding:5px 10px;text-decoration:none;border-radius:3px;text-align:center;cursor:pointer;display:inline-block}.debugger-button:hover,.no-thumb-set:hover,.open-ftf-preview:hover{color:#fff;background:#00a0d2}.debugger-button:active,.no-thumb-set:active,.open-ftf-preview:active{color:#fff}.debugger-button::-moz-selection,.no-thumb-set::-moz-selection,.open-ftf-preview::-moz-selection{color:#fff}.debugger-button::selection,.no-thumb-set::selection,.open-ftf-preview::selection{color:#fff}.debugger-button{width:67px;background:#ce3895;-webkit-box-sizing:border-box;box-sizing:border-box}.debugger-button:hover{background:#f058b6}.ftf-rule{margin:15px 0;height:1px;border-top:dashed 1px #ccc}.ftf-warning strong{color:#ff0000}.no-thumb-set{background:#ccc}.ftf-mask{position:fixed;top:0;left:0;width:100%;height:100%;background:#3b5998;opacity:.7;z-index:999999!important;display:none}.ftf-mask.show-ftf-mask{display:block}.ftf-help{margin:0 340px 0 0}.topic{padding:5px 0;margin:0;font-weight:bold;cursor:pointer}.open-help{color:#0074a2}.help-answer{border-bottom:dashed 1px #ccc;padding:0 0 20px 25px;margin:0 0 20px 0}.help-answer h4{color:#0074a2}.task-rocket{position:fixed;bottom:0;right:-5px;width:270px;height:540px;text-indent:-9999em;display:block;-webkit-box-shadow:rgba(0, 0, 0, 0.0980392) 0px 1px 1px 0px;box-shadow:rgba(0, 0, 0, 0.0980392) 0px 1px 1px 0px;margin:55px 25px 0 0;z-index:9;-webkit-box-sizing:border-box;box-sizing:border-box;background:url("../images/task-rocket.png") no-repeat;background-size:cover;border-top-left-radius:5px;border-top-right-radius:5px}.task-rocket h3{color:#fff;text-align:center;text-transform:uppercase;font-size:2em;margin:0}.task-rocket p{margin:25px 0}.task-rocket a{display:block;width:195px;margin:10px auto 0 auto;font-weight:bold;text-transform:uppercase;color:#fff;background:#fab13f;border-bottom:solid 3px #e89b22;padding:14px 0;text-decoration:none;text-align:center;border-radius:3px}.ftf-good{background:#2CBB5F;color:#fff;padding:15px}.ftf-good a{color:#fff}.ftf-bad{background:#e34c6b;color:#fff;padding:15px}.ftf-bad a{color:#fff} 
  • facebook-thumb-fixer/trunk/css/ftf.scss

    r1469119 r1695009  
    3535        width: 16px; 
    3636        height: 16px; 
     37    } 
     38} 
     39 
     40.home-thumb-image { 
     41    display: block; 
     42    height: 250px; 
     43     
     44    img { 
     45        width: 100%; 
     46        height: auto; 
     47        display: block; 
     48        position: absolute; 
     49        top: 50%; 
     50        transform: translateY(-50%); 
    3751    } 
    3852} 
     
    7488        } 
    7589 
     90        img { 
     91            display: block; 
     92            position: absolute; 
     93            top: 50%; 
     94            transform: translateY(-50%); 
     95        } 
     96 
    7697        p { 
    7798            font-size: 12px; 
     
    93114        .overflow { 
    94115            width: 468px; 
    95             max-height: 235px; 
     116            height: 235px; 
    96117            overflow: hidden; 
    97118            margin: 0 0 5px 0; 
     
    105126        } 
    106127    } 
     128} 
     129 
     130#default_fb_thumb_button { 
     131    width: 80px; 
     132    text-align: center; 
    107133} 
    108134 
     
    242268    bottom:0; 
    243269    right:-5px; 
    244     width: 300px; 
    245     padding: 35px 20px 35px 20px; 
    246     background: #f09950; /* Old browsers */ 
    247     background: -moz-linear-gradient(top,  #f09950 0%, #1d005c 100%); /* FF3.6-15 */ 
    248     background: -webkit-linear-gradient(top,  #f09950 0%,#1d005c 100%); /* Chrome10-25,Safari5.1-6 */ 
    249     background: linear-gradient(to bottom,  #f09950 0%,#1d005c 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ 
    250     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09950', endColorstr='#1d005c',GradientType=0 ); /* IE6-9 */ 
     270    width: 270px; 
     271    height: 540px; 
     272    text-indent: -9999em; 
     273    display: block; 
    251274    box-shadow: rgba(0, 0, 0, 0.0980392) 0px 1px 1px 0px; 
    252275    margin: 55px 25px 0 0; 
    253276    z-index: 9; 
    254277    box-sizing: border-box; 
    255      
    256     &:after { 
    257         content: ""; 
    258         display: block; 
    259         width: 260px; 
    260         height: 152px; 
    261         background: url(../images/tr-promo-background.png) no-repeat bottom; 
    262         background-size: 100%; 
    263     } 
     278    background: url('../images/task-rocket.png') no-repeat; 
     279    background-size: cover; 
     280    border-top-left-radius: 5px; 
     281    border-top-right-radius: 5px; 
    264282 
    265283    h3 { 
  • facebook-thumb-fixer/trunk/readme.txt

    r1469119 r1695009  
    33Tags: facebook, thumb, fixer, default, thumbnail, thumbnails, thumbs, og:image, og:description, og:title, open, graph, open graph 
    44Requires at least: 4.0 
    5 Tested up to: 4.5.3 
     5Tested up to: 4.8 
    66Stable tag: trunk 
    77 
    8 Fixes the problem of the missing (or wrong) thumbnail when a post is shared on Facebook. 
     8Control how your thumbnails are viewed when a post is shared on Facebook, Twitter and Google+. 
    99 
    1010== Description == 
     
    1414It works by making sure the thumbnail is derived from the featured image of your post. If your post doesn't have a featured image then it will use a fall-back image that you can specify. 
    1515 
    16 The plug-in inserts the open graph meta properties, which Facebook and other social services look for when someone shares your page. These properties contain information about the page and of course the image you specify. 
     16The plug-in inserts the open graph meta properties which Facebook and other social services look for when someone shares your page. These properties specific information about the page and of course the image you specify. 
    1717 
    1818== Installation == 
     
    2828<a href="https://wordpress.org/support/plugin/facebook-thumb-fixer">Facebook Thumb Fixer Support</a> at the official Wordpress repository. 
    2929 
    30 Go to 'Facebook Thumb Fixer' in WordPress admin for more information about how it works, what it does, and how to resolve common problems. 
    31  
    3230== How to set a fall-back image == 
    3331 
    34 Go to Settings -> General and scroll down until you find 'Default Facebook Thumb'. Put the path to your fall-back image there. Make sure it's at least 1200x630 or 600x315. 
     32Go to Settings -> General and scroll down until you find 'Default Facebook Thumb'. Choose or upload a fall-back image. Make sure it's at least 1200x630 or 600x315. 
    3533 
    3634== How to set a Facebook App ID == 
     
    3836If you have a Facebook App, you can get the App ID from <a href="https://developers.facebook.com/apps/" target="_blank">your developer dashboard</a>. 
    3937 
    40 Specify your Facebook App ID Settings -> General. 
     38Specify your Facebook App ID Settings -> General and scroll down until you find 'Facebook App ID'. 
    4139 
    4240== How to set an object type == 
     
    5048<strong>Home page</strong> 
    5149 
    52 To specify what Object Type your homepage is, go to the Wordpress Settings -> General page and make a selection from the 'Home page Object Type' field. 
     50To specify what Object Type your homepage is, go to Settings -> General, scroll down until you find 'Homepage Object Type' and make a selection. After you've specified a Default Facebook Thumb, Homepage Object Type and saved the options, you'll then be able to view an approximate preview of your homepage when shared on Facebook. 
    5351 
    54 Note: If no selection is made for the home page then the Object Type will be 'webpage', which in most cases is probably what you want. 
     52Note: If no selection is made for the home page then the Object Type will default to 'webpage', which in most cases is probably what you want. 
    5553 
    5654== Changelog == 
     55 
     56= 1.7 = 
     57 
     58Fixed Facebook scraping issue caused by double quotes in excerpts. 
     59Pages now use truncated main content when excerpt does not exist. 
     60Added media galley browsing button for when choosing a default image. 
     61Added plugin activation message prompting users to set default thumbnail image. 
     62Added translation support. 
    5763 
    5864= 1.6 = 
Note: See TracChangeset for help on using the changeset viewer.