'' . __( 'Settings', 'facebook-thumb-fixer' ) . ' | ' . __( 'Help', 'facebook-thumb-fixer' ) . ''), $links); } // Include custom CSS function admin_load_fbf_css(){ wp_enqueue_style('stylsheet', plugins_url( '/css/ftf.css', __FILE__ ) ); add_thickbox(); } add_action('admin_enqueue_scripts', 'admin_load_fbf_css'); // Show message upon plugin activation register_activation_hook( __FILE__, 'ftf_admin_notice_activation_hook' ); // Runs only when the plugin is activated function ftf_admin_notice_activation_hook() { /* Create transient data */ set_transient( 'ftf-admin-notice', true, 1000 ); } /* Add admin notice */ add_action( 'admin_notices', 'ftf_admin_notice' ); // Admin Notice on Activation function ftf_admin_notice(){ /* Check transient, if available display notice */ if( get_transient( 'ftf-admin-notice' ) ){ ?>

here.", "facebook-thumb-fixer" ), $presentation_options_url); ?>

' . __('Default Facebook Thumb' , 'facebook-thumb-fixer' ) . '' , array(&$this, 'fields_html') , 'general' ); } function fields_html() { $fbt_value = get_option( 'default_fb_thumb'); $fb_URL = 'https://developers.facebook.com/docs/sharing/best-practices#images'; $settings_URL = admin_url( '/options-general.php?page=facebook-thumb-fixer' ); $home_image_ID = attachment_url_to_postid( $fbt_value ); // Get the ID of the default image $image_attributes = wp_get_attachment_image_src( $attachment_id = $home_image_ID, 'full' ); // Get the image attributes of the default image $width = $image_attributes[1]; // Get the width $height = $image_attributes[2]; // Get the height ?>

recommends your image be 1200 x 630 or 600 x 315.', 'facebook-thumb-fixer' ), $fb_URL) ?>

Oops! Your default Facebook image is smaller than the minimum 600 x 315 recommended by Facebook.', 'facebook-thumb-fixer' ), $fb_URL) ?>

' . __('Facebook App ID' , 'facebook-thumb-fixer' ).'' , array(&$this, 'fb_app_ID_field') , 'general' ); } function fb_app_ID_field() { $fbaid_value = get_option( 'fb_app_ID', '' ); ?>

here.', 'facebook-thumb-fixer' ), $fb_app_ID_URL); ?>

' . __('Homepage Object Type' , 'facebook-thumb-fixer' ) . '' , array(&$this, 'ot_fields_html') , 'general' ); } function ot_fields_html() { ?>

here.', 'facebook-thumb-fixer' ), $fb_object_types_URL); ?>

= 600 || $height >= 315)) { ?>

Note: If no selection is made, the Object Type for your home page will be "website".', 'facebook-thumb-fixer' ); ?>

ID, "ftf_open_type", TRUE); $dog = get_post_meta($post->ID, "disable_open_graph", TRUE); $current_screen = get_current_screen(); if ($current_screen ->id === 'post') { $post_type_label = 'post'; } else if ($current_screen ->id === 'page') { $post_type_label = 'page'; } else { $post_type_label = ''; } ?>

Object Type

here.', 'facebook-thumb-fixer' ), $post_type_label, $fb_object_types_URL); ?>

">

">

>

Facebook Thumb Fixer

here.', 'facebook-thumb-fixer' ), $settings_URL); ?>

Note: Facebook recommends your image be 1200 x 630 or 600 x 315.', 'facebook-thumb-fixer' ), $fb_URL); ?> = 600 && $height >= 315) { ?>

Oops! Although you do have a default Facebook thumbnail, the dimensions are smaller than the minimum 600 x 315 recommended by Facebook.', 'facebook-thumb-fixer' ), $fb_URL); ?>

here.', 'facebook-thumb-fixer' ), $settings_URL); ?>

Wordpress plug-in repo.', 'facebook-thumb-fixer' ), $support_URL) ?>