Description: Inserts Facebook Open Graph, Google+ / Schema.org and Twitter Card Tags into your WordPress Blog/Website for more effective and efficient Facebook, Google+ and Twitter sharing results. You can also choose to insert the "enclosure" and "media:content" tags to the RSS feeds, so that apps like RSS Graffiti and twitterfeed post the image to Facebook correctly. Version: 1.7 Author: Webdados Author URI: http://www.webdados.pt Text Domain: wd-fb-og Domain Path: /lang */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly $webdados_fb_open_graph_plugin_version = '1.7'; $webdados_fb_open_graph_plugin_name = 'Facebook Open Graph, Google+ and Twitter Card Tags'; $webdados_fb_open_graph_plugin_settings = array('fb_app_id_show', 'fb_app_id', 'fb_admin_id_show', 'fb_admin_id', 'fb_locale_show', 'fb_locale', 'fb_sitename_show', 'fb_title_show', 'fb_title_show_schema', 'fb_title_show_twitter', 'fb_url_show', 'fb_url_show_twitter', 'fb_url_canonical', 'fb_url_add_trailing', 'fb_type_show', 'fb_type_homepage', 'fb_article_dates_show', 'fb_article_sections_show', 'fb_publisher_show', 'fb_publisher', 'fb_publisher_show_schema', 'fb_publisher_schema', 'fb_publisher_show_twitter', 'fb_publisher_twitteruser', 'fb_author_show', 'fb_author_show_meta', 'fb_author_show_linkrelgp', 'fb_author_show_twitter', 'fb_author_hide_on_pages', 'fb_desc_show', 'fb_desc_show_meta', 'fb_desc_show_schema', 'fb_desc_show_twitter', 'fb_desc_chars', 'fb_desc_homepage', 'fb_desc_homepage_customtext', 'fb_image_show', 'fb_image_size_show', 'fb_image_show_schema', 'fb_image_show_twitter', 'fb_image', 'fb_image_rss', 'fb_image_use_specific', 'fb_image_use_featured', 'fb_image_use_content', 'fb_image_use_media', 'fb_image_use_default', 'fb_image_min_size', 'fb_show_wpseoyoast', 'fb_show_subheading', 'fb_show_businessdirectoryplugin', 'fb_keep_data_uninstall', 'fb_adv_force_local', 'fb_adv_notify_fb', 'fb_adv_supress_fb_notice', 'fb_twitter_card_type', 'fb_wc_usecategthumb', 'fb_wc_useproductgallery'); //We have to remove canonical NOW because the plugin runs too late - We're also loading the settings which is cool if ($webdados_fb_open_graph_settings = webdados_fb_open_graph_load_settings()) { //To avoid activation errors if (intval($webdados_fb_open_graph_settings['fb_url_show']) == 1) { if (intval($webdados_fb_open_graph_settings['fb_url_canonical']) == 1) { remove_action('wp_head', 'rel_canonical'); } } } //Languages function webdados_fb_open_graph_init() { load_plugin_textdomain('wd-fb-og', false, dirname(plugin_basename(__FILE__)) . '/lang/'); } add_action('plugins_loaded', 'webdados_fb_open_graph_init'); function webdados_fb_open_graph() {
$usersettings['fb_show_subheading'] = intval(webdados_fb_open_graph_post('fb_show_subheading')); $usersettings['fb_show_businessdirectoryplugin'] = intval(webdados_fb_open_graph_post('fb_show_businessdirectoryplugin')); $usersettings['fb_adv_force_local'] = intval(webdados_fb_open_graph_post('fb_adv_force_local')); $usersettings['fb_adv_notify_fb'] = intval(webdados_fb_open_graph_post('fb_adv_notify_fb')); $usersettings['fb_adv_supress_fb_notice'] = intval(webdados_fb_open_graph_post('fb_adv_supress_fb_notice')); $usersettings['fb_twitter_card_type'] = trim(webdados_fb_open_graph_post('fb_twitter_card_type')); //Update update_option('wonderm00n_open_graph_settings', $usersettings); //WPML - Register custom website description if (function_exists('icl_object_id') && function_exists('icl_register_string')) { icl_register_string('wd-fb-og', 'wd_fb_og_desc_homepage_customtext', trim(webdados_fb_open_graph_post('fb_desc_homepage_customtext'))); } } } //Load the settings extract(webdados_fb_open_graph_load_settings()); ?> <div class="wrap"> <?php screen_icon(); ?> <h2><?php echo $webdados_fb_open_graph_plugin_name; ?> (<?php echo $webdados_fb_open_graph_plugin_version; ?> )</h2> <br class="clear"/> <p><?php