Open Graph for Facebook, Google+ and Twitter Card Tags - Version 2.0

Version Description

  • We would like to thank Heateor, "a creative team with unique ideas in mind" (their words), for forking our plugin (although no credits whatsoever were made regarding our original work), and thus trully inspiring us to make this new version, using also their "unique" ideas, in the spirit of GPL, but giving them the deserved credit in the spirit of civism, integrity and the WordPress way of doing things
  • Revised and optimized code with better WordPress standards and best practices
  • Completely redesigned settings screen
  • Fixed Business Directory Plugin integration (only works with CPT integration activated)
  • Removed Google authorship (link rel="author") tag because it isn't used anymore
  • Added meta publisher tag
  • New option to either keep or delete plugin configurations upon uninstall
  • Fixed a bug where a custom taxonomy description was not being correctly set
  • Fixed og:price:amount and og:price:currency tags now correctly set as property instead of name
Download this release

Release Info

Developer webdados
Plugin Icon Open Graph for Facebook, Google+ and Twitter Card Tags
Version 2.0
Comparing to
See all releases

Code changes from version 1.7.4.4 to 2.0

admin/class-webdados-fb-open-graph-admin.php ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class Webdados_FB_Admin {
6
+
7
+ /* Version */
8
+ private $version;
9
+
10
+ /* Database options */
11
+ private $options;
12
+
13
+ /* Construct */
14
+ public function __construct( $options, $version ) {
15
+ $this->options = $options;
16
+ $this->version = $version;
17
+ }
18
+
19
+ /* Admin menu */
20
+ public function create_admin_menu() {
21
+ $options_page = add_options_page( WEBDADOS_FB_PLUGIN_NAME, WEBDADOS_FB_PLUGIN_NAME, 'manage_options', basename(__FILE__), array( $this, 'options_page' ) );
22
+ add_action( 'admin_print_styles-' . $options_page, array( $this, 'admin_style' ) );
23
+ add_action( 'admin_print_scripts-' . $options_page, array( $this, 'admin_scripts' ) );
24
+ }
25
+
26
+ /* Register settings and sanitization */
27
+ public function options_init() {
28
+ register_setting( 'wonderm00n_open_graph_settings', 'wonderm00n_open_graph_settings', array( $this, 'validate_options' ) );
29
+ // show option to disable sharing on particular page/post
30
+ //$post_types = get_post_types( array( 'public' => true ), 'names', 'and' );
31
+ //$post_types = array_unique( array_merge( $post_types, array( 'post', 'page' ) ) );
32
+ //foreach ( $post_types as $type ) {
33
+ // add_meta_box( 'heateor_ogmt_meta', 'Open Graph Meta Tags', array( $this, 'custom_meta_setup' ), $type );
34
+ //}
35
+ // save sharing meta on post/page save
36
+ //add_action( 'save_post', array( $this, 'save_custom_meta' ) );
37
+ }
38
+
39
+ /* Settings link on the plugins page */
40
+ public function place_settings_link( $links ) {
41
+ $settings_link = '<a href="options-general.php?page=class-webdados-fb-open-graph-admin.php">' . __( 'Settings', 'wd-fb-og' ) . '</a>';
42
+ // place it before other links
43
+ array_unshift( $links, $settings_link );
44
+ return $links;
45
+ }
46
+
47
+ /* Extra user fields */
48
+ public function user_contactmethods( $usercontacts ) {
49
+ global $webdados_fb;
50
+ if ( !$webdados_fb->is_yoast_seo_active() ) {
51
+ //Google+
52
+ $usercontacts['googleplus'] = __('Google+', 'wd-fb-og');
53
+ //Twitter
54
+ $usercontacts['twitter'] = __('Twitter username (without @)', 'wd-fb-og');
55
+ //Facebook
56
+ $usercontacts['facebook'] = __('Facebook profile URL', 'wd-fb-og');
57
+ }
58
+ return $usercontacts;
59
+ }
60
+
61
+ /* Meta boxes on posts */
62
+ public function add_meta_boxes( $usercontacts ) {
63
+ global $post;
64
+ //All public post types
65
+ $public_types = get_post_types( array('public'=>true) );
66
+ //Do not show for some post types
67
+ $exclude_types = array(
68
+ 'attachment',
69
+ );
70
+ $exclude_types = apply_filters( 'fb_og_metabox_exclude_types', $exclude_types );
71
+ if ( is_object($post) ) {
72
+ if ( in_array(get_post_type($post->ID), $public_types) && !in_array(get_post_type($post->ID), $exclude_types) ) {
73
+ add_meta_box(
74
+ 'webdados_fb_open_graph',
75
+ WEBDADOS_FB_PLUGIN_NAME,
76
+ array(&$this, 'post_meta_box'),
77
+ $post->post_type
78
+ );
79
+ }
80
+ }
81
+ }
82
+ public function post_meta_box() {
83
+ global $post;
84
+ // Add an nonce field so we can check for it later.
85
+ wp_nonce_field( 'webdados_fb_open_graph_custom_box', 'webdados_fb_open_graph_custom_box_nonce' );
86
+ // Current image value
87
+ $value_image = get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true);
88
+ ?>
89
+ <label for="webdados_fb_open_graph_specific_image">
90
+ <?php _e('Use this image:', 'wd-fb-og'); ?>
91
+ </label>
92
+ <input type="text" id="webdados_fb_open_graph_specific_image" name="webdados_fb_open_graph_specific_image" value="<?php echo esc_attr( $value_image ); ?>" size="50"/>
93
+ <input id="webdados_fb_open_graph_specific_image_button" class="button" type="button" value="<?php echo esc_attr( __('Upload/Choose','wd-fb-og') ); ?>"/>
94
+ <input id="webdados_fb_open_graph_specific_image_button_clear" class="button" type="button" value="<?php echo esc_attr( __('Clear field','wd-fb-og') ); ?>"/>
95
+ <br/>
96
+ <?php printf( __( 'Recommended size: %dx%dpx', 'wd-fb-og' ), WEBDADOS_FB_W, WEBDADOS_FB_H); ?>
97
+ <script type="text/javascript">
98
+ jQuery(document).ready(function($){
99
+ // Instantiates the variable that holds the media library frame.
100
+ var meta_image_frame;
101
+ // Runs when the image button is clicked.
102
+ $('#webdados_fb_open_graph_specific_image_button').click(function(e){
103
+ // Prevents the default action from occuring.
104
+ e.preventDefault();
105
+ // If the frame already exists, re-open it.
106
+ if ( meta_image_frame ) {
107
+ meta_image_frame.open();
108
+ return;
109
+ }
110
+ // Sets up the media library frame
111
+ meta_image_frame = wp.media.frames.meta_image_frame = wp.media({
112
+ title: "<?php _e('Select image', 'wd-fb-og'); ?>",
113
+ button: { text: "<?php _e('Use this image', 'wd-fb-og'); ?>" },
114
+ library: { type: 'image' }
115
+ });
116
+ // Runs when an image is selected.
117
+ meta_image_frame.on('select', function(){
118
+ // Grabs the attachment selection and creates a JSON representation of the model.
119
+ var media_attachment = meta_image_frame.state().get('selection').first().toJSON();
120
+ // Sends the attachment URL to our custom image input field.
121
+ $('#webdados_fb_open_graph_specific_image').val(media_attachment.url);
122
+ });
123
+ // Opens the media library frame.
124
+ meta_image_frame.open();
125
+ });
126
+ // Clear
127
+ $('#webdados_fb_open_graph_specific_image_button_clear').click(function(e){
128
+ // Prevents the default action from occuring.
129
+ e.preventDefault();
130
+ // Clears field
131
+ $('#webdados_fb_open_graph_specific_image').val('');
132
+ });
133
+ });
134
+ </script>
135
+ <?php
136
+ }
137
+ public function save_meta_boxes($post_id) {
138
+ global $webdados_fb_open_graph_settings;
139
+ $save=true;
140
+ // If this is an autosave, our form has not been submitted, so we don't want to do anything.
141
+ if ( (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || empty($_POST['post_type']))
142
+ return $post_id;
143
+ // If the post is not public
144
+ $post_type = get_post_type_object( get_post_type($post_id) );
145
+ if ($post_type->public) {
146
+ //OK - Go on
147
+ } else {
148
+ //Not publicly_queryable (or page) -> Go away
149
+ return $post_id;
150
+ }
151
+
152
+ // Check if our nonce is set.
153
+ if (!isset($_POST['webdados_fb_open_graph_custom_box_nonce']))
154
+ $save=false;
155
+
156
+ $nonce=(isset($_POST['webdados_fb_open_graph_custom_box_nonce']) ? $_POST['webdados_fb_open_graph_custom_box_nonce'] : '');
157
+
158
+ // Verify that the nonce is valid.
159
+ if (!wp_verify_nonce($nonce, 'webdados_fb_open_graph_custom_box'))
160
+ $save=false;
161
+
162
+ // Check the user's permissions.
163
+ if ('page' == $_POST['post_type']) {
164
+ if (!current_user_can('edit_page', $post_id))
165
+ $save=false;
166
+ } else {
167
+ if (!current_user_can('edit_post', $post_id))
168
+ $save=false;
169
+ }
170
+ if ($save) {
171
+ /* OK, its safe for us to save the data now. */
172
+ // Sanitize user input.
173
+ $mydata = sanitize_text_field($_POST['webdados_fb_open_graph_specific_image']);
174
+ // Update the meta field in the database.
175
+ update_post_meta($post_id, '_webdados_fb_open_graph_specific_image', $mydata);
176
+ }
177
+ if ($save) {
178
+ //Force Facebook update anyway - Our meta box could be hidden - Not really! We'll just update if we got our metabox
179
+ if (get_post_status($post_id)=='publish' && intval($this->options['fb_adv_notify_fb'])==1) {
180
+ $fb_debug_url='http://graph.facebook.com/?id='.urlencode(get_permalink($post_id)).'&scrape=true&method=post';
181
+ $response=wp_remote_get($fb_debug_url);
182
+ if ( is_wp_error($response) ) {
183
+ $_SESSION['wd_fb_og_updated_error']=1;
184
+ $_SESSION['wd_fb_og_updated_error_message']=__('URL failed:', 'wd-fb-og').' '.$fb_debug_url;
185
+ } else {
186
+ if ( $response['response']['code']==200 && intval($this->options['fb_adv_supress_fb_notice'])==0 ) {
187
+ $_SESSION['wd_fb_og_updated']=1;
188
+ } else {
189
+ if ( $response['response']['code']==500 ) {
190
+ $_SESSION['wd_fb_og_updated_error']=1;
191
+ $error=json_decode($response['body']);
192
+ $_SESSION['wd_fb_og_updated_error_message']=__('Facebook returned:', 'wd-fb-og').' '.$error->error->message;
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+ return $post_id;
199
+ }
200
+ public function admin_notices() {
201
+ if ($screen = get_current_screen()) {
202
+ if (isset($_SESSION['wd_fb_og_updated']) && $_SESSION['wd_fb_og_updated']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
203
+ global $post;
204
+ ?>
205
+ <div class="updated">
206
+ <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wd-fb-og'); ?> <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wd-fb-og'); ?></a></p>
207
+ </div>
208
+ <?php
209
+ } else {
210
+ if (isset($_SESSION['wd_fb_og_updated_error']) && $_SESSION['wd_fb_og_updated_error']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
211
+ ?>
212
+ <div class="error">
213
+ <p><?php
214
+ echo '<b>'.__('Error: Facebook Open Graph Tags cache NOT updated/purged.', 'wd-fb-og').'</b>';
215
+ echo '<br/>'.$_SESSION['wd_fb_og_updated_error_message'];
216
+ ?></p>
217
+ </div>
218
+ <?php
219
+ }
220
+ }
221
+ }
222
+ unset($_SESSION['wd_fb_og_updated']);
223
+ unset($_SESSION['wd_fb_og_updated_error']);
224
+ unset($_SESSION['wd_fb_og_updated_error_message']);
225
+ }
226
+
227
+ /* Options page */
228
+ public function options_page() {
229
+ // message on saving options
230
+ //echo $this->settings_saved_notification();
231
+ $options = $this->options;
232
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/options-page.php';
233
+ }
234
+ public function admin_style() {
235
+ wp_enqueue_style( 'webdados_fb_admin_style', plugins_url( 'css/webdados-fb-open-graph-admin.css', __FILE__ ), false, $this->version );
236
+ }
237
+ public function admin_scripts() {
238
+ wp_enqueue_script( 'webdados_fb_admin_script', plugins_url( 'js/webdados-fb-open-graph-admin.js', __FILE__ ), array( 'jquery', 'jquery-ui-tabs', 'media-upload' ), $this->version );
239
+ wp_localize_script( 'webdados_fb_admin_script', 'texts', array(
240
+ 'select_image' => __('Select image', 'wd-fb-og'),
241
+ 'use_this_image' => __('Use this image', 'wd-fb-og'),
242
+ ) );
243
+ }
244
+
245
+ /* Sanitize options */
246
+ public function validate_options( $options ) {
247
+ global $webdados_fb;
248
+ $all_options = $webdados_fb->all_options();
249
+ foreach($all_options as $key => $temp) {
250
+ if ( isset($options[$key]) ) {
251
+ switch($temp) {
252
+ case 'intval':
253
+ $options[$key] = intval($options[$key]);
254
+ break;
255
+ case 'trim':
256
+ $options[$key] = trim($options[$key]);
257
+ break;
258
+ }
259
+ } else {
260
+ switch($temp) {
261
+ case 'intval':
262
+ $options[$key] = 0;
263
+ break;
264
+ case 'trim':
265
+ $options[$key] = '';
266
+ break;
267
+ }
268
+ }
269
+ }
270
+ //var_dump($options);
271
+ return $options;
272
+ }
273
+
274
+ }
admin/css/webdados-fb-open-graph-admin.css ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ #webdados_fb_admin .webdados_fb_admin_left #poststuff,
4
+ #webdados_fb_admin .webdados_fb_admin_right #poststuff,
5
+ #webdados_fb_admin .webdados_fb_admin_right #poststuff .postbox {
6
+ min-width: 0;
7
+ }
8
+
9
+ #webdados_fb_admin .webdados_fb_admin_left #poststuff {
10
+ padding: 1em;
11
+ border: 1px solid #ccc;
12
+ border-top: 0px;
13
+ clear: both;
14
+ }
15
+ #webdados_fb_admin .webdados_fb_admin_left #poststuff p.submit {
16
+ padding-bottom: 0px;
17
+ }
18
+
19
+ .js #webdados_fb_admin .postbox .hndle {
20
+ cursor: initial;
21
+ }
22
+ #webdados_fb_admin .postbox h3.hndle a {
23
+ font-size: 14px;
24
+ font-weight: bold;
25
+ }
26
+ #webdados_fb_admin .postbox h3.hndle img {
27
+ display: inline-block;
28
+ width: 20px;
29
+ height: 20px;
30
+ vertical-align: bottom;
31
+ }
32
+
33
+ #webdados_fb_admin #webdadoslink a {
34
+ display: block;
35
+ }
36
+ #webdadoslink a img {
37
+ display: block;
38
+ margin: auto;
39
+ width: 200px;
40
+ max-width: 100%;
41
+ height: auto;
42
+ }
43
+
44
+ #webdados_fb_admin input.error,
45
+ #webdados_fb_admin textarea.error {
46
+ border-color: #ff0000;
47
+ }
48
+
49
+ /*@media screen and (min-width:783px) {*/
50
+ @media screen and (min-width:1012px) {
51
+ #webdados_fb_admin .webdados_fb_admin_left {
52
+ width: 74%;
53
+ float: left;
54
+ }
55
+ #webdados_fb_admin .webdados_fb_admin_right {
56
+ width: 24%;
57
+ float: right;
58
+ }
59
+ }
60
+
61
+ #webdados_fb_admin h2.nav-tab-wrapper {
62
+ /* height: 34px; */
63
+ height: 29px;
64
+ }
65
+ #webdados_fb_admin h2.nav-tab-wrapper > ul {
66
+ margin: 0px;
67
+ }
68
+ #webdados_fb_admin h2.nav-tab-wrapper > ul > li {
69
+ float: left;
70
+ margin-right: 5px;
71
+ margin-bottom: 0px;
72
+ }
73
+ #webdados_fb_admin h2.nav-tab-wrapper > ul > li:first-child {
74
+ margin-left: 5px;
75
+ }
76
+ #webdados_fb_admin h2.nav-tab-wrapper > ul > li > a.nav-tab {
77
+ margin: 0;
78
+ /* height: 23px; */
79
+ height: 18px;
80
+ line-height: 19px;
81
+ font-size: 12px;
82
+ }
83
+ #webdados_fb_admin h2.nav-tab-wrapper > ul > li > a.nav-tab:focus {
84
+ outline: 0 !important;
85
+ }
86
+ #webdados_fb_admin h2.nav-tab-wrapper > ul > li > a.nav-tab > i.dashicons-before:before {
87
+ font-size: 15px;
88
+ width: 15px;
89
+ height: 15px;
90
+ margin-top: 2px;
91
+ }
92
+ #webdados_fb_admin h2.nav-tab-wrapper > ul > li.ui-tabs-active {
93
+ border-bottom-color: #f1f1f1;
94
+ border-bottom-style: solid;
95
+ border-bottom-width: 1px;
96
+ outline: 0;
97
+ }
98
+ #webdados_fb_admin h2.nav-tab-wrapper > ul > li.ui-tabs-active > a.nav-tab {
99
+ background-color: #f1f1f1;
100
+ color: #444;
101
+ outline: 0;
102
+ }
103
+
104
+ #webdados_fb_admin .form-table th,
105
+ #webdados_fb_admin .form-table td {
106
+ padding: 10px;
107
+ padding-bottom: 5px;
108
+ /*width: auto;*/
109
+ }
110
+ #webdados_fb_admin .form-table th {
111
+ width: 250px;
112
+ }
113
+ #webdados_fb_admin .info {
114
+ font-size: 0.85em;
115
+ color: #888;
116
+ }
117
+ #webdados_fb_admin .form-table td.info {
118
+ padding: 0px;
119
+ padding-left: 10px;
120
+ padding-bottom: 20px;
121
+ /*font-style: italic;*/
122
+ }
123
+
124
+ #webdados_fb_admin div.stuffbox h3 {
125
+ border-bottom: 1px solid #eee;
126
+ }
admin/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
admin/js/webdados-fb-open-graph-admin.js ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ jQuery(document).ready(function($) {
4
+
5
+ //Tabs
6
+ $('.nav-tab').on('click', function() {
7
+ $('#settings_last_tab').val($(this).attr('data-tab-index'));
8
+ });
9
+
10
+ //Images
11
+ var file_frame;
12
+ var file_frame_field_id;
13
+ file_frame = wp.media.frames.file_frame = wp.media({
14
+ title: texts.select_image,
15
+ button: {
16
+ text: texts.use_this_image
17
+ },
18
+ multiple: false
19
+ });
20
+ file_frame.on("select", function() {
21
+ var image = file_frame.state().get("selection").first().toJSON();
22
+ $("#"+file_frame_field_id).val(image.url);
23
+ });
24
+ //Default
25
+ $('#fb_image_button').on('click', function(event) {
26
+ event.preventDefault();
27
+ file_frame_field_id='fb_image';
28
+ if (file_frame) {
29
+ file_frame.open();
30
+ }
31
+ });
32
+ //Overlay
33
+ $('#fb_image_overlay_button').on('click', function(event) {
34
+ event.preventDefault();
35
+ file_frame_field_id='fb_image_overlay_image';
36
+ if (file_frame) {
37
+ file_frame.open();
38
+ }
39
+ });
40
+
41
+ //General
42
+ showDescriptionCustomText(false);
43
+ showImageOverlayOptions();
44
+ showUrlTrail();
45
+ //OG
46
+ showImageOptions();
47
+ showTypeOptions();
48
+ showPublisherOptions();
49
+ showLocaleOptions();
50
+ showAdminOptions();
51
+ showAppidOptions();
52
+ showFBNotifyOptions();
53
+ //Twitter
54
+ showPublisherTwitterOptions();
55
+ //Schema
56
+ showPublisherSchemaOptions();
57
+ //3rd Party
58
+ showSubheadingOptions();
59
+
60
+ //Functions
61
+ function showDescriptionCustomText(focus) {
62
+ if ($('#fb_desc_homepage').val()=='custom') {
63
+ $('#fb_desc_homepage_customtext_div').show();
64
+ $('#fb_desc_homepage_customtext').val( $.trim($('#fb_desc_homepage_customtext').val()) );
65
+ if ( $('#fb_desc_homepage_customtext').val()=='' ) {
66
+ $('#fb_desc_homepage_customtext').addClass('error');
67
+ } else {
68
+ $('#fb_desc_homepage_customtext').removeClass('error');
69
+ }
70
+ if (focus) $('#fb_desc_homepage_customtext').focus();
71
+ } else {
72
+ $('#fb_desc_homepage_customtext_div').hide();
73
+ }
74
+ }
75
+ $('#fb_desc_homepage').on('change', function() {
76
+ showDescriptionCustomText(true);
77
+ });
78
+
79
+ function showImageOverlayOptions() {
80
+ if ($('#fb_image_overlay').is(':checked')) {
81
+ $('.fb_image_overlay_options').show();
82
+ $('#fb_image_overlay_image').val( $.trim($('#fb_image_overlay_image').val()) );
83
+ if ( $('#fb_image_overlay_image').val()=='' ) {
84
+ $('#fb_image_overlay_image').addClass('error');
85
+ } else {
86
+ $('#fb_image_overlay_image').removeClass('error');
87
+ }
88
+ } else {
89
+ $('.fb_image_overlay_options').hide();
90
+ }
91
+ }
92
+ $('#fb_image_overlay').on('click', function() {
93
+ showImageOverlayOptions();
94
+ });
95
+
96
+ function showUrlTrail() {
97
+ if ($('#fb_url_add_trailing').is(':checked')) {
98
+ $('#fb_url_add_trailing_example').show();
99
+ } else {
100
+ $('#fb_url_add_trailing_example').hide();
101
+ }
102
+ }
103
+ $('#fb_url_add_trailing').on('click', function() {
104
+ showUrlTrail();
105
+ });
106
+
107
+ function showImageOptions() {
108
+ if ($('#fb_image_show').is(':checked')) {
109
+ $('.fb_image_options').show();
110
+ } else {
111
+ $('.fb_image_options').hide();
112
+ }
113
+ }
114
+ $('#fb_image_show').on('click', function() {
115
+ showImageOptions();
116
+ });
117
+
118
+ function showTypeOptions() {
119
+ if ($('#fb_type_show').is(':checked')) {
120
+ $('.fb_type_options').show();
121
+ } else {
122
+ $('.fb_type_options').hide();
123
+ }
124
+ }
125
+ $('#fb_type_show').on('click', function() {
126
+ showTypeOptions();
127
+ });
128
+
129
+ function showPublisherOptions() {
130
+ if ($('#fb_publisher_show').is(':checked')) {
131
+ $('.fb_publisher_options').show();
132
+ $('#fb_publisher').val( $.trim($('#fb_publisher').val()) );
133
+ if ( $('#fb_publisher').val()=='' ) {
134
+ $('#fb_publisher').addClass('error');
135
+ } else {
136
+ $('#fb_publisher').removeClass('error');
137
+ }
138
+ } else {
139
+ $('.fb_publisher_options').hide();
140
+ }
141
+ }
142
+ $('#fb_publisher_show').on('click', function() {
143
+ showPublisherOptions();
144
+ });
145
+
146
+ function showLocaleOptions() {
147
+ if ($('#fb_locale_show').is(':checked')) {
148
+ $('.fb_locale_options').show();
149
+ } else {
150
+ $('.fb_locale_options').hide();
151
+ }
152
+ }
153
+ $('#fb_locale_show').on('click', function() {
154
+ showLocaleOptions();
155
+ });
156
+
157
+ function showAdminOptions() {
158
+ if ($('#fb_admin_id_show').is(':checked')) {
159
+ $('.fb_admin_id_options').show();
160
+ $('#fb_admin_id').val( $.trim($('#fb_admin_id').val()) );
161
+ if ( $('#fb_admin_id').val()=='' ) {
162
+ $('#fb_admin_id').addClass('error');
163
+ } else {
164
+ $('#fb_admin_id').removeClass('error');
165
+ }
166
+ } else {
167
+ $('.fb_admin_id_options').hide();
168
+ }
169
+ }
170
+ $('#fb_admin_id_show').on('click', function() {
171
+ showAdminOptions();
172
+ });
173
+
174
+ function showAppidOptions() {
175
+ if ($('#fb_app_id_show').is(':checked')) {
176
+ $('.fb_app_id_options').show();
177
+ $('#fb_app_id').val( $.trim($('#fb_app_id').val()) );
178
+ if ( $('#fb_app_id').val()=='' ) {
179
+ $('#fb_app_id').addClass('error');
180
+ } else {
181
+ $('#fb_app_id').removeClass('error');
182
+ }
183
+ } else {
184
+ $('.fb_app_id_options').hide();
185
+ }
186
+ }
187
+ $('#fb_app_id_show').on('click', function() {
188
+ showAppidOptions();
189
+ });
190
+
191
+ function showFBNotifyOptions() {
192
+ if ($('#fb_adv_notify_fb').is(':checked')) {
193
+ $('.fb_adv_notify_fb_options').show();
194
+ } else {
195
+ $('.fb_adv_notify_fb_options').hide();
196
+ }
197
+ }
198
+ $('#fb_adv_notify_fb').on('click', function() {
199
+ showFBNotifyOptions();
200
+ });
201
+
202
+ function showPublisherTwitterOptions() {
203
+ if ($('#fb_publisher_show_twitter').is(':checked')) {
204
+ $('.fb_publisher_twitter_options').show();
205
+ $('#fb_publisher_twitteruser').val( $.trim($('#fb_publisher_twitteruser').val()) );
206
+ if ( $('#fb_publisher_twitteruser').val()=='' ) {
207
+ $('#fb_publisher_twitteruser').addClass('error');
208
+ } else {
209
+ $('#fb_publisher_twitteruser').removeClass('error');
210
+ }
211
+ } else {
212
+ $('.fb_publisher_twitter_options').hide();
213
+ }
214
+ }
215
+ $('#fb_publisher_show_twitter').on('click', function() {
216
+ showPublisherTwitterOptions();
217
+ });
218
+
219
+ function showPublisherSchemaOptions() {
220
+ if ($('#fb_publisher_show_schema').is(':checked')) {
221
+ $('.fb_publisher_schema_options').show();
222
+ $('#fb_publisher_schema').val( $.trim($('#fb_publisher_schema').val()) );
223
+ if ( $('#fb_publisher_schema').val()=='' ) {
224
+ $('#fb_publisher_schema').addClass('error');
225
+ } else {
226
+ $('#fb_publisher_schema').removeClass('error');
227
+ }
228
+ } else {
229
+ $('.fb_publisher_schema_options').hide();
230
+ }
231
+ }
232
+ $('#fb_publisher_show_schema').on('click', function() {
233
+ showPublisherSchemaOptions();
234
+ });
235
+
236
+
237
+ function showSubheadingOptions() {
238
+ if ($('#fb_show_subheading').is(':checked')) {
239
+ $('.fb_subheading_options').show();
240
+ } else {
241
+ $('.fb_subheading_options').hide();
242
+ }
243
+ }
244
+ $('#fb_show_subheading').on('click', function() {
245
+ showSubheadingOptions();
246
+ });
247
+
248
+ });
admin/options-page-3rdparty.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ global $webdados_fb;
6
+
7
+ ?>
8
+ <div class="menu_containt_div" id="tabs-6">
9
+ <p><?php _e( 'Settings for 3rd party integration with other plugins.', 'wd-fb-og' ); ?></p>
10
+ <?php
11
+ $yoast_seo = $webdados_fb->is_yoast_seo_active();
12
+ $woocommerce = $webdados_fb->is_woocommerce_active();
13
+ $sub_heading = $webdados_fb->is_subheading_plugin_active();
14
+ $business_directory = $webdados_fb->is_business_directory_active();
15
+ ?>
16
+ <!-- Yoast SEO -->
17
+ <div class="postbox">
18
+ <h3 class="hndle">
19
+ <?php
20
+ if ($yoast_seo) {
21
+ $wpseo_utils = new WPSEO_Utils();
22
+ ?>
23
+ <img src="<?php echo 'data:image/svg+xml;base64,' . base64_encode( str_replace('fill:#82878c', 'fill:#23282d', $wpseo_utils->get_icon_svg(false) ) ) ; ?>"/>
24
+ <?php
25
+ } else {
26
+ ?><i class="dashicons-before dashicons-editor-code"></i><?php
27
+ }
28
+ ?>
29
+ <a href="https://wordpress.org/plugins/wordpress-seo/" target="_blank">Yoast SEO</a>
30
+ </h3>
31
+ <div class="inside">
32
+ <?php
33
+ if ($yoast_seo) {
34
+ ?>
35
+ <table class="form-table">
36
+ <tbody>
37
+
38
+ <tr>
39
+ <th><?php _e( 'Use Title, URL and Description', 'wd-fb-og' ); ?>:</th>
40
+ <td>
41
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_show_wpseoyoast]" id="fb_show_wpseoyoast" value="1" <?php echo (intval($options['fb_show_wpseoyoast'])==1 ? ' checked="checked"' : ''); ?>/>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td colspan="2" class="info">
46
+ <?php _e( 'Use Title, Canonical URL and Description generated by Yoast SEO', 'wd-fb-og' ); ?>
47
+ </td>
48
+ </tr>
49
+
50
+ </tbody>
51
+ </table>
52
+ <?php
53
+ } else {
54
+ ?>
55
+ <p><?php printf ( __( 'You don\'t have %s installed or activated.', 'wd-fb-og' ), 'Yoast SEO' ); ?></p>
56
+ <?php
57
+ }
58
+ ?>
59
+ </div>
60
+ </div>
61
+ <!-- WooCommerce -->
62
+ <div class="postbox">
63
+ <h3 class="hndle">
64
+ <i class="dashicons-before dashicons-cart"></i>
65
+ <a href="https://wordpress.org/plugins/woocommerce/" target="_blank">WooCommerce</a>
66
+ </h3>
67
+ <div class="inside">
68
+ <?php
69
+ if ($woocommerce) {
70
+ ?>
71
+ <p><?php _e('On the product page we will automatically set <i>og:type</i> to "product" and <i>product:price</i> to the price including tax.', 'wd-fb-og'); ?></p>
72
+ <table class="form-table">
73
+ <tbody>
74
+
75
+ <tr>
76
+ <th><?php _e( 'Use Product Gallery as Images', 'wd-fb-og' ); ?>:</th>
77
+ <td>
78
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_wc_useproductgallery]" id="fb_wc_useproductgallery" value="1" <?php echo (intval($options['fb_wc_useproductgallery'])==1 ? ' checked="checked"' : ''); ?>/>
79
+ </td>
80
+ </tr>
81
+ <tr>
82
+ <td colspan="2" class="info">
83
+ <?php _e('Sets each Product Gallery image as an additional <i>og:image</i> tag so that, when a product is shared on Facebook, the user is given the choice what image to display', 'wd-fb-og'); ?>
84
+ </td>
85
+ </tr>
86
+
87
+ <tr class="fb_image_overlay_options">
88
+ <th><?php _e( 'Overlay PNG logo', 'wd-fb-og' ); ?>:</th>
89
+ <td>
90
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_wc_usepg_png_overlay]" id="fb_wc_usepg_png_overlay" value="1" <?php echo (intval($options['fb_wc_usepg_png_overlay'])==1 ? ' checked="checked"' : ''); ?>/>
91
+ </td>
92
+ </tr>
93
+ <tr class="fb_image_overlay_options">
94
+ <td colspan="2" class="info">
95
+ <?php _e( 'Also overlay the PNG logo on the Product Gallery images', 'wd-fb-og' ); ?>
96
+ </td>
97
+ </tr>
98
+
99
+ <tr>
100
+ <th><?php _e( 'Use Category thumbnail as Image', 'wd-fb-og' ); ?>:</th>
101
+ <td>
102
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_wc_usecategthumb]" id="fb_wc_usecategthumb" value="1" <?php echo (intval($options['fb_wc_usecategthumb'])==1 ? ' checked="checked"' : ''); ?>/>
103
+ </td>
104
+ </tr>
105
+ <tr>
106
+ <td colspan="2" class="info">
107
+ <?php _e('Recommended if you set large thumbnails for Product Categories and want to use them as Open Graph Images on category listing pages', 'wd-fb-og'); ?>
108
+ </td>
109
+ </tr>
110
+
111
+ </tbody>
112
+ </table>
113
+ <?php
114
+ } else {
115
+ ?>
116
+ <p><?php printf ( __( 'You don\'t have %s installed or activated.', 'wd-fb-og' ), 'WooCommerce' ); ?></p>
117
+ <?php
118
+ }
119
+ ?>
120
+ </div>
121
+ </div>
122
+ <!-- SubHeading -->
123
+ <div class="postbox">
124
+ <h3 class="hndle">
125
+ <i class="dashicons-before dashicons-editor-textcolor"></i>
126
+ <a href="https://wordpress.org/plugins/subheading/" target="_blank">SubHeading</a>
127
+ </h3>
128
+ <div class="inside">
129
+ <?php
130
+ if ($sub_heading) {
131
+ ?>
132
+ <table class="form-table">
133
+ <tbody>
134
+
135
+ <tr>
136
+ <th><?php _e( 'Add SubHeading to Post/Page Title', 'wd-fb-og' ); ?>:</th>
137
+ <td>
138
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_show_subheading]" id="fb_show_subheading" value="1" <?php echo (intval($options['fb_show_subheading'])==1 ? ' checked="checked"' : ''); ?>/>
139
+ </td>
140
+ </tr>
141
+ <tr>
142
+ <td colspan="2" class="info">
143
+
144
+ </td>
145
+ </tr>
146
+
147
+ <tr class="fb_subheading_options">
148
+ <th><?php _e( 'SubHeading position', 'wd-fb-og' ); ?>:</th>
149
+ <td>
150
+ <select name="wonderm00n_open_graph_settings[fb_subheading_position]" id="fb_subheading_position">
151
+ <option value=""<?php if (trim($options['fb_subheading_position'])=='after') echo ' selected="selected"'; ?>><?php _e('After', 'wd-fb-og');?></option>
152
+ <option value="before"<?php if (trim($options['fb_subheading_position'])=='before') echo ' selected="selected"'; ?>><?php _e('Before', 'wd-fb-og');?></option>
153
+ </select>
154
+ </td>
155
+ </tr>
156
+ <tr class="fb_subheading_options">
157
+ <td colspan="2" class="info">
158
+
159
+ </td>
160
+ </tr>
161
+
162
+ </tbody>
163
+ </table>
164
+ <?php
165
+ } else {
166
+ ?>
167
+ <p><?php printf ( __( 'You don\'t have %s installed or activated.', 'wd-fb-og' ), 'SubHeading' ); ?></p>
168
+ <?php
169
+ }
170
+ ?>
171
+ </div>
172
+ </div>
173
+ <!-- Business Directory -->
174
+ <div class="postbox">
175
+ <h3 class="hndle">
176
+ <i class="dashicons-before dashicons-id"></i>
177
+ <a href="https://wordpress.org/plugins/business-directory-plugin/" target="_blank">Business Directory Plugin</a>
178
+ </h3>
179
+ <div class="inside">
180
+ <?php
181
+ if ($business_directory) {
182
+ ?>
183
+ <table class="form-table">
184
+ <tbody>
185
+
186
+ <tr>
187
+ <th><?php _e( 'Use listing details', 'wd-fb-og' ); ?>:</th>
188
+ <td>
189
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_show_businessdirectoryplugin]" id="fb_show_businessdirectoryplugin" value="1" <?php echo (intval($options['fb_show_businessdirectoryplugin'])==1 ? ' checked="checked"' : ''); ?>/>
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <td colspan="2" class="info">
194
+ <?php _e( 'Use Business Directory Plugin listing details (Title, URL, Description and Image) to populate tags', 'wd-fb-og' ); ?>
195
+ <br/>
196
+ <?php _e( 'Setting "Include URL", "Set Canonical URL", "Include Description" and "Include Image" options is HIGHLY recommended', 'wd-fb-og' ); ?>
197
+ </td>
198
+ </tr>
199
+
200
+ </tbody>
201
+ </table>
202
+ <?php
203
+ } else {
204
+ ?>
205
+ <p><?php printf ( __( 'You don\'t have %s installed or activated.', 'wd-fb-og' ), 'Business Directory Plugin' ); ?></p>
206
+ <?php
207
+ }
208
+ ?>
209
+ </div>
210
+ </div>
211
+ </div>
admin/options-page-facebook.php ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ ?>
6
+ <div class="menu_containt_div" id="tabs-2">
7
+ <p><?php _e( 'Open Graph tags used by Facebook, and other social networks, to render link share posts.', 'wd-fb-og' ); ?></p>
8
+ <div class="postbox">
9
+ <h3 class="hndle"><i class="dashicons-before dashicons-facebook-alt"></i> <?php _e( 'Facebook Open Graph Tags', 'wd-fb-og' ) ?></h3>
10
+ <div class="inside">
11
+ <table class="form-table">
12
+ <tbody>
13
+
14
+ <tr>
15
+ <th><?php _e( 'Include Post/Page Title', 'wd-fb-og' );?>:</th>
16
+ <td>
17
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_title_show]" id="fb_title_show" value="1" <?php echo (intval($options['fb_title_show'])==1 ? ' checked="checked"' : ''); ?>/>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <td colspan="2" class="info">
22
+ <i>&lt;meta property="og:title" content="..."/&gt;</i>
23
+ </td>
24
+ </tr>
25
+
26
+ <tr>
27
+ <th><?php _e( 'Include Site Name', 'wd-fb-og' );?>:</th>
28
+ <td>
29
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_sitename_show]" id="fb_sitename_show" value="1" <?php echo (intval($options['fb_sitename_show'])==1 ? ' checked="checked"' : ''); ?>/>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <td colspan="2" class="info">
34
+ <i>&lt;meta property="og:site_name" content="..."/&gt;</i>
35
+ <br/>
36
+ <?php _e( 'From Settings &gt; General &gt; Site Title', 'wd-fb-og' );?>
37
+ </td>
38
+ </tr>
39
+
40
+ <tr>
41
+ <th><?php _e( 'Include URL', 'wd-fb-og' );?>:</th>
42
+ <td>
43
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_url_show]" id="fb_url_show" value="1" <?php echo (intval($options['fb_url_show'])==1 ? ' checked="checked"' : ''); ?>/>
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <td colspan="2" class="info">
48
+ <i>&lt;meta property="og:url" content="..."/&gt;</i>
49
+ </td>
50
+ </tr>
51
+
52
+ <tr>
53
+ <th><?php _e( 'Include Description', 'wd-fb-og' );?>:</th>
54
+ <td>
55
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_desc_show]" id="fb_desc_show" value="1" <?php echo (intval($options['fb_desc_show'])==1 ? ' checked="checked"' : ''); ?>/>
56
+ </td>
57
+ </tr>
58
+ <tr>
59
+ <td colspan="2" class="info">
60
+ <i>&lt;meta property="og:description" content="..."/&gt;</i>
61
+ </td>
62
+ </tr>
63
+
64
+ <tr>
65
+ <th><?php _e( 'Include Image', 'wd-fb-og' );?>:</th>
66
+ <td>
67
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_show]" id="fb_image_show" value="1" <?php echo (intval($options['fb_image_show'])==1 ? ' checked="checked"' : ''); ?>/>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <td colspan="2" class="info">
72
+ <i>&lt;meta property="og:image" content="..."/&gt;</i>
73
+ <br/>
74
+ <?php printf( __('All images must have at least 200px on both dimensions in order to Facebook to load them at all. %dx%dpx for optimal results. Minimum of 600x315px is recommended.', 'wd-fb-og' ), WEBDADOS_FB_W, WEBDADOS_FB_H );?>
75
+ </td>
76
+ </tr>
77
+
78
+ <tr class="fb_image_options">
79
+ <th><?php _e( 'Include Image Dimensions', 'wd-fb-og' );?>:</th>
80
+ <td>
81
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_size_show]" id="fb_image_size_show" value="1" <?php echo (intval($options['fb_image_size_show'])==1 ? ' checked="checked"' : ''); ?>/>
82
+ </td>
83
+ </tr>
84
+ <tr class="fb_image_options">
85
+ <td colspan="2" class="info">
86
+ <i>&lt;meta property="og:image:width" content="..."/&gt;</i> <?php _e('and', 'wd-fb-og'); ?> <i>&lt;meta property="og:image:height" content="..."/&gt;</i>
87
+ <br/>
88
+ <?php _e( 'Recommended only if Facebook is having problems loading the image when the post is shared for the first time, or else it adds extra unnecessary processing time', 'wd-fb-og' );?>
89
+ </td>
90
+ </tr>
91
+
92
+ <tr>
93
+ <th><?php _e( 'Include Type', 'wd-fb-og' );?>:</th>
94
+ <td>
95
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_type_show]" id="fb_type_show" value="1" <?php echo (intval($options['fb_type_show'])==1 ? ' checked="checked"' : ''); ?>/>
96
+ </td>
97
+ </tr>
98
+ <tr>
99
+ <td colspan="2" class="info">
100
+ <i>&lt;meta property="og:type" content="..."/&gt;</i>
101
+ <br/>
102
+ <?php printf( __( 'Will be "%1$s" for posts and pages and "%2$s" or "%3$s" for the homepage', 'wd-fb-og' ), 'article', 'website', 'blog' ); ?>
103
+ <br/>
104
+ <?php _e( 'Additional types may be used depending on 3rd party integrations', 'wd-fb-og' ); ?>
105
+ </td>
106
+ </tr>
107
+
108
+ <tr class="fb_type_options">
109
+ <th><?php _e( 'Homepage Type', 'wd-fb-og' );?>:</th>
110
+ <td>
111
+ <select name="wonderm00n_open_graph_settings[fb_type_homepage]" id="fb_type_homepage">
112
+ <option value="website"<?php if (trim($options['fb_type_homepage'])=='' || trim($options['fb_type_homepage'])=='website') echo ' selected="selected"'; ?>>website</option>
113
+ <option value="blog"<?php if (trim($options['fb_type_homepage'])=='blog') echo ' selected="selected"'; ?>>blog</option>
114
+ </select>
115
+ </td>
116
+ </tr>
117
+ <tr class="fb_type_options">
118
+ <td colspan="2" class="info">
119
+ </td>
120
+ </tr>
121
+
122
+ <tr>
123
+ <th><?php _e( 'Include Post/Page Author', 'wd-fb-og' );?>:</th>
124
+ <td>
125
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_author_show]" id="fb_author_show" value="1" <?php echo (intval($options['fb_author_show'])==1 ? ' checked="checked"' : ''); ?>/>
126
+ </td>
127
+ </tr>
128
+ <tr>
129
+ <td colspan="2" class="info">
130
+ <i>&lt;meta property="article:author" content="..."/&gt;</i>
131
+ <br/>
132
+ <?php _e( 'The user\'s Facebook URL must be filled in on his profile', 'wd-fb-og' );?>
133
+ </td>
134
+ </tr>
135
+
136
+ <tr>
137
+ <th><?php _e( 'Include Published/Modified Dates', 'wd-fb-og' );?>:</th>
138
+ <td>
139
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_article_dates_show]" id="fb_article_dates_show" value="1" <?php echo (intval($options['fb_article_dates_show'])==1 ? ' checked="checked"' : ''); ?>/>
140
+ </td>
141
+ </tr>
142
+ <tr>
143
+ <td colspan="2" class="info">
144
+ <i>&lt;meta property="article:published_time" content="..."/&gt;</i>, <i>&lt;meta property="article:modified_time" content="..."/&gt;</i> <?php _e('and', 'wd-fb-og'); ?> <i>&lt;meta property="og:updated_time" content="..."/&gt;</i>
145
+ <br/>
146
+ <?php _e( 'For posts only', 'wd-fb-og' );?>
147
+ </td>
148
+ </tr>
149
+
150
+ <tr>
151
+ <th><?php _e( 'Include Article Sections', 'wd-fb-og' );?>:</th>
152
+ <td>
153
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_article_sections_show]" id="fb_article_sections_show" value="1" <?php echo (intval($options['fb_article_sections_show'])==1 ? ' checked="checked"' : ''); ?>/>
154
+ </td>
155
+ </tr>
156
+ <tr>
157
+ <td colspan="2" class="info">
158
+ <i>&lt;meta property="article:section" content="..."/&gt;</i>
159
+ <br/>
160
+ <?php _e( 'For posts only', 'wd-fb-og' );?>, <?php _e('from the categories names', 'wd-fb-og'); ?>
161
+ </td>
162
+ </tr>
163
+
164
+ <tr>
165
+ <th><?php _e( 'Include Publisher', 'wd-fb-og' );?>:</th>
166
+ <td>
167
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_publisher_show]" id="fb_publisher_show" value="1" <?php echo (intval($options['fb_publisher_show'])==1 ? ' checked="checked"' : ''); ?>/>
168
+ </td>
169
+ </tr>
170
+ <tr>
171
+ <td colspan="2" class="info">
172
+ <i>&lt;meta property="article:publisher" content="..."/&gt;</i>
173
+ <br/>
174
+ <?php _e( 'The website\'s Facebook Page', 'wd-fb-og' );?>
175
+ </td>
176
+ </tr>
177
+
178
+ <tr class="fb_publisher_options">
179
+ <th><?php _e( 'Website\'s Facebook Page', 'wd-fb-og' );?>:</th>
180
+ <td>
181
+ <input type="text" name="wonderm00n_open_graph_settings[fb_publisher]" id="fb_publisher" size="50" value="<?php echo trim(esc_attr($options['fb_publisher'])); ?>"/>
182
+ </td>
183
+ </tr>
184
+ <tr class="fb_publisher_options">
185
+ <td colspan="2" class="info">
186
+ <?php _e( 'Facebook Page URL (with https://)', 'wd-fb-og' ); ?>
187
+ </td>
188
+ </tr>
189
+
190
+ <tr>
191
+ <th><a name="fblocale"></a><?php _e( 'Include Locale', 'wd-fb-og' );?>:</th>
192
+ <td>
193
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_locale_show]" id="fb_locale_show" value="1" <?php echo (intval($options['fb_locale_show'])==1 ? ' checked="checked"' : ''); ?>/>
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <td colspan="2" class="info">
198
+ <i>&lt;meta property="fb:locale" content="..."/&gt;</i>
199
+ <br/>
200
+ <?php _e( 'The website\'s Facebook Page', 'wd-fb-og' );?>
201
+ </td>
202
+ </tr>
203
+
204
+ <tr class="fb_locale_options">
205
+ <th><?php _e( 'Locale', 'wd-fb-og' );?>:</th>
206
+ <td>
207
+ <?php
208
+ $listLocales=false;
209
+ $loadedOnline=false;
210
+ $loadedOffline=false;
211
+ //Online
212
+ if (!empty($_GET['localeOnline'])) {
213
+ if (intval($_GET['localeOnline'])==1) {
214
+ if ($ch = curl_init('http://www.facebook.com/translations/FacebookLocales.xml')) {
215
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
216
+ $fb_locales=curl_exec($ch);
217
+ if (curl_errno($ch)) {
218
+ //echo curl_error($ch);
219
+ } else {
220
+ $info = curl_getinfo($ch);
221
+ if (intval($info['http_code'])==200) {
222
+ //Save the file locally
223
+ $fh = fopen(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml', 'w') or die("Can't open file");
224
+ fwrite($fh, $fb_locales);
225
+ fclose($fh);
226
+ $listLocales=true;
227
+ $loadedOnline=true;
228
+ }
229
+ }
230
+ curl_close($ch);
231
+ }
232
+ }
233
+ }
234
+ //Offline
235
+ if (!$listLocales) {
236
+ if ($fb_locales=file_get_contents(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml')) {
237
+ $listLocales=true;
238
+ $loadedOffline=true;
239
+ }
240
+ }
241
+ ?>
242
+ <select name="wonderm00n_open_graph_settings[fb_locale]" id="fb_locale">
243
+ <option value=""<?php if (trim($options['fb_locale'])=='') echo ' selected="selected"'; ?>><?php _e('WordPress current locale/language', 'wd-fb-og'); ?> (<?php echo get_locale(); ?>)</option>
244
+ <?php
245
+ //OK
246
+ if ($listLocales) {
247
+ $xml=simplexml_load_string($fb_locales);
248
+ $json = json_encode($xml);
249
+ $locales = json_decode($json,TRUE);
250
+ if (is_array($locales['locale'])) {
251
+ foreach ($locales['locale'] as $locale) {
252
+ ?><option value="<?php echo $locale['codes']['code']['standard']['representation']; ?>"<?php if (trim($options['fb_locale'])==trim($locale['codes']['code']['standard']['representation'])) echo ' selected="selected"'; ?>><?php echo $locale['englishName']; ?> (<?php echo $locale['codes']['code']['standard']['representation']; ?>)</option><?php
253
+ }
254
+ }
255
+ }
256
+ ?>
257
+ </select>
258
+ </td>
259
+ </tr>
260
+ <tr class="fb_locale_options">
261
+ <td colspan="2" class="info">
262
+ <?php
263
+ if ($loadedOnline) {
264
+ _e('List loaded from Facebook (online)', 'wd-fb-og');
265
+ } else {
266
+ if ($loadedOffline) {
267
+ _e('List loaded from local cache (offline)', 'wd-fb-og'); ?> - <a href="?page=class-webdados-fb-open-graph-admin.php&amp;localeOnline=1" onClick="return(confirm('<?php _e('You\\\'l lose any changes you haven\\\'t saved. Are you sure?', 'wd-fb-og'); ?>'));"><?php _e('Reload from Facebook', 'wd-fb-og'); ?></a><?php
268
+ } else {
269
+ _e('List not loaded', 'wd-fb-og');
270
+ }
271
+ }
272
+ ?>
273
+ </td>
274
+ </tr>
275
+
276
+ <tr>
277
+ <th><?php _e( 'Include Facebook Admin(s) ID', 'wd-fb-og' );?>:</th>
278
+ <td>
279
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_admin_id_show]" id="fb_admin_id_show" value="1" <?php echo (intval($options['fb_admin_id_show'])==1 ? ' checked="checked"' : ''); ?>/>
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <td colspan="2" class="info">
284
+ <i>&lt;meta property="fb:admins" content="..."/&gt;</i>
285
+ </td>
286
+ </tr>
287
+
288
+ <tr class="fb_admin_id_options">
289
+ <th><?php _e( 'Facebook Admin(s) ID', 'wd-fb-og' );?>:</th>
290
+ <td>
291
+ <input type="text" name="wonderm00n_open_graph_settings[fb_admin_id]" id="fb_admin_id" size="50" value="<?php echo trim(esc_attr($options['fb_admin_id'])); ?>"/>
292
+ </td>
293
+ </tr>
294
+ <tr class="fb_admin_id_options">
295
+ <td colspan="2" class="info">
296
+ <?php _e( 'Comma separated if more than one', 'wd-fb-og' ); ?>
297
+ </td>
298
+ </tr>
299
+
300
+ <tr>
301
+ <th><?php _e( 'Include Facebook Platform App ID', 'wd-fb-og' );?>:</th>
302
+ <td>
303
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_app_id_show]" id="fb_app_id_show" value="1" <?php echo (intval($options['fb_app_id_show'])==1 ? ' checked="checked"' : ''); ?>/>
304
+ </td>
305
+ </tr>
306
+ <tr>
307
+ <td colspan="2" class="info">
308
+ <i>&lt;meta property="fb:app_id" content="..."/&gt;</i>
309
+ </td>
310
+ </tr>
311
+
312
+ <tr class="fb_app_id_options">
313
+ <th><?php _e( 'Facebook Platform App ID', 'wd-fb-og' );?>:</th>
314
+ <td>
315
+ <input type="text" name="wonderm00n_open_graph_settings[fb_app_id]" id="fb_app_id" size="50" value="<?php echo trim(esc_attr($options['fb_app_id'])); ?>"/>
316
+ </td>
317
+ </tr>
318
+ <tr class="fb_app_id_options">
319
+ <td colspan="2" class="info">
320
+ <?php _e( 'From your Facebook Developers dashboard', 'wd-fb-og' ); ?>
321
+ </td>
322
+ </tr>
323
+
324
+ </tbody>
325
+ </table>
326
+ </div>
327
+ </div>
328
+ <div class="postbox">
329
+ <h3 class="hndle"><i class="dashicons-before dashicons-portfolio"></i> <?php _e( 'Facebook Open Graph Tags cache', 'wd-fb-og' ) ?></h3>
330
+ <div class="inside">
331
+ <table class="form-table">
332
+ <tbody>
333
+
334
+ <tr>
335
+ <th><?php _e( 'Clear cache', 'wd-fb-og' );?>:</th>
336
+ <td>
337
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_adv_notify_fb]" id="fb_adv_notify_fb" value="1" <?php echo (intval($options['fb_adv_notify_fb'])==1 ? ' checked="checked"' : ''); ?>/>
338
+ </td>
339
+ </tr>
340
+ <tr>
341
+ <td colspan="2" class="info">
342
+ <?php _e( 'Try to clear the Facebook Open Graph Tags cache when saving a post or page, so the link preview on Facebook is immediately updated', 'wd-fb-og' );?>
343
+ </td>
344
+ </tr>
345
+
346
+ <tr class="fb_adv_notify_fb_options">
347
+ <th><?php _e( 'Suppress cache notices', 'wd-fb-og' );?>:</th>
348
+ <td>
349
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_adv_supress_fb_notice]" id="fb_adv_supress_fb_notice" value="1" <?php echo (intval($options['fb_adv_supress_fb_notice'])==1 ? ' checked="checked"' : ''); ?>/>
350
+ </td>
351
+ </tr>
352
+ <tr class="fb_adv_notify_fb_options">
353
+ <td colspan="2" class="info">
354
+ <?php _e( 'Sometimes we aren\'t able to update the cache and the post author will see a notice if this option is not checked', 'wd-fb-og' ); ?>
355
+ </td>
356
+ </tr>
357
+
358
+ </tbody>
359
+ </table>
360
+ </div>
361
+ </div>
362
+ </div>
admin/options-page-general.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ global $webdados_fb;
6
+ ?>
7
+ <div class="menu_containt_div" id="tabs-1">
8
+ <p><?php _e( 'General settings that will apply to all tags types.', 'wd-fb-og' ); ?></p>
9
+ <div class="postbox">
10
+ <h3 class="hndle"><i class="dashicons-before dashicons-editor-alignleft"></i> <?php _e( 'Description settings', 'wd-fb-og' ) ?></h3>
11
+ <div class="inside">
12
+ <table class="form-table">
13
+ <tbody>
14
+
15
+ <tr>
16
+ <th><?php _e( 'Description maximum length', 'wd-fb-og' ); ?>:</th>
17
+ <td>
18
+ <input type="text" name="wonderm00n_open_graph_settings[fb_desc_chars]" id="fb_desc_chars" size="3" maxlength="3" value="<?php echo (intval($options['fb_desc_chars'])>0 ? intval($options['fb_desc_chars']) : '' ); ?>"/> <?php _e( 'characters', 'wd-fb-og' ); ?>
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <td colspan="2" class="info">
23
+ <?php _e( '0 (zero) or blank for no maximum length', 'wd-fb-og' );?>
24
+ </td>
25
+ </tr>
26
+
27
+ <tr>
28
+ <th><?php _e( 'Homepage description', 'wd-fb-og' ); ?>:</th>
29
+ <td>
30
+ <?php
31
+ $hide_home_description=false;
32
+ if (get_option( 'show_on_front' )=='page' ) {
33
+ $hide_home_description=true;
34
+ _e( 'The description of your front page:', 'wd-fb-og' );
35
+ echo ' <a href="'.get_edit_post_link(get_option( 'page_on_front' )).'" target="_blank">'.get_the_title(get_option( 'page_on_front' )).'</a>';
36
+ }; ?>
37
+ <div<?php if ($hide_home_description) echo ' style="display: none;"'; ?>>
38
+ <select name="wonderm00n_open_graph_settings[fb_desc_homepage]" id="fb_desc_homepage">
39
+ <option value=""<?php if (trim($options['fb_desc_homepage'])=='' ) echo ' selected="selected"'; ?>><?php _e( 'Website tagline', 'wd-fb-og' );?>&nbsp;</option>
40
+ <option value="custom"<?php if (trim($options['fb_desc_homepage'])=='custom' ) echo ' selected="selected"'; ?>><?php _e( 'Custom text', 'wd-fb-og' );?>&nbsp;</option>
41
+ </select>
42
+ <div id="fb_desc_homepage_customtext_div">
43
+ <textarea name="wonderm00n_open_graph_settings[fb_desc_homepage_customtext]" id="fb_desc_homepage_customtext" rows="3" cols="50"><?php echo trim(esc_attr($options['fb_desc_homepage_customtext'])); ?></textarea>
44
+ <?php
45
+ if ( $webdados_fb->is_wpml_active() ) {
46
+ echo '<div class="info">';
47
+ printf(
48
+ __( 'WPML users: Set the default language description here, save changes and then go to <a href="%s" target="_blank">WPML &gt; String translation</a> to set it for other languages.', 'wd-fb-og' ),
49
+ 'admin.php?page=wpml-string-translation/menu/string-translation.php&amp;context=wd-fb-og'
50
+ );
51
+ echo '</div>'; }
52
+ ?>
53
+ </div>
54
+ </div>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <td colspan="2" class="info">
59
+ </td>
60
+ </tr>
61
+
62
+ </tbody>
63
+ </table>
64
+ </div>
65
+ </div>
66
+ <div class="postbox">
67
+ <h3 class="hndle"><i class="dashicons-before dashicons-format-image"></i> <?php _e( 'Image settings', 'wd-fb-og' ) ?></h3>
68
+ <div class="inside">
69
+ <table class="form-table">
70
+ <tbody>
71
+
72
+ <tr>
73
+ <th><?php _e( 'Default image', 'wd-fb-og' ); ?>:</th>
74
+ <td>
75
+ <input type="text" name="wonderm00n_open_graph_settings[fb_image]" id="fb_image" size="45" value="<?php echo trim(esc_attr($options['fb_image'])); ?>" class="<?php echo( trim($options['fb_image'])=='' ? 'error' : '' ); ?>"/>
76
+ <input id="fb_image_button" class="button" type="button" value="<?php echo esc_attr( __('Upload/Choose', 'wd-fb-og') ); ?>" />
77
+ </td>
78
+ </tr>
79
+ <tr>
80
+ <td colspan="2" class="info">
81
+ <?php _e( 'URL (with http(s)://)', 'wd-fb-og' );?>
82
+ <br/>
83
+ <?php printf( __( 'Recommended size: %dx%dpx', 'wd-fb-og' ), WEBDADOS_FB_W, WEBDADOS_FB_H); ?>
84
+ </td>
85
+ </tr>
86
+
87
+ <tr>
88
+ <th><?php _e( 'On Post/Page, use image from', 'wd-fb-og' ); ?>:</th>
89
+ <td>
90
+ <div>
91
+ 1) <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_use_specific]" id="fb_image_use_specific" value="1" <?php echo (intval($options['fb_image_use_specific'])==1 ? ' checked="checked"' : '' ); ?>/>
92
+ <small><?php _e( '"Open Graph Image" custom field on the post', 'wd-fb-og' );?></small>
93
+ </div>
94
+ <div>
95
+ 2) <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_use_featured]" id="fb_image_use_featured" value="1" <?php echo (intval($options['fb_image_use_featured'])==1 ? ' checked="checked"' : '' ); ?>/>
96
+ <small><?php _e( 'Post/page featured image', 'wd-fb-og' );?></small>
97
+ </div>
98
+ <div>
99
+ 3) <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_use_content]" id="fb_image_use_content" value="1" <?php echo (intval($options['fb_image_use_content'])==1 ? ' checked="checked"' : '' ); ?>/>
100
+ <small><?php _e( 'First image from the post/page content', 'wd-fb-og' );?></small>
101
+ </div>
102
+ <div>
103
+ 4) <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_use_media]" id="fb_image_use_media" value="1" <?php echo (intval($options['fb_image_use_media'])==1 ? ' checked="checked"' : '' ); ?>/>
104
+ <small><?php _e( 'First image from the post/page media gallery', 'wd-fb-og' );?></small>
105
+ </div>
106
+ <div>
107
+ 5) <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_use_default]" id="fb_image_use_default" value="1" <?php echo (intval($options['fb_image_use_default'])==1 ? ' checked="checked"' : '' ); ?>/>
108
+ <small><?php _e( 'Default image specified above', 'wd-fb-og' );?></small>
109
+ </div>
110
+ </td>
111
+ </tr>
112
+ <tr>
113
+ <td colspan="2" class="info">
114
+ <?php _e( 'On posts/pages the first image found, using the priority above, will be used. On the homepage, archives and other website sections the default image is always used.', 'wd-fb-og' );?>
115
+ </td>
116
+ </tr>
117
+
118
+ <tr>
119
+ <th><?php _e( 'Overlay PNG logo', 'wd-fb-og' ); ?> [BETA]:</th>
120
+ <td>
121
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_overlay]" id="fb_image_overlay" value="1" <?php echo (intval($options['fb_image_overlay'])==1 ? ' checked="checked"' : '' ); ?>/>
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <td colspan="2" class="info">
126
+ <?php printf( __( 'The original image will be resized/cropped to %dx%dpx and the chosen PNG (that should also have this size) will be overlaid on it. It will only work for locally hosted images.', 'wd-fb-og' ), WEBDADOS_FB_W, WEBDADOS_FB_H);?>
127
+ <br/>
128
+ <?php printf( __( 'You can see an example of the end result <a href="%s" target="_blank">here</a>', '' ), 'https://www.flickr.com/photos/wonderm00n/29890263040/in/dateposted-public/' ); ?>
129
+ </td>
130
+ </tr>
131
+
132
+ <tr class="fb_image_overlay_options">
133
+ <th><?php _e( 'PNG logo', 'wd-fb-og' ); ?>:</th>
134
+ <td>
135
+ <input type="text" name="wonderm00n_open_graph_settings[fb_image_overlay_image]" id="fb_image_overlay_image" size="45" value="<?php echo trim(esc_attr($options['fb_image_overlay_image'])); ?>"/>
136
+ <input id="fb_image_overlay_button" class="button" type="button" value="<?php echo esc_attr( __('Upload/Choose', 'wd-fb-og') ); ?>" />
137
+ </td>
138
+ </tr>
139
+ <tr class="fb_image_overlay_options">
140
+ <td colspan="2" class="info">
141
+ <?php _e( 'URL (with http(s)://)', 'wd-fb-og' );?>
142
+ <br/>
143
+ <?php printf( __( 'Size: %dx%dpx', 'wd-fb-og' ), WEBDADOS_FB_W, WEBDADOS_FB_H); ?>
144
+ </td>
145
+ </tr>
146
+
147
+ <tr>
148
+ <th><?php _e( 'Add image to RSS/RSS2 feeds', 'wd-fb-og' ); ?>:</th>
149
+ <td>
150
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_rss]" id="fb_image_rss" value="1" <?php echo (intval($options['fb_image_rss'])==1 ? ' checked="checked"' : '' ); ?>/>
151
+ </td>
152
+ </tr>
153
+ <tr>
154
+ <td colspan="2" class="info">
155
+ <?php _e( 'For auto-posting apps like RSS Graffiti, twitterfeed, ...', 'wd-fb-og' ); ?>
156
+ </td>
157
+ </tr>
158
+
159
+ <tr>
160
+ <th><?php _e( 'Force getimagesize on local file', 'wd-fb-og' ); ?>:</th>
161
+ <td>
162
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_adv_force_local]" id="fb_adv_force_local" value="1" <?php echo (intval($options['fb_adv_force_local'])==1 ? ' checked="checked"' : '' ); ?>/>
163
+ </td>
164
+ </tr>
165
+ <tr>
166
+ <td colspan="2" class="info">
167
+ <b><?php _e( 'This is an advanced option: Don\'t mess with this unless you know what you\'re doing', 'wd-fb-og' ); ?></b>
168
+ <br/>
169
+ <?php _e( 'Force getimagesize on local file even if allow_url_fopen=1', 'wd-fb-og' ); ?>
170
+ <br/>
171
+ <?php _e( 'May cause problems with some multisite configurations but fixes "HTTP request failed" errors', 'wd-fb-og' );?>
172
+ </td>
173
+ </tr>
174
+
175
+ </tbody>
176
+ </table>
177
+ </div>
178
+ </div>
179
+ <div class="postbox">
180
+ <h3 class="hndle"><i class="dashicons-before dashicons-admin-links"></i> <?php _e( 'URL settings', 'wd-fb-og' ) ?></h3>
181
+ <div class="inside">
182
+ <table class="form-table">
183
+ <tbody>
184
+
185
+ <tr>
186
+ <th><?php _e( 'Add trailing slash at the end', 'wd-fb-og' ); ?>:</th>
187
+ <td>
188
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_url_add_trailing]" id="fb_url_add_trailing" value="1" <?php echo (intval($options['fb_url_add_trailing'])==1 ? ' checked="checked"' : '' ); ?>/>
189
+ </td>
190
+ </tr>
191
+ <tr>
192
+ <td colspan="2" class="info">
193
+ <?php _e( 'If missing, a trailing slash will be added at the end', 'wd-fb-og' ); ?>
194
+ <br/>
195
+ <?php _e( 'Homepage example:', 'wd-fb-og' ); ?>: <i><?php echo get_option( 'siteurl' ); ?><span id="fb_url_add_trailing_example">/</span></i>
196
+ </td>
197
+ </tr>
198
+
199
+ </tbody>
200
+ </table>
201
+ </div>
202
+ </div>
203
+ <div class="postbox">
204
+ <h3 class="hndle"><i class="dashicons-before dashicons-admin-users"></i> <?php _e( 'Author settings', 'wd-fb-og' ) ?></h3>
205
+ <div class="inside">
206
+ <table class="form-table">
207
+ <tbody>
208
+
209
+ <tr>
210
+ <th><?php _e( 'Hide Author on Pages', 'wd-fb-og' ); ?>:</th>
211
+ <td>
212
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_author_hide_on_pages]" id="fb_author_hide_on_pages" value="1" <?php echo (intval($options['fb_author_hide_on_pages'])==1 ? ' checked="checked"' : '' ); ?>/>
213
+ </td>
214
+ </tr>
215
+ <tr>
216
+ <td colspan="2" class="info">
217
+ <?php _e( 'Hides all Author tags on Pages', 'wd-fb-og' );?>
218
+ </td>
219
+ </tr>
220
+
221
+ </tbody>
222
+ </table>
223
+ </div>
224
+ </div>
225
+ <div class="postbox">
226
+ <h3 class="hndle"><i class="dashicons-before dashicons-general"></i> <?php _e( 'Other settings', 'wd-fb-og' ) ?></h3>
227
+ <div class="inside">
228
+ <table class="form-table">
229
+ <tbody>
230
+
231
+ <tr>
232
+ <th><?php _e( 'Keep data on uninstall', 'wd-fb-og' ); ?>:</th>
233
+ <td>
234
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_keep_data_uninstall]" id="fb_keep_data_uninstall" value="1" <?php echo (intval($options['fb_keep_data_uninstall'])==1 ? ' checked="checked"' : '' ); ?>/>
235
+ </td>
236
+ </tr>
237
+ <tr>
238
+ <td colspan="2" class="info">
239
+ <?php _e( 'Keep the plugin settings on the database even if the plugin is uninstalled', 'wd-fb-og' );?>
240
+ </td>
241
+ </tr>
242
+
243
+ </tbody>
244
+ </table>
245
+ </div>
246
+ </div>
247
+ </div>
admin/options-page-right.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $out_link_utm='?utm_source=fb_og_wp_plugin_settings&amp;utm_medium=link&amp;utm_campaign=fb_og_wp_plugin';
4
+
5
+ $links = array(
6
+ 0 => array(
7
+ 'text' => __('Test your URLs on the Facebook Debugger', 'wd-fb-og'),
8
+ 'url' => 'https://developers.facebook.com/tools/debug',
9
+ ),
10
+ 5 => array(
11
+ 'text' => __('Test your URLs on the Twitter Card validator', 'wd-fb-og'),
12
+ 'url' => 'https://cards-dev.twitter.com/validator',
13
+ ),
14
+ 10 => array(
15
+ 'text' => __('About the Open Graph Protocol (on Facebook)', 'wd-fb-og'),
16
+ 'url' => 'https://developers.facebook.com/docs/opengraph/',
17
+ ),
18
+ 20 => array(
19
+ 'text' => __('The Open Graph Protocol (official website)', 'wd-fb-og'),
20
+ 'url' => 'http://ogp.me/',
21
+ ),
22
+ 25 => array(
23
+ 'text' => __('About Twitter Cards', 'wd-fb-og'),
24
+ 'url' => 'https://dev.twitter.com/cards/getting-started',
25
+ ),
26
+ 30 => array(
27
+ 'text' => __('Plugin official URL', 'wd-fb-og'),
28
+ 'url' => 'http://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/'.$out_link_utm,
29
+ ),
30
+ 40 => array(
31
+ 'text' => __('Author\'s website: Webdados', 'wd-fb-og'),
32
+ 'url' => 'http://www.webdados.pt/'.$out_link_utm,
33
+ ),
34
+ 50 => array(
35
+ 'text' => __('Author\'s Facebook page: Webdados', 'wd-fb-og'),
36
+ 'url' => 'http://www.facebook.com/Webdados',
37
+ ),
38
+ 60 => array(
39
+ 'text' => __('Author\'s Twitter account: @Wonderm00n<br/>(Webdados founder)', 'wd-fb-og'),
40
+ 'url' => 'http://twitter.com/wonderm00n',
41
+ ),
42
+ );
43
+
44
+ ?>
45
+ <div class="postbox-container webdados_fb_admin_right">
46
+
47
+ <div id="poststuff">
48
+
49
+ <div class="postbox">
50
+ <h3 class="hndle"><?php _e('About this plugin', 'wd-fb-og');?></h3>
51
+ <div class="inside">
52
+ <h4><?php _e('Support forum', 'wd-fb-og'); ?>:</h4>
53
+ <p><a href="https://wordpress.org/support/plugin/wonderm00ns-simple-facebook-open-graph-tags" target="_blank">WordPress.org</a></p>
54
+ <h4><?php _e('Premium technical support or custom WordPress development', 'wd-fb-og'); ?>:</h4>
55
+ <p id="webdadoslink"><a href="http://www.webdados.pt/contactos/<?php echo esc_attr($out_link_utm); ?>" title="<?php echo esc_attr(sprintf(__('Please contact %s', 'wd-fb-og'), 'Webdados')); ?>" target="_blank"><img src="<?php echo plugins_url('webdados.png', __FILE__); ?>"/></a></p>
56
+ <h4><?php _e('Please rate our plugin at WordPress.org', 'wd-fb-og'); ?>:</h4>
57
+ <a href="https://wordpress.org/support/view/plugin-reviews/wonderm00ns-simple-facebook-open-graph-tags?filter=5#postform" target="_blank" style="text-align: center; display: block;">
58
+ <div class="star-rating"><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div></div>
59
+ </a>
60
+ </div>
61
+ </div>
62
+
63
+ <div class="postbox">
64
+ <h3 class="hndle"><?php _e('Useful links', 'wd-fb-og');?></h3>
65
+ <div class="inside">
66
+ <ul>
67
+ <?php foreach($links as $link) { ?>
68
+ <li>- <a href="<?php echo $link['url']; ?>" target="_blank"><?php echo $link['text']; ?></a></li>
69
+ <?php } ?>
70
+ </ul>
71
+ </div>
72
+ </div>
73
+
74
+ <div id="webdados_fb_open_graph_donation" class="postbox">
75
+ <h3 class="hndle"><?php _e('Donate', 'wd-fb-og');?></h3>
76
+ <div class="inside">
77
+ <p><?php _e('If you find this plugin useful and want to make a contribution towards future development please consider making a small, or big ;-), donation.', 'wd-fb-og');?></p>
78
+ <center><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
79
+ <input type="hidden" name="cmd" value="_donations">
80
+ <input type="hidden" name="business" value="wonderm00n@gmail.com">
81
+ <input type="hidden" name="lc" value="PT">
82
+ <input type="hidden" name="item_name" value="Marco Almeida (Wonderm00n)">
83
+ <input type="hidden" name="item_number" value="facebook_open_graph_plugin">
84
+ <input type="hidden" name="currency_code" value="USD">
85
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
86
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
87
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
88
+ </form></center>
89
+ </div>
90
+ </div>
91
+
92
+ </div>
93
+
94
+ </div>
admin/options-page-schema.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ ?>
6
+ <div class="menu_containt_div" id="tabs-4">
7
+ <p><?php _e( 'Schema.org tags used by Google+ to render link share posts.', 'wd-fb-og' ); ?></p>
8
+ <div class="postbox">
9
+ <h3 class="hndle"><i class="dashicons-before dashicons-googleplus"></i> <?php _e( 'Google+ / Schema.org Tags', 'wd-fb-og' ) ?></h3>
10
+ <div class="inside">
11
+ <table class="form-table">
12
+ <tbody>
13
+
14
+ <tr>
15
+ <th><?php _e( 'Include Title', 'wd-fb-og' );?>:</th>
16
+ <td>
17
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_title_show_schema]" id="fb_title_show_schema" value="1" <?php echo (intval($options['fb_title_show_schema'])==1 ? ' checked="checked"' : ''); ?>/>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <td colspan="2" class="info">
22
+ <i>&lt;meta itemprop="name" content="..."/&gt;</i>
23
+ </td>
24
+ </tr>
25
+
26
+ <tr>
27
+ <th><?php _e( 'Include Description', 'wd-fb-og' );?>:</th>
28
+ <td>
29
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_desc_show_schema]" id="fb_desc_show_schema" value="1" <?php echo (intval($options['fb_desc_show_schema'])==1 ? ' checked="checked"' : ''); ?>/>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <td colspan="2" class="info">
34
+ <i>&lt;meta itemprop="description" content="..."/&gt;</i>
35
+ </td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <th><?php _e( 'Include Image', 'wd-fb-og' );?>:</th>
40
+ <td>
41
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_show_schema]" id="fb_image_show_schema" value="1" <?php echo (intval($options['fb_image_show_schema'])==1 ? ' checked="checked"' : ''); ?>/>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td colspan="2" class="info">
46
+ <i>&lt;meta itemprop="image" content="..."/&gt;</i>
47
+ </td>
48
+ </tr>
49
+
50
+ <!-- Removed in 2.0 - https://support.google.com/webmasters/answer/6083347 -->
51
+ <!--<tr>
52
+ <th><?php _e( 'Include Post/Page Author', 'wd-fb-og' );?>:</th>
53
+ <td>
54
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_author_show_linkrelgp]" id="fb_author_show_linkrelgp" value="1" <?php echo (intval($options['fb_author_show_linkrelgp'])==1 ? ' checked="checked"' : ''); ?>/>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <td colspan="2" class="info">
59
+ <i>&lt;link rel="author" content="..."/&gt;</i>
60
+ <br/>
61
+ <?php _e('The user\'s Google+ URL must be filled in on his profile', 'wd-fb-og');?>
62
+ </td>
63
+ </tr>-->
64
+
65
+ <tr>
66
+ <th><?php _e( 'Include Post/Page Author', 'wd-fb-og' );?>:</th>
67
+ <td>
68
+ <?php _e('Google doesn\'t use it anymore', 'wd-fb-og');?>
69
+ <input type="hidden" name="wonderm00n_open_graph_settings[fb_author_show_linkrelgp]" id="fb_author_show_linkrelgp" value="0"/>
70
+ </td>
71
+ </tr>
72
+ <tr>
73
+ <td colspan="2" class="info">
74
+ <a href="https://support.google.com/webmasters/answer/6083347" target="_blank">https://support.google.com/webmasters/answer/6083347</a>
75
+ </td>
76
+ </tr>
77
+
78
+ <tr>
79
+ <th><?php _e( 'Include Publisher', 'wd-fb-og' );?>:</th>
80
+ <td>
81
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_publisher_show_schema]" id="fb_publisher_show_schema" value="1" <?php echo (intval($options['fb_publisher_show_schema'])==1 ? ' checked="checked"' : ''); ?>/>
82
+ </td>
83
+ </tr>
84
+ <tr>
85
+ <td colspan="2" class="info">
86
+ <i>&lt;link rel="publisher" href="..."/&gt;</i>
87
+ <br/>
88
+ <?php _e( 'The website\'s Google+ Page', 'wd-fb-og' );?>
89
+ </td>
90
+ </tr>
91
+
92
+ <tr class="fb_publisher_schema_options">
93
+ <th><?php _e( 'Website\'s Google+ Page', 'wd-fb-og' );?>:</th>
94
+ <td>
95
+ <input type="text" name="wonderm00n_open_graph_settings[fb_publisher_schema]" id="fb_publisher_schema" size="50" value="<?php echo trim(esc_attr($options['fb_publisher_schema'])); ?>"/>
96
+ </td>
97
+ </tr>
98
+ <tr class="fb_publisher_schema_options">
99
+ <td colspan="2" class="info">
100
+ <?php _e( 'Google+ Page URL (with https://)', 'wd-fb-og' ); ?>
101
+ </td>
102
+ </tr>
103
+
104
+ </tbody>
105
+ </table>
106
+ </div>
107
+ </div>
108
+ </div>
admin/options-page-seo.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ ?>
6
+ <div class="menu_containt_div" id="tabs-5">
7
+ <p><?php _e( 'SEO Meta Tags that are recommended ONLY if no other plugin is setting them already.', 'wd-fb-og' ); ?></p>
8
+ <div class="postbox">
9
+ <h3 class="hndle"><i class="dashicons-before dashicons-admin-site"></i> <?php _e( 'SEO Meta Tags', 'wd-fb-og' ) ?></h3>
10
+ <div class="inside">
11
+ <table class="form-table">
12
+ <tbody>
13
+
14
+ <tr>
15
+ <th><?php _e( 'Set Canonical URL', 'wd-fb-og' ); ?>:</th>
16
+ <td>
17
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_url_canonical]" id="fb_url_canonical" value="1" <?php echo (intval($options['fb_url_canonical'])==1 ? ' checked="checked"' : '' ); ?>/>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <td colspan="2" class="info">
22
+ <i>&lt;link rel="canonical" href="..."/&gt;</i>
23
+ <?php
24
+ if ( $webdados_fb->is_yoast_seo_active() ) {
25
+ ?>
26
+ <br/>
27
+ <?php _e( 'Not recommended because you have Yoast SEO active', 'wd-fb-og' );?>
28
+ <?php
29
+ }
30
+ ?>
31
+ </td>
32
+ </tr>
33
+
34
+ <tr>
35
+ <th><?php _e( 'Include Meta Description tag', 'wd-fb-og' ); ?>:</th>
36
+ <td>
37
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_desc_show_meta]" id="fb_desc_show_meta" value="1" <?php echo (intval($options['fb_desc_show_meta'])==1 ? ' checked="checked"' : '' ); ?>/>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td colspan="2" class="info">
42
+ <i>&lt;meta name="description" content="..."/&gt;</i>
43
+ <?php
44
+ if ( $webdados_fb->is_yoast_seo_active() ) {
45
+ ?>
46
+ <br/>
47
+ <?php _e( 'Not recommended because you have Yoast SEO active', 'wd-fb-og' );?>
48
+ <?php
49
+ }
50
+ ?>
51
+ </td>
52
+ </tr>
53
+
54
+ <tr>
55
+ <th><?php _e( 'Include Post/Page Author name', 'wd-fb-og' );?>:</th>
56
+ <td>
57
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_author_show_meta]" id="fb_author_show_meta" value="1" <?php echo (intval($options['fb_author_show_meta'])==1 ? ' checked="checked"' : ''); ?>/>
58
+ </td>
59
+ </tr>
60
+ <tr>
61
+ <td colspan="2" class="info">
62
+ <i>&lt;meta name="author" content="..."/&gt;</i>
63
+ <br/>
64
+ <?php _e( 'From the user Display name', 'wd-fb-og' );?>
65
+ </td>
66
+ </tr>
67
+
68
+ <tr>
69
+ <th><?php _e( 'Include Publisher', 'wd-fb-og' );?>:</th>
70
+ <td>
71
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_publisher_show_meta]" id="fb_publisher_show_meta" value="1" <?php echo (intval($options['fb_publisher_show_meta'])==1 ? ' checked="checked"' : ''); ?>/>
72
+ </td>
73
+ </tr>
74
+ <tr>
75
+ <td colspan="2" class="info">
76
+ <i>&lt;meta name="publisher" content="..."/&gt;</i>
77
+ <br/>
78
+ <?php _e( 'From Settings &gt; General &gt; Site Title', 'wd-fb-og' );?>
79
+ </td>
80
+ </tr>
81
+
82
+ </tbody>
83
+ </table>
84
+ </div>
85
+ </div>
86
+ </div>
admin/options-page-twitter.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ ?>
6
+ <div class="menu_containt_div" id="tabs-3">
7
+ <p><?php _e( 'Tags used by Twitter to render their Cards.', 'wd-fb-og' ); ?></p>
8
+ <div class="postbox">
9
+ <h3 class="hndle"><i class="dashicons-before dashicons-twitter"></i> <?php _e( 'Twitter Card Tags', 'wd-fb-og' ) ?></h3>
10
+ <div class="inside">
11
+ <table class="form-table">
12
+ <tbody>
13
+
14
+ <tr>
15
+ <th><?php _e( 'Include Title', 'wd-fb-og' );?>:</th>
16
+ <td>
17
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_title_show_twitter]" id="fb_title_show_twitter" value="1" <?php echo (intval($options['fb_title_show_twitter'])==1 ? ' checked="checked"' : ''); ?>/>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <td colspan="2" class="info">
22
+ <i>&lt;meta name="twitter:title" content=..."/&gt;</i>
23
+ </td>
24
+ </tr>
25
+
26
+ <tr>
27
+ <th><?php _e( 'Include URL', 'wd-fb-og' );?>:</th>
28
+ <td>
29
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_url_show_twitter]" id="fb_url_show_twitter" value="1" <?php echo (intval($options['fb_url_show_twitter'])==1 ? ' checked="checked"' : ''); ?>/>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <td colspan="2" class="info">
34
+ <i>&lt;meta name="twitter:url" content="..."/&gt;</i>
35
+ </td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <th><?php _e( 'Include Description', 'wd-fb-og' );?>:</th>
40
+ <td>
41
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_desc_show_twitter]" id="fb_desc_show_twitter" value="1" <?php echo (intval($options['fb_desc_show_twitter'])==1 ? ' checked="checked"' : ''); ?>/>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td colspan="2" class="info">
46
+ <i>&lt;meta name="twitter:description" content="..."/&gt;</i>
47
+ </td>
48
+ </tr>
49
+
50
+ <tr>
51
+ <th><?php _e( 'Include Image', 'wd-fb-og' );?>:</th>
52
+ <td>
53
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_show_twitter]" id="fb_image_show_twitter" value="1" <?php echo (intval($options['fb_image_show_twitter'])==1 ? ' checked="checked"' : ''); ?>/>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <td colspan="2" class="info">
58
+ <i>&lt;meta name="twitter:image" content="..."/&gt;</i>
59
+ </td>
60
+ </tr>
61
+
62
+ <tr>
63
+ <th><?php _e( 'Include Post/Page Author', 'wd-fb-og' );?>:</th>
64
+ <td>
65
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_author_show_twitter]" id="fb_author_show_twitter" value="1" <?php echo (intval($options['fb_author_show_twitter'])==1 ? ' checked="checked"' : ''); ?>/>
66
+ </td>
67
+ </tr>
68
+ <tr>
69
+ <td colspan="2" class="info">
70
+ <i>&lt;meta name="twitter:creator" content="@..."/&gt;</i>
71
+ <br/>
72
+ <?php _e( 'The user\'s Twitter Username must be filled in on his profile', 'wd-fb-og' );?>
73
+ </td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <th><?php _e( 'Include Publisher', 'wd-fb-og' );?>:</th>
78
+ <td>
79
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_publisher_show_twitter]" id="fb_publisher_show_twitter" value="1" <?php echo (intval($options['fb_publisher_show_twitter'])==1 ? ' checked="checked"' : ''); ?>/>
80
+ </td>
81
+ </tr>
82
+ <tr>
83
+ <td colspan="2" class="info">
84
+ <i>&lt;meta name="twitter:site" content="@..."/&gt;</i>
85
+ <br/>
86
+ <?php _e( 'The website\'s Twitter Username', 'wd-fb-og' );?>
87
+ </td>
88
+ </tr>
89
+
90
+ <tr class="fb_publisher_twitter_options">
91
+ <th><?php _e( 'Website\'s Twitter Username', 'wd-fb-og' );?>:</th>
92
+ <td>
93
+ <input type="text" name="wonderm00n_open_graph_settings[fb_publisher_twitteruser]" id="fb_publisher_twitteruser" size="20" value="<?php echo trim(esc_attr($options['fb_publisher_twitteruser'])); ?>"/>
94
+ </td>
95
+ </tr>
96
+ <tr class="fb_publisher_twitter_options">
97
+ <td colspan="2" class="info">
98
+ <?php _e( 'Twitter username (without @)', 'wd-fb-og' );?>
99
+ </td>
100
+ </tr>
101
+
102
+ <tr>
103
+ <th><?php _e( 'Card Type', 'wd-fb-og' );?>:</th>
104
+ <td>
105
+ <select name="wonderm00n_open_graph_settings[fb_twitter_card_type]" id="fb_twitter_card_type">
106
+ <option value="summary"<?php if (trim($options['fb_twitter_card_type'])=='summary') echo ' selected="selected"'; ?>><?php _e('Summary Card', 'wd-fb-og');?></option>
107
+ <option value="summary_large_image"<?php if (trim($options['fb_twitter_card_type'])=='summary_large_image') echo ' selected="selected"'; ?>><?php _e('Summary Card with Large Image', 'wd-fb-og');?></option>
108
+ </select>
109
+ </td>
110
+ </tr>
111
+ <tr>
112
+ <td colspan="2" class="info">
113
+ <i>&lt;meta name="twitter:card" content="..."/&gt;</i>
114
+ <br/>
115
+ <?php _e( 'The type of Twitter Card shown on the timeline', 'wd-fb-og' );?>
116
+ </td>
117
+ </tr>
118
+
119
+ </tbody>
120
+ </table>
121
+ </div>
122
+ </div>
123
+ </div>
admin/options-page.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ wp_enqueue_media();
6
+
7
+ ?>
8
+ <div class="wrap" id="webdados_fb_admin">
9
+
10
+
11
+ <h1><?php echo WEBDADOS_FB_PLUGIN_NAME ?> (<?php echo WEBDADOS_FB_VERSION; ?>)</h1><br class="clear"/>
12
+ <p><?php _e( 'Please set some default values and which tags should, or should not, be included. It may be necessary to exclude some tags if other plugins are already including them.', 'wd-fb-og' ); ?></p>
13
+
14
+ <div class="columns-2 webdados_fb_admin_left" id="post-body">
15
+ <div class="menu_div metabox-holder" id="tabs">
16
+ <form id="webdados_fb_form" action="options.php" method="post">
17
+
18
+ <?php settings_fields( 'wonderm00n_open_graph_settings' ); ?>
19
+ <!-- Remeber last active tab -->
20
+ <input type="hidden" name="wonderm00n_open_graph_settings[settings_last_tab]" id="settings_last_tab" value="<?php echo intval($options['settings_last_tab']); ?>"/>
21
+ <!-- Minimum image size -->
22
+ <input type="hidden" name="wonderm00n_open_graph_settings[fb_image_min_size]" value="<?php echo intval($options['fb_image_min_size']); ?>"/>
23
+
24
+ <h2 class="nav-tab-wrapper">
25
+ <ul>
26
+ <li>
27
+ <a class="nav-tab" href="#tabs-1" data-tab-index="0">
28
+ <i class="dashicons-before dashicons-admin-generic"></i>
29
+ <?php _e( 'General', 'wd-fb-og' ) ?>
30
+ </a>
31
+ </li>
32
+ <li>
33
+ <a class="nav-tab" href="#tabs-2" data-tab-index="1">
34
+ <i class="dashicons-before dashicons-facebook-alt"></i>
35
+ <?php _e( 'Open Graph', 'wd-fb-og' ) ?>
36
+ </a>
37
+ </li>
38
+ <li>
39
+ <a class="nav-tab" href="#tabs-3" data-tab-index="2">
40
+ <i class="dashicons-before dashicons-twitter"></i>
41
+ <?php _e( 'Cards', 'wd-fb-og' ) ?>
42
+ </a>
43
+ </li>
44
+ <li>
45
+ <a class="nav-tab" href="#tabs-4" data-tab-index="3">
46
+ <i class="dashicons-before dashicons-googleplus"></i>
47
+ <?php _e( 'Schema', 'wd-fb-og' ) ?>
48
+ </a>
49
+ </li>
50
+ <li>
51
+ <a class="nav-tab" href="#tabs-5" data-tab-index="4">
52
+ <i class="dashicons-before dashicons-admin-site"></i>
53
+ <?php _e( 'SEO tags', 'wd-fb-og' ) ?>
54
+ </a>
55
+ </li>
56
+ <li>
57
+ <a class="nav-tab" href="#tabs-6" data-tab-index="5">
58
+ <i class="dashicons-before dashicons-layout"></i>
59
+ <?php _e( '3rd party', 'wd-fb-og' ) ?>
60
+ </a>
61
+ </li>
62
+ </ul>
63
+ </h2>
64
+
65
+ <div id="poststuff">
66
+
67
+ <div class="clear"></div>
68
+
69
+ <!-- General -->
70
+ <?php include 'options-page-general.php'; ?>
71
+
72
+
73
+ <!-- Facebook Open Graph -->
74
+ <?php include 'options-page-facebook.php'; ?>
75
+
76
+ <!-- Twitter Cards -->
77
+ <?php include 'options-page-twitter.php'; ?>
78
+
79
+ <!-- Google+ / Schema.org -->
80
+ <?php include 'options-page-schema.php'; ?>
81
+
82
+ <!-- SEO Meta Tags -->
83
+ <?php include 'options-page-seo.php'; ?>
84
+
85
+ <!-- 3rd party integrations -->
86
+ <?php include 'options-page-3rdparty.php'; ?>
87
+
88
+ <div class="clear"></div>
89
+ <?php submit_button(); ?>
90
+
91
+ </div>
92
+
93
+ </form>
94
+ </div>
95
+ </div>
96
+
97
+
98
+ <?php include 'options-page-right.php'; ?>
99
+
100
+
101
+ <div class="clear">
102
+ <p><br/>&copy 2011<?php if(date( 'Y' )>2011) echo '-'.date( 'Y' ); ?> <a href="http://www.webdados.pt/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Webdados</a> &amp; <a href="http://wonderm00n.com/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Marco Almeida (Wonderm00n)</a></p>
103
+ </div>
104
+
105
+
106
+ </div>
107
+ <script type="text/javascript">
108
+ jQuery(document).ready(function($) {
109
+
110
+ //Tabs
111
+ $( function() {
112
+ $( "#tabs" ).tabs({
113
+ active: <?php echo intval($options['settings_last_tab']); ?>
114
+ });
115
+ });
116
+ <?php
117
+ if (isset($_GET['localeOnline']) && intval($_GET['localeOnline'])==1) {
118
+ ?>
119
+ location.hash = "#fblocale";
120
+ $('#fb_locale').focus();
121
+ <?php
122
+ }
123
+ ?>
124
+
125
+ });
126
+ </script>
{includes → admin}/webdados.png RENAMED
File without changes
fbimg.php CHANGED
@@ -2,16 +2,18 @@
2
  define('WP_USE_THEMES', false);
3
  require( '../../../wp-blog-header.php' );
4
 
5
- if ($webdados_fb_open_graph_settings=webdados_fb_open_graph_load_settings()) {
 
 
6
 
7
  if ( isset($_GET['img']) && trim($_GET['img'])!='' ) {
8
- if ($url=parse_url(trim($_GET['img']))) {
9
  if ( $url['host']==$_SERVER['HTTP_HOST'] ) {
10
 
11
  if( $image=imagecreatefromfile($_SERVER['DOCUMENT_ROOT'].$url['path']) ) {
12
 
13
- $thumb_width = 1200;
14
- $thumb_height = 630;
15
 
16
  $width = imagesx($image);
17
  $height = imagesy($image);
@@ -43,14 +45,14 @@
43
  $new_width, $new_height,
44
  $width, $height);
45
  //Barra
46
- if (trim($webdados_fb_open_graph_settings['fb_image_overlay_image'])!='') {
47
- $barra_url = parse_url(trim($webdados_fb_open_graph_settings['fb_image_overlay_image']));
48
  $barra = imagecreatefromfile($_SERVER['DOCUMENT_ROOT'].$barra_url['path']);
49
- imagecopy($thumb, $barra, 0, 0, 0, 0, 1200, 630);
50
  }
51
 
52
  header('Content-Type: image/jpeg');
53
- imagejpeg($thumb, NULL, 95);
54
  imagedestroy($image);
55
  imagedestroy($thumb);
56
  imagedestroy($barra);
2
  define('WP_USE_THEMES', false);
3
  require( '../../../wp-blog-header.php' );
4
 
5
+
6
+
7
+ if ( $webdados_fb = webdados_fb_run() ) {
8
 
9
  if ( isset($_GET['img']) && trim($_GET['img'])!='' ) {
10
+ if ( $url=parse_url(trim($_GET['img'])) ) {
11
  if ( $url['host']==$_SERVER['HTTP_HOST'] ) {
12
 
13
  if( $image=imagecreatefromfile($_SERVER['DOCUMENT_ROOT'].$url['path']) ) {
14
 
15
+ $thumb_width = intval(WEBDADOS_FB_W);
16
+ $thumb_height = intval(WEBDADOS_FB_H);
17
 
18
  $width = imagesx($image);
19
  $height = imagesy($image);
45
  $new_width, $new_height,
46
  $width, $height);
47
  //Barra
48
+ if ( trim($webdados_fb->options['fb_image_overlay_image'])!='' ) {
49
+ $barra_url = parse_url(trim($webdados_fb->options['fb_image_overlay_image']));
50
  $barra = imagecreatefromfile($_SERVER['DOCUMENT_ROOT'].$barra_url['path']);
51
+ imagecopy($thumb, $barra, 0, 0, 0, 0, intval(WEBDADOS_FB_W), intval(WEBDADOS_FB_H) );
52
  }
53
 
54
  header('Content-Type: image/jpeg');
55
+ imagejpeg($thumb, NULL, 95 );
56
  imagedestroy($image);
57
  imagedestroy($thumb);
58
  imagedestroy($barra);
includes/FacebookLocales.xml CHANGED
@@ -309,6 +309,17 @@
309
  </codes>
310
  </locale>
311
  <locale>
 
 
 
 
 
 
 
 
 
 
 
312
  <englishName>Spanish (Colombia)</englishName>
313
  <codes>
314
  <code>
@@ -342,6 +353,28 @@
342
  </codes>
343
  </locale>
344
  <locale>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  <englishName>Estonian</englishName>
346
  <codes>
347
  <code>
@@ -551,6 +584,17 @@
551
  </codes>
552
  </locale>
553
  <locale>
 
 
 
 
 
 
 
 
 
 
 
554
  <englishName>Hungarian</englishName>
555
  <codes>
556
  <code>
@@ -716,6 +760,17 @@
716
  </codes>
717
  </locale>
718
  <locale>
 
 
 
 
 
 
 
 
 
 
 
719
  <englishName>Latin</englishName>
720
  <codes>
721
  <code>
@@ -804,6 +859,17 @@
804
  </codes>
805
  </locale>
806
  <locale>
 
 
 
 
 
 
 
 
 
 
 
807
  <englishName>Macedonian</englishName>
808
  <codes>
809
  <code>
@@ -1024,6 +1090,17 @@
1024
  </codes>
1025
  </locale>
1026
  <locale>
 
 
 
 
 
 
 
 
 
 
 
1027
  <englishName>Quechua</englishName>
1028
  <codes>
1029
  <code>
309
  </codes>
310
  </locale>
311
  <locale>
312
+ <englishName>Spanish (Chile)</englishName>
313
+ <codes>
314
+ <code>
315
+ <standard>
316
+ <name>FB</name>
317
+ <representation>es_CL</representation>
318
+ </standard>
319
+ </code>
320
+ </codes>
321
+ </locale>
322
+ <locale>
323
  <englishName>Spanish (Colombia)</englishName>
324
  <codes>
325
  <code>
353
  </codes>
354
  </locale>
355
  <locale>
356
+ <englishName>Spanish (Mexico)</englishName>
357
+ <codes>
358
+ <code>
359
+ <standard>
360
+ <name>FB</name>
361
+ <representation>es_MX</representation>
362
+ </standard>
363
+ </code>
364
+ </codes>
365
+ </locale>
366
+ <locale>
367
+ <englishName>Spanish (Venezuela)</englishName>
368
+ <codes>
369
+ <code>
370
+ <standard>
371
+ <name>FB</name>
372
+ <representation>es_VE</representation>
373
+ </standard>
374
+ </code>
375
+ </codes>
376
+ </locale>
377
+ <locale>
378
  <englishName>Estonian</englishName>
379
  <codes>
380
  <code>
584
  </codes>
585
  </locale>
586
  <locale>
587
+ <englishName>Haitian Creole</englishName>
588
+ <codes>
589
+ <code>
590
+ <standard>
591
+ <name>FB</name>
592
+ <representation>ht_HT</representation>
593
+ </standard>
594
+ </code>
595
+ </codes>
596
+ </locale>
597
+ <locale>
598
  <englishName>Hungarian</englishName>
599
  <codes>
600
  <code>
760
  </codes>
761
  </locale>
762
  <locale>
763
+ <englishName>Kyrgyz</englishName>
764
+ <codes>
765
+ <code>
766
+ <standard>
767
+ <name>FB</name>
768
+ <representation>ky_KG</representation>
769
+ </standard>
770
+ </code>
771
+ </codes>
772
+ </locale>
773
+ <locale>
774
  <englishName>Latin</englishName>
775
  <codes>
776
  <code>
859
  </codes>
860
  </locale>
861
  <locale>
862
+ <englishName>Māori</englishName>
863
+ <codes>
864
+ <code>
865
+ <standard>
866
+ <name>FB</name>
867
+ <representation>mi_NZ</representation>
868
+ </standard>
869
+ </code>
870
+ </codes>
871
+ </locale>
872
+ <locale>
873
  <englishName>Macedonian</englishName>
874
  <codes>
875
  <code>
1090
  </codes>
1091
  </locale>
1092
  <locale>
1093
+ <englishName>Quiché</englishName>
1094
+ <codes>
1095
+ <code>
1096
+ <standard>
1097
+ <name>FB</name>
1098
+ <representation>qc_GT</representation>
1099
+ </standard>
1100
+ </code>
1101
+ </codes>
1102
+ </locale>
1103
+ <locale>
1104
  <englishName>Quechua</englishName>
1105
  <codes>
1106
  <code>
includes/class-webdados-fb-open-graph.php ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class Webdados_FB {
6
+
7
+ /* Unique identifier */
8
+ //protected $plugin_slug; - Necessário??
9
+
10
+ /* Version */
11
+ protected $version;
12
+
13
+ /* Database options */
14
+ public $options;
15
+
16
+ /* Public class */
17
+ //public $plugin_public; - Necessário?
18
+
19
+ /* Construct */
20
+ public function __construct( $version ) {
21
+ //$this->plugin_slug = 'wonderm00ns-simple-facebook-open-graph-tags';
22
+ $this->version = $version;
23
+ $this->options = $this->load_options();
24
+ //var_dump($this->options);
25
+ $this->load_dependencies();
26
+ $this->set_locale();
27
+ $this->call_global_hooks();
28
+ if ( is_admin() ) $this->call_admin_hooks();
29
+ if ( !is_admin() ) $this->call_public_hooks();
30
+ }
31
+
32
+ /* Default options */
33
+ private function default_options() {
34
+ return array(
35
+ //System
36
+ 'fb_keep_data_uninstall' => 1,
37
+ 'fb_image_min_size' => 200,
38
+ //General
39
+ 'fb_desc_chars' => 300,
40
+ 'fb_image_use_specific' => 1,
41
+ 'fb_image_use_featured' => 1,
42
+ 'fb_image_use_content' => 0,
43
+ 'fb_image_use_media' => 0,
44
+ 'fb_image_use_default' => 1,
45
+ //OG
46
+ 'fb_title_show' => 1,
47
+ 'fb_sitename_show' => 1,
48
+ 'fb_url_show' => 1,
49
+ 'fb_desc_show' => 1,
50
+ 'fb_image_show' => 1,
51
+ 'fb_type_show' => 1,
52
+ 'fb_author_show' => 1,
53
+ 'fb_article_dates_show' => 1,
54
+ 'fb_article_sections_show' => 1,
55
+ 'fb_publisher_show' => 1,
56
+ 'fb_locale_show' => 1,
57
+ 'fb_adv_notify_fb' => 1,
58
+ //Twitter
59
+ 'fb_title_show_twitter' => 1,
60
+ 'fb_url_show_twitter' => 1,
61
+ 'fb_desc_show_twitter' => 1,
62
+ 'fb_image_show_twitter' => 1,
63
+ 'fb_author_show_twitter' => 1,
64
+ 'fb_publisher_show_twitter' => 1,
65
+ 'fb_twitter_card_type' => 'summary_large_image',
66
+ //Schema
67
+ 'fb_title_show_schema' => 1,
68
+ 'fb_desc_show_schema' => 1,
69
+ 'fb_image_show_schema' => 1,
70
+ 'fb_publisher_show_schema' => 1,
71
+ //SEO
72
+ //...
73
+ //3rd party
74
+ 'fb_show_wpseoyoast' => 1,
75
+ 'fb_wc_useproductgallery' => 1,
76
+ 'fb_subheading_position' => 'after',
77
+ );
78
+ }
79
+
80
+ /* All Settings and sanitize function */
81
+ public function all_options() {
82
+ return array(
83
+ 'fb_app_id_show' => 'intval',
84
+ 'fb_app_id' => 'trim',
85
+ 'fb_admin_id_show' => 'intval',
86
+ 'fb_admin_id' => 'trim',
87
+ 'fb_locale_show' => 'intval',
88
+ 'fb_locale' => 'trim',
89
+ 'fb_sitename_show' => 'intval',
90
+ 'fb_title_show' => 'intval',
91
+ 'fb_title_show_schema' => 'intval',
92
+ 'fb_title_show_twitter' => 'intval',
93
+ 'fb_url_show' => 'intval',
94
+ 'fb_url_show_twitter' => 'intval',
95
+ 'fb_url_canonical' => 'intval',
96
+ 'fb_url_add_trailing' => 'intval',
97
+ 'fb_type_show' => 'intval',
98
+ 'fb_type_homepage' => 'trim',
99
+ 'fb_article_dates_show' => 'intval',
100
+ 'fb_article_sections_show' => 'intval',
101
+ 'fb_publisher_show' => 'intval',
102
+ 'fb_publisher' => 'trim',
103
+ 'fb_publisher_show_schema' => 'intval',
104
+ 'fb_publisher_schema' => 'trim',
105
+ 'fb_publisher_show_twitter' => 'intval',
106
+ 'fb_publisher_twitteruser' => 'trim',
107
+ 'fb_author_show' => 'intval',
108
+ 'fb_author_show_meta' => 'intval',
109
+ 'fb_author_show_linkrelgp' => 'intval',
110
+ 'fb_author_show_twitter' => 'intval',
111
+ 'fb_author_hide_on_pages' => 'intval',
112
+ 'fb_desc_show' => 'intval',
113
+ 'fb_desc_show_meta' => 'intval',
114
+ 'fb_desc_show_schema' => 'intval',
115
+ 'fb_desc_show_twitter' => 'intval',
116
+ 'fb_desc_chars' => 'intval',
117
+ 'fb_desc_homepage' => 'trim',
118
+ 'fb_desc_homepage_customtext' => 'trim',
119
+ 'fb_image_show' => 'intval',
120
+ 'fb_image_size_show' => 'intval',
121
+ 'fb_image_show_schema' => 'intval',
122
+ 'fb_image_show_twitter' => 'intval',
123
+ 'fb_image' => 'trim',
124
+ 'fb_image_rss' => 'intval',
125
+ 'fb_image_use_specific' => 'intval',
126
+ 'fb_image_use_featured' => 'intval',
127
+ 'fb_image_use_content' => 'intval',
128
+ 'fb_image_use_media' => 'intval',
129
+ 'fb_image_use_default' => 'intval',
130
+ 'fb_image_min_size' => 'intval',
131
+ 'fb_show_wpseoyoast' => 'intval',
132
+ 'fb_show_subheading' => 'intval',
133
+ 'fb_subheading_position' => 'trim',
134
+ 'fb_show_businessdirectoryplugin' => 'intval',
135
+ 'fb_keep_data_uninstall' => 'intval',
136
+ 'fb_adv_force_local' => 'intval',
137
+ 'fb_adv_notify_fb' => 'intval',
138
+ 'fb_adv_supress_fb_notice' => 'intval',
139
+ 'fb_twitter_card_type' => 'trim',
140
+ 'fb_wc_usecategthumb' => 'intval',
141
+ 'fb_wc_useproductgallery' => 'intval',
142
+ 'fb_wc_usepg_png_overlay' => 'intval',
143
+ 'fb_image_overlay' => 'intval',
144
+ 'fb_image_overlay_image' => 'trim',
145
+ 'fb_publisher_show_meta' => 'intval',
146
+ 'settings_last_tab' => 'intval',
147
+ );
148
+ }
149
+
150
+ /* Load Options */
151
+ private function load_options() {
152
+ $user_options = get_option( 'wonderm00n_open_graph_settings' );
153
+ $all_options = $this->all_options();
154
+ $default_options = $this->default_options();
155
+ if ( is_array( $all_options ) ) {
156
+ //Merge the settings "all together now" (yes, it's a Beatles reference)
157
+ foreach( $all_options as $key => $sanitize ) {
158
+ //We have it on the user settings ?
159
+ if ( isset( $user_options[$key] ) ) {
160
+ //Is it empty?
161
+ if ( mb_strlen( trim( $user_options[$key] ) ) == 0 ) {
162
+ //Should we get it from defaults, then?
163
+ if ( !empty( $default_options[$key] ) ) {
164
+ $user_options[$key] = $default_options[$key];
165
+ }
166
+ }
167
+ } else {
168
+ if ( !empty( $default_options[$key] ) ) {
169
+ //Get it from defaults
170
+ $user_options[$key] = $default_options[$key];
171
+ } else {
172
+ //Or just set it as an empty strings to avoid php notices and having to test isset() all the time
173
+ $user_options[$key] = '';
174
+ }
175
+ }
176
+ }
177
+ }
178
+ return $user_options;
179
+ }
180
+
181
+ /* Dependencies */
182
+ private function load_dependencies() {
183
+ if ( is_admin() ) require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-webdados-fb-open-graph-admin.php';
184
+ if ( !is_admin() ) require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-webdados-fb-open-graph-public.php';
185
+ }
186
+
187
+ /* Translations */
188
+ private function set_locale() {
189
+ load_plugin_textdomain( 'wd-fb-og', false, dirname(plugin_basename(__FILE__)) . '/../lang/' );
190
+ }
191
+
192
+ /* Global hooks */
193
+ private function call_global_hooks() {
194
+ //Update
195
+ add_action( 'plugins_loaded', array( $this, 'update_db_check' ) );
196
+ //Add excerpts to pages
197
+ add_action( 'init', array( $this, 'add_excerpts_to_pages' ) );
198
+ }
199
+
200
+ /* Admin hooks */
201
+ private function call_admin_hooks() {
202
+ $plugin_admin = new Webdados_FB_Admin( $this->options, $this->version );
203
+ // Menu
204
+ add_action( 'admin_menu', array( $plugin_admin, 'create_admin_menu' ) );
205
+ // set sanitization callback for plugin options - ???
206
+ add_action( 'admin_init', array( $plugin_admin, 'options_init' ) );
207
+ // check if BuddyPress is active - This should be global, no?
208
+ add_action( 'bp_include', array( $plugin_admin, 'is_bp_loaded' ) );
209
+ // add a "Settings" link to the Plugins page
210
+ add_filter( 'plugin_action_links_wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php', array( $plugin_admin, 'place_settings_link' ) );
211
+ if ( intval( $this->options['fb_adv_notify_fb'] ) == 1 ) {
212
+ // try to clear Facebook open graph cache
213
+ //add_action( 'save_post', array( $plugin_admin, 'clear_facebook_og_cache' ) );
214
+ // show notification in admin area, if Facebook Open Graph cache gets cleared successfully
215
+ //add_action( 'admin_notices', array( $plugin_admin, 'fb_og_cache_cleared_notification' ) );
216
+ }
217
+ // show custom options at author's profile page
218
+ add_action( 'user_contactmethods', array( $plugin_admin, 'user_contactmethods' ) );
219
+ // Add metabox to posts
220
+ add_action( 'add_meta_boxes', array( $plugin_admin, 'add_meta_boxes' ) );
221
+ add_action( 'save_post', array( $plugin_admin, 'save_meta_boxes' ) );
222
+ add_action( 'admin_notices', array( $plugin_admin, 'admin_notices' ) );
223
+ // Session start so we can know if the cache was cleared on Facebook
224
+ if(!session_id())
225
+ session_start();
226
+ }
227
+
228
+ /* Public hooks */
229
+ private function call_public_hooks() {
230
+ //Create public object
231
+ $plugin_public = new Webdados_FB_Public( $this->options, $this->version );
232
+ // Get Post as soon as he's set, because some plugins, like BDP usally mess with it
233
+ add_action( 'the_post', array( $plugin_public, 'get_post' ), 0 );
234
+ // hook to upate plugin db/options based on version
235
+ add_action( 'wp_head', array( $plugin_public, 'insert_meta_tags' ), 99999 );
236
+ // hook to add Open Graph Namespace
237
+ add_filter( 'language_attributes', array( $plugin_public, 'add_open_graph_namespace' ), 99999 );
238
+ // RSS
239
+ add_action( 'rss2_ns', array( $plugin_public, 'images_on_feed_yahoo_media_tag') );
240
+ add_action( 'rss_item', array( $plugin_public, 'images_on_feed_image') );
241
+ add_action( 'rss2_item', array( $plugin_public, 'images_on_feed_image') );
242
+ }
243
+
244
+ /* Update database */
245
+ public function update_db_check() {
246
+ $upgrade = false;
247
+ //Upgrade from 0.5.4 - Last version with individual settings
248
+ if ( !$v=get_option('wonderm00n_open_graph_version') ) {
249
+ //No version because it's a new install or because it's 0.5.4 or less?
250
+ if ( $this->version <= '0.5.4' ) {
251
+
252
+ } else {
253
+ //A new install - set the default data on the database
254
+ $upgrade = true;
255
+ update_option( 'wonderm00n_open_graph_settings', $this->options );
256
+ }
257
+ } else {
258
+ if ( $v<$webdados_fb_open_graph_plugin_version ) {
259
+ //Any version upgrade
260
+ $upgrade=true;
261
+ //We should do any upgrade we need, right here
262
+ //...
263
+ }
264
+ }
265
+ //Set version on database
266
+ if ($upgrade) {
267
+ update_option( 'wonderm00n_open_graph_version', $this->version );
268
+ }
269
+ }
270
+
271
+ /* Add excerpt to pages */
272
+ public function add_excerpts_to_pages() {
273
+ add_post_type_support( 'page', 'excerpt' );
274
+ }
275
+
276
+ /* WPML */
277
+ public function is_wpml_active() {
278
+ if ( function_exists( 'icl_object_id' ) && function_exists( 'icl_register_string' ) ) {
279
+ return true;
280
+ }
281
+ return false;
282
+ }
283
+
284
+ /* 3rd Party - Yoast SEO */
285
+ public function is_yoast_seo_active() {
286
+ if ( defined( 'WPSEO_VERSION' ) ) {
287
+ return true;
288
+ }
289
+ return false;
290
+ }
291
+ /* 3rd Party - WooCommerce */
292
+ public function is_woocommerce_active() {
293
+ return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
294
+ }
295
+
296
+ /* 3rd Party - Subheading */
297
+ public function is_subheading_plugin_active() {
298
+ if ( class_exists( 'SubHeading' ) && function_exists( 'get_the_subheading' ) ) {
299
+ return true;
300
+ }
301
+ return false;
302
+ }
303
+
304
+ /* 3rd Party - Business Directory Plugin */
305
+ public function is_business_directory_active() {
306
+ @include_once(ABSPATH . 'wp-admin/includes/plugin.php');
307
+ if ( is_plugin_active( 'business-directory-plugin/business-directory-plugin.php' ) ) {
308
+ return true;
309
+ }
310
+ return false;
311
+ }
312
+
313
+ }
includes/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
includes/settings-page.php DELETED
@@ -1,1193 +0,0 @@
1
- <?php
2
- /**
3
- * @package Facebook Open Graph Meta Tags for WordPress
4
- * @subpackage Settings Page
5
- *
6
- * @since 0.1
7
- * @author Webdados
8
- *
9
- *
10
- */
11
-
12
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
-
14
- //First we save!
15
- if ( isset($_POST['action']) ) {
16
- if (trim($_POST['action'])=='save') {
17
- //This should also use the $wonderm00n_open_graph_plugin_settings array, but because of intval and trim we still can't
18
- $usersettings['fb_app_id_show']= intval(webdados_fb_open_graph_post('fb_app_id_show'));
19
- $usersettings['fb_app_id']= trim(webdados_fb_open_graph_post('fb_app_id'));
20
- $usersettings['fb_admin_id_show']= intval(webdados_fb_open_graph_post('fb_admin_id_show'));
21
- $usersettings['fb_admin_id']= trim(webdados_fb_open_graph_post('fb_admin_id'));
22
- $usersettings['fb_locale_show']= intval(webdados_fb_open_graph_post('fb_locale_show'));
23
- $usersettings['fb_locale']= trim(webdados_fb_open_graph_post('fb_locale'));
24
- $usersettings['fb_sitename_show']= intval(webdados_fb_open_graph_post('fb_sitename_show'));
25
- $usersettings['fb_title_show']= intval(webdados_fb_open_graph_post('fb_title_show'));
26
- $usersettings['fb_title_show_schema']= intval(webdados_fb_open_graph_post('fb_title_show_schema'));
27
- $usersettings['fb_title_show_twitter']= intval(webdados_fb_open_graph_post('fb_title_show_twitter'));
28
- $usersettings['fb_url_show']= intval(webdados_fb_open_graph_post('fb_url_show'));
29
- $usersettings['fb_url_show_twitter']= intval(webdados_fb_open_graph_post('fb_url_show_twitter'));
30
- $usersettings['fb_url_canonical']= intval(webdados_fb_open_graph_post('fb_url_canonical'));
31
- $usersettings['fb_url_add_trailing']= intval(webdados_fb_open_graph_post('fb_url_add_trailing'));
32
- $usersettings['fb_type_show']= intval(webdados_fb_open_graph_post('fb_type_show'));
33
- $usersettings['fb_type_homepage']= trim(webdados_fb_open_graph_post('fb_type_homepage'));
34
- $usersettings['fb_article_dates_show']= intval(webdados_fb_open_graph_post('fb_article_dates_show'));
35
- $usersettings['fb_article_sections_show']= intval(webdados_fb_open_graph_post('fb_article_sections_show'));
36
- $usersettings['fb_publisher_show']= intval(webdados_fb_open_graph_post('fb_publisher_show'));
37
- $usersettings['fb_publisher']= trim(webdados_fb_open_graph_post('fb_publisher'));
38
- $usersettings['fb_publisher_show_schema']= intval(webdados_fb_open_graph_post('fb_publisher_show_schema'));
39
- $usersettings['fb_publisher_schema']= trim(webdados_fb_open_graph_post('fb_publisher_schema'));
40
- $usersettings['fb_publisher_show_twitter']= intval(webdados_fb_open_graph_post('fb_publisher_show_twitter'));
41
- $usersettings['fb_publisher_twitteruser']= trim(webdados_fb_open_graph_post('fb_publisher_twitteruser'));
42
- $usersettings['fb_author_show']= intval(webdados_fb_open_graph_post('fb_author_show'));
43
- $usersettings['fb_author_show_meta']= intval(webdados_fb_open_graph_post('fb_author_show_meta'));
44
- $usersettings['fb_author_show_linkrelgp']= intval(webdados_fb_open_graph_post('fb_author_show_linkrelgp'));
45
- $usersettings['fb_author_show_twitter']= intval(webdados_fb_open_graph_post('fb_author_show_twitter'));
46
- $usersettings['fb_author_hide_on_pages']= intval(webdados_fb_open_graph_post('fb_author_hide_on_pages'));
47
- $usersettings['fb_desc_show']= intval(webdados_fb_open_graph_post('fb_desc_show'));
48
- $usersettings['fb_desc_show_meta']= intval(webdados_fb_open_graph_post('fb_desc_show_meta'));
49
- $usersettings['fb_desc_show_schema']= intval(webdados_fb_open_graph_post('fb_desc_show_schema'));
50
- $usersettings['fb_desc_show_twitter']= intval(webdados_fb_open_graph_post('fb_desc_show_twitter'));
51
- $usersettings['fb_desc_chars']= intval(webdados_fb_open_graph_post('fb_desc_chars'));
52
- $usersettings['fb_desc_homepage']= trim(webdados_fb_open_graph_post('fb_desc_homepage'));
53
- $usersettings['fb_desc_homepage_customtext']= trim(webdados_fb_open_graph_post('fb_desc_homepage_customtext'));
54
- $usersettings['fb_image_show']= intval(webdados_fb_open_graph_post('fb_image_show'));
55
- $usersettings['fb_image_size_show']= intval(webdados_fb_open_graph_post('fb_image_size_show'));
56
- $usersettings['fb_image_show_schema']= intval(webdados_fb_open_graph_post('fb_image_show_schema'));
57
- $usersettings['fb_image_show_twitter']= intval(webdados_fb_open_graph_post('fb_image_show_twitter'));
58
- $usersettings['fb_image']= trim(webdados_fb_open_graph_post('fb_image'));
59
- $usersettings['fb_image_rss']= intval(webdados_fb_open_graph_post('fb_image_rss'));
60
- $usersettings['fb_image_use_specific']= intval(webdados_fb_open_graph_post('fb_image_use_specific'));
61
- $usersettings['fb_image_use_featured']= intval(webdados_fb_open_graph_post('fb_image_use_featured'));
62
- $usersettings['fb_image_use_content']= intval(webdados_fb_open_graph_post('fb_image_use_content'));
63
- $usersettings['fb_image_use_media']= intval(webdados_fb_open_graph_post('fb_image_use_media'));
64
- $usersettings['fb_image_use_default']= intval(webdados_fb_open_graph_post('fb_image_use_default'));
65
- $usersettings['fb_show_wpseoyoast']= intval(webdados_fb_open_graph_post('fb_show_wpseoyoast'));
66
- $usersettings['fb_show_subheading']= intval(webdados_fb_open_graph_post('fb_show_subheading'));
67
- $usersettings['fb_subheading_position']= trim(webdados_fb_open_graph_post('fb_subheading_position'));
68
- $usersettings['fb_show_businessdirectoryplugin']= intval(webdados_fb_open_graph_post('fb_show_businessdirectoryplugin'));
69
- $usersettings['fb_adv_force_local']= intval(webdados_fb_open_graph_post('fb_adv_force_local'));
70
- $usersettings['fb_adv_notify_fb']= intval(webdados_fb_open_graph_post('fb_adv_notify_fb'));
71
- $usersettings['fb_adv_supress_fb_notice']= intval(webdados_fb_open_graph_post('fb_adv_supress_fb_notice'));
72
- $usersettings['fb_twitter_card_type']= trim(webdados_fb_open_graph_post('fb_twitter_card_type'));
73
- $usersettings['fb_wc_usecategthumb']= intval(webdados_fb_open_graph_post('fb_wc_usecategthumb'));
74
- $usersettings['fb_wc_useproductgallery']= intval(webdados_fb_open_graph_post('fb_wc_useproductgallery'));
75
- $usersettings['fb_image_overlay']= intval(webdados_fb_open_graph_post('fb_image_overlay'));
76
- $usersettings['fb_image_overlay_image']= trim(webdados_fb_open_graph_post('fb_image_overlay_image'));
77
- //Update
78
- update_option('wonderm00n_open_graph_settings', $usersettings);
79
- //WPML - Register custom website description
80
- if (function_exists('icl_object_id') && function_exists('icl_register_string')) {
81
- icl_register_string('wd-fb-og', 'wd_fb_og_desc_homepage_customtext', trim(webdados_fb_open_graph_post('fb_desc_homepage_customtext')));
82
- }
83
- }
84
- }
85
-
86
- //Load the settings
87
- extract(webdados_fb_open_graph_load_settings());
88
-
89
- wp_enqueue_media();
90
- ?>
91
- <div class="wrap">
92
-
93
- <?php screen_icon(); ?>
94
- <h1><?php echo $webdados_fb_open_graph_plugin_name; ?> (<?php echo $webdados_fb_open_graph_plugin_version; ?>)</h1>
95
- <br class="clear"/>
96
- <p><?php _e('Please set some default values and which tags should, or should not, be included. It may be necessary to exclude some tags if other plugins are already including them.', 'wd-fb-og'); ?></p>
97
-
98
- <?php
99
- settings_fields('wonderm00n_open_graph');
100
- ?>
101
-
102
- <div class="postbox-container og_left_col">
103
- <div id="poststuff">
104
- <form name="form1" method="post">
105
-
106
- <div id="webdados_fb_open_graph-settings" class="postbox">
107
- <h3 class="hndle"><?php _e('Settings', 'wd-fb-og'); ?></h3>
108
- <div class="inside">
109
- <table width="100%" class="form-table">
110
- <tr>
111
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Facebook Platform App ID (fb:app_id) tag', 'wd-fb-og'); ?></th>
112
- <td>
113
- <input type="checkbox" name="fb_app_id_show" id="fb_app_id_show" value="1" <?php echo (intval($fb_app_id_show)==1 ? ' checked="checked"' : ''); ?> onclick="showAppidOptions();"/>
114
- </td>
115
- </tr>
116
- <tr class="fb_app_id_options">
117
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Facebook Platform App ID', 'wd-fb-og'); ?>:</th>
118
- <td>
119
- <input type="text" name="fb_app_id" id="fb_app_id" size="30" value="<?php echo trim(esc_attr($fb_app_id)); ?>"/>
120
- </td>
121
- </tr>
122
- <tr>
123
- <td colspan="2"><hr/></td>
124
- </tr>
125
- <tr>
126
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Facebook Admin(s) ID (fb:admins) tag', 'wd-fb-og'); ?></th>
127
- <td>
128
- <input type="checkbox" name="fb_admin_id_show" id="fb_admin_id_show" value="1" <?php echo (intval($fb_admin_id_show)==1 ? ' checked="checked"' : ''); ?> onclick="showAdminOptions();"/>
129
- </td>
130
- </tr>
131
- <tr class="fb_admin_id_options">
132
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Facebook Admin(s) ID', 'wd-fb-og'); ?>:</th>
133
- <td>
134
- <input type="text" name="fb_admin_id" id="fb_admin_id" size="30" value="<?php echo trim(esc_attr($fb_admin_id)); ?>"/>
135
- <br/>
136
- <small>
137
- <?php _e('Comma separated if more than one', 'wd-fb-og'); ?>
138
- </small>
139
- </td>
140
- </tr>
141
- <tr>
142
- <td colspan="2"><hr/></td>
143
- </tr>
144
- <tr>
145
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include locale (fb:locale) tag', 'wd-fb-og'); ?></th>
146
- <td>
147
- <input type="checkbox" name="fb_locale_show" id="fb_locale_show" value="1" <?php echo (intval($fb_locale_show)==1 ? ' checked="checked"' : ''); ?> onclick="showLocaleOptions();"/>
148
- </td>
149
- </tr>
150
- <tr class="fb_locale_options">
151
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Locale', 'wd-fb-og'); ?>:</th>
152
- <td>
153
- <select name="fb_locale" id="fb_locale">
154
- <option value=""<?php if (trim($fb_locale)=='') echo ' selected="selected"'; ?>><?php _e('WordPress current locale/language', 'wd-fb-og'); ?> (<?php echo get_locale(); ?>)&nbsp;</option>
155
- <?php
156
- $listLocales=false;
157
- $loadedOnline=false;
158
- $loadedOffline=false;
159
- //Online
160
- if (!empty($_GET['localeOnline'])) {
161
- if (intval($_GET['localeOnline'])==1) {
162
- if ($ch = curl_init('http://www.facebook.com/translations/FacebookLocales.xml')) {
163
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
164
- $fb_locales=curl_exec($ch);
165
- if (curl_errno($ch)) {
166
- //echo curl_error($ch);
167
- } else {
168
- $info = curl_getinfo($ch);
169
- if (intval($info['http_code'])==200) {
170
- //Save the file locally
171
- $fh = fopen(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml', 'w') or die("Can't open file");
172
- fwrite($fh, $fb_locales);
173
- fclose($fh);
174
- $listLocales=true;
175
- $loadedOnline=true;
176
- }
177
- }
178
- curl_close($ch);
179
- }
180
- }
181
- }
182
- //Offline
183
- if (!$listLocales) {
184
- if ($fb_locales=file_get_contents(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml')) {
185
- $listLocales=true;
186
- $loadedOffline=true;
187
- }
188
- }
189
- //OK
190
- if ($listLocales) {
191
- $xml=simplexml_load_string($fb_locales);
192
- $json = json_encode($xml);
193
- $locales = json_decode($json,TRUE);
194
- if (is_array($locales['locale'])) {
195
- foreach ($locales['locale'] as $locale) {
196
- ?><option value="<?php echo $locale['codes']['code']['standard']['representation']; ?>"<?php if (trim($fb_locale)==trim($locale['codes']['code']['standard']['representation'])) echo ' selected="selected"'; ?>><?php echo $locale['englishName']; ?> (<?php echo $locale['codes']['code']['standard']['representation']; ?>)</option><?php
197
- }
198
- }
199
- }
200
- ?>
201
- </select>
202
- <br/>
203
- <small>
204
- <?php
205
- if ($loadedOnline) {
206
- _e('List loaded from Facebook (online)', 'wd-fb-og');
207
- } else {
208
- if ($loadedOffline) {
209
- _e('List loaded from local cache (offline)', 'wd-fb-og'); ?> - <a href="?page=wonderm00n-open-graph.php&amp;localeOnline=1" onClick="return(confirm('<?php _e('You\\\'l lose any changes you haven\\\'t saved. Are you sure?', 'wd-fb-og'); ?>'));"><?php _e('Reload from Facebook', 'wd-fb-og'); ?></a><?php
210
- } else {
211
- _e('List not loaded', 'wd-fb-og');
212
- }
213
- }
214
- ?>
215
- </small>
216
- </td>
217
- </tr>
218
- <tr>
219
- <td colspan="2"><hr/></td>
220
- </tr>
221
- <tr>
222
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Site Name (og:site_name) tag', 'wd-fb-og');?></th>
223
- <td>
224
- <input type="checkbox" name="fb_sitename_show" id="fb_sitename_show" value="1" <?php echo (intval($fb_sitename_show)==1 ? ' checked="checked"' : ''); ?>/>
225
- </td>
226
- </tr>
227
- <tr>
228
- <td colspan="2"><hr/></td>
229
- </tr>
230
- <tr>
231
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Post/Page title (og:title) tag', 'wd-fb-og');?></th>
232
- <td>
233
- <input type="checkbox" name="fb_title_show" id="fb_title_show" value="1" <?php echo (intval($fb_title_show)==1 ? ' checked="checked"' : ''); ?> onclick="showTitleOptions();"/>
234
- </td>
235
- </tr>
236
- <tr class="fb_title_options">
237
- <th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Schema.org "itemprop" Name tag', 'wd-fb-og');?></th>
238
- <td>
239
- <input type="checkbox" name="fb_title_show_schema" id="fb_title_show_schema" value="1" <?php echo (intval($fb_title_show_schema)==1 ? ' checked="checked"' : ''); ?>/>
240
- <br/>
241
- <small>
242
- <i>&lt;meta itemprop="name" content="..."/&gt;</i>
243
- <br/>
244
- <?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
245
- </small>
246
- </td>
247
- </tr>
248
- <tr class="fb_title_options">
249
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Title tag', 'wd-fb-og');?></th>
250
- <td>
251
- <input type="checkbox" name="fb_title_show_twitter" id="fb_title_show_twitter" value="1" <?php echo (intval($fb_title_show_twitter)==1 ? ' checked="checked"' : ''); ?>/>
252
- <br/>
253
- <small>
254
- <i>&lt;meta name="twitter:title" content=..."/&gt;</i>
255
- <br/>
256
- <?php _e('Recommended for Twitter sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
257
- </small>
258
- </td>
259
- </tr>
260
- <tr>
261
- <td colspan="2"><hr/></td>
262
- </tr>
263
- <tr>
264
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include URL (og:url) tag', 'wd-fb-og');?></th>
265
- <td>
266
- <input type="checkbox" name="fb_url_show" id="fb_url_show" value="1" <?php echo (intval($fb_url_show)==1 ? ' checked="checked"' : ''); ?> onclick="showUrlOptions();"/>
267
- </td>
268
- </tr>
269
- <tr>
270
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card URL tag', 'wd-fb-og');?></th>
271
- <td>
272
- <input type="checkbox" name="fb_url_show_twitter" id="fb_url_show_twitter" value="1" <?php echo (intval($fb_url_show_twitter)==1 ? ' checked="checked"' : ''); ?>/>
273
- </td>
274
- </tr>
275
- <tr class="fb_url_options">
276
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Add trailing slash at the end', 'wd-fb-og');?>:</th>
277
- <td>
278
- <input type="checkbox" name="fb_url_add_trailing" id="fb_url_add_trailing" value="1" <?php echo (intval($fb_url_add_trailing)==1 ? ' checked="checked"' : ''); ?> onclick="showUrlTrail();"/>
279
- <br/>
280
- <small>
281
- <?php _e('On the homepage will be', 'wd-fb-og');?>: <i><?php echo get_option('siteurl'); ?><span id="fb_url_add_trailing_example">/</span></i>
282
- </small>
283
- </td>
284
- </tr>
285
- <tr class="fb_url_options">
286
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Set Canonical URL', 'wd-fb-og');?>:</th>
287
- <td>
288
- <input type="checkbox" name="fb_url_canonical" id="fb_url_canonical" value="1" <?php echo (intval($fb_url_canonical)==1 ? ' checked="checked"' : ''); ?>/>
289
- <br/>
290
- <small>
291
- <i>&lt;link rel="canonical" href="..."/&gt;</i>
292
- </small>
293
- </td>
294
- </tr>
295
- <tr>
296
- <td colspan="2"><hr/></td>
297
- </tr>
298
- <tr>
299
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Type (og:type) tag', 'wd-fb-og');?></th>
300
- <td>
301
- <input type="checkbox" name="fb_type_show" id="fb_type_show" value="1" <?php echo (intval($fb_type_show)==1 ? ' checked="checked"' : ''); ?> onclick="showTypeOptions();"/>
302
- <br/>
303
- <small>
304
- <?php printf( __('Will be "%1$s" for posts and pages and "%2$s" or "%3$s"; for the homepage', 'wd-fb-og'), 'article', 'website', 'blog' );?>
305
- </small>
306
- </td>
307
- </tr>
308
- <tr class="fb_type_options">
309
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Homepage type', 'wd-fb-og');?>:</th>
310
- <td>
311
- <?php _e('Use', 'wd-fb-og');?>
312
- <select name="fb_type_homepage" id="fb_type_homepage">
313
- <option value="website"<?php if (trim($fb_type_homepage)=='' || trim($fb_type_homepage)=='website') echo ' selected="selected"'; ?>>website&nbsp;</option>
314
- <option value="blog"<?php if (trim($fb_type_homepage)=='blog') echo ' selected="selected"'; ?>>blog&nbsp;</option>
315
- </select>
316
- </td>
317
- </tr>
318
- <tr>
319
- <td colspan="2"><hr/></td>
320
- </tr>
321
- <tr>
322
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include published and modified dates (article:published_time, article:modified_time and og:updated_time) tags', 'wd-fb-og');?></th>
323
- <td>
324
- <input type="checkbox" name="fb_article_dates_show" id="fb_article_dates_show" value="1" <?php echo (intval($fb_article_dates_show)==1 ? ' checked="checked"' : ''); ?>/>
325
- <br/>
326
- <small>
327
- <?php _e('Works for posts only', 'wd-fb-og'); ?>
328
- </small>
329
- </td>
330
- </tr>
331
- <tr>
332
- <td colspan="2"><hr/></td>
333
- </tr>
334
- <tr>
335
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include article section (article:section) tags', 'wd-fb-og');?></th>
336
- <td>
337
- <input type="checkbox" name="fb_article_sections_show" id="fb_article_sections_show" value="1" <?php echo (intval($fb_article_sections_show)==1 ? ' checked="checked"' : ''); ?>/>
338
- <br/>
339
- <small>
340
- <?php _e('Works for posts only', 'wd-fb-og'); ?>, <?php _e('from the categories', 'wd-fb-og'); ?>
341
- </small>
342
- </td>
343
- </tr>
344
- <tr>
345
- <td colspan="2"><hr/></td>
346
- </tr>
347
- <tr>
348
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Publisher Page (article:publisher) tag', 'wd-fb-og');?></th>
349
- <td>
350
- <input type="checkbox" name="fb_publisher_show" id="fb_publisher_show" value="1" <?php echo (intval($fb_publisher_show)==1 ? ' checked="checked"' : ''); ?> onclick="showPublisherOptions();"/>
351
- <br/>
352
- <small>
353
- <?php _e('Links the website to the publisher Facebook Page.', 'wd-fb-og');?>
354
- </small>
355
- </td>
356
- </tr>
357
- <tr class="fb_publisher_options">
358
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Website\'s Facebook Page', 'wd-fb-og');?>:</th>
359
- <td>
360
- <input type="text" name="fb_publisher" id="fb_publisher" size="50" value="<?php echo trim(esc_attr($fb_publisher)); ?>"/>
361
- <br/>
362
- <small>
363
- <?php _e('Full URL with http://', 'wd-fb-og');?>
364
- </small>
365
- </td>
366
- </tr>
367
- <tr>
368
- <th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Google+ "publisher" tag', 'wd-fb-og');?>:</th>
369
- <td>
370
- <input type="checkbox" name="fb_publisher_show_schema" id="fb_publisher_show_schema" value="1" <?php echo (intval($fb_publisher_show_schema)==1 ? ' checked="checked"' : ''); ?> onclick="showPublisherSchemaOptions();"/>
371
- <br/>
372
- <small>
373
- <?php _e('Links the website to the publisher Google+ Page.', 'wd-fb-og');?>
374
- </small>
375
- </td>
376
- </tr>
377
- <tr class="fb_publisher_schema_options">
378
- <th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Website\'s Google+ Page', 'wd-fb-og');?>:</th>
379
- <td>
380
- <input type="text" name="fb_publisher_schema" id="fb_publisher_schema" size="50" value="<?php echo trim(esc_attr($fb_publisher_schema)); ?>"/>
381
- <br/>
382
- <small>
383
- <?php _e('Full URL with http://', 'wd-fb-og');?>
384
- </small>
385
- </td>
386
- </tr>
387
- <tr>
388
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Website Username tag', 'wd-fb-og');?>:</th>
389
- <td>
390
- <input type="checkbox" name="fb_publisher_show_twitter" id="fb_publisher_show_twitter" value="1" <?php echo (intval($fb_publisher_show_twitter)==1 ? ' checked="checked"' : ''); ?> onclick="showPublisherTwitterOptions();"/>
391
- <br/>
392
- <small>
393
- <?php _e('Links the website to the publisher Twitter Username.', 'wd-fb-og');?>
394
- </small>
395
- </td>
396
- </tr>
397
- <tr class="fb_publisher_twitter_options">
398
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Website\'s Twitter Username', 'wd-fb-og');?>:</th>
399
- <td>
400
- <input type="text" name="fb_publisher_twitteruser" id="fb_publisher_twitteruser" size="20" value="<?php echo trim(esc_attr($fb_publisher_twitteruser)); ?>"/>
401
- <br/>
402
- <small>
403
- <?php _e('Twitter username (without @)', 'wd-fb-og');?>
404
- </small>
405
- </td>
406
- </tr>
407
- <tr>
408
- <td colspan="2"><hr/></td>
409
- </tr>
410
-
411
- <tr>
412
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Author Profile (article:author) tag', 'wd-fb-og');?></th>
413
- <td>
414
- <input type="checkbox" name="fb_author_show" id="fb_author_show" value="1" <?php echo (intval($fb_author_show)==1 ? ' checked="checked"' : ''); ?> onclick="showAuthorOptions();"/>
415
- <br/>
416
- <small>
417
- <?php _e('Links the article to the author Facebook Profile. The user\'s Facebook profile URL must be filled in.', 'wd-fb-og');?>
418
- </small>
419
- </td>
420
- </tr>
421
- <tr class="fb_author_options">
422
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Include Meta Author tag', 'wd-fb-og');?></th>
423
- <td>
424
- <input type="checkbox" name="fb_author_show_meta" id="fb_author_show_meta" value="1" <?php echo (intval($fb_author_show_meta)==1 ? ' checked="checked"' : ''); ?>/>
425
- <br/>
426
- <small>
427
- <i>&lt;meta name="author" content="..."/&gt;</i>
428
- <br/>
429
- <?php _e('Sets the article author name', 'wd-fb-og');?>
430
- </small>
431
- </td>
432
- </tr>
433
- <tr class="fb_author_options">
434
- <th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Google+ link rel "author" tag', 'wd-fb-og');?></th>
435
- <td>
436
- <input type="checkbox" name="fb_author_show_linkrelgp" id="fb_author_show_linkrelgp" value="1" <?php echo (intval($fb_author_show_linkrelgp)==1 ? ' checked="checked"' : ''); ?>/>
437
- <br/>
438
- <small>
439
- <i>&lt;link rel="author" href="..."/&gt;</i>
440
- <br/>
441
- <?php _e('Links the article to the author Google+ Profile (authorship). The user\'s Google+ profile URL must be filled in.', 'wd-fb-og');?>
442
- </small>
443
- </td>
444
- </tr>
445
- <tr class="fb_author_options">
446
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Creator tag', 'wd-fb-og');?></th>
447
- <td>
448
- <input type="checkbox" name="fb_author_show_twitter" id="fb_author_show_twitter" value="1" <?php echo (intval($fb_author_show_twitter)==1 ? ' checked="checked"' : ''); ?>/>
449
- <br/>
450
- <small>
451
- <i>&lt;meta name="twitter:creator" content="@..."/&gt;</i>
452
- <br/>
453
- <?php _e('Links the article to the author Twitter profile. The user\'s Twitter user must be filled in.', 'wd-fb-og');?>
454
- </small>
455
- </td>
456
- </tr>
457
- <tr class="fb_author_options">
458
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Hide author on pages', 'wd-fb-og');?></th>
459
- <td>
460
- <input type="checkbox" name="fb_author_hide_on_pages" id="fb_author_hide_on_pages" value="1" <?php echo (intval($fb_author_hide_on_pages)==1 ? ' checked="checked"' : ''); ?>/>
461
- <br/>
462
- <small>
463
- <?php _e('Hides all author tags on pages.', 'wd-fb-og');?>
464
- </small>
465
- </td>
466
- </tr>
467
- <tr>
468
- <td colspan="2"><hr/></td>
469
- </tr>
470
-
471
- <tr>
472
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Description (og:description) tag', 'wd-fb-og');?></th>
473
- <td>
474
- <input type="checkbox" name="fb_desc_show" id="fb_desc_show" value="1" <?php echo (intval($fb_desc_show)==1 ? ' checked="checked"' : ''); ?> onclick="showDescriptionOptions();"/>
475
- </td>
476
- </tr>
477
- <tr class="fb_description_options">
478
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Include Meta Description tag', 'wd-fb-og');?></th>
479
- <td>
480
- <input type="checkbox" name="fb_desc_show_meta" id="fb_desc_show_meta" value="1" <?php echo (intval($fb_desc_show_meta)==1 ? ' checked="checked"' : ''); ?>/>
481
- <br/>
482
- <small>
483
- <i>&lt;meta name="description" content="..."/&gt;</i>
484
- <br/>
485
- <?php _e('Recommended for SEO purposes if no other plugin is setting it already', 'wd-fb-og');?>
486
- </small>
487
- </td>
488
- </tr>
489
- <tr class="fb_description_options">
490
- <th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Schema.org "itemprop" Description tag', 'wd-fb-og');?></th>
491
- <td>
492
- <input type="checkbox" name="fb_desc_show_schema" id="fb_desc_show_schema" value="1" <?php echo (intval($fb_desc_show_schema)==1 ? ' checked="checked"' : ''); ?>/>
493
- <br/>
494
- <small>
495
- <i>&lt;meta itemprop="description" content="..."/&gt;</i>
496
- <br/>
497
- <?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
498
- </small>
499
- </td>
500
- </tr>
501
- <tr class="fb_description_options">
502
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Description tag', 'wd-fb-og');?></th>
503
- <td>
504
- <input type="checkbox" name="fb_desc_show_twitter" id="fb_desc_show_twitter" value="1" <?php echo (intval($fb_desc_show_twitter)==1 ? ' checked="checked"' : ''); ?>/>
505
- <br/>
506
- <small>
507
- <i>&lt;meta name="twitter:description" content"..."/&gt;</i>
508
- <br/>
509
- <?php _e('Recommended for Twitter sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
510
- </small>
511
- </td>
512
- </tr>
513
- <tr class="fb_description_options">
514
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Description maximum length', 'wd-fb-og');?>:</th>
515
- <td>
516
- <input type="text" name="fb_desc_chars" id="fb_desc_chars" size="3" maxlength="3" value="<?php echo (intval($fb_desc_chars)>0 ? intval($fb_desc_chars) : ''); ?>"/> characters,
517
- <br/>
518
- <small>
519
- <?php _e('0 or blank for no maximum length', 'wd-fb-og');?>
520
- </small>
521
- </td>
522
- </tr>
523
- <tr class="fb_description_options">
524
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Homepage description', 'wd-fb-og');?>:</th>
525
- <td>
526
- <?php
527
- $hide_home_description=false;
528
- if (get_option('show_on_front')=='page') {
529
- $hide_home_description=true;
530
- _e('The description of your front page:', 'wd-fb-og');
531
- echo ' <a href="'.get_edit_post_link(get_option('page_on_front')).'" target="_blank">'.get_the_title(get_option('page_on_front')).'</a>';
532
- }; ?>
533
- <div<?php if ($hide_home_description) echo ' style="display: none;"'; ?>><?php _e('Use', 'wd-fb-og');?>
534
- <select name="fb_desc_homepage" id="fb_desc_homepage" onchange="showDescriptionCustomText();">
535
- <option value=""<?php if (trim($fb_desc_homepage)=='') echo ' selected="selected"'; ?>><?php _e('Website tagline', 'wd-fb-og');?>&nbsp;</option>
536
- <option value="custom"<?php if (trim($fb_desc_homepage)=='custom') echo ' selected="selected"'; ?>><?php _e('Custom text', 'wd-fb-og');?>&nbsp;</option>
537
- </select>
538
- <div id="fb_desc_homepage_customtext_div">
539
- <textarea name="fb_desc_homepage_customtext" id="fb_desc_homepage_customtext" rows="3" cols="50"><?php echo trim(esc_attr($fb_desc_homepage_customtext)); ?></textarea>
540
- <?php
541
- if (function_exists('icl_object_id') && function_exists('icl_register_string')) {
542
- ?>
543
- <br/>
544
- <small>
545
- <?php
546
- printf(
547
- __('WPML users: Set the default language description here, save changes and then go to <a href="%s">WPML &gt; String translation</a> to set it for other languages.', 'wd-fb-og'),
548
- 'admin.php?page=wpml-string-translation/menu/string-translation.php&amp;context=wd-fb-og'
549
- );
550
- ?>
551
- </small>
552
- <?php
553
- }
554
- ?>
555
- </div>
556
- </div>
557
- </td>
558
- </tr>
559
- <tr>
560
- <td colspan="2"><hr/></td>
561
- </tr>
562
- <tr>
563
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Image (og:image) tag', 'wd-fb-og');?></th>
564
- <td>
565
- <input type="checkbox" name="fb_image_show" id="fb_image_show" value="1" <?php echo (intval($fb_image_show)==1 ? ' checked="checked"' : ''); ?> onclick="showImageOptions();"/>
566
- <br/>
567
- <small>
568
- <?php _e('All images MUST have at least 200px on both dimensions in order to Facebook to load them at all.<br/>1200x630px for optimal results.<br/>Minimum of 600x315px is recommended.', 'wd-fb-og');?>
569
- </small>
570
- </td>
571
- </tr>
572
- <tr class="fb_image_options">
573
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Image size (og:image:width and og:image:height) tags', 'wd-fb-og');?></th>
574
- <td>
575
- <input type="checkbox" name="fb_image_size_show" id="fb_image_size_show" value="1" <?php echo (intval($fb_image_size_show)==1 ? ' checked="checked"' : ''); ?>/>
576
- <br/>
577
- <small>
578
- <?php _e('Recommended only if Facebook is having problems loading the image when the post is shared for the first time.', 'wd-fb-og');?>
579
- </small>
580
- </td>
581
- </tr>
582
- <tr class="fb_image_options">
583
- <th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Schema.org "itemprop" Image tag', 'wd-fb-og');?></th>
584
- <td>
585
- <input type="checkbox" name="fb_image_show_schema" id="fb_image_show_schema" value="1" <?php echo (intval($fb_image_show_schema)==1 ? ' checked="checked"' : ''); ?>/>
586
- <br/>
587
- <small>
588
- <i>&lt;meta itemprop="image" content="..."/&gt;</i>
589
- <br/>
590
- <?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
591
- </small>
592
- </td>
593
- </tr>
594
- <tr class="fb_image_options">
595
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Image tag', 'wd-fb-og');?></th>
596
- <td>
597
- <input type="checkbox" name="fb_image_show_twitter" id="fb_image_show_twitter" value="1" <?php echo (intval($fb_image_show_twitter)==1 ? ' checked="checked"' : ''); ?>/>
598
- <br/>
599
- <small>
600
- <i>&lt;meta name="twitter:image:src" content="..."/&gt;</i>
601
- <br/>
602
- <?php _e('Recommended for Twitter sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
603
- </small>
604
- </td>
605
- </tr>
606
- <tr class="fb_image_options">
607
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Default image', 'wd-fb-og');?>:</th>
608
- <td>
609
- <input type="text" name="fb_image" id="fb_image" size="50" value="<?php echo trim(esc_attr($fb_image)); ?>"/>
610
- <input id="fb_image_button" class="button" type="button" value="Upload/Choose image" />
611
- <br/>
612
- <small>
613
- <?php _e('Full URL with http://', 'wd-fb-og');?>
614
- <br/>
615
- <?php _e('Recommended size: 1200x630px', 'wd-fb-og'); ?>
616
- </small>
617
- </td>
618
- </tr>
619
- <tr class="fb_image_options">
620
- <th scope="row"><i class="dashicons-before dashicons-rss"></i><?php _e('Add image to RSS/RSS2 feeds', 'wd-fb-og');?></th>
621
- <td>
622
- <input type="checkbox" name="fb_image_rss" id="fb_image_rss" value="1" <?php echo (intval($fb_image_rss)==1 ? ' checked="checked"' : ''); ?> onclick="showImageOptions();"/>
623
- <br/>
624
- <small>
625
- <?php _e('For auto-posting apps like RSS Graffiti, twitterfeed, ...', 'wd-fb-og');?>
626
- </small>
627
- </td>
628
- </tr>
629
- <tr class="fb_image_options">
630
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('On posts/pages', 'wd-fb-og');?>:</th>
631
- <td>
632
- <div>
633
- 1) <input type="checkbox" name="fb_image_use_specific" id="fb_image_use_specific" value="1" <?php echo (intval($fb_image_use_specific)==1 ? ' checked="checked"' : ''); ?>/>
634
- <small><?php _e('Image will be fetched from the specific "Open Graph Image" custom field on the post', 'wd-fb-og');?></small>
635
- </div>
636
- <div>
637
- 2) <input type="checkbox" name="fb_image_use_featured" id="fb_image_use_featured" value="1" <?php echo (intval($fb_image_use_featured)==1 ? ' checked="checked"' : ''); ?>/>
638
- <small><?php _e('If it\'s not set, image will be fetched from post/page featured/thumbnail picture', 'wd-fb-og');?></small>
639
- </div>
640
- <div>
641
- 3) <input type="checkbox" name="fb_image_use_content" id="fb_image_use_content" value="1" <?php echo (intval($fb_image_use_content)==1 ? ' checked="checked"' : ''); ?>/>
642
- <small><?php _e('If it doesn\'t exist, use the first image from the post/page content', 'wd-fb-og');?></small>
643
- </div>
644
- <div>
645
- 4) <input type="checkbox" name="fb_image_use_media" id="fb_image_use_media" value="1" <?php echo (intval($fb_image_use_media)==1 ? ' checked="checked"' : ''); ?>/>
646
- <small><?php _e('If it doesn\'t exist, use first image from the post/page media gallery', 'wd-fb-og');?></small>
647
- </div>
648
- <div>
649
- 5) <input type="checkbox" name="fb_image_use_default" id="fb_image_use_default" value="1" <?php echo (intval($fb_image_use_default)==1 ? ' checked="checked"' : ''); ?>/>
650
- <small><?php _e('If it doesn\'t exist, use the default image above', 'wd-fb-og');?></small>
651
- </div>
652
- </td>
653
- </tr>
654
- <tr class="fb_image_options">
655
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Overlay PNG logo', 'wd-fb-og');?> [BETA]:</th>
656
- <td>
657
- <div>
658
- <input type="checkbox" name="fb_image_overlay" id="fb_image_overlay" value="1" <?php echo (intval($fb_image_overlay)==1 ? ' checked="checked"' : ''); ?> onclick="showImageOverlayOptions();"/>
659
- <br/>
660
- <small><?php _e('Image will be resized/cropped to 1200x630 and the transparent PNG chosen bellow (that should also have this size) will be overlaid on it. It will only work for locally hosted images.', 'wd-fb-og');?></small>
661
- </div>
662
- <div class="fb_image_overlay_options">
663
- <input type="text" name="fb_image_overlay_image" id="fb_image_overlay_image" size="50" value="<?php echo trim(esc_attr($fb_image_overlay_image)); ?>"/>
664
- <input id="fb_image_overlay_button" class="button" type="button" value="Upload/Choose image" />
665
- <br/>
666
- <small>
667
- <?php _e('Full URL with http://', 'wd-fb-og');?>
668
- <br/>
669
- <?php _e('Size: 1200x630px', 'wd-fb-og'); ?>
670
- </small>
671
- </div>
672
- </td>
673
- </tr>
674
- <tr>
675
- <td colspan="2"><hr/></td>
676
- </tr>
677
- <tr>
678
- <th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Twitter Card Type', 'wd-fb-og');?>:</th>
679
- <td>
680
- <select name="fb_twitter_card_type" id="fb_twitter_card_type">
681
- <option value="summary"<?php if (trim($fb_twitter_card_type)=='summary') echo ' selected="selected"'; ?>><?php _e('Summary Card', 'wd-fb-og');?></option>
682
- <option value="summary_large_image"<?php if (trim($fb_twitter_card_type)=='summary_large_image') echo ' selected="selected"'; ?>><?php _e('Summary Card with Large Image', 'wd-fb-og');?></option>
683
- </select>
684
- </td>
685
- </tr>
686
- </table>
687
- </div>
688
- </div>
689
-
690
- <div id="webdados_fb_open_graph-thirdparty" class="postbox">
691
- <h3 class="hndle"><?php _e('3rd Party Integration', 'wd-fb-og');?></h3>
692
- <div class="inside">
693
- <?php
694
- $thirdparty=false;
695
- //WordPress SEO by Yoast
696
- if ( defined('WPSEO_VERSION') ) {
697
- $thirdparty=true;
698
- ?>
699
- <hr/>
700
- <a name="wpseo"></a>
701
- <h4><a href="https://wordpress.org/plugins/wordpress-seo/" target="_blank">WordPress SEO by Yoast</a></h4>
702
- <p><?php _e('It\'s HIGHLY recommended to go to <a href="admin.php?page=wpseo_social" target="_blank">SEO &gt; Social</a> and disable "Add Open Graph meta data", "Add Twitter card meta data" and "Add Google+ specific post meta data"', 'wd-fb-og'); ?> <?php _e('even if you don\'t enable integration bellow. You will get duplicate tags if you don\'t do this.', 'wd-fb-og'); ?></p>
703
- <table width="100%" class="form-table">
704
- <tr>
705
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Use title, url (canonical) and description from WPSEO', 'wd-fb-og');?></th>
706
- <td>
707
- <input type="checkbox" name="fb_show_wpseoyoast" id="fb_show_wpseoyoast" value="1" <?php echo (intval($fb_show_wpseoyoast)==1 ? ' checked="checked"' : ''); ?>/>
708
- </td>
709
- </tr>
710
- </table>
711
- <?php
712
- }
713
- //WooCommerce
714
- if ( class_exists('woocommerce') ) {
715
- $thirdparty=true;
716
- ?>
717
- <hr/>
718
- <a name="woocommerce"></a>
719
- <h4><a href="https://wordpress.org/plugins/woocommerce/" target="_blank">WooCommerce</a></h4>
720
- <p><?php _e('On product pages we will automatically set og:type to "product" and add the price including tax to the product:price tags.', 'wd-fb-og');?></p>
721
- <table width="100%" class="form-table">
722
- <tr>
723
- <th scope="row"><i class="dashicons-before dashicons-cart"></i><?php _e('Use Product Category thumbnail as Open Graph Image', 'wd-fb-og');?></th>
724
- <td>
725
- <input type="checkbox" name="fb_wc_usecategthumb" id="fb_wc_usecategthumb" value="1" <?php echo (intval($fb_wc_usecategthumb)==1 ? ' checked="checked"' : ''); ?>/>
726
- <br/>
727
- <small>
728
- <?php _e('Recommended if you set large thumbnails for Product Categories and want to use them as Open Graph Images on listing pages', 'wd-fb-og');?>
729
- </small>
730
- </td>
731
- </tr>
732
- <tr>
733
- <th scope="row"><i class="dashicons-before dashicons-cart"></i><?php _e('Use Product Gallery images as additional Open Graph Images', 'wd-fb-og');?></th>
734
- <td>
735
- <input type="checkbox" name="fb_wc_useproductgallery" id="fb_wc_useproductgallery" value="1" <?php echo (intval($fb_wc_useproductgallery)==1 ? ' checked="checked"' : ''); ?>/>
736
- <br/>
737
- <small>
738
- <?php _e('Experimental', 'wd-fb-og');?>
739
- -
740
- <?php _e('Uses additional Product Gallery images so, when the product is shared on Facebook, the user can choose what image to use', 'wd-fb-og');?>
741
- </small>
742
- </td>
743
- </tr>
744
- </table>
745
- <?php
746
- }
747
- //SubHeading
748
- if (webdados_fb_open_graph_subheadingactive()) {
749
- $thirdparty=true;
750
- ?>
751
- <hr/>
752
- <h4><a href="https://wordpress.org/extend/plugins/subheading/" target="_blank">SubHeading</a></h4>
753
- <table width="100%" class="form-table">
754
- <tr>
755
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Add SubHeading to Post/Page title', 'wd-fb-og');?></th>
756
- <td>
757
- <input type="checkbox" name="fb_show_subheading" id="fb_show_subheading" value="1" <?php echo (intval($fb_show_subheading)==1 ? ' checked="checked"' : ''); ?> onclick="showSubheadingOptions();"/>
758
- </td>
759
- </tr>
760
- <tr class="fb_subheading_options">
761
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('SubHeading position', 'wd-fb-og');?></th>
762
- <td>
763
- <select name="fb_subheading_position" id="fb_subheading_position">
764
- <option value=""<?php if (trim($fb_subheading_position)=='after') echo ' selected="selected"'; ?>><?php _e('After', 'wd-fb-og');?></option>
765
- <option value="before"<?php if (trim($fb_subheading_position)=='before') echo ' selected="selected"'; ?>><?php _e('Before', 'wd-fb-og');?></option>
766
- </select>
767
- </td>
768
- </tr>
769
- </table>
770
- <?php
771
- }
772
- //Business Directory Plugin
773
- if(is_plugin_active('business-directory-plugin/wpbusdirman.php')) {
774
- $thirdparty=true;
775
- ?>
776
- <hr/>
777
- <h4><a href="https://wordpress.org/extend/plugins/business-directory-plugin/" target="_blank">Business Directory Plugin</a></h4>
778
- <table width="100%" class="form-table">
779
- <tr>
780
- <th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Use BDP listing contents as OG tags', 'wd-fb-og');?></th>
781
- <td>
782
- <input type="checkbox" name="fb_show_businessdirectoryplugin" id="fb_show_businessdirectoryplugin" value="1" <?php echo (intval($fb_show_businessdirectoryplugin)==1 ? ' checked="checked"' : ''); ?>/>
783
- <br/>
784
- <small>
785
- <?php _e('Setting "Include URL", "Set Canonical URL", "Include Description" and "Include Image" options above is HIGHLY recommended', 'wd-fb-og');?>
786
- </small>
787
- </td>
788
- </tr>
789
- </table>
790
- <?php
791
- }
792
- if (!$thirdparty) {
793
- ?>
794
- <p><?php _e('You don\'t have any compatible 3rd Party plugin installed/active.', 'wd-fb-og');?></p>
795
- <p><?php _e('This plugin is currently compatible with:', 'wd-fb-og');?></p>
796
- <ul>
797
- <li><a href="https://wordpress.org/extend/plugins/wordpress-seo/" target="_blank">WordPress SEO by Yoast</a></li>
798
- <li><a href="https://wordpress.org/plugins/woocommerce/" target="_blank">WooCommerce</a></li>
799
- <li><a href="https://wordpress.org/extend/plugins/subheading/" target="_blank">SubHeading</a></li>
800
- <li><a href="https://wordpress.org/extend/plugins/business-directory-plugin/" target="_blank">Business Directory Plugin</a></li>
801
- </ul>
802
- <?php
803
- }
804
- ?>
805
- </div>
806
- </div>
807
-
808
- <div id="webdados_fb_open_graph-advanced" class="postbox">
809
- <h3 class="hndle"><?php _e('Advanced settings', 'wd-fb-og');?></h3>
810
- <div class="inside">
811
- <p><?php _e('Don\'t mess with this unless you know what you\'re doing', 'wd-fb-og');?></p>
812
- <table width="100%" class="form-table">
813
- <tr>
814
- <th scope="row"><i class="dashicons-before dashicons-admin-generic"></i><?php _e('Force getimagesize on local file even if allow_url_fopen=1', 'wd-fb-og'); ?></th>
815
- <td>
816
- <input type="checkbox" name="fb_adv_force_local" id="fb_adv_force_local" value="1" <?php echo (intval($fb_adv_force_local)==1 ? ' checked="checked"' : ''); ?>/>
817
- <br/>
818
- <small>
819
- <?php _e('May cause problems with some multisite configurations but fix "HTTP request failed" errors', 'wd-fb-og');?>
820
- </small>
821
- </td>
822
- </tr>
823
- <tr>
824
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Try to update Facebook Open Graph Tags cache when saving the post', 'wd-fb-og'); ?></th>
825
- <td>
826
- <input type="checkbox" name="fb_adv_notify_fb" id="fb_adv_notify_fb" value="1" onclick="showFBNotifyOptions();"<?php echo (intval($fb_adv_notify_fb)==1 ? ' checked="checked"' : ''); ?>/>
827
- </td>
828
- </tr>
829
- <tr class="fb_adv_notify_fb_options">
830
- <th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Supress Facebook Open Graph Tags cache updated notice', 'wd-fb-og'); ?></th>
831
- <td>
832
- <input type="checkbox" name="fb_adv_supress_fb_notice" id="fb_adv_supress_fb_notice" value="1" <?php echo (intval($fb_adv_supress_fb_notice)==1 ? ' checked="checked"' : ''); ?>/>
833
- </td>
834
- </tr>
835
- </table>
836
- </div>
837
- </div>
838
-
839
- <p class="submit">
840
- <input type="hidden" name="action" value="save"/>
841
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
842
- </p>
843
-
844
- </form>
845
- </div>
846
- </div>
847
-
848
- <?php
849
-
850
- $out_link_utm='?utm_source=fb_og_wp_plugin_settings&amp;utm_medium=link&amp;utm_campaign=fb_og_wp_plugin';
851
-
852
- $links[0]['text']=__('Test your URLs at Facebook URL Linter / Debugger', 'wd-fb-og');
853
- $links[0]['url']='https://developers.facebook.com/tools/debug';
854
-
855
- $links[5]['text']=__('Test (and request approval for) your URLs at Twitter Card validator', 'wd-fb-og');
856
- $links[5]['url']='https://cards-dev.twitter.com/validator';
857
-
858
- $links[10]['text']=__('About the Open Graph Protocol (on Facebook)', 'wd-fb-og');
859
- $links[10]['url']='https://developers.facebook.com/docs/opengraph/';
860
-
861
- $links[20]['text']=__('The Open Graph Protocol (official website)', 'wd-fb-og');
862
- $links[20]['url']='http://ogp.me/';
863
-
864
- $links[25]['text']=__('About Twitter Cards', 'wd-fb-og');
865
- $links[25]['url']='https://dev.twitter.com/cards/getting-started';
866
-
867
- $links[30]['text']=__('Plugin official URL', 'wd-fb-og');
868
- $links[30]['url']='http://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/'.$out_link_utm;
869
-
870
- $links[40]['text']=__('Author\'s website: Webdados', 'wd-fb-og');
871
- $links[40]['url']='http://www.webdados.pt/'.$out_link_utm;
872
-
873
- $links[50]['text']=__('Author\'s Facebook page: Webdados', 'wd-fb-og');
874
- $links[50]['url']='http://www.facebook.com/Webdados';
875
-
876
- $links[60]['text']=__('Author\'s Twitter account: @Wonderm00n<br/>(Webdados founder)', 'wd-fb-og');
877
- $links[60]['url']='http://twitter.com/wonderm00n';
878
- ?>
879
- <div class="postbox-container og_right_col">
880
-
881
- <div id="poststuff">
882
- <div class="postbox">
883
- <h3 class="hndle"><?php _e('About this plugin', 'wd-fb-og');?></h3>
884
- <div class="inside">
885
- <h4><?php _e('Support forum', 'wd-fb-og'); ?>:</h4>
886
- <p><a href="https://wordpress.org/support/plugin/wonderm00ns-simple-facebook-open-graph-tags" target="_blank">WordPress.org</a></p>
887
- <h4><?php _e('Premium technical support or custom WordPress development', 'wd-fb-og'); ?>:</h4>
888
- <p id="webdadoslink"><a href="http://www.webdados.pt/contactos/<?php echo esc_attr($out_link_utm); ?>" title="<?php echo esc_attr(sprintf(__('Please contact %s', 'wd-fb-og'), 'Webdados')); ?>" target="_blank"><img src="<?php echo plugins_url('webdados.png', __FILE__); ?>" width="200"/></a></p>
889
- <h4><?php _e('Please rate our plugin at WordPress.org', 'wd-fb-og'); ?>:</h4>
890
- <a href="https://wordpress.org/support/view/plugin-reviews/wonderm00ns-simple-facebook-open-graph-tags?filter=5#postform" target="_blank" style="text-align: center; display: block;">
891
- <div class="star-rating"><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div></div>
892
- </a>
893
- </div>
894
- </div>
895
- </div>
896
-
897
- <div id="poststuff">
898
- <div class="postbox">
899
- <h3 class="hndle"><?php _e('Useful links', 'wd-fb-og');?></h3>
900
- <div class="inside">
901
- <ul>
902
- <?php foreach($links as $link) { ?>
903
- <li>- <a href="<?php echo $link['url']; ?>" target="_blank"><?php echo $link['text']; ?></a></li>
904
- <?php } ?>
905
- </ul>
906
- </div>
907
- </div>
908
- </div>
909
-
910
- <div id="poststuff">
911
- <div id="webdados_fb_open_graph_donation" class="postbox">
912
- <h3 class="hndle"><?php _e('Donate', 'wd-fb-og');?></h3>
913
- <div class="inside">
914
- <p><?php _e('If you find this plugin useful and want to make a contribution towards future development please consider making a small, or big ;-), donation.', 'wd-fb-og');?></p>
915
- <center><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
916
- <input type="hidden" name="cmd" value="_donations">
917
- <input type="hidden" name="business" value="wonderm00n@gmail.com">
918
- <input type="hidden" name="lc" value="PT">
919
- <input type="hidden" name="item_name" value="Marco Almeida (Wonderm00n)">
920
- <input type="hidden" name="item_number" value="facebook_open_graph_plugin">
921
- <input type="hidden" name="currency_code" value="USD">
922
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
923
- <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
924
- <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
925
- </form></center>
926
- </div>
927
- </div>
928
- </div>
929
-
930
- </div>
931
-
932
- <div class="clear">
933
- <p><br/>&copy 2011<?php if(date('Y')>2011) echo '-'.date('Y'); ?> <a href="http://www.webdados.pt/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Webdados</a> &amp; <a href="http://wonderm00n.com/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Marco Almeida (Wonderm00n)</a></p>
934
- </div>
935
-
936
- </div>
937
-
938
- <script type="text/javascript">
939
- jQuery(document).ready(function() {
940
- /*jQuery('#fb_image_button').click(function(){
941
- tb_show('',"media-upload.php?type=image&TB_iframe=true");
942
- });
943
- window.send_to_editor = function(html) {
944
- var imgurl = jQuery('<div>'+html+'</div>').find('img').attr('src');
945
- jQuery("input"+"#fb_image").val(imgurl);
946
- tb_remove();
947
- }*/
948
- //Images
949
- var file_frame;
950
- var file_frame_field_id;
951
- file_frame = wp.media.frames.file_frame = wp.media({
952
- title: '<?php _e('Select image', 'wd-fb-og');?>',
953
- button: {
954
- text: '<?php _e('Use this image', 'wd-fb-og');?>'
955
- },
956
- multiple: false
957
- });
958
- file_frame.on("select", function() {
959
- var image = file_frame.state().get("selection").first().toJSON();
960
- jQuery("#"+file_frame_field_id).val(image.url);
961
- });
962
- //Default
963
- jQuery('#fb_image_button').on('click', function(event) {
964
- event.preventDefault();
965
- file_frame_field_id='fb_image';
966
- if (file_frame) {
967
- file_frame.open();
968
- }
969
- });
970
- //Overlay
971
- jQuery('#fb_image_overlay_button').on('click', function(event) {
972
- event.preventDefault();
973
- file_frame_field_id='fb_image_overlay_image';
974
- if (file_frame) {
975
- file_frame.open();
976
- }
977
- });
978
- showAppidOptions();
979
- showAdminOptions();
980
- showLocaleOptions();
981
- showTypeOptions();
982
- showPublisherOptions();
983
- showPublisherSchemaOptions();
984
- showPublisherTwitterOptions();
985
- showAuthorOptions();
986
- showUrlOptions();
987
- showUrlTrail();
988
- jQuery('.fb_description_options').hide();
989
- showDescriptionOptions();
990
- showTitleOptions();
991
- jQuery('#fb_desc_homepage_customtext').hide();
992
- showDescriptionCustomText();
993
- showImageOptions();
994
- showImageOverlayOptions();
995
- showFBNotifyOptions();
996
- showSubheadingOptions();
997
- });
998
- function showAppidOptions() {
999
- if (jQuery('#fb_app_id_show').is(':checked')) {
1000
- jQuery('.fb_app_id_options').show();
1001
- } else {
1002
- jQuery('.fb_app_id_options').hide();
1003
- }
1004
- }
1005
- function showAdminOptions() {
1006
- if (jQuery('#fb_admin_id_show').is(':checked')) {
1007
- jQuery('.fb_admin_id_options').show();
1008
- } else {
1009
- jQuery('.fb_admin_id_options').hide();
1010
- }
1011
- }
1012
- function showLocaleOptions() {
1013
- if (jQuery('#fb_locale_show').is(':checked')) {
1014
- jQuery('.fb_locale_options').show();
1015
- } else {
1016
- jQuery('.fb_locale_options').hide();
1017
- }
1018
- }
1019
- function showUrlOptions() {
1020
- /*if (jQuery('#fb_url_show').is(':checked')) {
1021
- jQuery('.fb_url_options').show();
1022
- } else {
1023
- jQuery('.fb_url_options').hide();
1024
- }*/
1025
- jQuery('.fb_url_options').show();
1026
- }
1027
- function showUrlTrail() {
1028
- if (jQuery('#fb_url_add_trailing').is(':checked')) {
1029
- jQuery('#fb_url_add_trailing_example').show();
1030
- } else {
1031
- jQuery('#fb_url_add_trailing_example').hide();
1032
- }
1033
- }
1034
- function showTypeOptions() {
1035
- if (jQuery('#fb_type_show').is(':checked')) {
1036
- jQuery('.fb_type_options').show();
1037
- } else {
1038
- jQuery('.fb_type_options').hide();
1039
- }
1040
- }
1041
- function showAuthorOptions() {
1042
- /*if (jQuery('#fb_author_show').is(':checked')) {
1043
- jQuery('.fb_author_options').show();
1044
- } else {
1045
- jQuery('.fb_author_options').hide();
1046
- }*/
1047
- jQuery('.fb_author_options').show();
1048
- }
1049
- function showPublisherOptions() {
1050
- if (jQuery('#fb_publisher_show').is(':checked')) {
1051
- jQuery('.fb_publisher_options').show();
1052
- } else {
1053
- jQuery('.fb_publisher_options').hide();
1054
- }
1055
- }
1056
- function showPublisherTwitterOptions() {
1057
- if (jQuery('#fb_publisher_show_twitter').is(':checked')) {
1058
- jQuery('.fb_publisher_twitter_options').show();
1059
- } else {
1060
- jQuery('.fb_publisher_twitter_options').hide();
1061
- }
1062
- }
1063
- function showPublisherSchemaOptions() {
1064
- if (jQuery('#fb_publisher_show_schema').is(':checked')) {
1065
- jQuery('.fb_publisher_schema_options').show();
1066
- } else {
1067
- jQuery('.fb_publisher_schema_options').hide();
1068
- }
1069
- }
1070
- function showTypeOptions() {
1071
- if (jQuery('#fb_author_show').is(':checked')) {
1072
- jQuery('.fb_author_options').show();
1073
- } else {
1074
- jQuery('.fb_author_options').hide();
1075
- }
1076
- }
1077
- function showDescriptionOptions() {
1078
- /*if (jQuery('#fb_desc_show').is(':checked')) {
1079
- jQuery('.fb_description_options').show();
1080
- } else {
1081
- jQuery('.fb_description_options').hide();
1082
- }*/
1083
- jQuery('.fb_description_options').show();
1084
- }
1085
- function showTitleOptions() {
1086
- /*if (jQuery('#fb_title_show').is(':checked')) {
1087
- jQuery('.fb_title_options').show();
1088
- } else {
1089
- jQuery('.fb_title_options').hide();
1090
- }*/
1091
- jQuery('.fb_title_options').show(); //Not exclusive
1092
- }
1093
- function showDescriptionCustomText() {
1094
- if (jQuery('#fb_desc_homepage').val()=='custom') {
1095
- jQuery('#fb_desc_homepage_customtext').show().focus();
1096
- } else {
1097
- jQuery('#fb_desc_homepage_customtext').hide();
1098
- }
1099
- }
1100
- function showImageOptions() {
1101
- /*if (jQuery('#fb_image_show').is(':checked')) {
1102
- jQuery('.fb_image_options').show();
1103
- } else {
1104
- jQuery('.fb_image_options').hide();
1105
- }*/
1106
- jQuery('.fb_image_options').show();
1107
- }
1108
- function showImageOverlayOptions() {
1109
- if (jQuery('#fb_image_overlay').is(':checked')) {
1110
- jQuery('.fb_image_overlay_options').show();
1111
- } else {
1112
- jQuery('.fb_image_overlay_options').hide();
1113
- }
1114
- }
1115
- function showFBNotifyOptions() {
1116
- if (jQuery('#fb_adv_notify_fb').is(':checked')) {
1117
- jQuery('.fb_adv_notify_fb_options').show();
1118
- } else {
1119
- jQuery('.fb_adv_notify_fb_options').hide();
1120
- }
1121
- }
1122
- function showSubheadingOptions() {
1123
- if (jQuery('#fb_show_subheading').is(':checked')) {
1124
- jQuery('.fb_subheading_options').show();
1125
- } else {
1126
- jQuery('.fb_subheading_options').hide();
1127
- }
1128
- }
1129
- </script>
1130
- <style type="text/css">
1131
- .og_left_col {
1132
- width: 69%;
1133
- }
1134
- .og_right_col {
1135
- width: 29%;
1136
- float: right;
1137
- }
1138
- .og_left_col #poststuff,
1139
- .og_right_col #poststuff {
1140
- min-width: 0;
1141
- }
1142
- #webdadoslink a {
1143
- display: block;
1144
- }
1145
- #webdadoslink a img {
1146
- display: block;
1147
- margin: auto;
1148
- }
1149
- table.form-table tr th,
1150
- table.form-table tr td {
1151
- line-height: 1.5;
1152
- }
1153
- table.form-table tr th[scope=row] {
1154
- min-width: 300px;
1155
- }
1156
- table.form-table tr td hr {
1157
- height: 1px;
1158
- margin: 0px;
1159
- background-color: #DFDFDF;
1160
- border: none;
1161
- }
1162
- .og_left_col .inside hr:first-child,
1163
- .og_right_col .inside hr:first-child {
1164
- display: block;
1165
- }
1166
- table.form-table .dashicons-before {
1167
- margin-right: 10px;
1168
- font-size: 12px;
1169
- opacity: 0.5;
1170
- }
1171
- table.form-table .dashicons-facebook-alt {
1172
- color: #3B5998;
1173
- }
1174
- table.form-table .dashicons-googleplus {
1175
- color: #D34836;
1176
- }
1177
- table.form-table .dashicons-twitter {
1178
- color: #55ACEE;
1179
- }
1180
- table.form-table .dashicons-rss {
1181
- color: #FF6600;
1182
- }
1183
- table.form-table .dashicons-admin-site,
1184
- table.form-table .dashicons-admin-generic {
1185
- color: #666;
1186
- }
1187
- .inside hr:first-child {
1188
- display: none;
1189
- }
1190
- .fb_image_overlay_options {
1191
- display: none;
1192
- }
1193
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
lang/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
lang/wd-fb-og-pt_PT.mo CHANGED
Binary file
lang/wd-fb-og-pt_PT.po CHANGED
@@ -1,10 +1,10 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v1.6.1\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wonderm00ns-simple-"
5
  "facebook-open-graph-tags\n"
6
- "POT-Creation-Date: 2016-09-26 19:24+0100\n"
7
- "PO-Revision-Date: 2016-09-26 19:26+0100\n"
8
  "Last-Translator: Wonderm00n <wonderm00n@gmail.com>\n"
9
  "Language-Team: Webdados <info@webdados.pt>\n"
10
  "Language: pt_PT\n"
@@ -20,720 +20,679 @@ msgstr ""
20
  "X-Textdomain-Support: yes\n"
21
  "X-Poedit-SearchPath-0: .\n"
22
 
23
- # @ wd-fb-og
24
- #: includes/settings-page.php:96
25
- msgid ""
26
- "Please set some default values and which tags should, or should not, be "
27
- "included. It may be necessary to exclude some tags if other plugins are "
28
- "already including them."
29
- msgstr ""
30
- "Por favor defina alguns valores padrão e que tags devem, ou não, ser "
31
- "incluídas. Pode ser necessário excluir algumas tags se outros plugins já as "
32
- "estão a incluir."
33
-
34
- #: includes/settings-page.php:107 wonderm00n-open-graph.php:864
35
  msgid "Settings"
36
  msgstr "Opções"
37
 
38
- # @ wd-fb-og
39
- #: includes/settings-page.php:111
40
- msgid "Include Facebook Platform App ID (fb:app_id) tag"
41
- msgstr "Incluir tag \"Facebook Platform App ID\" (fb:app_id)"
42
 
43
- # @ wd-fb-og
44
- #: includes/settings-page.php:117
45
- msgid "Facebook Platform App ID"
46
- msgstr "Facebook Platform App ID"
47
 
48
- # @ wd-fb-og
49
- #: includes/settings-page.php:126
50
- msgid "Include Facebook Admin(s) ID (fb:admins) tag"
51
- msgstr "Incluir tag com ID dos admin de Facebook (fb:admins)"
52
 
53
  # @ wd-fb-og
54
- #: includes/settings-page.php:132
55
- msgid "Facebook Admin(s) ID"
56
- msgstr "ID do(s) Admin(s) no Facebook"
57
 
58
- # @ wd-fb-og
59
- #: includes/settings-page.php:137
60
- msgid "Comma separated if more than one"
61
- msgstr "Separados por vírgulas se mais do que um"
62
 
63
  # @ wd-fb-og
64
- #: includes/settings-page.php:145
65
- msgid "Include locale (fb:locale) tag"
66
- msgstr "Incluir tag \"Locale\" (fb:locale)"
67
 
68
- # @ wd-fb-og
69
- #: includes/settings-page.php:151
70
- msgid "Locale"
71
- msgstr "Locale"
 
72
 
73
- # @ wd-fb-og
74
- #: includes/settings-page.php:154
75
- msgid "WordPress current locale/language"
76
- msgstr "O \"locale\"/idíoma actual do WordPress"
77
 
78
- # @ wd-fb-og
79
- #: includes/settings-page.php:206
80
- msgid "List loaded from Facebook (online)"
81
- msgstr "Lista carregada do Facebook (online)"
82
 
83
- # @ wd-fb-og
84
- #: includes/settings-page.php:209
85
- msgid "List loaded from local cache (offline)"
86
- msgstr "Lista carregada da cache local (offline)"
87
 
88
- # @ wd-fb-og
89
- #: includes/settings-page.php:209
90
- msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  msgstr ""
92
- "Vai perder quaisquer modificações que não tenha gravado. Tem a certeza?"
 
93
 
94
- # @ wd-fb-og
95
- #: includes/settings-page.php:209
96
- msgid "Reload from Facebook"
97
- msgstr "(Re)carregar a partir do Facebook"
98
 
99
- # @ wd-fb-og
100
- #: includes/settings-page.php:211
101
- msgid "List not loaded"
102
- msgstr "Lista não carregada"
 
 
 
 
 
103
 
104
- # @ wd-fb-og
105
- #: includes/settings-page.php:222
106
- msgid "Include Site Name (og:site_name) tag"
107
- msgstr "Incluir tag Nome do site (og:site_name)"
108
 
109
- # @ wd-fb-og
110
- #: includes/settings-page.php:231
111
- msgid "Include Post/Page title (og:title) tag"
112
- msgstr "Incluir tag Título do artigo/página (og:title)"
113
 
114
- # @ wd-fb-og
115
- #: includes/settings-page.php:237
116
- msgid "Include Schema.org \"itemprop\" Name tag"
117
- msgstr "Incluir a tag \"itemprop Name\" do Schema.org"
118
 
119
- # @ wd-fb-og
120
- #: includes/settings-page.php:244 includes/settings-page.php:497
121
- #: includes/settings-page.php:590
122
  msgid ""
123
- "Recommended for Google+ sharing purposes if no other plugin is setting it "
124
- "already"
125
  msgstr ""
126
- "Recomendado para efeitos de partilha no Google+, se outro plugin ainda não a "
127
- "está a definir"
 
128
 
129
- # @ wd-fb-og
130
- #: includes/settings-page.php:249
131
- msgid "Include Twitter Card Title tag"
132
- msgstr "Incluir tag Título do \"Twitter Card\""
133
 
134
- # @ wd-fb-og
135
- #: includes/settings-page.php:256 includes/settings-page.php:509
136
- #: includes/settings-page.php:602
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  msgid ""
138
- "Recommended for Twitter sharing purposes if no other plugin is setting it "
139
- "already"
140
  msgstr ""
141
- "Recomendado para efeitos de partilha no Twitter, se outro plugin ainda não a "
142
- "está a definir"
143
 
144
- # @ wd-fb-og
145
- #: includes/settings-page.php:264
146
- msgid "Include URL (og:url) tag"
147
- msgstr "Incluir tag URL (og:url)"
 
 
 
148
 
149
- #: includes/settings-page.php:270
150
- msgid "Include Twitter Card URL tag"
151
- msgstr "Incluir tag URL do \"Twitter Card\""
 
 
 
 
152
 
153
- # @ wd-fb-og
154
- #: includes/settings-page.php:276
155
- msgid "Add trailing slash at the end"
156
- msgstr "Adicionar barra invertida no final"
157
 
158
- # @ wd-fb-og
159
- #: includes/settings-page.php:281
160
- msgid "On the homepage will be"
161
- msgstr "Na página inicial será"
162
 
163
- # @ wd-fb-og
164
- #: includes/settings-page.php:286
165
- msgid "Set Canonical URL"
166
- msgstr "Incluir a tag URL Canónico"
167
 
168
- # @ wd-fb-og
169
- #: includes/settings-page.php:299
170
- msgid "Include Type (og:type) tag"
171
- msgstr "Incluir tag Tipo (og:type)"
172
 
173
- # @ wd-fb-og
174
- #: includes/settings-page.php:304
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  #, php-format
176
  msgid ""
177
- "Will be \"%1$s\" for posts and pages and \"%2$s\" or \"%3$s\"; for the "
178
- "homepage"
 
179
  msgstr ""
180
- "Será \"%1$s\" para artigos e páginas, e \"%2$s\" ou \"%3$s\"; para a página "
181
- "inicial"
 
182
 
183
- # @ wd-fb-og
184
- #: includes/settings-page.php:309
185
- msgid "Homepage type"
186
- msgstr "Tipo para a página inicial"
187
 
188
- # @ wd-fb-og
189
- #: includes/settings-page.php:311 includes/settings-page.php:533
190
- msgid "Use"
191
- msgstr "Utilizar"
192
 
193
- #: includes/settings-page.php:322
194
  msgid ""
195
- "Include published and modified dates (article:published_time, article:"
196
- "modified_time and og:updated_time) tags"
 
197
  msgstr ""
198
- "Incluir tags com datas de publicação e modificação (article:published_time, "
199
- "article:modified_time e og:updated_time)"
 
200
 
201
- #: includes/settings-page.php:327 includes/settings-page.php:340
202
- msgid "Works for posts only"
203
- msgstr "Funciona apenas para \"artigos\" (posts)"
204
 
205
- # @ wd-fb-og
206
- #: includes/settings-page.php:335
207
- msgid "Include article section (article:section) tags"
208
- msgstr "Incluir tags Secção do artigo (article:section)"
 
 
 
 
209
 
210
- #: includes/settings-page.php:340
211
- msgid "from the categories"
212
- msgstr "a partir das categorias"
 
 
213
 
214
- # @ wd-fb-og
215
- #: includes/settings-page.php:348
216
- msgid "Include Publisher Page (article:publisher) tag"
217
- msgstr "Incluir tag \"Publisher\" (article:publisher)"
218
 
219
- #: includes/settings-page.php:353
220
- msgid "Links the website to the publisher Facebook Page."
221
- msgstr "Associa o website à Página Facebook do mesmo"
 
222
 
223
- #: includes/settings-page.php:358
224
- msgid "Website's Facebook Page"
225
- msgstr "Página de Facebook do Website"
226
 
227
- # @ wd-fb-og
228
- #: includes/settings-page.php:363 includes/settings-page.php:383
229
- #: includes/settings-page.php:613 includes/settings-page.php:667
230
- msgid "Full URL with http://"
231
- msgstr "URL completo com http://"
232
 
233
- #: includes/settings-page.php:368
234
- msgid "Include Google+ \"publisher\" tag"
235
- msgstr "Incluir tag \"Google+ publisher\""
236
 
237
- #: includes/settings-page.php:373
238
- msgid "Links the website to the publisher Google+ Page."
239
- msgstr "Associa o website à Página Google+ do mesmo"
240
 
241
- #: includes/settings-page.php:378
242
- msgid "Website's Google+ Page"
243
- msgstr "Página Google+ do Website"
244
 
245
- # @ wd-fb-og
246
- #: includes/settings-page.php:388
247
- msgid "Include Twitter Card Website Username tag"
248
- msgstr "Incluir tag Username Twitter do Website do \"Twitter Card\""
249
 
250
- #: includes/settings-page.php:393
251
- msgid "Links the website to the publisher Twitter Username."
252
- msgstr "Associa o website ao Username Twitter do mesmo"
253
 
254
- #: includes/settings-page.php:398
255
- msgid "Website's Twitter Username"
256
- msgstr "Utilizador Twitter do Website"
257
 
258
- #: includes/settings-page.php:403 wonderm00n-open-graph.php:1089
259
- msgid "Twitter username (without @)"
260
- msgstr "Utilizador do Twitter (sem @)"
261
 
262
- #: includes/settings-page.php:412
263
- msgid "Include Author Profile (article:author) tag"
264
- msgstr "Incluir tag \"Autor do artigo\" (article:author)"
265
 
266
- #: includes/settings-page.php:417
267
- msgid ""
268
- "Links the article to the author Facebook Profile. The user's Facebook "
269
- "profile URL must be filled in."
270
- msgstr ""
271
- "Associa o artigo ao perfil Facebook do autor do mesmo. O URL de Perfil "
272
- "Facebook do utilizador tem de estar preenchido."
273
 
274
  # @ wd-fb-og
275
- #: includes/settings-page.php:422
276
- msgid "Include Meta Author tag"
277
- msgstr "Incluir a tag \"Meta Author\""
278
 
279
- #: includes/settings-page.php:429
280
- msgid "Sets the article author name"
281
- msgstr "Define o nome do autor do artigo"
 
282
 
283
- #: includes/settings-page.php:434
284
- msgid "Include Google+ link rel \"author\" tag"
285
- msgstr "Incluir tag \"Google+ link rel author\""
 
286
 
287
- #: includes/settings-page.php:441
288
- msgid ""
289
- "Links the article to the author Google+ Profile (authorship). The user's "
290
- "Google+ profile URL must be filled in."
291
  msgstr ""
292
- "Associa o artigo ao perfil Google+ do autor do mesmo. O URL de Perfil Google"
293
- "+ do utilizador tem de estar preenchido."
294
-
295
- #: includes/settings-page.php:446
296
- msgid "Include Twitter Card Creator tag"
297
- msgstr "Incluir tag Autor do \"Twitter Card\""
298
 
299
- #: includes/settings-page.php:453
300
- msgid ""
301
- "Links the article to the author Twitter profile. The user's Twitter user "
302
- "must be filled in."
303
- msgstr ""
304
- "Associa o artigo ao perfil Twitter do autor do mesmo. O Utilizador Twitter "
305
- "tem de estar preenchido."
306
 
307
- #: includes/settings-page.php:458
308
- msgid "Hide author on pages"
309
- msgstr "Não mostrar autor nas páginas"
 
310
 
311
- #: includes/settings-page.php:463
312
- msgid "Hides all author tags on pages."
313
- msgstr "Esconder todas as tags de autor nas páginas."
314
 
315
  # @ wd-fb-og
316
- #: includes/settings-page.php:472
317
- msgid "Include Description (og:description) tag"
318
- msgstr "Incluir tag Descrição (og:description)"
319
 
320
  # @ wd-fb-og
321
- #: includes/settings-page.php:478
322
- msgid "Include Meta Description tag"
323
- msgstr "Incluir a tag \"Meta Description\""
 
 
 
 
324
 
325
  # @ wd-fb-og
326
- #: includes/settings-page.php:485
327
- msgid "Recommended for SEO purposes if no other plugin is setting it already"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  msgstr ""
329
- "Recomendado para efeitos de Optimização para Motores de Busca, se outro "
330
- "plugin ainda não a está a definir"
331
 
332
- # @ wd-fb-og
333
- #: includes/settings-page.php:490
334
- msgid "Include Schema.org \"itemprop\" Description tag"
335
- msgstr "Incluir a tag \"itemprop Description\" do Schema.org"
336
 
337
- # @ wd-fb-og
338
- #: includes/settings-page.php:502
339
- msgid "Include Twitter Card Description tag"
340
- msgstr "Incluir tag Descrição do \"Twitter Card\""
 
 
 
 
 
 
 
 
 
 
 
341
 
342
  # @ wd-fb-og
343
- #: includes/settings-page.php:514
344
  msgid "Description maximum length"
345
  msgstr "Comprimento máximo da descrição"
346
 
347
- # @ wd-fb-og
348
- #: includes/settings-page.php:519
349
- msgid "0 or blank for no maximum length"
350
- msgstr "0 ou em branco para não definir máximo"
 
 
 
351
 
352
  # @ wd-fb-og
353
- #: includes/settings-page.php:524
354
  msgid "Homepage description"
355
  msgstr "Descrição da página inicial"
356
 
357
  # @ wd-fb-og
358
- #: includes/settings-page.php:530
359
  msgid "The description of your front page:"
360
  msgstr "A descrição da sua página inicial:"
361
 
362
  # @ wd-fb-og
363
- #: includes/settings-page.php:535
364
  msgid "Website tagline"
365
  msgstr "Descrição do site"
366
 
367
  # @ wd-fb-og
368
- #: includes/settings-page.php:536
369
  msgid "Custom text"
370
  msgstr "Texto personalizado"
371
 
372
- #: includes/settings-page.php:547
373
  #, php-format
374
  msgid ""
375
  "WPML users: Set the default language description here, save changes and then "
376
- "go to <a href=\"%s\">WPML &gt; String translation</a> to set it for other "
377
- "languages."
378
  msgstr ""
379
  "Utilizadores WPML: Defina aqui a descrição no idioma por omissão, guarde as "
380
- "alterações e vá a <a href=\"%s\">WPML &gt; Tradução de storing</a> para "
381
- "defini-la para outros idiomas."
382
 
383
- # @ wd-fb-og
384
- #: includes/settings-page.php:563
385
- msgid "Include Image (og:image) tag"
386
- msgstr "Incluir tag Imagem (og:image)"
387
 
388
  # @ wd-fb-og
389
- #: includes/settings-page.php:568
390
- msgid ""
391
- "All images MUST have at least 200px on both dimensions in order to Facebook "
392
- "to load them at all.<br/>1200x630px for optimal results.<br/>Minimum of "
393
- "600x315px is recommended."
394
- msgstr ""
395
- "Todas as imagens TÊM de ter pelo menos 200px em ambas as dimensões para que "
396
- "o Facebook as carregue.<br/>1200x630px para resultados optimizados.<br/>Um "
397
- "mínimo de 600x315px é recomendado."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
 
399
- #: includes/settings-page.php:573
400
- msgid "Include Image size (og:image:width and og:image:height) tags"
401
- msgstr "Incluir tags de Tamanho de Imagem (og:image:width e og:image:height)"
402
 
403
- #: includes/settings-page.php:578
404
  msgid ""
405
- "Recommended only if Facebook is having problems loading the image when the "
406
- "post is shared for the first time."
 
407
  msgstr ""
408
- "Recomendado apenas se o Facebook tem problemas a carregar a imagem quando o "
409
- "artigo é partilhado pela primeira vez."
 
410
 
411
- # @ wd-fb-og
412
- #: includes/settings-page.php:583
413
- msgid "Include Schema.org \"itemprop\" Image tag"
414
- msgstr "Incluir a tag \"itemprop Image\" do Schema.org"
 
 
 
 
 
 
415
 
416
- # @ wd-fb-og
417
- #: includes/settings-page.php:595
418
- msgid "Include Twitter Card Image tag"
419
- msgstr "Incluir tag Imagem do \"Twitter Card\""
 
 
 
 
420
 
421
- # @ wd-fb-og
422
- #: includes/settings-page.php:607
423
- msgid "Default image"
424
- msgstr "Imagem por omissão"
425
 
426
- # @ wd-fb-og
427
- #: includes/settings-page.php:615 wonderm00n-open-graph.php:931
428
- msgid "Recommended size: 1200x630px"
429
- msgstr "Tamanho recomendado: 1200x630px"
430
 
431
  # @ wd-fb-og
432
- #: includes/settings-page.php:620
433
  msgid "Add image to RSS/RSS2 feeds"
434
  msgstr "Incluir a imagem aos feeds RSS/RSS2"
435
 
436
  # @ wd-fb-og
437
- #: includes/settings-page.php:625
438
  msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
439
  msgstr ""
440
  "Para aplicação de posts automáticos como o RSS Graffitti, twitterfeed, etc..."
441
 
442
- # @ wd-fb-og
443
- #: includes/settings-page.php:630
444
- msgid "On posts/pages"
445
- msgstr "Nos artigos/páginas"
446
 
447
- # @ wd-fb-og
448
- #: includes/settings-page.php:634
449
  msgid ""
450
- "Image will be fetched from the specific \"Open Graph Image\" custom field on "
451
- "the post"
452
- msgstr ""
453
- "A imagem utilizada será a definida no campo específico \"Open Graph Image\" "
454
- "no artigo"
455
 
456
- # @ wd-fb-og
457
- #: includes/settings-page.php:638
458
- msgid ""
459
- "If it's not set, image will be fetched from post/page featured/thumbnail "
460
- "picture"
461
  msgstr ""
462
- "Se não definida, a imagem utilizada será a imagem de destaque do artigo/"
463
- "página"
464
 
465
- # @ wd-fb-og
466
- #: includes/settings-page.php:642
467
- msgid "If it doesn't exist, use the first image from the post/page content"
 
468
  msgstr ""
469
- "Se não existir, será utilizada a primeira imagem no conteúdo do artigo/página"
 
470
 
471
- # @ wd-fb-og
472
- #: includes/settings-page.php:646
473
- msgid "If it doesn't exist, use first image from the post/page media gallery"
474
- msgstr ""
475
- "Se não existir, será usada a primeira imagem na galeria multimédia do artigo/"
476
- "página"
477
 
478
  # @ wd-fb-og
479
- #: includes/settings-page.php:650
480
- msgid "If it doesn't exist, use the default image above"
481
- msgstr "Se não existir, utilizar a imagem por omissão em cima"
482
 
483
- #: includes/settings-page.php:655
484
- msgid "Overlay PNG logo"
485
- msgstr "Sobrepor logotipo em PNG"
486
 
487
- #: includes/settings-page.php:660
488
- msgid ""
489
- "Image will be resized/cropped to 1200x630 and the transparent PNG chosen "
490
- "bellow (that should also have this size) will be overlaid on it. It will "
491
- "only work for locally hosted images."
492
- msgstr ""
493
- "A imagem será redimensionada e cortada para 1200x630 e o PNG transparente "
494
- "escolhido (que deve também ter este tamanho) será sobreposto à mesma. Só "
495
- "funciona para imagens alojadas localmente."
496
 
497
- #: includes/settings-page.php:669
498
- msgid "Size: 1200x630px"
499
- msgstr "Tamanho: 1200x630px"
500
 
501
- #: includes/settings-page.php:678
502
- msgid "Twitter Card Type"
503
- msgstr "Tipo de cartão do Twitter"
504
 
505
- #: includes/settings-page.php:681
506
- msgid "Summary Card"
507
- msgstr "Resumo"
508
 
509
- #: includes/settings-page.php:682
510
- msgid "Summary Card with Large Image"
511
- msgstr "Resumo com imagem grande"
512
 
513
- # @ wd-fb-og
514
- #: includes/settings-page.php:691
515
- msgid "3rd Party Integration"
516
- msgstr "Integração com outros plugins"
517
 
518
- # @ wd-fb-og
519
- #: includes/settings-page.php:702
520
  msgid ""
521
- "It's HIGHLY recommended to go to <a href=\"admin.php?page=wpseo_social\" "
522
- "target=\"_blank\">SEO &gt; Social</a> and disable \"Add Open Graph meta data"
523
- "\", \"Add Twitter card meta data\" and \"Add Google+ specific post meta data"
524
- "\""
525
  msgstr ""
526
- "É ALTAMENTE recomendado ir a <a href=\"admin.php?page=wpseo_social\">SEO "
527
- "&gt; Social</a> e desactivar \"Adiciona meta dados Open Graph \", "
528
- "\"Acrescentar metadados Twitter card\" e \"Add Google+ specific post meta "
529
- "data\""
530
 
531
- #: includes/settings-page.php:702
532
- msgid ""
533
- "even if you don't enable integration bellow. You will get duplicate tags if "
534
- "you don't do this."
535
- msgstr ""
536
- "mesmo que não active a integração em baixo. Obterá tags duplicadas se não o "
537
- "fizer."
538
 
539
- # @ wd-fb-og
540
- #: includes/settings-page.php:705
541
- msgid "Use title, url (canonical) and description from WPSEO"
542
- msgstr "Utilizar título, url (canónico) e descrição do WPSEO"
543
 
544
- #: includes/settings-page.php:720
545
- msgid ""
546
- "On product pages we will automatically set og:type to \"product\" and add "
547
- "the price including tax to the product:price tags."
548
- msgstr ""
549
- "Em páginas de produtos vamos automaticamente definir o og:type como \"product"
550
- "\" e adicionar o preço com taxas às tags product:price."
551
 
552
- #: includes/settings-page.php:723
553
- msgid "Use Product Category thumbnail as Open Graph Image"
554
- msgstr "Utilizar miniaturas de Categorias de Produto como \"Open Graph Image\""
 
555
 
556
- #: includes/settings-page.php:728
557
- msgid ""
558
- "Recommended if you set large thumbnails for Product Categories and want to "
559
- "use them as Open Graph Images on listing pages"
560
- msgstr ""
561
- "Recomendado se utiliza imagens de grandes dimensões como miniatura das "
562
- "Categorias de Produto e deseja usar as mesmas como \"Open Graph Image\" nas "
563
- "listagens de categorias de produto."
564
-
565
- #: includes/settings-page.php:733
566
- msgid "Use Product Gallery images as additional Open Graph Images"
567
- msgstr ""
568
- "Utilizar as imagens da Galeria de Produtos como \"Open Graph Image\" "
569
- "adicionais"
570
-
571
- #: includes/settings-page.php:738
572
- msgid "Experimental"
573
- msgstr "Experimental"
574
-
575
- #: includes/settings-page.php:740
576
- msgid ""
577
- "Uses additional Product Gallery images so, when the product is shared on "
578
- "Facebook, the user can choose what image to use"
579
- msgstr ""
580
- "Utiliza as imagens da Galeria de Produtos de forma que, quando o mesmo é "
581
- "partilhado no Facebook, o utilizador possa escolher que imagem usar para a "
582
- "partilha"
583
-
584
- # @ wd-fb-og
585
- #: includes/settings-page.php:755
586
- msgid "Add SubHeading to Post/Page title"
587
- msgstr "Adicionar \"SubHeading\" ao título do artigo/página"
588
-
589
- #: includes/settings-page.php:761
590
- msgid "SubHeading position"
591
- msgstr "Posição do \"SubHeading\""
592
-
593
- #: includes/settings-page.php:764
594
- msgid "After"
595
- msgstr "Depois"
596
-
597
- #: includes/settings-page.php:765
598
- msgid "Before"
599
- msgstr "Antes"
600
-
601
- # @ wd-fb-og
602
- #: includes/settings-page.php:780
603
- msgid "Use BDP listing contents as OG tags"
604
- msgstr "Utilizar o conteúdo dos anúncios BDP como tags OG"
605
-
606
- # @ wd-fb-og
607
- #: includes/settings-page.php:785
608
- msgid ""
609
- "Setting \"Include URL\", \"Set Canonical URL\", \"Include Description\" and "
610
- "\"Include Image\" options above is HIGHLY recommended"
611
- msgstr ""
612
- "Activar as opções \"Incluir tag URL (og:url)\", \"Incluir a tag URL Canónico"
613
- "\", \"Incluir tag Descrição (og:description)\" e \"Incluir tag Imagem (og:"
614
- "image)\" é ALTAMENTE recomendado"
615
-
616
- # @ wd-fb-og
617
- #: includes/settings-page.php:794
618
- msgid "You don't have any compatible 3rd Party plugin installed/active."
619
- msgstr "Não tem nenhum plugin compatível instalado/activo."
620
-
621
- # @ wd-fb-og
622
- #: includes/settings-page.php:795
623
- msgid "This plugin is currently compatible with:"
624
- msgstr "Este plugin é actualmente compatível com:"
625
-
626
- #: includes/settings-page.php:809
627
- msgid "Advanced settings"
628
- msgstr "Definições avançadas"
629
-
630
- #: includes/settings-page.php:811
631
- msgid "Don't mess with this unless you know what you're doing"
632
- msgstr "Não mexer nestas configurações se não souber o que está a fazer"
633
-
634
- #: includes/settings-page.php:814
635
- msgid "Force getimagesize on local file even if allow_url_fopen=1"
636
- msgstr ""
637
- "Forçar o \"getimagesize\" no ficheiro local mesmo que allow_url_fopen=1"
638
-
639
- #: includes/settings-page.php:819
640
- msgid ""
641
- "May cause problems with some multisite configurations but fix \"HTTP request "
642
- "failed\" errors"
643
- msgstr ""
644
- "Pode causar problemas com algumas configurações \"multisite\" mas corrige "
645
- "erros \"HTTP request failed\""
646
-
647
- #: includes/settings-page.php:824
648
- msgid "Try to update Facebook Open Graph Tags cache when saving the post"
649
- msgstr ""
650
- "Tentar actualizar a cache das Facebook Open Graph Tags ao gravar um post"
651
-
652
- #: includes/settings-page.php:830
653
- msgid "Supress Facebook Open Graph Tags cache updated notice"
654
- msgstr ""
655
- "Esconder notificação de actualização de cache das Facebook Open Graph Tags"
656
-
657
- #: includes/settings-page.php:841
658
- msgid "Save Changes"
659
- msgstr "Guardar alterações"
660
-
661
- # @ wd-fb-og
662
- #: includes/settings-page.php:852
663
- msgid "Test your URLs at Facebook URL Linter / Debugger"
664
- msgstr "Teste os seus URLs no \"Facebook URL Linter / Debugger\""
665
-
666
- #: includes/settings-page.php:855
667
- msgid "Test (and request approval for) your URLs at Twitter Card validator"
668
- msgstr "Teste (e solicite aprovação dos) URLs no \"Twitter Card validator\""
669
-
670
- # @ wd-fb-og
671
- #: includes/settings-page.php:858
672
- msgid "About the Open Graph Protocol (on Facebook)"
673
- msgstr "Sobre o Protocolo Open Graph (no Facebook)"
674
-
675
- # @ wd-fb-og
676
- #: includes/settings-page.php:861
677
- msgid "The Open Graph Protocol (official website)"
678
- msgstr "O Protocolo Open Graph (website oficial)"
679
-
680
- #: includes/settings-page.php:864
681
- msgid "About Twitter Cards"
682
- msgstr "Sobre os \"Twitter Cards\""
683
 
684
  # @ wd-fb-og
685
- #: includes/settings-page.php:867
686
  msgid "Plugin official URL"
687
  msgstr "URL oficial do plugin"
688
 
689
  # @ wd-fb-og
690
- #: includes/settings-page.php:870
691
  msgid "Author's website: Webdados"
692
  msgstr "Website do autor: Webdados"
693
 
694
  # @ wd-fb-og
695
- #: includes/settings-page.php:873
696
  msgid "Author's Facebook page: Webdados"
697
  msgstr "Página Facebook do autor: Webdados"
698
 
699
  # @ wd-fb-og
700
- #: includes/settings-page.php:876
701
  msgid "Author's Twitter account: @Wonderm00n<br/>(Webdados founder)"
702
  msgstr "Conta Twitter do autor: @Wonderm00n<br/>(fundador da Webdados)"
703
 
704
- #: includes/settings-page.php:883
705
  msgid "About this plugin"
706
  msgstr "Sobre este plugin"
707
 
708
- #: includes/settings-page.php:885
709
  msgid "Support forum"
710
  msgstr "Fórum de suporte"
711
 
712
- #: includes/settings-page.php:887
713
  msgid "Premium technical support or custom WordPress development"
714
  msgstr "Suporte técnico premium ou desenvolvimento WordPress à medida"
715
 
716
- #: includes/settings-page.php:888
717
  #, php-format
718
  msgid "Please contact %s"
719
  msgstr "Por favor contactar %s"
720
 
721
- #: includes/settings-page.php:889
722
  msgid "Please rate our plugin at WordPress.org"
723
  msgstr "Por favor classifique o nosso plugin no WordPress.org"
724
 
725
  # @ wd-fb-og
726
- #: includes/settings-page.php:899
727
  msgid "Useful links"
728
  msgstr "Links úteis"
729
 
730
  # @ wd-fb-og
731
- #: includes/settings-page.php:912
732
  msgid "Donate"
733
  msgstr "Doar"
734
 
735
  # @ wd-fb-og
736
- #: includes/settings-page.php:914
737
  msgid ""
738
  "If you find this plugin useful and want to make a contribution towards "
739
  "future development please consider making a small, or big ;-), donation."
@@ -742,87 +701,158 @@ msgstr ""
742
  "desenvolvimento no futuro, considere fazer uma pequena, ou grande ;-), "
743
  "doação."
744
 
745
- #: includes/settings-page.php:952
746
- msgid "Select image"
747
- msgstr "Selecionar imagem"
 
 
748
 
749
- #: includes/settings-page.php:954
750
- msgid "Use this image"
751
- msgstr "Utilizar esta imagem"
752
 
753
- #: wonderm00n-open-graph.php:319
754
- msgid "Search for"
755
- msgstr "Pesquisa por"
756
 
757
- #: wonderm00n-open-graph.php:328 wonderm00n-open-graph.php:332
758
- #: wonderm00n-open-graph.php:336
759
- msgid "Archives"
760
- msgstr "Arquivos"
761
 
762
- #: wonderm00n-open-graph.php:417
763
- msgid "Price"
764
- msgstr "Preço"
765
 
766
- # @ wd-fb-og
767
- #: wonderm00n-open-graph.php:926
768
- msgid "Use this image:"
769
- msgstr "Utilizar esta imagem:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
770
 
771
  # @ wd-fb-og
772
- #: wonderm00n-open-graph.php:929
773
- msgid "Upload/Choose Open Graph Image"
774
- msgstr "Carregar/Escolher Imagem Open Graph"
 
 
 
 
775
 
776
  # @ wd-fb-og
777
- #: wonderm00n-open-graph.php:930
778
- msgid "Clear field"
779
- msgstr "Limpar campo"
780
 
781
- #: wonderm00n-open-graph.php:995
782
- msgid "URL failed:"
783
- msgstr "Falha no URL:"
784
 
785
- #: wonderm00n-open-graph.php:1003
786
- msgid "Facebook returned:"
787
- msgstr "O Facebook retornou:"
788
 
789
- #: wonderm00n-open-graph.php:1020
790
- msgid "Facebook Open Graph Tags cache updated/purged."
791
- msgstr "Cache das Facebook Open Graph Tags actualizada."
792
 
793
- #: wonderm00n-open-graph.php:1020
794
- msgid "Share this on Facebook"
795
- msgstr "Partilhe isto no Facebook"
796
 
797
- #: wonderm00n-open-graph.php:1028
798
- msgid "Error: Facebook Open Graph Tags cache NOT updated/purged."
799
- msgstr "Erro: Cache das Facebook Open Graph Tags NÃO actualizada"
800
 
801
- # @ wd-fb-og
802
- #: wonderm00n-open-graph.php:1068
803
- msgid "Use as Image Open Graph Tag"
804
- msgstr "Utilizar como Imagem Open Graph"
805
 
806
- #: wonderm00n-open-graph.php:1087
807
- msgid "Google+"
808
- msgstr "Google+"
809
 
810
- #: wonderm00n-open-graph.php:1091
811
- msgid "Facebook profile URL"
812
- msgstr "URL de Perfil Facebook"
 
 
 
 
 
 
 
 
 
 
 
 
813
 
814
- #: wonderm00n-open-graph.php:1110
 
815
  msgid ""
816
- "Please ignore the (dumb) Yoast WordPress SEO warning regarding open graph "
817
- "issues with this plugin. Just disable WPSEO Social settings at"
 
818
  msgstr ""
819
- "Por favor ignore o (parvo) aviso do plugin Yoast WordPress SEO sobre "
820
- "problemas \"open graph\" com este plugin. Simplesmente inactive as "
821
- "definições Social do WPSEO em"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
822
 
823
- #: wonderm00n-open-graph.php:1111
824
- msgid "SEO &gt; Social"
825
- msgstr "SEO &gt; Social"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
826
 
827
  #. Description of the plugin/theme
828
  msgid ""
@@ -838,6 +868,430 @@ msgstr ""
838
  "\"enclosure\" e \"media:content\" nos feeds RSS, para que aplicações como o "
839
  "RSS Graffiti and twitterfeed façam partilha para o Facebook correctamente."
840
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
841
  #~ msgid ""
842
  #~ "Image will be resized/cropped to 1200x630 and the PNG chosen bellow will "
843
  #~ "be overlaid"
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v2.0\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wonderm00ns-simple-"
5
  "facebook-open-graph-tags\n"
6
+ "POT-Creation-Date: 2016-10-11 17:23+0100\n"
7
+ "PO-Revision-Date: 2016-10-11 17:24+0100\n"
8
  "Last-Translator: Wonderm00n <wonderm00n@gmail.com>\n"
9
  "Language-Team: Webdados <info@webdados.pt>\n"
10
  "Language: pt_PT\n"
20
  "X-Textdomain-Support: yes\n"
21
  "X-Poedit-SearchPath-0: .\n"
22
 
23
+ #: admin/class-webdados-fb-open-graph-admin.php:41
 
 
 
 
 
 
 
 
 
 
 
24
  msgid "Settings"
25
  msgstr "Opções"
26
 
27
+ #: admin/class-webdados-fb-open-graph-admin.php:52
28
+ msgid "Google+"
29
+ msgstr "Google+"
 
30
 
31
+ #: admin/class-webdados-fb-open-graph-admin.php:54
32
+ #: admin/options-page-twitter.php:98
33
+ msgid "Twitter username (without @)"
34
+ msgstr "Utilizador do Twitter (sem @)"
35
 
36
+ #: admin/class-webdados-fb-open-graph-admin.php:56
37
+ msgid "Facebook profile URL"
38
+ msgstr "URL de Perfil Facebook"
 
39
 
40
  # @ wd-fb-og
41
+ #: admin/class-webdados-fb-open-graph-admin.php:90
42
+ msgid "Use this image:"
43
+ msgstr "Utilizar esta imagem:"
44
 
45
+ #: admin/class-webdados-fb-open-graph-admin.php:93
46
+ #: admin/options-page-general.php:76 admin/options-page-general.php:136
47
+ msgid "Upload/Choose"
48
+ msgstr "Carregar/Escolher"
49
 
50
  # @ wd-fb-og
51
+ #: admin/class-webdados-fb-open-graph-admin.php:94
52
+ msgid "Clear field"
53
+ msgstr "Limpar campo"
54
 
55
+ #: admin/class-webdados-fb-open-graph-admin.php:96
56
+ #: admin/options-page-general.php:83
57
+ #, php-format
58
+ msgid "Recommended size: %dx%dpx"
59
+ msgstr "Tamanho recomendado: %dx%dpx"
60
 
61
+ #: admin/class-webdados-fb-open-graph-admin.php:112
62
+ #: admin/class-webdados-fb-open-graph-admin.php:240
63
+ msgid "Select image"
64
+ msgstr "Selecionar imagem"
65
 
66
+ #: admin/class-webdados-fb-open-graph-admin.php:113
67
+ #: admin/class-webdados-fb-open-graph-admin.php:241
68
+ msgid "Use this image"
69
+ msgstr "Utilizar esta imagem"
70
 
71
+ #: admin/class-webdados-fb-open-graph-admin.php:184
72
+ msgid "URL failed:"
73
+ msgstr "Falha no URL:"
 
74
 
75
+ #: admin/class-webdados-fb-open-graph-admin.php:192
76
+ msgid "Facebook returned:"
77
+ msgstr "O Facebook retornou:"
78
+
79
+ #: admin/class-webdados-fb-open-graph-admin.php:206
80
+ msgid "Facebook Open Graph Tags cache updated/purged."
81
+ msgstr "Cache das Facebook Open Graph Tags actualizada."
82
+
83
+ #: admin/class-webdados-fb-open-graph-admin.php:206
84
+ msgid "Share this on Facebook"
85
+ msgstr "Partilhe isto no Facebook"
86
+
87
+ #: admin/class-webdados-fb-open-graph-admin.php:214
88
+ msgid "Error: Facebook Open Graph Tags cache NOT updated/purged."
89
+ msgstr "Erro: Cache das Facebook Open Graph Tags NÃO actualizada"
90
+
91
+ #: admin/options-page-3rdparty.php:9
92
+ msgid "Settings for 3rd party integration with other plugins."
93
+ msgstr "Opções para integração com outros plugins."
94
+
95
+ #: admin/options-page-3rdparty.php:39
96
+ msgid "Use Title, URL and Description"
97
+ msgstr "Utilizar Título, URL e Descrição"
98
+
99
+ #: admin/options-page-3rdparty.php:46
100
+ msgid "Use Title, Canonical URL and Description generated by Yoast SEO"
101
+ msgstr "Utilizar o Título, URL Canónico e a Descrição gerados pelo Yoast SEO"
102
+
103
+ #: admin/options-page-3rdparty.php:55 admin/options-page-3rdparty.php:116
104
+ #: admin/options-page-3rdparty.php:167 admin/options-page-3rdparty.php:205
105
+ #, php-format
106
+ msgid "You don't have %s installed or activated."
107
+ msgstr "Não tem %s instalado ou activado."
108
+
109
+ #: admin/options-page-3rdparty.php:71
110
+ msgid ""
111
+ "On the product page we will automatically set <i>og:type</i> to \"product\" "
112
+ "and <i>product:price</i> to the price including tax."
113
  msgstr ""
114
+ "Em páginas de produtos vamos automaticamente definir o <i>og:type</i> como "
115
+ "\"product\" e <i>product:price</i> com o preço incluindo taxas."
116
 
117
+ #: admin/options-page-3rdparty.php:76
118
+ msgid "Use Product Gallery as Images"
119
+ msgstr "Utilizar Galeria de Produto como Imagens"
 
120
 
121
+ #: admin/options-page-3rdparty.php:83
122
+ msgid ""
123
+ "Sets each Product Gallery image as an additional <i>og:image</i> tag so "
124
+ "that, when a product is shared on Facebook, the user is given the choice "
125
+ "what image to display"
126
+ msgstr ""
127
+ "Define cada imagem da Galeria de Produto como uma tag <i>og:image</i> "
128
+ "adicional para que, quando um produto for partilhado no Facebook, seja dada "
129
+ "ao utilizador a escolha de qual imagem mostrar"
130
 
131
+ #: admin/options-page-3rdparty.php:88 admin/options-page-general.php:119
132
+ msgid "Overlay PNG logo"
133
+ msgstr "Sobrepor logotipo em PNG"
 
134
 
135
+ #: admin/options-page-3rdparty.php:95
136
+ msgid "Also overlay the PNG logo on the Product Gallery images"
137
+ msgstr "Também sobrepor o logotipo em PNG nas imagens da Galeria de Produto"
 
138
 
139
+ #: admin/options-page-3rdparty.php:100
140
+ msgid "Use Category thumbnail as Image"
141
+ msgstr "Utilizar miniatura de Categoria como Imagem"
 
142
 
143
+ #: admin/options-page-3rdparty.php:107
 
 
144
  msgid ""
145
+ "Recommended if you set large thumbnails for Product Categories and want to "
146
+ "use them as Open Graph Images on category listing pages"
147
  msgstr ""
148
+ "Recomendado se utiliza imagens de grandes dimensões nas Categorias de "
149
+ "Produto e deseja usar as mesmas como \"Open Graph Image\" nas listagens de "
150
+ "categorias"
151
 
152
+ #: admin/options-page-3rdparty.php:136
153
+ msgid "Add SubHeading to Post/Page Title"
154
+ msgstr "Adicionar \"SubHeading\" ao título do Artigo/Página"
 
155
 
156
+ #: admin/options-page-3rdparty.php:148
157
+ msgid "SubHeading position"
158
+ msgstr "Posição do \"SubHeading\""
159
+
160
+ #: admin/options-page-3rdparty.php:151
161
+ msgid "After"
162
+ msgstr "Depois"
163
+
164
+ #: admin/options-page-3rdparty.php:152
165
+ msgid "Before"
166
+ msgstr "Antes"
167
+
168
+ #: admin/options-page-3rdparty.php:187
169
+ msgid "Use listing details"
170
+ msgstr "Utilizar detalhes dos anúncios"
171
+
172
+ #: admin/options-page-3rdparty.php:194
173
  msgid ""
174
+ "Use Business Directory Plugin listing details (Title, URL, Description and "
175
+ "Image) to populate tags"
176
  msgstr ""
177
+ "Utilizar os detalhes de anúncios do Business Directory Plugin (Título, URL, "
178
+ "e Imagem) como conteúdo das tags"
179
 
180
+ #: admin/options-page-3rdparty.php:196
181
+ msgid ""
182
+ "Setting \"Include URL\", \"Set Canonical URL\", \"Include Description\" and "
183
+ "\"Include Image\" options is HIGHLY recommended"
184
+ msgstr ""
185
+ "Activar as opções \"Incluir URL”, \"Incluir URL Canónico\", \"Incluir "
186
+ "Descrição\" e \"Incluir Imagem\" é ALTAMENTE recomendado"
187
 
188
+ #: admin/options-page-facebook.php:7
189
+ msgid ""
190
+ "Open Graph tags used by Facebook, and other social networks, to render link "
191
+ "share posts."
192
+ msgstr ""
193
+ "Tags Open Graph utilizadas pelo Facebook, e outras redes sociais, para "
194
+ "definir posts de partilha de links."
195
 
196
+ #: admin/options-page-facebook.php:9
197
+ msgid "Facebook Open Graph Tags"
198
+ msgstr "Tags Facebook Open Graph"
 
199
 
200
+ #: admin/options-page-facebook.php:15
201
+ msgid "Include Post/Page Title"
202
+ msgstr "Incluir Título do Artigo/Página"
 
203
 
204
+ #: admin/options-page-facebook.php:27
205
+ msgid "Include Site Name"
206
+ msgstr "Incluir Nome do Site"
 
207
 
208
+ #: admin/options-page-facebook.php:36 admin/options-page-seo.php:78
209
+ msgid "From Settings &gt; General &gt; Site Title"
210
+ msgstr "De Opções &gt;Geral &gt; Título do site"
 
211
 
212
+ #: admin/options-page-facebook.php:41 admin/options-page-twitter.php:27
213
+ msgid "Include URL"
214
+ msgstr "Incluir URL"
215
+
216
+ #: admin/options-page-facebook.php:53 admin/options-page-schema.php:27
217
+ #: admin/options-page-twitter.php:39
218
+ msgid "Include Description"
219
+ msgstr "Incluir Descrição"
220
+
221
+ #: admin/options-page-facebook.php:65 admin/options-page-schema.php:39
222
+ #: admin/options-page-twitter.php:51
223
+ msgid "Include Image"
224
+ msgstr "Incluir Imagem"
225
+
226
+ #: admin/options-page-facebook.php:74
227
  #, php-format
228
  msgid ""
229
+ "All images must have at least 200px on both dimensions in order to Facebook "
230
+ "to load them at all. %dx%dpx for optimal results. Minimum of 600x315px is "
231
+ "recommended."
232
  msgstr ""
233
+ "Todas as imagens devem ter pelo menos 200px em ambas as dimensões para que o "
234
+ "Facebook as carregue. %dx%dpx para resultados optimizados. Um mínimo de "
235
+ "600x315px é recomendado."
236
 
237
+ #: admin/options-page-facebook.php:79
238
+ msgid "Include Image Dimensions"
239
+ msgstr "Incluir Dimensão da Imagem"
 
240
 
241
+ #: admin/options-page-facebook.php:86 admin/options-page-facebook.php:144
242
+ msgid "and"
243
+ msgstr "e"
 
244
 
245
+ #: admin/options-page-facebook.php:88
246
  msgid ""
247
+ "Recommended only if Facebook is having problems loading the image when the "
248
+ "post is shared for the first time, or else it adds extra unnecessary "
249
+ "processing time"
250
  msgstr ""
251
+ "Recomendado apenas se o Facebook tem problemas a carregar a imagem quando o "
252
+ "artigo é partilhado pela primeira vez, ou em contrário só adiciona tempo de "
253
+ "processamento desnecessário."
254
 
255
+ #: admin/options-page-facebook.php:93
256
+ msgid "Include Type"
257
+ msgstr "Incluir Tipo"
258
 
259
+ #: admin/options-page-facebook.php:102
260
+ #, php-format
261
+ msgid ""
262
+ "Will be \"%1$s\" for posts and pages and \"%2$s\" or \"%3$s\" for the "
263
+ "homepage"
264
+ msgstr ""
265
+ "Será \"%1$s\" para artigos e páginas, e \"%2$s\" ou \"%3$s\" para a página "
266
+ "inicial"
267
 
268
+ #: admin/options-page-facebook.php:104
269
+ msgid "Additional types may be used depending on 3rd party integrations"
270
+ msgstr ""
271
+ "Tipos adicionais podem ser utilizados dependendo de integrações com outros "
272
+ "plugins"
273
 
274
+ #: admin/options-page-facebook.php:109
275
+ msgid "Homepage Type"
276
+ msgstr "Tipo da Página Inicial"
 
277
 
278
+ #: admin/options-page-facebook.php:123 admin/options-page-schema.php:52
279
+ #: admin/options-page-schema.php:66 admin/options-page-twitter.php:63
280
+ msgid "Include Post/Page Author"
281
+ msgstr "Incluir Autor do Artigo/Página"
282
 
283
+ #: admin/options-page-facebook.php:132
284
+ msgid "The user's Facebook URL must be filled in on his profile"
285
+ msgstr "O URL de Facebook do utilizador tem de estar preenchido no seu perfil."
286
 
287
+ #: admin/options-page-facebook.php:137
288
+ msgid "Include Published/Modified Dates"
289
+ msgstr "Incluir Datas de Publicação/Modificação"
 
 
290
 
291
+ #: admin/options-page-facebook.php:146 admin/options-page-facebook.php:160
292
+ msgid "For posts only"
293
+ msgstr "Apenas para artigos"
294
 
295
+ #: admin/options-page-facebook.php:151
296
+ msgid "Include Article Sections"
297
+ msgstr "Incluir Secções de Artigos"
298
 
299
+ #: admin/options-page-facebook.php:160
300
+ msgid "from the categories names"
301
+ msgstr "do nome das categorias"
302
 
303
+ #: admin/options-page-facebook.php:165 admin/options-page-schema.php:79
304
+ #: admin/options-page-seo.php:69 admin/options-page-twitter.php:77
305
+ msgid "Include Publisher"
306
+ msgstr "Incluir “Publisher”"
307
 
308
+ #: admin/options-page-facebook.php:174 admin/options-page-facebook.php:200
309
+ msgid "The website's Facebook Page"
310
+ msgstr "Página de Facebook do Website"
311
 
312
+ #: admin/options-page-facebook.php:179
313
+ msgid "Website's Facebook Page"
314
+ msgstr "Página de Facebook do Website"
315
 
316
+ #: admin/options-page-facebook.php:186
317
+ msgid "Facebook Page URL (with https://)"
318
+ msgstr "URL da Página de Facebook (with https://)"
319
 
320
+ #: admin/options-page-facebook.php:191
321
+ msgid "Include Locale"
322
+ msgstr "Incluir “Locale”"
323
 
324
+ # @ wd-fb-og
325
+ #: admin/options-page-facebook.php:205
326
+ msgid "Locale"
327
+ msgstr "Locale"
 
 
 
328
 
329
  # @ wd-fb-og
330
+ #: admin/options-page-facebook.php:243
331
+ msgid "WordPress current locale/language"
332
+ msgstr "O \"locale\"/idíoma actual do WordPress"
333
 
334
+ # @ wd-fb-og
335
+ #: admin/options-page-facebook.php:264
336
+ msgid "List loaded from Facebook (online)"
337
+ msgstr "Lista carregada do Facebook (online)"
338
 
339
+ # @ wd-fb-og
340
+ #: admin/options-page-facebook.php:267
341
+ msgid "List loaded from local cache (offline)"
342
+ msgstr "Lista carregada da cache local (offline)"
343
 
344
+ # @ wd-fb-og
345
+ #: admin/options-page-facebook.php:267
346
+ msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
 
347
  msgstr ""
348
+ "Vai perder quaisquer modificações que não tenha gravado. Tem a certeza?"
 
 
 
 
 
349
 
350
+ # @ wd-fb-og
351
+ #: admin/options-page-facebook.php:267
352
+ msgid "Reload from Facebook"
353
+ msgstr "(Re)carregar a partir do Facebook"
 
 
 
354
 
355
+ # @ wd-fb-og
356
+ #: admin/options-page-facebook.php:269
357
+ msgid "List not loaded"
358
+ msgstr "Lista não carregada"
359
 
360
+ #: admin/options-page-facebook.php:277
361
+ msgid "Include Facebook Admin(s) ID"
362
+ msgstr "Incluir ID de Admin(s) do Facebook"
363
 
364
  # @ wd-fb-og
365
+ #: admin/options-page-facebook.php:289
366
+ msgid "Facebook Admin(s) ID"
367
+ msgstr "ID do(s) Admin(s) no Facebook"
368
 
369
  # @ wd-fb-og
370
+ #: admin/options-page-facebook.php:296
371
+ msgid "Comma separated if more than one"
372
+ msgstr "Separados por vírgulas se mais do que um"
373
+
374
+ #: admin/options-page-facebook.php:301
375
+ msgid "Include Facebook Platform App ID"
376
+ msgstr "Incluir \"Facebook Platform App ID\""
377
 
378
  # @ wd-fb-og
379
+ #: admin/options-page-facebook.php:313
380
+ msgid "Facebook Platform App ID"
381
+ msgstr "Facebook Platform App ID"
382
+
383
+ #: admin/options-page-facebook.php:320
384
+ msgid "From your Facebook Developers dashboard"
385
+ msgstr "Do seu “Facebook Developers dashboard”"
386
+
387
+ #: admin/options-page-facebook.php:329
388
+ msgid "Facebook Open Graph Tags cache"
389
+ msgstr "Cache de Tags Facebook Open Graph"
390
+
391
+ #: admin/options-page-facebook.php:335
392
+ msgid "Clear cache"
393
+ msgstr "Limpar cache"
394
+
395
+ #: admin/options-page-facebook.php:342
396
+ msgid ""
397
+ "Try to clear the Facebook Open Graph Tags cache when saving a post or page, "
398
+ "so the link preview on Facebook is immediately updated"
399
  msgstr ""
400
+ "Tentar actualizar a cache das Tags Facebook Open Graph ao gravar um post, "
401
+ "para que a pré-visualização no Facebook seja imediatamente actualizada"
402
 
403
+ #: admin/options-page-facebook.php:347
404
+ msgid "Suppress cache notices"
405
+ msgstr "Esconder notificações de cache"
 
406
 
407
+ #: admin/options-page-facebook.php:354
408
+ msgid ""
409
+ "Sometimes we aren't able to update the cache and the post author will see a "
410
+ "notice if this option is not checked"
411
+ msgstr ""
412
+ "Por vezes não conseguimos actualizar a cache e o autor do artigo verá uma "
413
+ "notificação se esta opção não estiver activa"
414
+
415
+ #: admin/options-page-general.php:8
416
+ msgid "General settings that will apply to all tags types."
417
+ msgstr "Opções gerais que se aplicam a todos os tipos de tags"
418
+
419
+ #: admin/options-page-general.php:10
420
+ msgid "Description settings"
421
+ msgstr "Opções de Descrição"
422
 
423
  # @ wd-fb-og
424
+ #: admin/options-page-general.php:16
425
  msgid "Description maximum length"
426
  msgstr "Comprimento máximo da descrição"
427
 
428
+ #: admin/options-page-general.php:18
429
+ msgid "characters"
430
+ msgstr "caracteres"
431
+
432
+ #: admin/options-page-general.php:23
433
+ msgid "0 (zero) or blank for no maximum length"
434
+ msgstr "0 (zero) ou em branco para não definir máximo"
435
 
436
  # @ wd-fb-og
437
+ #: admin/options-page-general.php:28
438
  msgid "Homepage description"
439
  msgstr "Descrição da página inicial"
440
 
441
  # @ wd-fb-og
442
+ #: admin/options-page-general.php:34
443
  msgid "The description of your front page:"
444
  msgstr "A descrição da sua página inicial:"
445
 
446
  # @ wd-fb-og
447
+ #: admin/options-page-general.php:39
448
  msgid "Website tagline"
449
  msgstr "Descrição do site"
450
 
451
  # @ wd-fb-og
452
+ #: admin/options-page-general.php:40
453
  msgid "Custom text"
454
  msgstr "Texto personalizado"
455
 
456
+ #: admin/options-page-general.php:48
457
  #, php-format
458
  msgid ""
459
  "WPML users: Set the default language description here, save changes and then "
460
+ "go to <a href=\"%s\" target=\"_blank\">WPML &gt; String translation</a> to "
461
+ "set it for other languages."
462
  msgstr ""
463
  "Utilizadores WPML: Defina aqui a descrição no idioma por omissão, guarde as "
464
+ "alterações e vá a <a href=\"%s\" target=\"_blank\">WPML &gt; Tradução de "
465
+ "string</a> para defini-la noutros idiomas."
466
 
467
+ #: admin/options-page-general.php:67
468
+ msgid "Image settings"
469
+ msgstr "Opções de Imagem"
 
470
 
471
  # @ wd-fb-og
472
+ #: admin/options-page-general.php:73
473
+ msgid "Default image"
474
+ msgstr "Imagem por omissão"
475
+
476
+ #: admin/options-page-general.php:81 admin/options-page-general.php:141
477
+ msgid "URL (with http(s)://)"
478
+ msgstr "URL (com http(s)://)"
479
+
480
+ #: admin/options-page-general.php:88
481
+ msgid "On Post/Page, use image from"
482
+ msgstr "No Artigo/Página, usar imagem de"
483
+
484
+ #: admin/options-page-general.php:92
485
+ msgid "\"Open Graph Image\" custom field on the post"
486
+ msgstr "Campo específico \"Open Graph Image\" no artigo"
487
+
488
+ #: admin/options-page-general.php:96
489
+ msgid "Post/page featured image"
490
+ msgstr "Imagem de destaque do artigo/página"
491
+
492
+ #: admin/options-page-general.php:100
493
+ msgid "First image from the post/page content"
494
+ msgstr "Primeira imagem no conteúdo do artigo/página"
495
+
496
+ #: admin/options-page-general.php:104
497
+ msgid "First image from the post/page media gallery"
498
+ msgstr "Primeira imagem carregada na galeria multimédia do artigo/página"
499
 
500
+ #: admin/options-page-general.php:108
501
+ msgid "Default image specified above"
502
+ msgstr "Imagem por omissão definida em cima"
503
 
504
+ #: admin/options-page-general.php:114
505
  msgid ""
506
+ "On posts/pages the first image found, using the priority above, will be "
507
+ "used. On the homepage, archives and other website sections the default image "
508
+ "is always used."
509
  msgstr ""
510
+ "Em artigos/páginas a primeira imagem encontrada, utilizando a prioridade em "
511
+ "cima, será utilizada. Na página inicial, arquivos e outras secções do "
512
+ "website a imagem utilizada será a por omissão."
513
 
514
+ #: admin/options-page-general.php:126
515
+ #, php-format
516
+ msgid ""
517
+ "The original image will be resized/cropped to %dx%dpx and the chosen PNG "
518
+ "(that should also have this size) will be overlaid on it. It will only work "
519
+ "for locally hosted images."
520
+ msgstr ""
521
+ "A imagem original será redimensionada/cortada para %dx%dpx e o PNG escolhido "
522
+ "(que deve ter exactamente este tamanho) será sobreposto à mesma. Só "
523
+ "funcionará para imagem alojadas localmente."
524
 
525
+ #: admin/options-page-general.php:128
526
+ #, php-format
527
+ msgid ""
528
+ "You can see an example of the end result <a href=\"%s\" target=\"_blank"
529
+ "\">here</a>"
530
+ msgstr ""
531
+ "Pode ver um exemplo do resultado final <a href=\"%s\" target=\"_blank"
532
+ "\">aqui</a>"
533
 
534
+ #: admin/options-page-general.php:133
535
+ msgid "PNG logo"
536
+ msgstr "Logo PNG"
 
537
 
538
+ #: admin/options-page-general.php:143
539
+ #, php-format
540
+ msgid "Size: %dx%dpx"
541
+ msgstr "Tamanho: %dx%dpx"
542
 
543
  # @ wd-fb-og
544
+ #: admin/options-page-general.php:148
545
  msgid "Add image to RSS/RSS2 feeds"
546
  msgstr "Incluir a imagem aos feeds RSS/RSS2"
547
 
548
  # @ wd-fb-og
549
+ #: admin/options-page-general.php:155
550
  msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
551
  msgstr ""
552
  "Para aplicação de posts automáticos como o RSS Graffitti, twitterfeed, etc..."
553
 
554
+ #: admin/options-page-general.php:160
555
+ msgid "Force getimagesize on local file"
556
+ msgstr "Forçar “getimagesize” em ficheiro local"
 
557
 
558
+ #: admin/options-page-general.php:167
 
559
  msgid ""
560
+ "This is an advanced option: Don't mess with this unless you know what you're "
561
+ "doing"
562
+ msgstr "Esta é uma opção avançada: Não a altere se não sabe o que está a fazer"
 
 
563
 
564
+ #: admin/options-page-general.php:169
565
+ msgid "Force getimagesize on local file even if allow_url_fopen=1"
 
 
 
566
  msgstr ""
567
+ "Forçar o \"getimagesize\" no ficheiro local mesmo que allow_url_fopen=1"
 
568
 
569
+ #: admin/options-page-general.php:171
570
+ msgid ""
571
+ "May cause problems with some multisite configurations but fixes \"HTTP "
572
+ "request failed\" errors"
573
  msgstr ""
574
+ "Pode causar problemas com algumas configurações “multisite” mas corrige "
575
+ "erros \"HTTP request failed\""
576
 
577
+ #: admin/options-page-general.php:180
578
+ msgid "URL settings"
579
+ msgstr "Opções de URL"
 
 
 
580
 
581
  # @ wd-fb-og
582
+ #: admin/options-page-general.php:186
583
+ msgid "Add trailing slash at the end"
584
+ msgstr "Adicionar barra invertida no final"
585
 
586
+ #: admin/options-page-general.php:193
587
+ msgid "If missing, a trailing slash will be added at the end"
588
+ msgstr "Se em falta, será adicionada uma barra invertida no final"
589
 
590
+ #: admin/options-page-general.php:195
591
+ msgid "Homepage example:"
592
+ msgstr "Exemplo da Página Inicial:"
 
 
 
 
 
 
593
 
594
+ #: admin/options-page-general.php:204
595
+ msgid "Author settings"
596
+ msgstr "Opções de Autor"
597
 
598
+ #: admin/options-page-general.php:210
599
+ msgid "Hide Author on Pages"
600
+ msgstr "Esconder Autor nas Páginas"
601
 
602
+ #: admin/options-page-general.php:217
603
+ msgid "Hides all Author tags on Pages"
604
+ msgstr "Esconde todas as tags de Autor nas Páginas"
605
 
606
+ #: admin/options-page-general.php:226
607
+ msgid "Other settings"
608
+ msgstr "Outras opções"
609
 
610
+ #: admin/options-page-general.php:232
611
+ msgid "Keep data on uninstall"
612
+ msgstr "Manter opções ao desinstalar"
 
613
 
614
+ #: admin/options-page-general.php:239
 
615
  msgid ""
616
+ "Keep the plugin settings on the database even if the plugin is uninstalled"
 
 
 
617
  msgstr ""
618
+ "Mantém as opções do plugin na base de dados mesmo que o plugin seja "
619
+ "desinstalado"
 
 
620
 
621
+ #: admin/options-page-right.php:7
622
+ msgid "Test your URLs on the Facebook Debugger"
623
+ msgstr "Teste os seus URLs no \"Facebook Debugger\""
 
 
 
 
624
 
625
+ #: admin/options-page-right.php:11
626
+ msgid "Test your URLs on the Twitter Card validator"
627
+ msgstr "Teste os seus URLs no \"Twitter Card validator\""
 
628
 
629
+ # @ wd-fb-og
630
+ #: admin/options-page-right.php:15
631
+ msgid "About the Open Graph Protocol (on Facebook)"
632
+ msgstr "Sobre o Protocolo Open Graph (no Facebook)"
 
 
 
633
 
634
+ # @ wd-fb-og
635
+ #: admin/options-page-right.php:19
636
+ msgid "The Open Graph Protocol (official website)"
637
+ msgstr "O Protocolo Open Graph (website oficial)"
638
 
639
+ #: admin/options-page-right.php:23
640
+ msgid "About Twitter Cards"
641
+ msgstr "Sobre os \"Twitter Cards\""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
642
 
643
  # @ wd-fb-og
644
+ #: admin/options-page-right.php:27
645
  msgid "Plugin official URL"
646
  msgstr "URL oficial do plugin"
647
 
648
  # @ wd-fb-og
649
+ #: admin/options-page-right.php:31
650
  msgid "Author's website: Webdados"
651
  msgstr "Website do autor: Webdados"
652
 
653
  # @ wd-fb-og
654
+ #: admin/options-page-right.php:35
655
  msgid "Author's Facebook page: Webdados"
656
  msgstr "Página Facebook do autor: Webdados"
657
 
658
  # @ wd-fb-og
659
+ #: admin/options-page-right.php:39
660
  msgid "Author's Twitter account: @Wonderm00n<br/>(Webdados founder)"
661
  msgstr "Conta Twitter do autor: @Wonderm00n<br/>(fundador da Webdados)"
662
 
663
+ #: admin/options-page-right.php:50
664
  msgid "About this plugin"
665
  msgstr "Sobre este plugin"
666
 
667
+ #: admin/options-page-right.php:52
668
  msgid "Support forum"
669
  msgstr "Fórum de suporte"
670
 
671
+ #: admin/options-page-right.php:54
672
  msgid "Premium technical support or custom WordPress development"
673
  msgstr "Suporte técnico premium ou desenvolvimento WordPress à medida"
674
 
675
+ #: admin/options-page-right.php:55
676
  #, php-format
677
  msgid "Please contact %s"
678
  msgstr "Por favor contactar %s"
679
 
680
+ #: admin/options-page-right.php:56
681
  msgid "Please rate our plugin at WordPress.org"
682
  msgstr "Por favor classifique o nosso plugin no WordPress.org"
683
 
684
  # @ wd-fb-og
685
+ #: admin/options-page-right.php:64
686
  msgid "Useful links"
687
  msgstr "Links úteis"
688
 
689
  # @ wd-fb-og
690
+ #: admin/options-page-right.php:75
691
  msgid "Donate"
692
  msgstr "Doar"
693
 
694
  # @ wd-fb-og
695
+ #: admin/options-page-right.php:77
696
  msgid ""
697
  "If you find this plugin useful and want to make a contribution towards "
698
  "future development please consider making a small, or big ;-), donation."
701
  "desenvolvimento no futuro, considere fazer uma pequena, ou grande ;-), "
702
  "doação."
703
 
704
+ #: admin/options-page-schema.php:7
705
+ msgid "Schema.org tags used by Google+ to render link share posts."
706
+ msgstr ""
707
+ "Tags Schema.org utilizadas pelo Google+ para definir posts de partilha de "
708
+ "links."
709
 
710
+ #: admin/options-page-schema.php:9
711
+ msgid "Google+ / Schema.org Tags"
712
+ msgstr "Tags Google+ / Schema.org"
713
 
714
+ #: admin/options-page-schema.php:15 admin/options-page-twitter.php:15
715
+ msgid "Include Title"
716
+ msgstr "Incluir Título"
717
 
718
+ #: admin/options-page-schema.php:61
719
+ msgid "The user's Google+ URL must be filled in on his profile"
720
+ msgstr "O URL de Google+ do utilizador tem de estar preenchido no seu perfil."
 
721
 
722
+ #: admin/options-page-schema.php:68
723
+ msgid "Google doesn't use it anymore"
724
+ msgstr "O Google já não usa"
725
 
726
+ #: admin/options-page-schema.php:88
727
+ msgid "The website's Google+ Page"
728
+ msgstr "Página de Google+ do Website"
729
+
730
+ #: admin/options-page-schema.php:93
731
+ msgid "Website's Google+ Page"
732
+ msgstr "Página Google+ do Website"
733
+
734
+ #: admin/options-page-schema.php:100
735
+ msgid "Google+ Page URL (with https://)"
736
+ msgstr "URL da Página de Google+ (with https://)"
737
+
738
+ #: admin/options-page-seo.php:7
739
+ msgid ""
740
+ "SEO Meta Tags that are recommended ONLY if no other plugin is setting them "
741
+ "already."
742
+ msgstr ""
743
+ "Meta Tags SEO que são recomendadas APENAS se não houver outro plugin já a "
744
+ "definir as mesmas."
745
+
746
+ #: admin/options-page-seo.php:9
747
+ msgid "SEO Meta Tags"
748
+ msgstr "Meta Tags SEO"
749
 
750
  # @ wd-fb-og
751
+ #: admin/options-page-seo.php:15
752
+ msgid "Set Canonical URL"
753
+ msgstr "Incluir URL Canónico"
754
+
755
+ #: admin/options-page-seo.php:27 admin/options-page-seo.php:47
756
+ msgid "Not recommended because you have Yoast SEO active"
757
+ msgstr "Não recomendado porque tem o Yoast SEO activado"
758
 
759
  # @ wd-fb-og
760
+ #: admin/options-page-seo.php:35
761
+ msgid "Include Meta Description tag"
762
+ msgstr "Incluir a tag \"Meta Description\""
763
 
764
+ #: admin/options-page-seo.php:55
765
+ msgid "Include Post/Page Author name"
766
+ msgstr "Incluir nome do Autor do Artigo/Página"
767
 
768
+ #: admin/options-page-seo.php:64
769
+ msgid "From the user Display name"
770
+ msgstr "Do nome público do utilizador"
771
 
772
+ #: admin/options-page-twitter.php:7
773
+ msgid "Tags used by Twitter to render their Cards."
774
+ msgstr "Tags utilizadas pelo Twitter para definir os seus cartões."
775
 
776
+ #: admin/options-page-twitter.php:9
777
+ msgid "Twitter Card Tags"
778
+ msgstr "Tags Twitter Card"
779
 
780
+ #: admin/options-page-twitter.php:72
781
+ msgid "The user's Twitter Username must be filled in on his profile"
782
+ msgstr "O Utilizador de Twitter tem de estar preenchido no seu perfil."
783
 
784
+ #: admin/options-page-twitter.php:86
785
+ msgid "The website's Twitter Username"
786
+ msgstr "Utilizador de Twitter do Website"
 
787
 
788
+ #: admin/options-page-twitter.php:91
789
+ msgid "Website's Twitter Username"
790
+ msgstr "Utilizador Twitter do Website"
791
 
792
+ #: admin/options-page-twitter.php:103
793
+ msgid "Card Type"
794
+ msgstr "Tipo de Cartão"
795
+
796
+ #: admin/options-page-twitter.php:106
797
+ msgid "Summary Card"
798
+ msgstr "Resumo"
799
+
800
+ #: admin/options-page-twitter.php:107
801
+ msgid "Summary Card with Large Image"
802
+ msgstr "Resumo com imagem grande"
803
+
804
+ #: admin/options-page-twitter.php:115
805
+ msgid "The type of Twitter Card shown on the timeline"
806
+ msgstr "O tipo de “Twitter Card” mostrado na timeline"
807
 
808
+ # @ wd-fb-og
809
+ #: admin/options-page.php:12
810
  msgid ""
811
+ "Please set some default values and which tags should, or should not, be "
812
+ "included. It may be necessary to exclude some tags if other plugins are "
813
+ "already including them."
814
  msgstr ""
815
+ "Por favor defina alguns valores padrão e que tags devem, ou não, ser "
816
+ "incluídas. Pode ser necessário excluir algumas tags se outros plugins já as "
817
+ "estão a incluir."
818
+
819
+ #: admin/options-page.php:29
820
+ msgid "General"
821
+ msgstr "Geral"
822
+
823
+ #: admin/options-page.php:35
824
+ msgid "Open Graph"
825
+ msgstr "Open Graph"
826
+
827
+ #: admin/options-page.php:41
828
+ msgid "Cards"
829
+ msgstr "Cards"
830
+
831
+ #: admin/options-page.php:47
832
+ msgid "Schema"
833
+ msgstr "Schema"
834
+
835
+ #: admin/options-page.php:53
836
+ msgid "SEO tags"
837
+ msgstr "Tags SEO"
838
 
839
+ #: admin/options-page.php:59
840
+ msgid "3rd party"
841
+ msgstr "Integração"
842
+
843
+ #: public/class-webdados-fb-open-graph-public.php:190
844
+ msgid "Price"
845
+ msgstr "Preço"
846
+
847
+ #: public/class-webdados-fb-open-graph-public.php:278
848
+ msgid "Search for"
849
+ msgstr "Pesquisa por"
850
+
851
+ #: public/class-webdados-fb-open-graph-public.php:287
852
+ #: public/class-webdados-fb-open-graph-public.php:291
853
+ #: public/class-webdados-fb-open-graph-public.php:295
854
+ msgid "Archives"
855
+ msgstr "Arquivos"
856
 
857
  #. Description of the plugin/theme
858
  msgid ""
868
  "\"enclosure\" e \"media:content\" nos feeds RSS, para que aplicações como o "
869
  "RSS Graffiti and twitterfeed façam partilha para o Facebook correctamente."
870
 
871
+ # @ wd-fb-og
872
+ #~ msgid "0 or blank for no maximum length"
873
+ #~ msgstr "0 ou em branco para não definir máximo"
874
+
875
+ #~ msgid ""
876
+ #~ "Use Business Directory Plugin listing details (Title, URL, Description "
877
+ #~ "adn Image) to populate tags"
878
+ #~ msgstr ""
879
+ #~ "Utilizar os detalhes de anúncios do Business Directory Plugin (Título, "
880
+ #~ "URL, e Imagem) como conteúdo das tags"
881
+
882
+ # @ wd-fb-og
883
+ #~ msgid "Include Facebook Platform App ID (fb:app_id) tag"
884
+ #~ msgstr "Incluir tag \"Facebook Platform App ID\" (fb:app_id)"
885
+
886
+ # @ wd-fb-og
887
+ #~ msgid "Include Facebook Admin(s) ID (fb:admins) tag"
888
+ #~ msgstr "Incluir tag com ID dos admin de Facebook (fb:admins)"
889
+
890
+ # @ wd-fb-og
891
+ #~ msgid "Include locale (fb:locale) tag"
892
+ #~ msgstr "Incluir tag \"Locale\" (fb:locale)"
893
+
894
+ # @ wd-fb-og
895
+ #~ msgid "Include Site Name (og:site_name) tag"
896
+ #~ msgstr "Incluir tag Nome do site (og:site_name)"
897
+
898
+ # @ wd-fb-og
899
+ #~ msgid "Include Post/Page title (og:title) tag"
900
+ #~ msgstr "Incluir tag Título do artigo/página (og:title)"
901
+
902
+ # @ wd-fb-og
903
+ #~ msgid "Include Schema.org \"itemprop\" Name tag"
904
+ #~ msgstr "Incluir a tag \"itemprop Name\" do Schema.org"
905
+
906
+ # @ wd-fb-og
907
+ #~ msgid ""
908
+ #~ "Recommended for Google+ sharing purposes if no other plugin is setting it "
909
+ #~ "already"
910
+ #~ msgstr ""
911
+ #~ "Recomendado para efeitos de partilha no Google+, se outro plugin ainda "
912
+ #~ "não a está a definir"
913
+
914
+ # @ wd-fb-og
915
+ #~ msgid "Include Twitter Card Title tag"
916
+ #~ msgstr "Incluir tag Título do \"Twitter Card\""
917
+
918
+ # @ wd-fb-og
919
+ #~ msgid ""
920
+ #~ "Recommended for Twitter sharing purposes if no other plugin is setting it "
921
+ #~ "already"
922
+ #~ msgstr ""
923
+ #~ "Recomendado para efeitos de partilha no Twitter, se outro plugin ainda "
924
+ #~ "não a está a definir"
925
+
926
+ # @ wd-fb-og
927
+ #~ msgid "Include URL (og:url) tag"
928
+ #~ msgstr "Incluir tag URL (og:url)"
929
+
930
+ #~ msgid "Include Twitter Card URL tag"
931
+ #~ msgstr "Incluir tag URL do \"Twitter Card\""
932
+
933
+ # @ wd-fb-og
934
+ #~ msgid "On the homepage will be"
935
+ #~ msgstr "Na página inicial será"
936
+
937
+ # @ wd-fb-og
938
+ #~ msgid "Include Type (og:type) tag"
939
+ #~ msgstr "Incluir tag Tipo (og:type)"
940
+
941
+ # @ wd-fb-og
942
+ #~ msgid ""
943
+ #~ "Will be \"%1$s\" for posts and pages and \"%2$s\" or \"%3$s\"; for the "
944
+ #~ "homepage"
945
+ #~ msgstr ""
946
+ #~ "Será \"%1$s\" para artigos e páginas, e \"%2$s\" ou \"%3$s\"; para a "
947
+ #~ "página inicial"
948
+
949
+ # @ wd-fb-og
950
+ #~ msgid "Homepage type"
951
+ #~ msgstr "Tipo para a página inicial"
952
+
953
+ # @ wd-fb-og
954
+ #~ msgid "Use"
955
+ #~ msgstr "Utilizar"
956
+
957
+ #~ msgid ""
958
+ #~ "Include published and modified dates (article:published_time, article:"
959
+ #~ "modified_time and og:updated_time) tags"
960
+ #~ msgstr ""
961
+ #~ "Incluir tags com datas de publicação e modificação (article:"
962
+ #~ "published_time, article:modified_time e og:updated_time)"
963
+
964
+ #~ msgid "Works for posts only"
965
+ #~ msgstr "Funciona apenas para \"artigos\" (posts)"
966
+
967
+ # @ wd-fb-og
968
+ #~ msgid "Include article section (article:section) tags"
969
+ #~ msgstr "Incluir tags Secção do artigo (article:section)"
970
+
971
+ #~ msgid "from the categories"
972
+ #~ msgstr "a partir das categorias"
973
+
974
+ # @ wd-fb-og
975
+ #~ msgid "Include Publisher Page (article:publisher) tag"
976
+ #~ msgstr "Incluir tag \"Publisher\" (article:publisher)"
977
+
978
+ #~ msgid "Links the website to the publisher Facebook Page."
979
+ #~ msgstr "Associa o website à Página Facebook do mesmo"
980
+
981
+ # @ wd-fb-og
982
+ #~ msgid "Full URL with http://"
983
+ #~ msgstr "URL completo com http://"
984
+
985
+ #~ msgid "Include Google+ \"publisher\" tag"
986
+ #~ msgstr "Incluir tag \"Google+ publisher\""
987
+
988
+ #~ msgid "Links the website to the publisher Google+ Page."
989
+ #~ msgstr "Associa o website à Página Google+ do mesmo"
990
+
991
+ # @ wd-fb-og
992
+ #~ msgid "Include Twitter Card Website Username tag"
993
+ #~ msgstr "Incluir tag Username Twitter do Website do \"Twitter Card\""
994
+
995
+ #~ msgid "Links the website to the publisher Twitter Username."
996
+ #~ msgstr "Associa o website ao Username Twitter do mesmo"
997
+
998
+ #~ msgid "Include Author Profile (article:author) tag"
999
+ #~ msgstr "Incluir tag \"Autor do artigo\" (article:author)"
1000
+
1001
+ #~ msgid ""
1002
+ #~ "Links the article to the author Facebook Profile. The user's Facebook "
1003
+ #~ "profile URL must be filled in."
1004
+ #~ msgstr ""
1005
+ #~ "Associa o artigo ao perfil Facebook do autor do mesmo. O URL de Perfil "
1006
+ #~ "Facebook do utilizador tem de estar preenchido."
1007
+
1008
+ # @ wd-fb-og
1009
+ #~ msgid "Include Meta Author tag"
1010
+ #~ msgstr "Incluir a tag \"Meta Author\""
1011
+
1012
+ #~ msgid "Sets the article author name"
1013
+ #~ msgstr "Define o nome do autor do artigo"
1014
+
1015
+ #~ msgid "Include Google+ link rel \"author\" tag"
1016
+ #~ msgstr "Incluir tag \"Google+ link rel author\""
1017
+
1018
+ #~ msgid ""
1019
+ #~ "Links the article to the author Google+ Profile (authorship). The user's "
1020
+ #~ "Google+ profile URL must be filled in."
1021
+ #~ msgstr ""
1022
+ #~ "Associa o artigo ao perfil Google+ do autor do mesmo. O URL de Perfil "
1023
+ #~ "Google+ do utilizador tem de estar preenchido."
1024
+
1025
+ #~ msgid "Include Twitter Card Creator tag"
1026
+ #~ msgstr "Incluir tag Autor do \"Twitter Card\""
1027
+
1028
+ #~ msgid ""
1029
+ #~ "Links the article to the author Twitter profile. The user's Twitter user "
1030
+ #~ "must be filled in."
1031
+ #~ msgstr ""
1032
+ #~ "Associa o artigo ao perfil Twitter do autor do mesmo. O Utilizador "
1033
+ #~ "Twitter tem de estar preenchido."
1034
+
1035
+ #~ msgid "Hide author on pages"
1036
+ #~ msgstr "Não mostrar autor nas páginas"
1037
+
1038
+ #~ msgid "Hides all author tags on pages."
1039
+ #~ msgstr "Esconder todas as tags de autor nas páginas."
1040
+
1041
+ # @ wd-fb-og
1042
+ #~ msgid "Include Description (og:description) tag"
1043
+ #~ msgstr "Incluir tag Descrição (og:description)"
1044
+
1045
+ # @ wd-fb-og
1046
+ #~ msgid ""
1047
+ #~ "Recommended for SEO purposes if no other plugin is setting it already"
1048
+ #~ msgstr ""
1049
+ #~ "Recomendado para efeitos de Optimização para Motores de Busca, se outro "
1050
+ #~ "plugin ainda não a está a definir"
1051
+
1052
+ # @ wd-fb-og
1053
+ #~ msgid "Include Schema.org \"itemprop\" Description tag"
1054
+ #~ msgstr "Incluir a tag \"itemprop Description\" do Schema.org"
1055
+
1056
+ # @ wd-fb-og
1057
+ #~ msgid "Include Twitter Card Description tag"
1058
+ #~ msgstr "Incluir tag Descrição do \"Twitter Card\""
1059
+
1060
+ #~ msgid ""
1061
+ #~ "WPML users: Set the default language description here, save changes and "
1062
+ #~ "then go to <a href=\"%s\">WPML &gt; String translation</a> to set it for "
1063
+ #~ "other languages."
1064
+ #~ msgstr ""
1065
+ #~ "Utilizadores WPML: Defina aqui a descrição no idioma por omissão, guarde "
1066
+ #~ "as alterações e vá a <a href=\"%s\">WPML &gt; Tradução de storing</a> "
1067
+ #~ "para defini-la para outros idiomas."
1068
+
1069
+ # @ wd-fb-og
1070
+ #~ msgid "Include Image (og:image) tag"
1071
+ #~ msgstr "Incluir tag Imagem (og:image)"
1072
+
1073
+ # @ wd-fb-og
1074
+ #~ msgid ""
1075
+ #~ "All images MUST have at least 200px on both dimensions in order to "
1076
+ #~ "Facebook to load them at all.<br/>1200x630px for optimal results.<br/"
1077
+ #~ ">Minimum of 600x315px is recommended."
1078
+ #~ msgstr ""
1079
+ #~ "Todas as imagens TÊM de ter pelo menos 200px em ambas as dimensões para "
1080
+ #~ "que o Facebook as carregue.<br/>1200x630px para resultados optimizados."
1081
+ #~ "<br/>Um mínimo de 600x315px é recomendado."
1082
+
1083
+ #~ msgid "Include Image size (og:image:width and og:image:height) tags"
1084
+ #~ msgstr ""
1085
+ #~ "Incluir tags de Tamanho de Imagem (og:image:width e og:image:height)"
1086
+
1087
+ #~ msgid ""
1088
+ #~ "Recommended only if Facebook is having problems loading the image when "
1089
+ #~ "the post is shared for the first time."
1090
+ #~ msgstr ""
1091
+ #~ "Recomendado apenas se o Facebook tem problemas a carregar a imagem quando "
1092
+ #~ "o artigo é partilhado pela primeira vez."
1093
+
1094
+ # @ wd-fb-og
1095
+ #~ msgid "Include Schema.org \"itemprop\" Image tag"
1096
+ #~ msgstr "Incluir a tag \"itemprop Image\" do Schema.org"
1097
+
1098
+ # @ wd-fb-og
1099
+ #~ msgid "Include Twitter Card Image tag"
1100
+ #~ msgstr "Incluir tag Imagem do \"Twitter Card\""
1101
+
1102
+ # @ wd-fb-og
1103
+ #~ msgid "Recommended size: 1200x630px"
1104
+ #~ msgstr "Tamanho recomendado: 1200x630px"
1105
+
1106
+ # @ wd-fb-og
1107
+ #~ msgid "On posts/pages"
1108
+ #~ msgstr "Nos artigos/páginas"
1109
+
1110
+ # @ wd-fb-og
1111
+ #~ msgid ""
1112
+ #~ "Image will be fetched from the specific \"Open Graph Image\" custom field "
1113
+ #~ "on the post"
1114
+ #~ msgstr ""
1115
+ #~ "A imagem utilizada será a definida no campo específico \"Open Graph Image"
1116
+ #~ "\" no artigo"
1117
+
1118
+ # @ wd-fb-og
1119
+ #~ msgid ""
1120
+ #~ "If it's not set, image will be fetched from post/page featured/thumbnail "
1121
+ #~ "picture"
1122
+ #~ msgstr ""
1123
+ #~ "Se não definida, a imagem utilizada será a imagem de destaque do artigo/"
1124
+ #~ "página"
1125
+
1126
+ # @ wd-fb-og
1127
+ #~ msgid "If it doesn't exist, use the first image from the post/page content"
1128
+ #~ msgstr ""
1129
+ #~ "Se não existir, será utilizada a primeira imagem no conteúdo do artigo/"
1130
+ #~ "página"
1131
+
1132
+ # @ wd-fb-og
1133
+ #~ msgid ""
1134
+ #~ "If it doesn't exist, use first image from the post/page media gallery"
1135
+ #~ msgstr ""
1136
+ #~ "Se não existir, será usada a primeira imagem na galeria multimédia do "
1137
+ #~ "artigo/página"
1138
+
1139
+ # @ wd-fb-og
1140
+ #~ msgid "If it doesn't exist, use the default image above"
1141
+ #~ msgstr "Se não existir, utilizar a imagem por omissão em cima"
1142
+
1143
+ #~ msgid ""
1144
+ #~ "Image will be resized/cropped to 1200x630 and the transparent PNG chosen "
1145
+ #~ "bellow (that should also have this size) will be overlaid on it. It will "
1146
+ #~ "only work for locally hosted images."
1147
+ #~ msgstr ""
1148
+ #~ "A imagem será redimensionada e cortada para 1200x630 e o PNG transparente "
1149
+ #~ "escolhido (que deve também ter este tamanho) será sobreposto à mesma. Só "
1150
+ #~ "funciona para imagens alojadas localmente."
1151
+
1152
+ #~ msgid "Size: 1200x630px"
1153
+ #~ msgstr "Tamanho: 1200x630px"
1154
+
1155
+ #~ msgid "Twitter Card Type"
1156
+ #~ msgstr "Tipo de cartão do Twitter"
1157
+
1158
+ # @ wd-fb-og
1159
+ #~ msgid "3rd Party Integration"
1160
+ #~ msgstr "Integração com outros plugins"
1161
+
1162
+ # @ wd-fb-og
1163
+ #~ msgid ""
1164
+ #~ "It's HIGHLY recommended to go to <a href=\"admin.php?page=wpseo_social\" "
1165
+ #~ "target=\"_blank\">SEO &gt; Social</a> and disable \"Add Open Graph meta "
1166
+ #~ "data\", \"Add Twitter card meta data\" and \"Add Google+ specific post "
1167
+ #~ "meta data\""
1168
+ #~ msgstr ""
1169
+ #~ "É ALTAMENTE recomendado ir a <a href=\"admin.php?page=wpseo_social\">SEO "
1170
+ #~ "&gt; Social</a> e desactivar \"Adiciona meta dados Open Graph \", "
1171
+ #~ "\"Acrescentar metadados Twitter card\" e \"Add Google+ specific post meta "
1172
+ #~ "data\""
1173
+
1174
+ #~ msgid ""
1175
+ #~ "even if you don't enable integration bellow. You will get duplicate tags "
1176
+ #~ "if you don't do this."
1177
+ #~ msgstr ""
1178
+ #~ "mesmo que não active a integração em baixo. Obterá tags duplicadas se não "
1179
+ #~ "o fizer."
1180
+
1181
+ # @ wd-fb-og
1182
+ #~ msgid "Use title, url (canonical) and description from WPSEO"
1183
+ #~ msgstr "Utilizar título, url (canónico) e descrição do WPSEO"
1184
+
1185
+ #~ msgid ""
1186
+ #~ "On product pages we will automatically set og:type to \"product\" and add "
1187
+ #~ "the price including tax to the product:price tags."
1188
+ #~ msgstr ""
1189
+ #~ "Em páginas de produtos vamos automaticamente definir o og:type como "
1190
+ #~ "\"product\" e adicionar o preço com taxas às tags product:price."
1191
+
1192
+ #~ msgid "Use Product Category thumbnail as Open Graph Image"
1193
+ #~ msgstr ""
1194
+ #~ "Utilizar miniaturas de Categorias de Produto como \"Open Graph Image\""
1195
+
1196
+ #~ msgid ""
1197
+ #~ "Recommended if you set large thumbnails for Product Categories and want "
1198
+ #~ "to use them as Open Graph Images on listing pages"
1199
+ #~ msgstr ""
1200
+ #~ "Recomendado se utiliza imagens de grandes dimensões como miniatura das "
1201
+ #~ "Categorias de Produto e deseja usar as mesmas como \"Open Graph Image\" "
1202
+ #~ "nas listagens de categorias de produto."
1203
+
1204
+ #~ msgid "Use Product Gallery images as additional Open Graph Images"
1205
+ #~ msgstr ""
1206
+ #~ "Utilizar as imagens da Galeria de Produtos como \"Open Graph Image\" "
1207
+ #~ "adicionais"
1208
+
1209
+ #~ msgid "Experimental"
1210
+ #~ msgstr "Experimental"
1211
+
1212
+ #~ msgid ""
1213
+ #~ "Uses additional Product Gallery images so, when the product is shared on "
1214
+ #~ "Facebook, the user can choose what image to use"
1215
+ #~ msgstr ""
1216
+ #~ "Utiliza as imagens da Galeria de Produtos de forma que, quando o mesmo é "
1217
+ #~ "partilhado no Facebook, o utilizador possa escolher que imagem usar para "
1218
+ #~ "a partilha"
1219
+
1220
+ # @ wd-fb-og
1221
+ #~ msgid "Add SubHeading to Post/Page title"
1222
+ #~ msgstr "Adicionar \"SubHeading\" ao título do artigo/página"
1223
+
1224
+ # @ wd-fb-og
1225
+ #~ msgid "Use BDP listing contents as OG tags"
1226
+ #~ msgstr "Utilizar o conteúdo dos anúncios BDP como tags OG"
1227
+
1228
+ # @ wd-fb-og
1229
+ #~ msgid ""
1230
+ #~ "Setting \"Include URL\", \"Set Canonical URL\", \"Include Description\" "
1231
+ #~ "and \"Include Image\" options above is HIGHLY recommended"
1232
+ #~ msgstr ""
1233
+ #~ "Activar as opções \"Incluir tag URL (og:url)\", \"Incluir a tag URL "
1234
+ #~ "Canónico\", \"Incluir tag Descrição (og:description)\" e \"Incluir tag "
1235
+ #~ "Imagem (og:image)\" é ALTAMENTE recomendado"
1236
+
1237
+ # @ wd-fb-og
1238
+ #~ msgid "You don't have any compatible 3rd Party plugin installed/active."
1239
+ #~ msgstr "Não tem nenhum plugin compatível instalado/activo."
1240
+
1241
+ # @ wd-fb-og
1242
+ #~ msgid "This plugin is currently compatible with:"
1243
+ #~ msgstr "Este plugin é actualmente compatível com:"
1244
+
1245
+ #~ msgid "Advanced settings"
1246
+ #~ msgstr "Definições avançadas"
1247
+
1248
+ #~ msgid "Don't mess with this unless you know what you're doing"
1249
+ #~ msgstr "Não mexer nestas configurações se não souber o que está a fazer"
1250
+
1251
+ #~ msgid ""
1252
+ #~ "May cause problems with some multisite configurations but fix \"HTTP "
1253
+ #~ "request failed\" errors"
1254
+ #~ msgstr ""
1255
+ #~ "Pode causar problemas com algumas configurações \"multisite\" mas corrige "
1256
+ #~ "erros \"HTTP request failed\""
1257
+
1258
+ #~ msgid "Try to update Facebook Open Graph Tags cache when saving the post"
1259
+ #~ msgstr ""
1260
+ #~ "Tentar actualizar a cache das Facebook Open Graph Tags ao gravar um post"
1261
+
1262
+ #~ msgid "Supress Facebook Open Graph Tags cache updated notice"
1263
+ #~ msgstr ""
1264
+ #~ "Esconder notificação de actualização de cache das Facebook Open Graph Tags"
1265
+
1266
+ #~ msgid "Save Changes"
1267
+ #~ msgstr "Guardar alterações"
1268
+
1269
+ # @ wd-fb-og
1270
+ #~ msgid "Test your URLs at Facebook URL Linter / Debugger"
1271
+ #~ msgstr "Teste os seus URLs no \"Facebook URL Linter / Debugger\""
1272
+
1273
+ #~ msgid "Test (and request approval for) your URLs at Twitter Card validator"
1274
+ #~ msgstr "Teste (e solicite aprovação dos) URLs no \"Twitter Card validator\""
1275
+
1276
+ # @ wd-fb-og
1277
+ #~ msgid "Upload/Choose Open Graph Image"
1278
+ #~ msgstr "Carregar/Escolher Imagem Open Graph"
1279
+
1280
+ # @ wd-fb-og
1281
+ #~ msgid "Use as Image Open Graph Tag"
1282
+ #~ msgstr "Utilizar como Imagem Open Graph"
1283
+
1284
+ #~ msgid ""
1285
+ #~ "Please ignore the (dumb) Yoast WordPress SEO warning regarding open graph "
1286
+ #~ "issues with this plugin. Just disable WPSEO Social settings at"
1287
+ #~ msgstr ""
1288
+ #~ "Por favor ignore o (parvo) aviso do plugin Yoast WordPress SEO sobre "
1289
+ #~ "problemas \"open graph\" com este plugin. Simplesmente inactive as "
1290
+ #~ "definições Social do WPSEO em"
1291
+
1292
+ #~ msgid "SEO &gt; Social"
1293
+ #~ msgstr "SEO &gt; Social"
1294
+
1295
  #~ msgid ""
1296
  #~ "Image will be resized/cropped to 1200x630 and the PNG chosen bellow will "
1297
  #~ "be overlaid"
lang/wd-fb-og.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Facebook Open Graph, Google+ and Twitter Card Tags\n"
6
- "POT-Creation-Date: 2016-09-26 19:24+0100\n"
7
  "PO-Revision-Date: 2016-09-26 14:52+0100\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
@@ -20,659 +20,749 @@ msgstr ""
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
- #: includes/settings-page.php:96
24
- msgid ""
25
- "Please set some default values and which tags should, or should not, be "
26
- "included. It may be necessary to exclude some tags if other plugins are "
27
- "already including them."
28
  msgstr ""
29
 
30
- #: includes/settings-page.php:107 wonderm00n-open-graph.php:864
31
- msgid "Settings"
32
  msgstr ""
33
 
34
- #: includes/settings-page.php:111
35
- msgid "Include Facebook Platform App ID (fb:app_id) tag"
 
36
  msgstr ""
37
 
38
- #: includes/settings-page.php:117
39
- msgid "Facebook Platform App ID"
40
  msgstr ""
41
 
42
- #: includes/settings-page.php:126
43
- msgid "Include Facebook Admin(s) ID (fb:admins) tag"
44
  msgstr ""
45
 
46
- #: includes/settings-page.php:132
47
- msgid "Facebook Admin(s) ID"
 
48
  msgstr ""
49
 
50
- #: includes/settings-page.php:137
51
- msgid "Comma separated if more than one"
52
  msgstr ""
53
 
54
- #: includes/settings-page.php:145
55
- msgid "Include locale (fb:locale) tag"
 
 
56
  msgstr ""
57
 
58
- #: includes/settings-page.php:151
59
- msgid "Locale"
 
60
  msgstr ""
61
 
62
- #: includes/settings-page.php:154
63
- msgid "WordPress current locale/language"
 
64
  msgstr ""
65
 
66
- #: includes/settings-page.php:206
67
- msgid "List loaded from Facebook (online)"
68
  msgstr ""
69
 
70
- #: includes/settings-page.php:209
71
- msgid "List loaded from local cache (offline)"
72
  msgstr ""
73
 
74
- #: includes/settings-page.php:209
75
- msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
76
  msgstr ""
77
 
78
- #: includes/settings-page.php:209
79
- msgid "Reload from Facebook"
80
  msgstr ""
81
 
82
- #: includes/settings-page.php:211
83
- msgid "List not loaded"
 
 
 
 
84
  msgstr ""
85
 
86
- #: includes/settings-page.php:222
87
- msgid "Include Site Name (og:site_name) tag"
88
  msgstr ""
89
 
90
- #: includes/settings-page.php:231
91
- msgid "Include Post/Page title (og:title) tag"
92
  msgstr ""
93
 
94
- #: includes/settings-page.php:237
95
- msgid "Include Schema.org \"itemprop\" Name tag"
 
 
96
  msgstr ""
97
 
98
- #: includes/settings-page.php:244 includes/settings-page.php:497
99
- #: includes/settings-page.php:590
100
  msgid ""
101
- "Recommended for Google+ sharing purposes if no other plugin is setting it "
102
- "already"
103
  msgstr ""
104
 
105
- #: includes/settings-page.php:249
106
- msgid "Include Twitter Card Title tag"
107
  msgstr ""
108
 
109
- #: includes/settings-page.php:256 includes/settings-page.php:509
110
- #: includes/settings-page.php:602
111
  msgid ""
112
- "Recommended for Twitter sharing purposes if no other plugin is setting it "
113
- "already"
 
114
  msgstr ""
115
 
116
- #: includes/settings-page.php:264
117
- msgid "Include URL (og:url) tag"
118
  msgstr ""
119
 
120
- #: includes/settings-page.php:270
121
- msgid "Include Twitter Card URL tag"
122
  msgstr ""
123
 
124
- #: includes/settings-page.php:276
125
- msgid "Add trailing slash at the end"
126
  msgstr ""
127
 
128
- #: includes/settings-page.php:281
129
- msgid "On the homepage will be"
 
 
130
  msgstr ""
131
 
132
- #: includes/settings-page.php:286
133
- msgid "Set Canonical URL"
134
  msgstr ""
135
 
136
- #: includes/settings-page.php:299
137
- msgid "Include Type (og:type) tag"
138
  msgstr ""
139
 
140
- #: includes/settings-page.php:304
141
- #, php-format
142
- msgid ""
143
- "Will be \"%1$s\" for posts and pages and \"%2$s\" or \"%3$s\"; for the "
144
- "homepage"
145
  msgstr ""
146
 
147
- #: includes/settings-page.php:309
148
- msgid "Homepage type"
149
  msgstr ""
150
 
151
- #: includes/settings-page.php:311 includes/settings-page.php:533
152
- msgid "Use"
153
  msgstr ""
154
 
155
- #: includes/settings-page.php:322
156
  msgid ""
157
- "Include published and modified dates (article:published_time, article:"
158
- "modified_time and og:updated_time) tags"
159
  msgstr ""
160
 
161
- #: includes/settings-page.php:327 includes/settings-page.php:340
162
- msgid "Works for posts only"
 
 
163
  msgstr ""
164
 
165
- #: includes/settings-page.php:335
166
- msgid "Include article section (article:section) tags"
 
 
167
  msgstr ""
168
 
169
- #: includes/settings-page.php:340
170
- msgid "from the categories"
171
  msgstr ""
172
 
173
- #: includes/settings-page.php:348
174
- msgid "Include Publisher Page (article:publisher) tag"
175
  msgstr ""
176
 
177
- #: includes/settings-page.php:353
178
- msgid "Links the website to the publisher Facebook Page."
179
  msgstr ""
180
 
181
- #: includes/settings-page.php:358
182
- msgid "Website's Facebook Page"
183
  msgstr ""
184
 
185
- #: includes/settings-page.php:363 includes/settings-page.php:383
186
- #: includes/settings-page.php:613 includes/settings-page.php:667
187
- msgid "Full URL with http://"
188
  msgstr ""
189
 
190
- #: includes/settings-page.php:368
191
- msgid "Include Google+ \"publisher\" tag"
 
192
  msgstr ""
193
 
194
- #: includes/settings-page.php:373
195
- msgid "Links the website to the publisher Google+ Page."
 
196
  msgstr ""
197
 
198
- #: includes/settings-page.php:378
199
- msgid "Website's Google+ Page"
 
 
 
 
200
  msgstr ""
201
 
202
- #: includes/settings-page.php:388
203
- msgid "Include Twitter Card Website Username tag"
204
  msgstr ""
205
 
206
- #: includes/settings-page.php:393
207
- msgid "Links the website to the publisher Twitter Username."
208
  msgstr ""
209
 
210
- #: includes/settings-page.php:398
211
- msgid "Website's Twitter Username"
 
 
 
212
  msgstr ""
213
 
214
- #: includes/settings-page.php:403 wonderm00n-open-graph.php:1089
215
- msgid "Twitter username (without @)"
216
  msgstr ""
217
 
218
- #: includes/settings-page.php:412
219
- msgid "Include Author Profile (article:author) tag"
 
 
 
220
  msgstr ""
221
 
222
- #: includes/settings-page.php:417
223
- msgid ""
224
- "Links the article to the author Facebook Profile. The user's Facebook "
225
- "profile URL must be filled in."
226
  msgstr ""
227
 
228
- #: includes/settings-page.php:422
229
- msgid "Include Meta Author tag"
230
  msgstr ""
231
 
232
- #: includes/settings-page.php:429
233
- msgid "Sets the article author name"
 
234
  msgstr ""
235
 
236
- #: includes/settings-page.php:434
237
- msgid "Include Google+ link rel \"author\" tag"
238
  msgstr ""
239
 
240
- #: includes/settings-page.php:441
241
- msgid ""
242
- "Links the article to the author Google+ Profile (authorship). The user's "
243
- "Google+ profile URL must be filled in."
244
  msgstr ""
245
 
246
- #: includes/settings-page.php:446
247
- msgid "Include Twitter Card Creator tag"
248
  msgstr ""
249
 
250
- #: includes/settings-page.php:453
251
- msgid ""
252
- "Links the article to the author Twitter profile. The user's Twitter user "
253
- "must be filled in."
254
  msgstr ""
255
 
256
- #: includes/settings-page.php:458
257
- msgid "Hide author on pages"
258
  msgstr ""
259
 
260
- #: includes/settings-page.php:463
261
- msgid "Hides all author tags on pages."
 
262
  msgstr ""
263
 
264
- #: includes/settings-page.php:472
265
- msgid "Include Description (og:description) tag"
266
  msgstr ""
267
 
268
- #: includes/settings-page.php:478
269
- msgid "Include Meta Description tag"
270
  msgstr ""
271
 
272
- #: includes/settings-page.php:485
273
- msgid "Recommended for SEO purposes if no other plugin is setting it already"
274
  msgstr ""
275
 
276
- #: includes/settings-page.php:490
277
- msgid "Include Schema.org \"itemprop\" Description tag"
278
  msgstr ""
279
 
280
- #: includes/settings-page.php:502
281
- msgid "Include Twitter Card Description tag"
282
  msgstr ""
283
 
284
- #: includes/settings-page.php:514
285
- msgid "Description maximum length"
286
  msgstr ""
287
 
288
- #: includes/settings-page.php:519
289
- msgid "0 or blank for no maximum length"
290
  msgstr ""
291
 
292
- #: includes/settings-page.php:524
293
- msgid "Homepage description"
294
  msgstr ""
295
 
296
- #: includes/settings-page.php:530
297
- msgid "The description of your front page:"
298
  msgstr ""
299
 
300
- #: includes/settings-page.php:535
301
- msgid "Website tagline"
302
  msgstr ""
303
 
304
- #: includes/settings-page.php:536
305
- msgid "Custom text"
306
  msgstr ""
307
 
308
- #: includes/settings-page.php:547
309
- #, php-format
310
- msgid ""
311
- "WPML users: Set the default language description here, save changes and then "
312
- "go to <a href=\"%s\">WPML &gt; String translation</a> to set it for other "
313
- "languages."
314
  msgstr ""
315
 
316
- #: includes/settings-page.php:563
317
- msgid "Include Image (og:image) tag"
318
  msgstr ""
319
 
320
- #: includes/settings-page.php:568
321
- msgid ""
322
- "All images MUST have at least 200px on both dimensions in order to Facebook "
323
- "to load them at all.<br/>1200x630px for optimal results.<br/>Minimum of "
324
- "600x315px is recommended."
325
  msgstr ""
326
 
327
- #: includes/settings-page.php:573
328
- msgid "Include Image size (og:image:width and og:image:height) tags"
329
  msgstr ""
330
 
331
- #: includes/settings-page.php:578
332
- msgid ""
333
- "Recommended only if Facebook is having problems loading the image when the "
334
- "post is shared for the first time."
335
  msgstr ""
336
 
337
- #: includes/settings-page.php:583
338
- msgid "Include Schema.org \"itemprop\" Image tag"
339
  msgstr ""
340
 
341
- #: includes/settings-page.php:595
342
- msgid "Include Twitter Card Image tag"
343
  msgstr ""
344
 
345
- #: includes/settings-page.php:607
346
- msgid "Default image"
347
  msgstr ""
348
 
349
- #: includes/settings-page.php:615 wonderm00n-open-graph.php:931
350
- msgid "Recommended size: 1200x630px"
 
 
351
  msgstr ""
352
 
353
- #: includes/settings-page.php:620
354
- msgid "Add image to RSS/RSS2 feeds"
355
  msgstr ""
356
 
357
- #: includes/settings-page.php:625
358
- msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
 
 
359
  msgstr ""
360
 
361
- #: includes/settings-page.php:630
362
- msgid "On posts/pages"
363
  msgstr ""
364
 
365
- #: includes/settings-page.php:634
366
- msgid ""
367
- "Image will be fetched from the specific \"Open Graph Image\" custom field on "
368
- "the post"
369
  msgstr ""
370
 
371
- #: includes/settings-page.php:638
372
- msgid ""
373
- "If it's not set, image will be fetched from post/page featured/thumbnail "
374
- "picture"
375
  msgstr ""
376
 
377
- #: includes/settings-page.php:642
378
- msgid "If it doesn't exist, use the first image from the post/page content"
379
  msgstr ""
380
 
381
- #: includes/settings-page.php:646
382
- msgid "If it doesn't exist, use first image from the post/page media gallery"
383
  msgstr ""
384
 
385
- #: includes/settings-page.php:650
386
- msgid "If it doesn't exist, use the default image above"
387
  msgstr ""
388
 
389
- #: includes/settings-page.php:655
390
- msgid "Overlay PNG logo"
391
  msgstr ""
392
 
393
- #: includes/settings-page.php:660
 
 
 
 
 
 
 
 
 
394
  msgid ""
395
- "Image will be resized/cropped to 1200x630 and the transparent PNG chosen "
396
- "bellow (that should also have this size) will be overlaid on it. It will "
397
- "only work for locally hosted images."
398
  msgstr ""
399
 
400
- #: includes/settings-page.php:669
401
- msgid "Size: 1200x630px"
402
  msgstr ""
403
 
404
- #: includes/settings-page.php:678
405
- msgid "Twitter Card Type"
406
  msgstr ""
407
 
408
- #: includes/settings-page.php:681
409
- msgid "Summary Card"
410
  msgstr ""
411
 
412
- #: includes/settings-page.php:682
413
- msgid "Summary Card with Large Image"
414
  msgstr ""
415
 
416
- #: includes/settings-page.php:691
417
- msgid "3rd Party Integration"
418
  msgstr ""
419
 
420
- #: includes/settings-page.php:702
421
- msgid ""
422
- "It's HIGHLY recommended to go to <a href=\"admin.php?page=wpseo_social\" "
423
- "target=\"_blank\">SEO &gt; Social</a> and disable \"Add Open Graph meta data"
424
- "\", \"Add Twitter card meta data\" and \"Add Google+ specific post meta data"
425
- "\""
426
  msgstr ""
427
 
428
- #: includes/settings-page.php:702
429
- msgid ""
430
- "even if you don't enable integration bellow. You will get duplicate tags if "
431
- "you don't do this."
432
  msgstr ""
433
 
434
- #: includes/settings-page.php:705
435
- msgid "Use title, url (canonical) and description from WPSEO"
436
  msgstr ""
437
 
438
- #: includes/settings-page.php:720
439
- msgid ""
440
- "On product pages we will automatically set og:type to \"product\" and add "
441
- "the price including tax to the product:price tags."
442
  msgstr ""
443
 
444
- #: includes/settings-page.php:723
445
- msgid "Use Product Category thumbnail as Open Graph Image"
 
 
 
446
  msgstr ""
447
 
448
- #: includes/settings-page.php:728
 
449
  msgid ""
450
- "Recommended if you set large thumbnails for Product Categories and want to "
451
- "use them as Open Graph Images on listing pages"
 
452
  msgstr ""
453
 
454
- #: includes/settings-page.php:733
455
- msgid "Use Product Gallery images as additional Open Graph Images"
 
 
 
456
  msgstr ""
457
 
458
- #: includes/settings-page.php:738
459
- msgid "Experimental"
460
  msgstr ""
461
 
462
- #: includes/settings-page.php:740
463
- msgid ""
464
- "Uses additional Product Gallery images so, when the product is shared on "
465
- "Facebook, the user can choose what image to use"
466
  msgstr ""
467
 
468
- #: includes/settings-page.php:755
469
- msgid "Add SubHeading to Post/Page title"
470
  msgstr ""
471
 
472
- #: includes/settings-page.php:761
473
- msgid "SubHeading position"
474
  msgstr ""
475
 
476
- #: includes/settings-page.php:764
477
- msgid "After"
478
  msgstr ""
479
 
480
- #: includes/settings-page.php:765
481
- msgid "Before"
 
 
482
  msgstr ""
483
 
484
- #: includes/settings-page.php:780
485
- msgid "Use BDP listing contents as OG tags"
486
  msgstr ""
487
 
488
- #: includes/settings-page.php:785
489
  msgid ""
490
- "Setting \"Include URL\", \"Set Canonical URL\", \"Include Description\" and "
491
- "\"Include Image\" options above is HIGHLY recommended"
 
 
 
 
492
  msgstr ""
493
 
494
- #: includes/settings-page.php:794
495
- msgid "You don't have any compatible 3rd Party plugin installed/active."
496
  msgstr ""
497
 
498
- #: includes/settings-page.php:795
499
- msgid "This plugin is currently compatible with:"
500
  msgstr ""
501
 
502
- #: includes/settings-page.php:809
503
- msgid "Advanced settings"
504
  msgstr ""
505
 
506
- #: includes/settings-page.php:811
507
- msgid "Don't mess with this unless you know what you're doing"
508
  msgstr ""
509
 
510
- #: includes/settings-page.php:814
511
- msgid "Force getimagesize on local file even if allow_url_fopen=1"
512
  msgstr ""
513
 
514
- #: includes/settings-page.php:819
515
- msgid ""
516
- "May cause problems with some multisite configurations but fix \"HTTP request "
517
- "failed\" errors"
518
  msgstr ""
519
 
520
- #: includes/settings-page.php:824
521
- msgid "Try to update Facebook Open Graph Tags cache when saving the post"
522
  msgstr ""
523
 
524
- #: includes/settings-page.php:830
525
- msgid "Supress Facebook Open Graph Tags cache updated notice"
526
  msgstr ""
527
 
528
- #: includes/settings-page.php:841
529
- msgid "Save Changes"
 
530
  msgstr ""
531
 
532
- #: includes/settings-page.php:852
533
- msgid "Test your URLs at Facebook URL Linter / Debugger"
534
  msgstr ""
535
 
536
- #: includes/settings-page.php:855
537
- msgid "Test (and request approval for) your URLs at Twitter Card validator"
538
  msgstr ""
539
 
540
- #: includes/settings-page.php:858
541
  msgid "About the Open Graph Protocol (on Facebook)"
542
  msgstr ""
543
 
544
- #: includes/settings-page.php:861
545
  msgid "The Open Graph Protocol (official website)"
546
  msgstr ""
547
 
548
- #: includes/settings-page.php:864
549
  msgid "About Twitter Cards"
550
  msgstr ""
551
 
552
- #: includes/settings-page.php:867
553
  msgid "Plugin official URL"
554
  msgstr ""
555
 
556
- #: includes/settings-page.php:870
557
  msgid "Author's website: Webdados"
558
  msgstr ""
559
 
560
- #: includes/settings-page.php:873
561
  msgid "Author's Facebook page: Webdados"
562
  msgstr ""
563
 
564
- #: includes/settings-page.php:876
565
  msgid "Author's Twitter account: @Wonderm00n<br/>(Webdados founder)"
566
  msgstr ""
567
 
568
- #: includes/settings-page.php:883
569
  msgid "About this plugin"
570
  msgstr ""
571
 
572
- #: includes/settings-page.php:885
573
  msgid "Support forum"
574
  msgstr ""
575
 
576
- #: includes/settings-page.php:887
577
  msgid "Premium technical support or custom WordPress development"
578
  msgstr ""
579
 
580
- #: includes/settings-page.php:888
581
  #, php-format
582
  msgid "Please contact %s"
583
  msgstr ""
584
 
585
- #: includes/settings-page.php:889
586
  msgid "Please rate our plugin at WordPress.org"
587
  msgstr ""
588
 
589
- #: includes/settings-page.php:899
590
  msgid "Useful links"
591
  msgstr ""
592
 
593
- #: includes/settings-page.php:912
594
  msgid "Donate"
595
  msgstr ""
596
 
597
- #: includes/settings-page.php:914
598
  msgid ""
599
  "If you find this plugin useful and want to make a contribution towards "
600
  "future development please consider making a small, or big ;-), donation."
601
  msgstr ""
602
 
603
- #: includes/settings-page.php:952
604
- msgid "Select image"
605
  msgstr ""
606
 
607
- #: includes/settings-page.php:954
608
- msgid "Use this image"
609
  msgstr ""
610
 
611
- #: wonderm00n-open-graph.php:319
612
- msgid "Search for"
613
  msgstr ""
614
 
615
- #: wonderm00n-open-graph.php:328 wonderm00n-open-graph.php:332
616
- #: wonderm00n-open-graph.php:336
617
- msgid "Archives"
618
  msgstr ""
619
 
620
- #: wonderm00n-open-graph.php:417
621
- msgid "Price"
622
  msgstr ""
623
 
624
- #: wonderm00n-open-graph.php:926
625
- msgid "Use this image:"
626
  msgstr ""
627
 
628
- #: wonderm00n-open-graph.php:929
629
- msgid "Upload/Choose Open Graph Image"
630
  msgstr ""
631
 
632
- #: wonderm00n-open-graph.php:930
633
- msgid "Clear field"
634
  msgstr ""
635
 
636
- #: wonderm00n-open-graph.php:995
637
- msgid "URL failed:"
 
 
638
  msgstr ""
639
 
640
- #: wonderm00n-open-graph.php:1003
641
- msgid "Facebook returned:"
642
  msgstr ""
643
 
644
- #: wonderm00n-open-graph.php:1020
645
- msgid "Facebook Open Graph Tags cache updated/purged."
646
  msgstr ""
647
 
648
- #: wonderm00n-open-graph.php:1020
649
- msgid "Share this on Facebook"
650
  msgstr ""
651
 
652
- #: wonderm00n-open-graph.php:1028
653
- msgid "Error: Facebook Open Graph Tags cache NOT updated/purged."
654
  msgstr ""
655
 
656
- #: wonderm00n-open-graph.php:1068
657
- msgid "Use as Image Open Graph Tag"
658
  msgstr ""
659
 
660
- #: wonderm00n-open-graph.php:1087
661
- msgid "Google+"
662
  msgstr ""
663
 
664
- #: wonderm00n-open-graph.php:1091
665
- msgid "Facebook profile URL"
 
 
 
 
 
 
 
 
 
 
 
 
666
  msgstr ""
667
 
668
- #: wonderm00n-open-graph.php:1110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
669
  msgid ""
670
- "Please ignore the (dumb) Yoast WordPress SEO warning regarding open graph "
671
- "issues with this plugin. Just disable WPSEO Social settings at"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  msgstr ""
673
 
674
- #: wonderm00n-open-graph.php:1111
675
- msgid "SEO &gt; Social"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
676
  msgstr ""
677
 
678
  #. Description of the plugin/theme
3
  msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Facebook Open Graph, Google+ and Twitter Card Tags\n"
6
+ "POT-Creation-Date: 2016-10-11 17:22+0100\n"
7
  "PO-Revision-Date: 2016-09-26 14:52+0100\n"
8
  "Last-Translator: \n"
9
  "Language-Team: \n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Poedit-SearchPathExcluded-0: *.js\n"
22
 
23
+ #: admin/class-webdados-fb-open-graph-admin.php:41
24
+ msgid "Settings"
 
 
 
25
  msgstr ""
26
 
27
+ #: admin/class-webdados-fb-open-graph-admin.php:52
28
+ msgid "Google+"
29
  msgstr ""
30
 
31
+ #: admin/class-webdados-fb-open-graph-admin.php:54
32
+ #: admin/options-page-twitter.php:98
33
+ msgid "Twitter username (without @)"
34
  msgstr ""
35
 
36
+ #: admin/class-webdados-fb-open-graph-admin.php:56
37
+ msgid "Facebook profile URL"
38
  msgstr ""
39
 
40
+ #: admin/class-webdados-fb-open-graph-admin.php:90
41
+ msgid "Use this image:"
42
  msgstr ""
43
 
44
+ #: admin/class-webdados-fb-open-graph-admin.php:93
45
+ #: admin/options-page-general.php:76 admin/options-page-general.php:136
46
+ msgid "Upload/Choose"
47
  msgstr ""
48
 
49
+ #: admin/class-webdados-fb-open-graph-admin.php:94
50
+ msgid "Clear field"
51
  msgstr ""
52
 
53
+ #: admin/class-webdados-fb-open-graph-admin.php:96
54
+ #: admin/options-page-general.php:83
55
+ #, php-format
56
+ msgid "Recommended size: %dx%dpx"
57
  msgstr ""
58
 
59
+ #: admin/class-webdados-fb-open-graph-admin.php:112
60
+ #: admin/class-webdados-fb-open-graph-admin.php:240
61
+ msgid "Select image"
62
  msgstr ""
63
 
64
+ #: admin/class-webdados-fb-open-graph-admin.php:113
65
+ #: admin/class-webdados-fb-open-graph-admin.php:241
66
+ msgid "Use this image"
67
  msgstr ""
68
 
69
+ #: admin/class-webdados-fb-open-graph-admin.php:184
70
+ msgid "URL failed:"
71
  msgstr ""
72
 
73
+ #: admin/class-webdados-fb-open-graph-admin.php:192
74
+ msgid "Facebook returned:"
75
  msgstr ""
76
 
77
+ #: admin/class-webdados-fb-open-graph-admin.php:206
78
+ msgid "Facebook Open Graph Tags cache updated/purged."
79
  msgstr ""
80
 
81
+ #: admin/class-webdados-fb-open-graph-admin.php:206
82
+ msgid "Share this on Facebook"
83
  msgstr ""
84
 
85
+ #: admin/class-webdados-fb-open-graph-admin.php:214
86
+ msgid "Error: Facebook Open Graph Tags cache NOT updated/purged."
87
+ msgstr ""
88
+
89
+ #: admin/options-page-3rdparty.php:9
90
+ msgid "Settings for 3rd party integration with other plugins."
91
  msgstr ""
92
 
93
+ #: admin/options-page-3rdparty.php:39
94
+ msgid "Use Title, URL and Description"
95
  msgstr ""
96
 
97
+ #: admin/options-page-3rdparty.php:46
98
+ msgid "Use Title, Canonical URL and Description generated by Yoast SEO"
99
  msgstr ""
100
 
101
+ #: admin/options-page-3rdparty.php:55 admin/options-page-3rdparty.php:116
102
+ #: admin/options-page-3rdparty.php:167 admin/options-page-3rdparty.php:205
103
+ #, php-format
104
+ msgid "You don't have %s installed or activated."
105
  msgstr ""
106
 
107
+ #: admin/options-page-3rdparty.php:71
 
108
  msgid ""
109
+ "On the product page we will automatically set <i>og:type</i> to \"product\" "
110
+ "and <i>product:price</i> to the price including tax."
111
  msgstr ""
112
 
113
+ #: admin/options-page-3rdparty.php:76
114
+ msgid "Use Product Gallery as Images"
115
  msgstr ""
116
 
117
+ #: admin/options-page-3rdparty.php:83
 
118
  msgid ""
119
+ "Sets each Product Gallery image as an additional <i>og:image</i> tag so "
120
+ "that, when a product is shared on Facebook, the user is given the choice "
121
+ "what image to display"
122
  msgstr ""
123
 
124
+ #: admin/options-page-3rdparty.php:88 admin/options-page-general.php:119
125
+ msgid "Overlay PNG logo"
126
  msgstr ""
127
 
128
+ #: admin/options-page-3rdparty.php:95
129
+ msgid "Also overlay the PNG logo on the Product Gallery images"
130
  msgstr ""
131
 
132
+ #: admin/options-page-3rdparty.php:100
133
+ msgid "Use Category thumbnail as Image"
134
  msgstr ""
135
 
136
+ #: admin/options-page-3rdparty.php:107
137
+ msgid ""
138
+ "Recommended if you set large thumbnails for Product Categories and want to "
139
+ "use them as Open Graph Images on category listing pages"
140
  msgstr ""
141
 
142
+ #: admin/options-page-3rdparty.php:136
143
+ msgid "Add SubHeading to Post/Page Title"
144
  msgstr ""
145
 
146
+ #: admin/options-page-3rdparty.php:148
147
+ msgid "SubHeading position"
148
  msgstr ""
149
 
150
+ #: admin/options-page-3rdparty.php:151
151
+ msgid "After"
 
 
 
152
  msgstr ""
153
 
154
+ #: admin/options-page-3rdparty.php:152
155
+ msgid "Before"
156
  msgstr ""
157
 
158
+ #: admin/options-page-3rdparty.php:187
159
+ msgid "Use listing details"
160
  msgstr ""
161
 
162
+ #: admin/options-page-3rdparty.php:194
163
  msgid ""
164
+ "Use Business Directory Plugin listing details (Title, URL, Description and "
165
+ "Image) to populate tags"
166
  msgstr ""
167
 
168
+ #: admin/options-page-3rdparty.php:196
169
+ msgid ""
170
+ "Setting \"Include URL\", \"Set Canonical URL\", \"Include Description\" and "
171
+ "\"Include Image\" options is HIGHLY recommended"
172
  msgstr ""
173
 
174
+ #: admin/options-page-facebook.php:7
175
+ msgid ""
176
+ "Open Graph tags used by Facebook, and other social networks, to render link "
177
+ "share posts."
178
  msgstr ""
179
 
180
+ #: admin/options-page-facebook.php:9
181
+ msgid "Facebook Open Graph Tags"
182
  msgstr ""
183
 
184
+ #: admin/options-page-facebook.php:15
185
+ msgid "Include Post/Page Title"
186
  msgstr ""
187
 
188
+ #: admin/options-page-facebook.php:27
189
+ msgid "Include Site Name"
190
  msgstr ""
191
 
192
+ #: admin/options-page-facebook.php:36 admin/options-page-seo.php:78
193
+ msgid "From Settings &gt; General &gt; Site Title"
194
  msgstr ""
195
 
196
+ #: admin/options-page-facebook.php:41 admin/options-page-twitter.php:27
197
+ msgid "Include URL"
 
198
  msgstr ""
199
 
200
+ #: admin/options-page-facebook.php:53 admin/options-page-schema.php:27
201
+ #: admin/options-page-twitter.php:39
202
+ msgid "Include Description"
203
  msgstr ""
204
 
205
+ #: admin/options-page-facebook.php:65 admin/options-page-schema.php:39
206
+ #: admin/options-page-twitter.php:51
207
+ msgid "Include Image"
208
  msgstr ""
209
 
210
+ #: admin/options-page-facebook.php:74
211
+ #, php-format
212
+ msgid ""
213
+ "All images must have at least 200px on both dimensions in order to Facebook "
214
+ "to load them at all. %dx%dpx for optimal results. Minimum of 600x315px is "
215
+ "recommended."
216
  msgstr ""
217
 
218
+ #: admin/options-page-facebook.php:79
219
+ msgid "Include Image Dimensions"
220
  msgstr ""
221
 
222
+ #: admin/options-page-facebook.php:86 admin/options-page-facebook.php:144
223
+ msgid "and"
224
  msgstr ""
225
 
226
+ #: admin/options-page-facebook.php:88
227
+ msgid ""
228
+ "Recommended only if Facebook is having problems loading the image when the "
229
+ "post is shared for the first time, or else it adds extra unnecessary "
230
+ "processing time"
231
  msgstr ""
232
 
233
+ #: admin/options-page-facebook.php:93
234
+ msgid "Include Type"
235
  msgstr ""
236
 
237
+ #: admin/options-page-facebook.php:102
238
+ #, php-format
239
+ msgid ""
240
+ "Will be \"%1$s\" for posts and pages and \"%2$s\" or \"%3$s\" for the "
241
+ "homepage"
242
  msgstr ""
243
 
244
+ #: admin/options-page-facebook.php:104
245
+ msgid "Additional types may be used depending on 3rd party integrations"
 
 
246
  msgstr ""
247
 
248
+ #: admin/options-page-facebook.php:109
249
+ msgid "Homepage Type"
250
  msgstr ""
251
 
252
+ #: admin/options-page-facebook.php:123 admin/options-page-schema.php:52
253
+ #: admin/options-page-schema.php:66 admin/options-page-twitter.php:63
254
+ msgid "Include Post/Page Author"
255
  msgstr ""
256
 
257
+ #: admin/options-page-facebook.php:132
258
+ msgid "The user's Facebook URL must be filled in on his profile"
259
  msgstr ""
260
 
261
+ #: admin/options-page-facebook.php:137
262
+ msgid "Include Published/Modified Dates"
 
 
263
  msgstr ""
264
 
265
+ #: admin/options-page-facebook.php:146 admin/options-page-facebook.php:160
266
+ msgid "For posts only"
267
  msgstr ""
268
 
269
+ #: admin/options-page-facebook.php:151
270
+ msgid "Include Article Sections"
 
 
271
  msgstr ""
272
 
273
+ #: admin/options-page-facebook.php:160
274
+ msgid "from the categories names"
275
  msgstr ""
276
 
277
+ #: admin/options-page-facebook.php:165 admin/options-page-schema.php:79
278
+ #: admin/options-page-seo.php:69 admin/options-page-twitter.php:77
279
+ msgid "Include Publisher"
280
  msgstr ""
281
 
282
+ #: admin/options-page-facebook.php:174 admin/options-page-facebook.php:200
283
+ msgid "The website's Facebook Page"
284
  msgstr ""
285
 
286
+ #: admin/options-page-facebook.php:179
287
+ msgid "Website's Facebook Page"
288
  msgstr ""
289
 
290
+ #: admin/options-page-facebook.php:186
291
+ msgid "Facebook Page URL (with https://)"
292
  msgstr ""
293
 
294
+ #: admin/options-page-facebook.php:191
295
+ msgid "Include Locale"
296
  msgstr ""
297
 
298
+ #: admin/options-page-facebook.php:205
299
+ msgid "Locale"
300
  msgstr ""
301
 
302
+ #: admin/options-page-facebook.php:243
303
+ msgid "WordPress current locale/language"
304
  msgstr ""
305
 
306
+ #: admin/options-page-facebook.php:264
307
+ msgid "List loaded from Facebook (online)"
308
  msgstr ""
309
 
310
+ #: admin/options-page-facebook.php:267
311
+ msgid "List loaded from local cache (offline)"
312
  msgstr ""
313
 
314
+ #: admin/options-page-facebook.php:267
315
+ msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
316
  msgstr ""
317
 
318
+ #: admin/options-page-facebook.php:267
319
+ msgid "Reload from Facebook"
320
  msgstr ""
321
 
322
+ #: admin/options-page-facebook.php:269
323
+ msgid "List not loaded"
324
  msgstr ""
325
 
326
+ #: admin/options-page-facebook.php:277
327
+ msgid "Include Facebook Admin(s) ID"
 
 
 
 
328
  msgstr ""
329
 
330
+ #: admin/options-page-facebook.php:289
331
+ msgid "Facebook Admin(s) ID"
332
  msgstr ""
333
 
334
+ #: admin/options-page-facebook.php:296
335
+ msgid "Comma separated if more than one"
 
 
 
336
  msgstr ""
337
 
338
+ #: admin/options-page-facebook.php:301
339
+ msgid "Include Facebook Platform App ID"
340
  msgstr ""
341
 
342
+ #: admin/options-page-facebook.php:313
343
+ msgid "Facebook Platform App ID"
 
 
344
  msgstr ""
345
 
346
+ #: admin/options-page-facebook.php:320
347
+ msgid "From your Facebook Developers dashboard"
348
  msgstr ""
349
 
350
+ #: admin/options-page-facebook.php:329
351
+ msgid "Facebook Open Graph Tags cache"
352
  msgstr ""
353
 
354
+ #: admin/options-page-facebook.php:335
355
+ msgid "Clear cache"
356
  msgstr ""
357
 
358
+ #: admin/options-page-facebook.php:342
359
+ msgid ""
360
+ "Try to clear the Facebook Open Graph Tags cache when saving a post or page, "
361
+ "so the link preview on Facebook is immediately updated"
362
  msgstr ""
363
 
364
+ #: admin/options-page-facebook.php:347
365
+ msgid "Suppress cache notices"
366
  msgstr ""
367
 
368
+ #: admin/options-page-facebook.php:354
369
+ msgid ""
370
+ "Sometimes we aren't able to update the cache and the post author will see a "
371
+ "notice if this option is not checked"
372
  msgstr ""
373
 
374
+ #: admin/options-page-general.php:8
375
+ msgid "General settings that will apply to all tags types."
376
  msgstr ""
377
 
378
+ #: admin/options-page-general.php:10
379
+ msgid "Description settings"
 
 
380
  msgstr ""
381
 
382
+ #: admin/options-page-general.php:16
383
+ msgid "Description maximum length"
 
 
384
  msgstr ""
385
 
386
+ #: admin/options-page-general.php:18
387
+ msgid "characters"
388
  msgstr ""
389
 
390
+ #: admin/options-page-general.php:23
391
+ msgid "0 (zero) or blank for no maximum length"
392
  msgstr ""
393
 
394
+ #: admin/options-page-general.php:28
395
+ msgid "Homepage description"
396
  msgstr ""
397
 
398
+ #: admin/options-page-general.php:34
399
+ msgid "The description of your front page:"
400
  msgstr ""
401
 
402
+ #: admin/options-page-general.php:39
403
+ msgid "Website tagline"
404
+ msgstr ""
405
+
406
+ #: admin/options-page-general.php:40
407
+ msgid "Custom text"
408
+ msgstr ""
409
+
410
+ #: admin/options-page-general.php:48
411
+ #, php-format
412
  msgid ""
413
+ "WPML users: Set the default language description here, save changes and then "
414
+ "go to <a href=\"%s\" target=\"_blank\">WPML &gt; String translation</a> to "
415
+ "set it for other languages."
416
  msgstr ""
417
 
418
+ #: admin/options-page-general.php:67
419
+ msgid "Image settings"
420
  msgstr ""
421
 
422
+ #: admin/options-page-general.php:73
423
+ msgid "Default image"
424
  msgstr ""
425
 
426
+ #: admin/options-page-general.php:81 admin/options-page-general.php:141
427
+ msgid "URL (with http(s)://)"
428
  msgstr ""
429
 
430
+ #: admin/options-page-general.php:88
431
+ msgid "On Post/Page, use image from"
432
  msgstr ""
433
 
434
+ #: admin/options-page-general.php:92
435
+ msgid "\"Open Graph Image\" custom field on the post"
436
  msgstr ""
437
 
438
+ #: admin/options-page-general.php:96
439
+ msgid "Post/page featured image"
 
 
 
 
440
  msgstr ""
441
 
442
+ #: admin/options-page-general.php:100
443
+ msgid "First image from the post/page content"
 
 
444
  msgstr ""
445
 
446
+ #: admin/options-page-general.php:104
447
+ msgid "First image from the post/page media gallery"
448
  msgstr ""
449
 
450
+ #: admin/options-page-general.php:108
451
+ msgid "Default image specified above"
 
 
452
  msgstr ""
453
 
454
+ #: admin/options-page-general.php:114
455
+ msgid ""
456
+ "On posts/pages the first image found, using the priority above, will be "
457
+ "used. On the homepage, archives and other website sections the default image "
458
+ "is always used."
459
  msgstr ""
460
 
461
+ #: admin/options-page-general.php:126
462
+ #, php-format
463
  msgid ""
464
+ "The original image will be resized/cropped to %dx%dpx and the chosen PNG "
465
+ "(that should also have this size) will be overlaid on it. It will only work "
466
+ "for locally hosted images."
467
  msgstr ""
468
 
469
+ #: admin/options-page-general.php:128
470
+ #, php-format
471
+ msgid ""
472
+ "You can see an example of the end result <a href=\"%s\" target=\"_blank"
473
+ "\">here</a>"
474
  msgstr ""
475
 
476
+ #: admin/options-page-general.php:133
477
+ msgid "PNG logo"
478
  msgstr ""
479
 
480
+ #: admin/options-page-general.php:143
481
+ #, php-format
482
+ msgid "Size: %dx%dpx"
 
483
  msgstr ""
484
 
485
+ #: admin/options-page-general.php:148
486
+ msgid "Add image to RSS/RSS2 feeds"
487
  msgstr ""
488
 
489
+ #: admin/options-page-general.php:155
490
+ msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
491
  msgstr ""
492
 
493
+ #: admin/options-page-general.php:160
494
+ msgid "Force getimagesize on local file"
495
  msgstr ""
496
 
497
+ #: admin/options-page-general.php:167
498
+ msgid ""
499
+ "This is an advanced option: Don't mess with this unless you know what you're "
500
+ "doing"
501
  msgstr ""
502
 
503
+ #: admin/options-page-general.php:169
504
+ msgid "Force getimagesize on local file even if allow_url_fopen=1"
505
  msgstr ""
506
 
507
+ #: admin/options-page-general.php:171
508
  msgid ""
509
+ "May cause problems with some multisite configurations but fixes \"HTTP "
510
+ "request failed\" errors"
511
+ msgstr ""
512
+
513
+ #: admin/options-page-general.php:180
514
+ msgid "URL settings"
515
  msgstr ""
516
 
517
+ #: admin/options-page-general.php:186
518
+ msgid "Add trailing slash at the end"
519
  msgstr ""
520
 
521
+ #: admin/options-page-general.php:193
522
+ msgid "If missing, a trailing slash will be added at the end"
523
  msgstr ""
524
 
525
+ #: admin/options-page-general.php:195
526
+ msgid "Homepage example:"
527
  msgstr ""
528
 
529
+ #: admin/options-page-general.php:204
530
+ msgid "Author settings"
531
  msgstr ""
532
 
533
+ #: admin/options-page-general.php:210
534
+ msgid "Hide Author on Pages"
535
  msgstr ""
536
 
537
+ #: admin/options-page-general.php:217
538
+ msgid "Hides all Author tags on Pages"
 
 
539
  msgstr ""
540
 
541
+ #: admin/options-page-general.php:226
542
+ msgid "Other settings"
543
  msgstr ""
544
 
545
+ #: admin/options-page-general.php:232
546
+ msgid "Keep data on uninstall"
547
  msgstr ""
548
 
549
+ #: admin/options-page-general.php:239
550
+ msgid ""
551
+ "Keep the plugin settings on the database even if the plugin is uninstalled"
552
  msgstr ""
553
 
554
+ #: admin/options-page-right.php:7
555
+ msgid "Test your URLs on the Facebook Debugger"
556
  msgstr ""
557
 
558
+ #: admin/options-page-right.php:11
559
+ msgid "Test your URLs on the Twitter Card validator"
560
  msgstr ""
561
 
562
+ #: admin/options-page-right.php:15
563
  msgid "About the Open Graph Protocol (on Facebook)"
564
  msgstr ""
565
 
566
+ #: admin/options-page-right.php:19
567
  msgid "The Open Graph Protocol (official website)"
568
  msgstr ""
569
 
570
+ #: admin/options-page-right.php:23
571
  msgid "About Twitter Cards"
572
  msgstr ""
573
 
574
+ #: admin/options-page-right.php:27
575
  msgid "Plugin official URL"
576
  msgstr ""
577
 
578
+ #: admin/options-page-right.php:31
579
  msgid "Author's website: Webdados"
580
  msgstr ""
581
 
582
+ #: admin/options-page-right.php:35
583
  msgid "Author's Facebook page: Webdados"
584
  msgstr ""
585
 
586
+ #: admin/options-page-right.php:39
587
  msgid "Author's Twitter account: @Wonderm00n<br/>(Webdados founder)"
588
  msgstr ""
589
 
590
+ #: admin/options-page-right.php:50
591
  msgid "About this plugin"
592
  msgstr ""
593
 
594
+ #: admin/options-page-right.php:52
595
  msgid "Support forum"
596
  msgstr ""
597
 
598
+ #: admin/options-page-right.php:54
599
  msgid "Premium technical support or custom WordPress development"
600
  msgstr ""
601
 
602
+ #: admin/options-page-right.php:55
603
  #, php-format
604
  msgid "Please contact %s"
605
  msgstr ""
606
 
607
+ #: admin/options-page-right.php:56
608
  msgid "Please rate our plugin at WordPress.org"
609
  msgstr ""
610
 
611
+ #: admin/options-page-right.php:64
612
  msgid "Useful links"
613
  msgstr ""
614
 
615
+ #: admin/options-page-right.php:75
616
  msgid "Donate"
617
  msgstr ""
618
 
619
+ #: admin/options-page-right.php:77
620
  msgid ""
621
  "If you find this plugin useful and want to make a contribution towards "
622
  "future development please consider making a small, or big ;-), donation."
623
  msgstr ""
624
 
625
+ #: admin/options-page-schema.php:7
626
+ msgid "Schema.org tags used by Google+ to render link share posts."
627
  msgstr ""
628
 
629
+ #: admin/options-page-schema.php:9
630
+ msgid "Google+ / Schema.org Tags"
631
  msgstr ""
632
 
633
+ #: admin/options-page-schema.php:15 admin/options-page-twitter.php:15
634
+ msgid "Include Title"
635
  msgstr ""
636
 
637
+ #: admin/options-page-schema.php:61
638
+ msgid "The user's Google+ URL must be filled in on his profile"
 
639
  msgstr ""
640
 
641
+ #: admin/options-page-schema.php:68
642
+ msgid "Google doesn't use it anymore"
643
  msgstr ""
644
 
645
+ #: admin/options-page-schema.php:88
646
+ msgid "The website's Google+ Page"
647
  msgstr ""
648
 
649
+ #: admin/options-page-schema.php:93
650
+ msgid "Website's Google+ Page"
651
  msgstr ""
652
 
653
+ #: admin/options-page-schema.php:100
654
+ msgid "Google+ Page URL (with https://)"
655
  msgstr ""
656
 
657
+ #: admin/options-page-seo.php:7
658
+ msgid ""
659
+ "SEO Meta Tags that are recommended ONLY if no other plugin is setting them "
660
+ "already."
661
  msgstr ""
662
 
663
+ #: admin/options-page-seo.php:9
664
+ msgid "SEO Meta Tags"
665
  msgstr ""
666
 
667
+ #: admin/options-page-seo.php:15
668
+ msgid "Set Canonical URL"
669
  msgstr ""
670
 
671
+ #: admin/options-page-seo.php:27 admin/options-page-seo.php:47
672
+ msgid "Not recommended because you have Yoast SEO active"
673
  msgstr ""
674
 
675
+ #: admin/options-page-seo.php:35
676
+ msgid "Include Meta Description tag"
677
  msgstr ""
678
 
679
+ #: admin/options-page-seo.php:55
680
+ msgid "Include Post/Page Author name"
681
  msgstr ""
682
 
683
+ #: admin/options-page-seo.php:64
684
+ msgid "From the user Display name"
685
  msgstr ""
686
 
687
+ #: admin/options-page-twitter.php:7
688
+ msgid "Tags used by Twitter to render their Cards."
689
+ msgstr ""
690
+
691
+ #: admin/options-page-twitter.php:9
692
+ msgid "Twitter Card Tags"
693
+ msgstr ""
694
+
695
+ #: admin/options-page-twitter.php:72
696
+ msgid "The user's Twitter Username must be filled in on his profile"
697
+ msgstr ""
698
+
699
+ #: admin/options-page-twitter.php:86
700
+ msgid "The website's Twitter Username"
701
  msgstr ""
702
 
703
+ #: admin/options-page-twitter.php:91
704
+ msgid "Website's Twitter Username"
705
+ msgstr ""
706
+
707
+ #: admin/options-page-twitter.php:103
708
+ msgid "Card Type"
709
+ msgstr ""
710
+
711
+ #: admin/options-page-twitter.php:106
712
+ msgid "Summary Card"
713
+ msgstr ""
714
+
715
+ #: admin/options-page-twitter.php:107
716
+ msgid "Summary Card with Large Image"
717
+ msgstr ""
718
+
719
+ #: admin/options-page-twitter.php:115
720
+ msgid "The type of Twitter Card shown on the timeline"
721
+ msgstr ""
722
+
723
+ #: admin/options-page.php:12
724
  msgid ""
725
+ "Please set some default values and which tags should, or should not, be "
726
+ "included. It may be necessary to exclude some tags if other plugins are "
727
+ "already including them."
728
+ msgstr ""
729
+
730
+ #: admin/options-page.php:29
731
+ msgid "General"
732
+ msgstr ""
733
+
734
+ #: admin/options-page.php:35
735
+ msgid "Open Graph"
736
+ msgstr ""
737
+
738
+ #: admin/options-page.php:41
739
+ msgid "Cards"
740
+ msgstr ""
741
+
742
+ #: admin/options-page.php:47
743
+ msgid "Schema"
744
  msgstr ""
745
 
746
+ #: admin/options-page.php:53
747
+ msgid "SEO tags"
748
+ msgstr ""
749
+
750
+ #: admin/options-page.php:59
751
+ msgid "3rd party"
752
+ msgstr ""
753
+
754
+ #: public/class-webdados-fb-open-graph-public.php:190
755
+ msgid "Price"
756
+ msgstr ""
757
+
758
+ #: public/class-webdados-fb-open-graph-public.php:278
759
+ msgid "Search for"
760
+ msgstr ""
761
+
762
+ #: public/class-webdados-fb-open-graph-public.php:287
763
+ #: public/class-webdados-fb-open-graph-public.php:291
764
+ #: public/class-webdados-fb-open-graph-public.php:295
765
+ msgid "Archives"
766
  msgstr ""
767
 
768
  #. Description of the plugin/theme
public/class-webdados-fb-open-graph-public.php ADDED
@@ -0,0 +1,853 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
+
5
+ class Webdados_FB_Public {
6
+
7
+
8
+
9
+ /* Version */
10
+ private $version;
11
+
12
+ /* Database options */
13
+ private $options;
14
+
15
+ /* Image Size temporary holder */
16
+ private $image_size = false;
17
+
18
+ /* BDP Post temporary holder */
19
+ private $post = false;
20
+
21
+
22
+
23
+ /* Construct */
24
+ public function __construct( $options, $version ) {
25
+ $this->options = $options;
26
+ $this->version = $version;
27
+ }
28
+
29
+
30
+
31
+ /* Insert the tags on the header */
32
+ function get_post( $post ) {
33
+ global $webdados_fb;
34
+ if ( is_singular() ) {
35
+ $this->post = $post;
36
+ }
37
+ return $post;
38
+ }
39
+
40
+
41
+
42
+ /* Insert the tags on the header */
43
+ public function insert_meta_tags() {
44
+ global $webdados_fb;
45
+
46
+ //Also set Title Tag? - Needed??
47
+ $fb_set_title_tag=0;
48
+
49
+ //Init values
50
+ $fb_locale = '';
51
+ $fb_title = '';
52
+ $fb_url = '';
53
+ $fb_desc = '';
54
+ $fb_image = '';
55
+ $fb_type = 'article';
56
+ $fb_author = '';
57
+ $fb_author_meta = '';
58
+ $fb_author_linkrelgp = '';
59
+ $fb_author_twitter = '';
60
+ $fb_article_pub_date = '';
61
+ $fb_article_mod_date = '';
62
+ $fb_image_additional = array();
63
+ $fb_additional_tags = array(
64
+ 'name' => array(),
65
+ 'property' => array(),
66
+ );
67
+ $fb_publisher = trim($this->options['fb_publisher']);
68
+ $fb_publisher_schema = trim($this->options['fb_publisher_schema']);
69
+ $fb_publisher_twitteruser = trim($this->options['fb_publisher_twitteruser']);
70
+
71
+ //Open tag
72
+ $html='
73
+ <!-- START - '.WEBDADOS_FB_PLUGIN_NAME.' '.WEBDADOS_FB_VERSION.' -->
74
+ ';
75
+
76
+ if ( is_singular() ) {
77
+
78
+ global $post;
79
+ // Title
80
+ //It's a Post or a Page or an attachment page - It can also be the homepage if it's set as a page
81
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( $post->post_title ), true ) );
82
+ //SubHeading
83
+ if ( isset($this->options['fb_show_subheading']) && intval($this->options['fb_show_subheading'])==1 && $webdados_fb->is_subheading_plugin_active() ) {
84
+ if (isset($this->options['fb_subheading_position']) && $this->options['fb_subheading_position']=='before' ) {
85
+ $fb_title = trim( trim(get_the_subheading()).' - '.trim($fb_title), ' -' );
86
+ } else {
87
+ $fb_title = trim( trim($fb_title).' - '.trim(get_the_subheading()), ' -' );
88
+ }
89
+ }
90
+ // URL
91
+ $fb_url = get_permalink();
92
+ // Type if it's a homepage page
93
+ if ( is_front_page() ) {
94
+ /* Fix homepage type when it's a static page */
95
+ $fb_url = get_option('home' ).(intval($this->options['fb_url_add_trailing'])==1 ? '/' : '' );
96
+ $fb_type = trim($this->options['fb_type_homepage']=='' ? 'website' : $this->options['fb_type_homepage']);
97
+ }
98
+ // Description
99
+ if ( trim($post->post_excerpt) != '' ) {
100
+ //If there's an excerpt that's what we'll use
101
+ $fb_desc = trim($post->post_excerpt);
102
+ } else {
103
+ //If not we grab it from the content
104
+ $fb_desc = trim($post->post_content);
105
+ }
106
+ // Image
107
+ if ( intval($this->options['fb_image_show'])==1 || intval($this->options['fb_image_show_schema'])==1 || intval($this->options['fb_image_show_twitter'])==1 ) {
108
+ $fb_image = $this->get_post_image();
109
+ }
110
+ // Author
111
+ $author_id = $post->post_author;
112
+ if ( $author_id > 0 && ! ( is_page() && intval($this->options['fb_author_hide_on_pages'])==1 ) ) {
113
+ $fb_author = get_the_author_meta('facebook', $author_id);
114
+ $fb_author_meta = get_the_author_meta('display_name', $author_id);
115
+ $fb_author_linkrelgp = get_the_author_meta('googleplus', $author_id);
116
+ $fb_author_twitter = get_the_author_meta('twitter', $author_id);
117
+ }
118
+
119
+ //Published and Modified time - We should check this out and maybe have it for any kind of post...
120
+ if ( is_singular('post' ) ) {
121
+ $fb_article_pub_date = get_the_date('c' );
122
+ $fb_article_mod_date = get_the_modified_date('c' );
123
+ } else {
124
+ //Reset dates show because we're not on posts
125
+ $this->options['fb_article_dates_show'] = 0;
126
+ }
127
+ //Sections
128
+ if ( is_singular('post' ) ) {
129
+ $cats = get_the_category();
130
+ if ( !is_wp_error($cats) && (is_array($cats) && count($cats)>0) ) {
131
+ $fb_sections = array();
132
+ foreach ($cats as $cat) {
133
+ $fb_sections[] = $cat->name;
134
+ }
135
+ }
136
+ } else {
137
+ $this->options['fb_article_sections_show'] = 0;
138
+ }
139
+ // Business Directory Plugin
140
+ if ( isset( $this->options['fb_show_businessdirectoryplugin'] ) && $webdados_fb->is_business_directory_active() ) {
141
+ global $wpbdp;
142
+ $bdp_action = wpbdp_current_action();
143
+ $bdp_disable_cpt = wpbdp_get_option( 'disable-cpt' );
144
+ $current_view_object = $wpbdp->dispatcher->current_view_object();
145
+ switch( $bdp_action ) {
146
+ case 'show_listing':
147
+ $fb_title = trim( esc_attr( wp_strip_all_tags( stripslashes( $this->post->post_title ), true ) ).' - '.$fb_title, ' -' );
148
+ $fb_set_title_tag = 1;
149
+ $fb_url = get_permalink($this->post->ID);
150
+ if ( trim($this->post->post_excerpt)!='' ) {
151
+ //If there's an excerpt that's what we'll use
152
+ $fb_desc = trim($this->post->post_excerpt);
153
+ } else {
154
+ //If not we grab it from the content
155
+ $fb_desc = trim($this->post->post_content);
156
+ }
157
+ if (intval($this->options['fb_image_show'])==1 || intval($this->options['fb_image_show_schema'])==1 || intval($this->options['fb_image_show_twitter'])==1) {
158
+ $thumbdone = false;
159
+ if ( intval($this->options['fb_image_use_featured'])==1 ) {
160
+ //Featured
161
+ if ( $id_attachment = get_post_thumbnail_id( $this->post->ID ) ) {
162
+ //There's a featured/thumbnail image for this listing
163
+ $fb_image = wp_get_attachment_url( $id_attachment, false );
164
+ $thumbdone = true;
165
+ } else {
166
+ }
167
+ }
168
+ if ( !$thumbdone ) {
169
+ //Main image loaded
170
+ if ( $thumbnail_id = wpbdp_listings_api()->get_thumbnail_id( $this->post->ID ) ) {
171
+ $fb_image = wp_get_attachment_url( $thumbnail_id, false );
172
+ $thumbdone = true;
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ // WooCommerce
179
+ if ( $webdados_fb->is_woocommerce_active() && is_product() ) {
180
+ $fb_type = 'product';
181
+ $product = new WC_Product( $post->ID );
182
+ //Price
183
+ $fb_additional_tags['property']['og_price_amount'] = array(
184
+ $product->get_price_including_tax()
185
+ );
186
+ if ( function_exists('get_woocommerce_currency') ) $fb_additional_tags['property']['og_price_currency'] = array(
187
+ get_woocommerce_currency()
188
+ );
189
+ $fb_additional_tags['name']['twitter_label1'] = array(
190
+ __('Price', 'wd-fb-og')
191
+ );
192
+ if ( function_exists('get_woocommerce_currency') ) $fb_additional_tags['name']['twitter_data1'] = array(
193
+ $product->get_price_including_tax().' '.get_woocommerce_currency()
194
+ );
195
+ //Additional product images?
196
+ if ( intval($this->options['fb_image_show'])==1 && $this->options['fb_wc_useproductgallery']==1 ) {
197
+ if ( $attachment_ids = $product->get_gallery_attachment_ids() ) {
198
+ foreach ( $attachment_ids as $attachment_id ) {
199
+ if ( $image_link = wp_get_attachment_url( $attachment_id ) ) {
200
+ if ( trim($image_link)!='' ) {
201
+ $fb_image_additional[] = array(
202
+ 'fb_image' => trim($image_link),
203
+ 'png_overlay' => ( intval($this->options['fb_wc_usepg_png_overlay']) ? true : false ),
204
+ );
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ } else {
213
+
214
+ global $wp_query;
215
+ //Other pages - Defaults
216
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( get_bloginfo( 'name' ) ), true ) );
217
+ $fb_url = ( ( !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ) ? 'https://' : 'http://' ).$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; //Not really canonical but will work for now
218
+ $fb_image = trim( $this->options['fb_image'] );
219
+
220
+ $this->options['fb_article_sections_show'] = 0;
221
+ $this->options['fb_article_dates_show'] = 0;
222
+ $this->options['fb_author_show'] = 0;
223
+ $this->options['fb_author_show_meta'] = 0;
224
+ $this->options['fb_author_show_linkrelgp'] = 0;
225
+ $this->options['fb_author_show_twitter'] = 0;
226
+ $this->options['fb_author_show_twitter'] = 0;
227
+
228
+ //Description
229
+ switch( $this->options['fb_desc_homepage'] ) {
230
+ case 'custom':
231
+ $fb_desc = $this->options['fb_desc_homepage_customtext'];
232
+ //WPML?
233
+ if ( $webdados_fb->is_wpml_active() ) {
234
+ global $sitepress;
235
+ if ( ICL_LANGUAGE_CODE != $sitepress->get_default_language() ) {
236
+ $fb_desc = icl_t( 'wd-fb-og', 'wd_fb_og_desc_homepage_customtext', $fb_desc );
237
+ }
238
+ }
239
+ break;
240
+ default:
241
+ $fb_desc = get_bloginfo( 'description' );
242
+ break;
243
+ }
244
+
245
+ //Category
246
+ if ( is_category() ) {
247
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( single_cat_title( '', false ) ), true ) );
248
+ $term = $wp_query->get_queried_object();
249
+ $fb_url = get_term_link( $term, $term->taxonomy );
250
+ $cat_desc = trim( esc_attr( wp_strip_all_tags( stripslashes( category_description() ), true ) ) );
251
+ if ( trim($cat_desc)!='' ) $fb_desc = $cat_desc;
252
+ } else {
253
+ if ( is_tag() ) {
254
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( single_tag_title( '', false ) ), true ) );
255
+ $term = $wp_query->get_queried_object();
256
+ $fb_url = get_term_link( $term, $term->taxonomy );
257
+ $tag_desc = trim( esc_attr( wp_strip_all_tags( stripslashes( tag_description() ), true ) ) );
258
+ if ( trim($tag_desc)!='' ) $fb_desc = $tag_desc;
259
+ } else {
260
+ if (is_tax()) {
261
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( single_term_title( '', false ) ), true ) );
262
+ $term = $wp_query->get_queried_object();
263
+ $fb_url = get_term_link($term, $term->taxonomy);
264
+ $tax_desc = trim( esc_attr( wp_strip_all_tags( stripslashes( term_description() ), true ) ) );
265
+ if ( trim($tax_desc)!='' ) $fb_desc = $tag_desc;
266
+ //WooCommerce
267
+ if ( $webdados_fb->is_woocommerce_active() && intval($this->options['fb_wc_usecategthumb'])==1 && is_product_category() ) {
268
+ if ( intval($this->options['fb_image_show'])==1 || intval($this->options['fb_image_show_schema'])==1 || intval($this->options['fb_image_show_twitter'])==1 ) {
269
+ if ( $thumbnail_id = get_woocommerce_term_meta( $term->term_id, 'thumbnail_id', true ) ) {
270
+ if ( $image = wp_get_attachment_url( $thumbnail_id ) ) {
271
+ $fb_image = $image;
272
+ }
273
+ }
274
+ }
275
+ }
276
+ } else {
277
+ if ( is_search() ) {
278
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( __('Search for', 'wd-fb-og').' "'.get_search_query().'"' ), true ) );
279
+ $fb_url = get_search_link();
280
+ } else {
281
+ if (is_author()) {
282
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( get_the_author_meta('display_name', get_query_var('author') ) ), true ) );
283
+ $fb_url = get_author_posts_url( get_query_var('author'), get_query_var('author_name') );
284
+ } else {
285
+ if ( is_archive() ) {
286
+ if ( is_day() ) {
287
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( get_query_var( 'day' ) . ' ' .single_month_title( ' ', false ) . ' ' . __( 'Archives', 'wd-fb-og' ) ), true ) );
288
+ $fb_url = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) );
289
+ } else {
290
+ if ( is_month() ) {
291
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( single_month_title( ' ', false ) . ' ' . __( 'Archives', 'wd-fb-og' ) ), true ) );
292
+ $fb_url = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) );
293
+ } else {
294
+ if ( is_year() ) {
295
+ $fb_title = esc_attr( wp_strip_all_tags( stripslashes( get_query_var( 'year' ) . ' ' . __( 'Archives', 'wd-fb-og' ) ), true ) );
296
+ $fb_url = get_year_link( get_query_var( 'year' ) );
297
+ }
298
+ }
299
+ }
300
+ } else {
301
+ if (is_front_page()) {
302
+ $fb_url = get_option('home').(intval($this->options['fb_url_add_trailing'])==1 ? '/' : '');
303
+ $fb_type = trim( $this->options['fb_type_homepage']=='' ? 'website' : $this->options['fb_type_homepage'] );
304
+ } else {
305
+ //Others... Defaults already set up there
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+
315
+ //og:type for WPML root page?
316
+ if ( $webdados_fb->is_wpml_active() ) {
317
+ if ( class_exists('WPML_Root_Page') ) {
318
+ if ( WPML_Root_Page::is_current_request_root() ) {
319
+ $fb_type = trim( $this->options['fb_type_homepage']=='' ? 'website' : $fb_type_homepage );
320
+ }
321
+ }
322
+ }
323
+
324
+ //Trim description
325
+ $fb_desc = (
326
+ intval($this->options['fb_desc_chars'])>0
327
+ ?
328
+ mb_substr( wp_strip_all_tags( strip_shortcodes( stripslashes( $fb_desc ), true ) ), 0, intval($this->options['fb_desc_chars']) )
329
+ :
330
+ wp_strip_all_tags( strip_shortcodes( stripslashes( $fb_desc ), true ) )
331
+ );
332
+
333
+ //YOAST SEO?
334
+ if ( $this->options['fb_show_wpseoyoast']==1 ) {
335
+ if ( $webdados_fb->is_yoast_seo_active() ) {
336
+ $wpseo = WPSEO_Frontend::get_instance();
337
+ //Title
338
+ $fb_title = wp_strip_all_tags( $wpseo->title(false), true );
339
+ //Title - SubHeading plugin
340
+ if ( $this->options['fb_show_subheading']==1 ) {
341
+ if ( $webdados_fb->is_subheading_plugin_active() ) {
342
+ if ( isset($this->options['fb_subheading_position']) && $this->options['fb_subheading_position']=='before' ) {
343
+ $fb_title = trim( trim( get_the_subheading() ).' - '.trim($fb_title), ' -');
344
+ } else {
345
+ $fb_title = trim( trim( $fb_title ).' - '.trim( get_the_subheading() ), ' -');
346
+ }
347
+ }
348
+ }
349
+ //URL
350
+ $fb_url = $wpseo->canonical(false);
351
+ //Description - From WPSEO or our plugin? If coming from Yoat SEO we won't trim it
352
+ $fb_desc_temp = $wpseo->metadesc(false);
353
+ $fb_desc = wp_strip_all_tags( trim($fb_desc_temp)!='' ? trim($fb_desc_temp) : $fb_desc, true);
354
+ }
355
+ }
356
+
357
+ //Apply Filters
358
+ $fb_locale = apply_filters('fb_og_locale', $fb_locale);
359
+ $fb_title = apply_filters('fb_og_title', $fb_title);
360
+ $fb_url = apply_filters('fb_og_url', $fb_url);
361
+ $fb_type = apply_filters('fb_og_type', $fb_type);
362
+ $fb_desc = apply_filters('fb_og_desc', $fb_desc);
363
+ $fb_image = apply_filters('fb_og_image', $fb_image);
364
+ $fb_image_additional = apply_filters('fb_og_image_additional', $fb_image_additional);
365
+
366
+ //Image size
367
+ $fb_image_size = false;
368
+ if ( intval($this->options['fb_image_show'])==1 && trim($fb_image)!='' ) {
369
+ if ( intval($this->options['fb_image_size_show'])==1 ) {
370
+ if ( isset($this->image_size) && is_array($this->image_size) ) { //Already fetched
371
+ $fb_image_size = $this->image_size;
372
+ } else {
373
+ $fb_image_size = $this->get_open_graph_image_size($fb_image);
374
+ }
375
+ }
376
+ } else {
377
+ $this->options['fb_image_show'] = 0;
378
+ }
379
+
380
+ //Image overlay - Single?
381
+ if ( intval($this->options['fb_image_show'])==1 && intval($this->options['fb_image_overlay'])==1 && apply_filters('fb_og_image_overlay', true, $fb_image) ) {
382
+ //Single
383
+ $temp_fb_image_overlay = $this->get_image_with_overlay($fb_image);
384
+ if ( $temp_fb_image_overlay['overlay'] ) {
385
+ $fb_image = $temp_fb_image_overlay['fb_image'];
386
+ //We know the exact size now. We better just show it, right?
387
+ $this->options['fb_image_size_show'] = 1;
388
+ $fb_image_size = array(WEBDADOS_FB_W, WEBDADOS_FB_H);
389
+ }
390
+ //Additional
391
+ if ( isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional)>0 ) {
392
+ foreach($fb_image_additional as $key => $value ) {
393
+ if ($value['png_overlay']) {
394
+ $temp_fb_image_overlay = $this->get_image_with_overlay($value['fb_image']);
395
+ if ( $temp_fb_image_overlay['overlay'] ) {
396
+ $fb_image_additional[$key]['fb_image'] = $temp_fb_image_overlay['fb_image'];
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+
403
+ //No spaces on URLs
404
+ if ( isset($fb_url) && trim($fb_url)!='' ) $fb_url= str_replace(' ', '%20', trim($fb_url));
405
+ if ( isset($fb_publisher) && trim($fb_publisher)!='' ) $fb_publisher= str_replace(' ', '%20', trim($fb_publisher));
406
+ if ( isset($fb_publisher_schema) && trim($fb_publisher_schema)!='' ) $fb_publisher_schema= str_replace(' ', '%20', trim($fb_publisher_schema));
407
+ if ( isset($fb_author) && trim($fb_author)!='' ) $fb_author= str_replace(' ', '%20', trim($fb_author));
408
+ if ( isset($fb_author_linkrelgp) && trim($fb_author_linkrelgp)!='' ) $fb_author_linkrelgp= str_replace(' ', '%20', trim($fb_author_linkrelgp));
409
+ if ( isset($fb_image) && trim($fb_image)!='' ) $fb_image= str_replace(' ', '%20', trim($fb_image));
410
+ if ( isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional) ) {
411
+ foreach ( $fb_image_additional as $key => $value ) {
412
+ $fb_image_additional[$key]['fb_image'] = str_replace( ' ', '%20', trim($value['fb_image']) );
413
+ }
414
+ }
415
+
416
+ //If there's no description let's just add the title as a last resort
417
+ if ( trim($fb_desc)=='' ) $fb_desc = $fb_title;
418
+
419
+ //Print tags
420
+ // Facebook
421
+ $html.=' <!-- Facebook Open Graph -->
422
+ ';
423
+ //Locale
424
+ if ( intval($this->options['fb_locale_show'])==1 ) $html.=' <meta property="og:locale" content="'.trim(esc_attr( trim($this->options['fb_locale'])!='' ? trim($this->options['fb_locale']) : trim(get_locale()) )).'"/>
425
+ ';
426
+ //Site name
427
+ if ( intval($this->options['fb_sitename_show'])==1 ) $html.=' <meta property="og:site_name" content="'.trim(esc_attr(get_bloginfo('name' ))).'"/>
428
+ ';
429
+ //Title
430
+ if ( intval($this->options['fb_title_show'])==1 && trim($fb_title)!='' ) $html.=' <meta property="og:title" content="'.trim(esc_attr($fb_title)).'"/>
431
+ ';
432
+ //URL
433
+ if ( intval($this->options['fb_url_show'])==1 && trim($fb_url)!='' ) $html.=' <meta property="og:url" content="'.trim(esc_attr($fb_url)).'"/>
434
+ ';
435
+ //Type
436
+ if ( intval($this->options['fb_type_show'])==1 && trim($fb_type)!='' ) $html.=' <meta property="og:type" content="'.trim(esc_attr($fb_type)).'"/>
437
+ ';
438
+ //Description
439
+ if ( intval($this->options['fb_desc_show'])==1 && trim($fb_desc)!='' ) $html.=' <meta property="og:description" content="'.trim(esc_attr($fb_desc)).'"/>
440
+ ';
441
+ //Image
442
+ if( intval($this->options['fb_image_show'])==1 && trim($fb_image)!='' ) $html.=' <meta property="og:image" content="'.trim(esc_attr($fb_image)).'"/>
443
+ ';
444
+ //Additional Images
445
+ if( intval($this->options['fb_image_show'])==1 && isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional)>0 ) {
446
+ foreach ($fb_image_additional as $fb_image_additional_temp) {
447
+ $html.=' <meta property="og:image" content="'.trim(esc_attr($fb_image_additional_temp['fb_image'])).'"/>
448
+ ';
449
+ }
450
+ } else {
451
+ //Image Size - We only show the image size if we only have one image
452
+ if( intval($this->options['fb_image_size_show'])==1 && isset($fb_image_size) && is_array($fb_image_size) ) $html.=' <meta property="og:image:width" content="'.intval(esc_attr($fb_image_size[0])).'"/>
453
+ <meta property="og:image:height" content="'.intval(esc_attr($fb_image_size[1])).'"/>
454
+ ';
455
+ }
456
+ //Dates
457
+ if ( intval($this->options['fb_article_dates_show'])==1 && trim($fb_article_pub_date)!='' ) $html.=' <meta property="article:published_time" content="'.trim(esc_attr($fb_article_pub_date)).'"/>
458
+ ';
459
+ if ( intval($this->options['fb_article_dates_show'])==1 && trim($fb_article_mod_date)!='') $html.=' <meta property="article:modified_time" content="'.trim(esc_attr($fb_article_mod_date)).'" />
460
+ <meta property="og:updated_time" content="'.trim(esc_attr($fb_article_mod_date)).'" />
461
+ ';
462
+ //Sections
463
+ if (intval($this->options['fb_article_sections_show'])==1 && isset($fb_sections) && is_array($fb_sections) && count($fb_sections)>0) {
464
+ foreach($fb_sections as $fb_section) {
465
+ $html.=' <meta property="article:section" content="'.trim(esc_attr($fb_section)).'"/>
466
+ ';
467
+ }
468
+ }
469
+ //Author
470
+ if ( intval($this->options['fb_author_show'])==1 && $fb_author!='') $html.=' <meta property="article:author" content="'.trim(esc_attr($fb_author)).'"/>
471
+ ';
472
+ //Publisher
473
+ if ( intval($this->options['fb_publisher_show'])==1 && trim($fb_publisher)!='') $html.=' <meta property="article:publisher" content="'.trim(esc_attr($fb_publisher)).'"/>
474
+ ';
475
+ //App ID
476
+ if ( intval($this->options['fb_app_id_show'])==1 && trim($this->options['fb_app_id'])!='' ) $html.=' <meta property="fb:app_id" content="'.trim(esc_attr($this->options['fb_app_id'])).'"/>
477
+ ';
478
+ //Admins
479
+ if ( intval($this->options['fb_admin_id_show'])==1 && trim($this->options['fb_admin_id'])!='' ) $html.=' <meta property="fb:admins" content="'.trim(esc_attr($this->options['fb_admin_id'])).'"/>
480
+ ';
481
+ // Schema
482
+ $html.=' <!-- Google+ / Schema.org -->
483
+ ';
484
+ //Title
485
+ if ( intval($this->options['fb_title_show_schema'])==1 && trim($fb_title)!='' ) $html.=' <meta itemprop="name" content="'.trim(esc_attr($fb_title)).'"/>
486
+ ';
487
+ //Description
488
+ if ( intval($this->options['fb_desc_show_schema'])==1 && trim($fb_desc)!='' ) $html.=' <meta itemprop="description" content="'.trim(esc_attr($fb_desc)).'"/>
489
+ ';
490
+ //Image
491
+ if( intval($this->options['fb_image_show_schema'])==1 && trim($fb_image)!='' ) $html.=' <meta itemprop="image" content="'.trim(esc_attr($fb_image)).'"/>
492
+ ';
493
+ //Author
494
+ if ( intval($this->options['fb_author_show_linkrelgp'])==1 && trim($fb_author_linkrelgp)!='') $html.=' <link rel="author" href="'.trim(esc_attr($fb_author_linkrelgp)).'"/>
495
+ ';
496
+ //Publisher
497
+ if ( intval($this->options['fb_publisher_show_schema'])==1 && trim($fb_publisher_schema)!='') $html.=' <link rel="publisher" href="'.trim(esc_attr($fb_publisher_schema)).'"/>
498
+ ';
499
+ // Twitter
500
+ $html.=' <!-- Twitter Cards -->
501
+ ';
502
+ //Title
503
+ if ( intval($this->options['fb_title_show_twitter'])==1 && trim($fb_title)!='' ) $html.=' <meta name="twitter:title" content="'.trim(esc_attr($fb_title)).'"/>
504
+ ';
505
+ //URL
506
+ if ( intval($this->options['fb_url_show_twitter'])==1 && trim($fb_url)!='' ) $html.=' <meta name="twitter:url" content="'.trim(esc_attr($fb_url)).'"/>
507
+ ';
508
+ //Description
509
+ if ( intval($this->options['fb_desc_show_twitter'])==1 && trim($fb_desc)!='' ) $html.=' <meta name="twitter:description" content="'.trim(esc_attr($fb_desc)).'"/>
510
+ ';
511
+ //Image
512
+ if( intval($this->options['fb_image_show_twitter'])==1 && trim($fb_image)!='' ) $html.=' <meta name="twitter:image" content="'.trim(esc_attr($fb_image)).'"/>
513
+ ';
514
+ //Twitter Card
515
+ if( intval($this->options['fb_title_show_twitter'])==1 || intval($this->options['fb_url_show_twitter'])==1 || intval($this->options['fb_desc_show_twitter'])==1 || intval($this->options['fb_publisher_show_twitter'])==1 || intval($this->options['fb_image_show_twitter'])==1 ) $html.=' <meta name="twitter:card" content="'.trim(esc_attr($this->options['fb_twitter_card_type'])).'"/>
516
+ ';
517
+ //Author
518
+ if ( intval($this->options['fb_author_show_twitter'])==1 && trim($fb_author_twitter)!='' ) $html.=' <meta name="twitter:creator" content="@'.trim(esc_attr( $fb_author_twitter )).'"/>
519
+ ';
520
+ //Publisher
521
+ if ( intval($this->options['fb_publisher_show_twitter'])==1 && trim($fb_publisher_twitteruser)!='') $html.=' <meta name="twitter:site" content="@'.trim(esc_attr($fb_publisher_twitteruser)).'"/>
522
+ ';
523
+ // SEO
524
+ $html.=' <!-- SEO -->
525
+ ';
526
+ //Title
527
+ if ( intval($fb_set_title_tag)==1 && trim($fb_title)!='' ) {
528
+ //Does nothing so far. We try to create the <title> tag but it's too late now
529
+ //We should use wp_title(), but do we want to? This is only because Business Directory Plugin and they seem to have it covered by now...
530
+ }
531
+ //URL
532
+ if ( intval($this->options['fb_url_canonical'])==1 ) $html.=' <link rel="canonical" href="'.trim(esc_attr($fb_url)).'"/>
533
+ ';
534
+ //Description
535
+ if ( intval($this->options['fb_desc_show_meta'])==1 && trim($fb_desc)!='' ) $html.=' <meta name="description" content="'.trim(esc_attr($fb_desc)).'"/>
536
+ ';
537
+ //Author
538
+ if (intval($this->options['fb_author_show_meta'])==1 && $fb_author_meta!='') $html.=' <meta name="author" content="'.trim(esc_attr($fb_author_meta)).'"/>
539
+ ';
540
+ //Publisher
541
+ if ( intval($this->options['fb_publisher_show_meta'])==1 ) $html.=' <meta name="publisher" content="'.trim(esc_attr(get_bloginfo('name' ))).'"/>
542
+ ';
543
+ // SEO
544
+ $html.=' <!-- Misc. tags -->
545
+ ';
546
+ foreach ($fb_additional_tags as $type => $tags) {
547
+ foreach($tags as $tag => $values) {
548
+ foreach($values as $value) {
549
+ $html.=' <meta '.$type.'="'.str_replace('_', ':', trim($tag)).'" content="'.trim(esc_attr($value)).'"/>
550
+ ';
551
+ }
552
+ }
553
+ }
554
+
555
+ //Close tag
556
+ $html.='<!-- END - '.WEBDADOS_FB_PLUGIN_NAME.' '.WEBDADOS_FB_VERSION.' -->
557
+
558
+ ';
559
+ echo $html;
560
+
561
+ }
562
+
563
+
564
+
565
+ /* Get post image - Singular pages */
566
+ private function get_post_image() {
567
+ global $post;
568
+ $thumbdone = false;
569
+ $fb_image = '';
570
+ $minsize = intval($this->options['fb_image_min_size']);
571
+ //Attachment page? - This overrides the other options
572
+ if ( is_attachment() ) {
573
+ if ( $temp=wp_get_attachment_image_src(null, 'full' ) ) {
574
+ $fb_image = trim($temp[0]);
575
+ $img_size = array(intval($temp[1]), intval($temp[2]));
576
+ if ( trim($fb_image)!='' ) {
577
+ $thumbdone=true;
578
+ }
579
+ }
580
+ }
581
+ //Specific post image
582
+ if ( !$thumbdone ) {
583
+ if ( intval($this->options['fb_image_use_specific'])==1 ) {
584
+ if ( $fb_image = trim(get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true)) ) {
585
+ if ( trim($fb_image)!='' ) {
586
+ $thumbdone=true;
587
+ }
588
+ }
589
+ }
590
+ }
591
+ //Featured image
592
+ if ( !$thumbdone ) {
593
+ if ( function_exists('get_post_thumbnail_id' ) ) {
594
+ if ( intval($this->options['fb_image_use_featured'])==1 ) {
595
+ if ( $id_attachment=get_post_thumbnail_id($post->ID) ) {
596
+ //There's a featured/thumbnail image for this post
597
+ $fb_image = wp_get_attachment_url($id_attachment, false);
598
+ $thumbdone = true;
599
+ }
600
+ }
601
+ }
602
+ }
603
+ //From post/page content
604
+ if ( !$thumbdone ) {
605
+ if ( intval($this->options['fb_image_use_content'])==1 ) {
606
+ $imgreg = '/<img .*src=["\']([^ ^"^\']*)["\']/';
607
+ preg_match_all($imgreg, trim($post->post_content), $matches);
608
+ if ($matches[1]) {
609
+ $imagetemp=false;
610
+ foreach($matches[1] as $image) {
611
+ //There's an image on the content
612
+ $pos = strpos($image, site_url());
613
+ if ($pos === false) {
614
+ if (stristr($image, 'http://' ) || stristr($image, 'https://' ) || mb_substr($image, 0, 2)=='//' ) {
615
+ if (mb_substr($image, 0, 2)=='//' ) $image=((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ) ? 'https:' : 'http:' ).$image;
616
+ //Complete URL - offsite
617
+ //if ( intval(ini_get('allow_url_fopen' ))==1 ) {
618
+ $imagetemp=$image;
619
+ $imagetempsize=$imagetemp;
620
+ //} else {
621
+ //If it's offsite we can't getimagesize'it, so we won't use it
622
+ //We could save a temporary version locally and then getimagesize'it but do we want to do this every single time?
623
+ //}
624
+ } else {
625
+ //Partial URL - we guess it's onsite because no http(s)://
626
+ $imagetemp=site_url().$image;
627
+ $imagetempsize=(
628
+ intval(ini_get('allow_url_fopen' ))==1
629
+ ?
630
+ (
631
+ intval($this->options['fb_adv_force_local'])==1
632
+ ?
633
+ ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
634
+ :
635
+ $imagetemp
636
+ )
637
+ :
638
+ ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
639
+ );
640
+ }
641
+ } else {
642
+ //Complete URL - onsite
643
+ $imagetemp=$image;
644
+ $imagetempsize=(
645
+ intval(ini_get('allow_url_fopen' ))==1
646
+ ?
647
+ (
648
+ intval($this->options['fb_adv_force_local'])==1
649
+ ?
650
+ ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
651
+ :
652
+ $imagetemp
653
+ )
654
+ :
655
+ ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
656
+ );
657
+ }
658
+ if ($imagetemp) {
659
+ if ($img_size = $this->get_open_graph_image_size($imagetempsize)) {
660
+ if ($img_size[0] >= $minsize && $img_size[1] >= $minsize) {
661
+ $fb_image = $imagetemp;
662
+ $thumbdone = true;
663
+ break;
664
+ }
665
+ }
666
+ }
667
+ }
668
+ }
669
+ }
670
+ }
671
+ //From media gallery
672
+ if ( !$thumbdone ) {
673
+ if ( intval($this->options['fb_image_use_media'])==1 ) {
674
+ $images = get_posts(array('post_type' => 'attachment','numberposts' => -1,'post_status' => null,'order' => 'ASC','orderby' => 'menu_order','post_mime_type' => 'image','post_parent' => $post->ID));
675
+ if ( $images ) {
676
+ foreach( $images as $image ) {
677
+ $imagetemp = wp_get_attachment_url($image->ID, false);
678
+ $imagetempsize = (
679
+ intval(ini_get('allow_url_fopen' ))==1
680
+ ?
681
+ (
682
+ intval($this->options['fb_adv_force_local'])==1
683
+ ?
684
+ ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
685
+ :
686
+ $imagetemp
687
+ )
688
+ :
689
+ ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
690
+ );
691
+ if ( $img_size = $this->get_open_graph_image_size($imagetempsize) ) {
692
+ if ($img_size[0] >= $minsize && $img_size[1] >= $minsize) {
693
+ $fb_image = $imagetemp;
694
+ $thumbdone = true;
695
+ break;
696
+ }
697
+ }
698
+ }
699
+ }
700
+ }
701
+ }
702
+ //From default
703
+ if ( !$thumbdone ) {
704
+ if ( intval($this->options['fb_image_use_default'])==1 ) {
705
+ //Well... We sure did try. We'll just keep the default one!
706
+ $fb_image = $this->options['fb_image'];
707
+ } else {
708
+ //User chose not to use default on pages/posts
709
+ $fb_image = '';
710
+ }
711
+ }
712
+ //Return
713
+ return $fb_image;
714
+
715
+ }
716
+
717
+
718
+ /* Image with overlay URL */
719
+ private function get_image_with_overlay($fb_image) {
720
+ $fb_image_parsed = parse_url($fb_image);
721
+ //Only if the image is hosted locally
722
+ if ( $fb_image_parsed['host']==$_SERVER['HTTP_HOST'] ) {
723
+ $fb_image = plugins_url('/wonderm00ns-simple-facebook-open-graph-tags/fbimg.php?img='.urlencode($fb_image));
724
+ return array(
725
+ 'overlay' => true,
726
+ 'fb_image' => $fb_image,
727
+ );
728
+ }
729
+ return array(
730
+ 'overlay' => false,
731
+ 'fb_image' => $fb_image,
732
+ );
733
+ }
734
+
735
+
736
+
737
+ /* Get image size */
738
+ private function get_open_graph_image_size( $image ) {
739
+ if ( stristr($image, 'http://' ) || stristr($image, 'https://' ) || mb_substr($image, 0, 2)=='//' ) {
740
+ if ( function_exists('curl_version' ) && function_exists('imagecreatefromstring' ) ) {
741
+ //We'll get just a part of the image to speed things up. From http://stackoverflow.com/questions/4635936/super-fast-getimagesize-in-php
742
+ $headers = array(
743
+ "Range: bytes=0-32768"
744
+ );
745
+ $curl = curl_init($image);
746
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
747
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
748
+ //Set HTTP REFERER and USER AGENT just in case. Some servers may have hotlinking protection
749
+ curl_setopt($curl, CURLOPT_REFERER, ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ) ? 'https://' : 'http://' ).$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
750
+ curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
751
+ if ( $data = curl_exec($curl) ) {
752
+ if ( $im = @imagecreatefromstring($data) ) { //Mute errors because we're not loading the all image
753
+ if ( $x=imagesx($im) ) {
754
+ //We have to fake the image type - For RSS
755
+ $ext = pathinfo($image, PATHINFO_EXTENSION);
756
+ switch(strtolower($ext)) {
757
+ case 'gif':
758
+ $type=1;
759
+ break;
760
+ case 'jpg':
761
+ case 'jpeg':
762
+ $type=2;
763
+ break;
764
+ case 'png':
765
+ $type=3;
766
+ break;
767
+ default:
768
+ $type=2;
769
+ break;
770
+ }
771
+ $img_size = array($x, imagesy($im), $type, '' );
772
+ } else {
773
+ $img_size = false;
774
+ }
775
+ } else {
776
+ $img_size = false;
777
+ }
778
+ } else {
779
+ $img_size = false;
780
+ }
781
+ curl_close($curl);
782
+ } else {
783
+ if ( intval(ini_get('allow_url_fopen' ))==1 ) {
784
+ $img_size = getimagesize($image);
785
+ } else {
786
+ //We give up!
787
+ $img_size = false;
788
+ }
789
+ }
790
+ } else {
791
+ //Local path
792
+ $img_size = getimagesize($image);
793
+ }
794
+ $this->image_size = $img_size;
795
+ return $img_size;
796
+ }
797
+
798
+
799
+
800
+ /* Add Open Graph Namespace */
801
+ public function add_open_graph_namespace($output) {
802
+ if (stristr($output,'xmlns:og' )) {
803
+ //Already there
804
+ } else {
805
+ //Let's add it
806
+ $output=$output . ' xmlns:og="http://ogp.me/ns#"';
807
+ }
808
+ if (stristr($output,'xmlns:fb' )) {
809
+ //Already there
810
+ } else {
811
+ //Let's add it
812
+ $output=$output . ' xmlns:fb="http://ogp.me/ns/fb#"';
813
+ }
814
+ return $output;
815
+ }
816
+
817
+
818
+
819
+ /* Images on feed */
820
+ public function images_on_feed_yahoo_media_tag() {
821
+ if ( intval($this->options['fb_image_rss'])==1 ) {
822
+ //Even if it's comments feed, not a problem
823
+ echo 'xmlns:media="http://search.yahoo.com/mrss/"';
824
+ }
825
+ }
826
+ public function images_on_feed_image() {
827
+ if ( intval($this->options['fb_image_rss'])==1 ) {
828
+ //Only runs on posts feed, not comments, so cool!
829
+ $fb_image = $this->get_post_image();
830
+ if ( $fb_image!='' ) {
831
+ $uploads = wp_upload_dir();
832
+ $url = parse_url($fb_image);
833
+ $path = $uploads['basedir'] . preg_replace( '/.*uploads(.*)/', '${1}', $url['path'] );
834
+ if ( file_exists($path) ) {
835
+ $filesize = filesize($path);
836
+ $url = $path;
837
+ } else {
838
+ $header = get_headers($fb_image, 1);
839
+ $filesize = $header['Content-Length'];
840
+ $url = $fb_image;
841
+ }
842
+ list( $width, $height, $type, $attr ) = $this->get_open_graph_image_size( $url );
843
+ echo '<enclosure url="' . $fb_image . '" length="' . $filesize . '" type="'.image_type_to_mime_type($type).'"/>';
844
+ echo '<media:content url="'.$fb_image.'" width="'.$width.'" height="'.$height.'" medium="image" type="'.image_type_to_mime_type($type).'"/>';
845
+ }
846
+ }
847
+ }
848
+
849
+
850
+
851
+ }
852
+
853
+ ?>
public/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
readme.txt CHANGED
@@ -4,17 +4,17 @@ Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-faceb
4
  Tags: facebook, open graph, open graph protocol, share, social, meta, rss, twitter card, twitter, schema, google+, g+, google, google plus, image, like, seo, search engine optimization, woocommerce, yoast seo, subheading, php7
5
  Requires at least: 4.0
6
  Tested up to: 4.6.1
7
- Stable tag: 1.7.4.4
8
- Inserts Facebook Open Graph, Google+/Schema.org, Twitter and other Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
11
 
12
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective and efficient Facebook sharing results.
13
 
14
- It also allows you to add the Meta Description tag and Schema.org Name, Description and Image tags for more effective and efficient Google+ sharing results.
15
-
16
  It also allows you to add the Twitter Card tags for more effective and efficient Twitter sharing results.
17
 
 
 
18
  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.
19
 
20
  It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
@@ -23,52 +23,54 @@ BETA: It's also possible to add a overlay logo to the image. The plugin will res
23
 
24
  = The (Facebook) Open Graph Tags that this plugin inserts are: =
25
 
26
- * **fb:app_id**: From settings on the options screen.
27
- * **fb:admins**: From settings on the options screen.
28
- * **og:locale**: From Wordpress locale or chosen by the user.
29
- * **og:site_name**: From blog title.
30
  * **og:title**: From post/page/archive/tag/... title.
 
31
  * **og:url**: From the post/page permalink.
 
 
 
32
  * **og:type**: "website" or "blog" for the homepage, "product" for WooCommerce products and "article" for all the others.
 
33
  * **article:published_time**: Article published time (for posts only)
34
  * **article:modified_time** and **og:updated_time**: Article modified time (for posts only)
35
- * **article:publisher**: From settings on the options screen.
36
  * **article:section**: From post categories.
37
- * **article:author**: From the user (post author) Faceboook Profile URL.
38
- * **og:description**: From post/page excerpt if it exist, or from post/page content. From category/tag description on it's pages, if it exist. From tagline, or custom text, on all the others.
39
- * **og:image**: From a specific custom field of the post/page, or if not set from the post/page featured/thumbnail image, or if it doesn't exist from the first image in the post content, or if it doesn't exist from the first image on the post media gallery, or if it doesn't exist from the default image defined on the options menu. The same image chosen here will be used and enclosure/media:content on the RSS feed.
40
- * **og:image:width** and **og:image:height**: Image dimensions.
41
  * **og:price:amount** and **og:price:currency**: Price on WooCommerce products.
42
 
43
- = The (Google+) Schema.org Tags that this plugin inserts are: =
44
-
45
- * **name**: Same as "og:title".
46
- * **author**: From the user (post author) Google+ profile URL.
47
- * **description**: Same as "og:description".
48
- * **image**: Same as "og:image".
49
-
50
  = The Twitter Card Tags that this plugin inserts are: =
51
 
52
- * **twitter:title**: Same as "og:title".
53
- * **twitter:url**: Sames as "ug:url".
54
- * **twitter:site**: The website twitter account.
 
55
  * **twitter:creator**: From the user (post author) Twitter account.
56
- * **twitter:description**: Same as "og:description".
57
- * **twitter:image:src**: Same as "og:image".
58
- * **twitter:card:src**: With value "summary_large_image" or "summary".
 
 
 
 
 
 
 
59
 
60
  = Other Tags: =
61
 
 
 
62
  * **meta author**: From the user (post author) Display Name.
63
- * **link rel author**: From the user (post author) Google+ Profile URL.
64
- * **meta description**: Same as "og:description".
65
- * **enclosure**: On RSS feeds, same as "og:image".
66
- * **media:content**: On RSS feeds, same as "og:image".
67
 
68
  = 3rd Party Integration: =
69
 
70
- * **[WordPress SEO by Yoast](http://wordpress.org/plugins/wordpress-seo/)**: Allows you to use title, url (canonical) and description from WPSEO plugin.
71
- * **[WooCommerce](https://wordpress.org/plugins/woocommerce/)**: On product pages sets `og:type` to `product` and adds the price including tax to the `product:price` tags. Also allows you to use the Product Category thumbnails as Open Graph Image and have Product Gallery images as additional Open Graph Images
72
  * **[SubHeading](http://wordpress.org/extend/plugins/subheading/)**: Add the SubHeading to the post/page title.
73
  * **[Business Directory Plugin](http://wordpress.org/extend/plugins/business-directory-plugin/)**: Allows you to use BDP listing contents as Open Graph Tags.
74
 
@@ -81,17 +83,17 @@ BETA: It's also possible to add a overlay logo to the image. The plugin will res
81
 
82
  == Frequently Asked Questions ==
83
 
84
- = WordPress SEO (by Yoast) shows up a big nasty warning if both plugins are active. Is the world in danger if I keep both plugins active? =
85
 
86
  No it isn't.
87
- You can (and, in our opinion, you should) use both plugins. If you want to use WordPress SEO for your SEO needs and our plugin for social media meta tags you just have to go to `SEO - Social` and disable settings for Facebook, Twitter and Google+. Then set up our plugin as you wish and you're ready to go.
88
- We like to work with everybody, so (if you want to) our plugin can even integrate with WordPress SEO and use it's title, description and canonical URL.
89
 
90
  = Facebook is not showing up the correct image when I share a post. What can I do? =
91
 
92
  1. Are you using a big enough image? The minimum image size is 200x200 pixels but we recommend 1200x630.
93
- 2. Are you sure you only have one og:image tag on the source code? Make sure you're not using more than one plugin to set OG tags?
94
- 3. Go to the [Facebook URL Debugger](https://developers.facebook.com/tools/debug/), insert your URL, click `Debug`. Then click on `Fetch new scrape information` to make sure Facebook gets the current version of your HTML code and not a cached version. If the image that shows up on the preview (bottom of the page) is the correct one, then the tags are well set and it "should" be the one that Facebook uses when sharing the post. If it still does not use the correct image when sharing, despite the debugger shows it correctly, there's nothing more we can do about that. That's just Facebook being Facebook.
95
 
96
  = When I save/edit my post I get the "Facebook Open Graph Tags cache NOT updated/purged" error. Should I worry? =
97
 
@@ -104,6 +106,9 @@ If this is not a new post and it's not the first time you're saving it, and if t
104
  If there's a popular plugin you think we could get content from to use on the meta tags, use the support forum to tell us that.
105
  If you are a plugin or theme author you can always use our filters `fb_og_title`, `fb_og_desc`, `fb_og_url`, `fb_og_type`, `fb_og_image`, `fb_og_image_additional` and `fb_og_locale` to customize the Open Graph (and other) meta tags output.
106
 
 
 
 
107
  = Do you provide email support? =
108
 
109
  We DO NOT provide email support for this plugin. If you send us an email asking for support you'll be invited to:
@@ -112,42 +117,53 @@ We DO NOT provide email support for this plugin. If you send us an email asking
112
 
113
  == Changelog ==
114
 
 
 
 
 
 
 
 
 
 
 
 
115
  = 1.7.4.4 =
116
- - Bug fix: WooCommerce price integration wasn't working on WooCommerce >= 2.6 (Thanks @jluisfreitas)
117
- - Bumped `Tested up to` tag
118
 
119
  = 1.7.4.3 =
120
- - Version number fix
121
- - Portuguese translation update
122
 
123
  = 1.7.4.2 =
124
- - Overlay PNG will only be used on locally hosted images
125
- - New `fb_og_image_overlay` filter to be able to disable Overlay PNG programatically based on whatever needs of the developer
126
- - Better texts about the Overlay PNG function on the settings page
127
- - Minor fixes
128
 
129
  = 1.7.4.1 =
130
- - WooCommerce integration: on product pages sets `og:type` to `product` and adds the price including tax to the `product:price` tags
131
 
132
  = 1.7.4 =
133
- - New beta feature: Add overlay PNG logo to the image
134
- - Minor fixes
135
 
136
  = 1.7.3.1 =
137
- - Fix: changed `twitter:image:src` meta name to `twitter:image` (Thanks mahler83)
138
- - Tested with WordPres 4.5 RC2
139
 
140
  = 1.7.3 =
141
- - Avoid php notice on the "Members" plugin role edit page
142
 
143
  = 1.7.2 =
144
- - Better SubHeading plugin compatibility (choose either to add it Before or After the title)
145
- - Description set the same value as the title if it's empty
146
- - Correct og:type for WPML root pages
147
- - Added the fb_og_type filter so that plugins or themes can override the Open Graph Type
148
 
149
  = 1.7.1 =
150
- - Added the fb_og_url filter so that plugins or themes can override the Open Graph URL
151
 
152
  = 1.7 =
153
  * WordPress 4.4, WooCommerce 2.4.12 and PHP 7 compatibility check - All good!
@@ -157,26 +173,26 @@ We DO NOT provide email support for this plugin. If you send us an email asking
157
  * Several tweaks on the settings page
158
 
159
  = 1.6.3 =
160
- - Added the fb_og_locale filter so that plugins or themes can override the Open Graph locale tag
161
 
162
  = 1.6.2.2 =
163
- - Bug fix: Google+, Twitter and Facebook profile fields would not be available on the user profile if Yoast SEO was not active
164
 
165
  = 1.6.2.1 =
166
- - Fix: Eliminates php notices introduced on 1.6.2
167
 
168
  = 1.6.2 =
169
- - Fix: Replaces all spaces by %20 on URLs (og:url, og:image, etc...), thanks to "Doc75"
170
 
171
  = 1.6.1 =
172
  * WPML compatibility: If the frontpage is set as "latest posts" and a custom homepage description is used, it can now be translated to other languages in WPML - String translation
173
 
174
  = 1.6 =
175
- * Added og:image:width and og:image:height tags if Facebook is having problems loading the image when the post is shared for the first time
176
  * Added the possibility to choose the Twitter Card Type
177
  * It's now possible to hide the author tags on pages
178
  * Fix: SubHeading plugin was not found on multisite
179
- * Fix: On the image attachment pages the og:image tag was not correctly set
180
  * Fix: Several PHP notices fixed
181
  * Updated FacebookLocales.xml
182
 
@@ -246,7 +262,7 @@ We DO NOT provide email support for this plugin. If you send us an email asking
246
 
247
  = 1.1 =
248
 
249
- * WordPress SEO by Yoast integration: title, url (canonical) and description can now be fetched from this very popular SEO plugin
250
  * Fix: small fix on javascript
251
 
252
  = 1.0.1 =
@@ -263,9 +279,9 @@ We DO NOT provide email support for this plugin. If you send us an email asking
263
  * Portuguese translation added (we welcome other translations if you want to do it)
264
  * Added webdados as contributor (Wonderm00n's company)
265
  * Fix: Several PHP warnings when WP_DEBUG is turned on. Thanks to @flynsarmy (yet again)
266
- * Fix: og:type was not set correctly for the homepage in case it was a static page. Thanks to yakitori
267
- * Fix: When the site url was not the same as the wordpress installation folder the wrong url was used in the homepage og:url/canonical tag. Thanks to theonetruebix
268
- * Using the requested url as og:urgl/canonical on not known areas of wordpress. Not really a canonical url but better than using the homepage one
269
 
270
  = 0.5.4 =
271
 
@@ -297,11 +313,11 @@ We DO NOT provide email support for this plugin. If you send us an email asking
297
 
298
  = 0.4.3 =
299
 
300
- * Fixed a bug where the original, Wordpress stock, Canonical URL was not being removed.
301
 
302
  = 0.4.2 =
303
 
304
- * If using the "Business Directory Plugin" integration, the "og:url" tag is now correctly set in the category listing pages.
305
 
306
  = 0.4.1 =
307
 
@@ -309,7 +325,7 @@ We DO NOT provide email support for this plugin. If you send us an email asking
309
 
310
  = 0.4 =
311
 
312
- * "Business Directory Plugin" plugin integration. It's now possible to populate "og:title", "og:url", "og:description" and "og:image" tags with each listing details. If a featured image is set it will be used. If not, the listing main image is used.
313
 
314
  = 0.3.5 =
315
 
@@ -333,14 +349,14 @@ We DO NOT provide email support for this plugin. If you send us an email asking
333
 
334
  = 0.3 =
335
 
336
- * "SubHeading" plugin integration. It's now possible add this field to the "og:title" tag.
337
  * Changed the way defaults and user settings are loaded and saved, to "try" to eliminate the problem some users experienced where the user settings would disappear.
338
  * Bugfix: "Also add image to RSS/RSS2 feeds?" option was not being correctly loaded.
339
  * The plugin version is now showed both as a comment before the open graph tags and on the settings page.
340
 
341
  = 0.2.3 =
342
 
343
- * No changes. Had a problem updating to 0.2.2 on the Wordpress website.
344
 
345
  = 0.2.2 =
346
 
@@ -348,20 +364,20 @@ We DO NOT provide email support for this plugin. If you send us an email asking
348
 
349
  = 0.2.1 =
350
 
351
- * Bugfix: when the og:image is not hosted on the same domain as the website/blog.
352
 
353
  = 0.2 =
354
 
355
- * If the option is set to true, the same image obtained to the og:image will be added to the RSS feed on the "enclosure" and "media:content" tags so that apps like RSS Graffiti and twitterfeed post them correctly.
356
 
357
  = 0.1.9.5 =
358
 
359
- * It's now possible to choose how the post/page og:image tag is set. It means that if the user doesn't want to use the featured/thumbnail image, or the first image in the post content, or the first image on the media gallery, or even the default image, he can choose not to.
360
 
361
  = 0.1.9 =
362
 
363
- * Added the og:locale tag. This will be the Wordpress locale by default, but can be chosen by the user also.
364
- * The og:type tag can now be set as 'website' or 'blog' for the homepage.
365
  * A final trailing slash can now be added to the homepage url, if the user wants to. Avoids 'circular reference error' on the Facebook debugger.
366
 
367
 
@@ -371,8 +387,8 @@ We DO NOT provide email support for this plugin. If you send us an email asking
371
 
372
  = 0.1.8 =
373
 
374
- * Type 'website' was being used as default for all the urls beside posts. This is wrong. According to Facebook Open Graph specification only the homepage should be 'website' and all the other contents must bu 'article'. This was fixed.
375
- * On Category and Tags pages, their descriptions, if not blank, are used for the og:description tag.
376
  * If the description comes out empty, the title is used on this tag.
377
 
378
  = 0.1.7 =
@@ -389,13 +405,13 @@ We DO NOT provide email support for this plugin. If you send us an email asking
389
  = 0.1.5 =
390
 
391
  * Fixed the way Categories and Tags pages links were being retrieved that would cause an error on WP 3.0.
392
- * Added the option to use a Custom text as homepage og:description instead of the Website Tagline.
393
- * Fixed a bug that wouldn't allow to uncheck the og:image tag.
394
 
395
  = 0.1.4 =
396
 
397
- * Shortcodes are now stripped from og:description.
398
- * Changed og:app_id and og:admins not to be included by default.
399
 
400
  = 0.1.3 =
401
 
4
  Tags: facebook, open graph, open graph protocol, share, social, meta, rss, twitter card, twitter, schema, google+, g+, google, google plus, image, like, seo, search engine optimization, woocommerce, yoast seo, subheading, php7
5
  Requires at least: 4.0
6
  Tested up to: 4.6.1
7
+ Stable tag: 2.0
8
+ Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
11
 
12
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective and efficient Facebook sharing results.
13
 
 
 
14
  It also allows you to add the Twitter Card tags for more effective and efficient Twitter sharing results.
15
 
16
+ It also allows you to add the Meta Description tag and Schema.org Name, Description and Image tags for more effective and efficient Google+ sharing results.
17
+
18
  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.
19
 
20
  It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
23
 
24
  = The (Facebook) Open Graph Tags that this plugin inserts are: =
25
 
 
 
 
 
26
  * **og:title**: From post/page/archive/tag/... title.
27
+ * **og:site_name**: From blog title.
28
  * **og:url**: From the post/page permalink.
29
+ * **og:description**: From post/page excerpt if it exist, or from post/page content. From category/tag description on it's pages, if it exist. From tagline, or custom text, on all the others.
30
+ * **og:image**: From a specific custom field of the post/page, or if not set from the post/page featured/thumbnail image, or if it doesn't exist from the first image in the post content, or if it doesn't exist from the first image on the post media gallery, or if it doesn't exist from the default image defined on the options menu. The same image chosen here will be used and enclosure/media:content on the RSS feed.
31
+ * **og:image:width** and **og:image:height**: Image dimensions.
32
  * **og:type**: "website" or "blog" for the homepage, "product" for WooCommerce products and "article" for all the others.
33
+ * **article:author**: From the user (post author) Faceboook Profile URL.
34
  * **article:published_time**: Article published time (for posts only)
35
  * **article:modified_time** and **og:updated_time**: Article modified time (for posts only)
 
36
  * **article:section**: From post categories.
37
+ * **article:publisher**: The website Facebook Page URL.
38
+ * **og:locale**: From WordPress locale or chosen by the user.
39
+ * **fb:admins**: From settings on the options screen.
40
+ * **fb:app_id**: From settings on the options screen.
41
  * **og:price:amount** and **og:price:currency**: Price on WooCommerce products.
42
 
 
 
 
 
 
 
 
43
  = The Twitter Card Tags that this plugin inserts are: =
44
 
45
+ * **twitter:title**: Same as `og:title`.
46
+ * **twitter:url**: Sames as `og:url`.
47
+ * **twitter:description**: Same as `og:description`.
48
+ * **twitter:image**: Same as `og:image`.
49
  * **twitter:creator**: From the user (post author) Twitter account.
50
+ * **twitter:site**: The website Twitter account.
51
+ * **twitter:card**: With value "summary_large_image" or "summary".
52
+
53
+ = The (Google+) Schema.org Tags that this plugin inserts are: =
54
+
55
+ * **name**: Same as `og:title`.
56
+ * **description**: Same as `og:description`.
57
+ * **image**: Same as `og:image`.
58
+ * **author**: From the user (post author) Google+ profile URL.
59
+ * **publisher**: The website Google+ Page URL.
60
 
61
  = Other Tags: =
62
 
63
+ * **canonical**: Same as `og:url`.
64
+ * **meta description**: Same as `og:description`.
65
  * **meta author**: From the user (post author) Display Name.
66
+ * **meta publisher**: From the website title.
67
+ * **enclosure**: On RSS feeds, same as `og:image`.
68
+ * **media:content**: On RSS feeds, same as `og:image`.
 
69
 
70
  = 3rd Party Integration: =
71
 
72
+ * **[Yoast SEO](http://wordpress.org/plugins/wordpress-seo/)**: Allows you to use title, url (canonical) and description from the Yoast SEO plugin.
73
+ * **[WooCommerce](https://wordpress.org/plugins/woocommerce/)**: On product pages sets `og:type` to "product" and adds the price including tax to the `product:price` tags. Also allows you to use the Product Category thumbnails as Open Graph Image and have Product Gallery images as additional Open Graph Images
74
  * **[SubHeading](http://wordpress.org/extend/plugins/subheading/)**: Add the SubHeading to the post/page title.
75
  * **[Business Directory Plugin](http://wordpress.org/extend/plugins/business-directory-plugin/)**: Allows you to use BDP listing contents as Open Graph Tags.
76
 
83
 
84
  == Frequently Asked Questions ==
85
 
86
+ = Yoast SEO shows up a big nasty warning if both plugins are active. Is the world in danger if I keep both plugins active? =
87
 
88
  No it isn't.
89
+ You can (and, in our opinion, you should) use both plugins. If you want to use Yoast SEO for your SEO needs and our plugin for social media meta tags you just have to go to `SEO - Social` and disable settings for Facebook, Twitter and Google+. Then set up our plugin as you wish and you're ready to go.
90
+ We like to work with everybody, so (if you want to) our plugin can even integrate with Yoast SEO and use it's title, description and canonical URL.
91
 
92
  = Facebook is not showing up the correct image when I share a post. What can I do? =
93
 
94
  1. Are you using a big enough image? The minimum image size is 200x200 pixels but we recommend 1200x630.
95
+ 2. Are you sure you only have one `og:image` tag on the source code? Make sure you're not using more than one plugin to set OG tags?
96
+ 3. Go to the [Facebook URL Debugger](https://developers.facebook.com/tools/debug/), insert your URL, click `Debug`. Then click on `Scrape again` to make sure Facebook gets the current version of your HTML code and not a cached version. If the image that shows up on the preview (bottom of the page) is the correct one, then the tags are well set and it "should" be the one that Facebook uses when sharing the post. If it still does not use the correct image when sharing, despite the debugger shows it correctly, there's nothing more we can do about that. That's just Facebook being Facebook.
97
 
98
  = When I save/edit my post I get the "Facebook Open Graph Tags cache NOT updated/purged" error. Should I worry? =
99
 
106
  If there's a popular plugin you think we could get content from to use on the meta tags, use the support forum to tell us that.
107
  If you are a plugin or theme author you can always use our filters `fb_og_title`, `fb_og_desc`, `fb_og_url`, `fb_og_type`, `fb_og_image`, `fb_og_image_additional` and `fb_og_locale` to customize the Open Graph (and other) meta tags output.
108
 
109
+ = There's a similar plugin on the repository, by Heateor. Is this the same? =
110
+ It's similar, yes. They've forked our plugin and gave no credits whatsoever for our original work.
111
+
112
  = Do you provide email support? =
113
 
114
  We DO NOT provide email support for this plugin. If you send us an email asking for support you'll be invited to:
117
 
118
  == Changelog ==
119
 
120
+ = 2.0 =
121
+ * We would like to thank Heateor, "a creative team with unique ideas in mind" (their words), for forking our plugin (although no credits whatsoever were made regarding our original work), and thus trully inspiring us to make this new version, using also their "unique" ideas, in the spirit of GPL, but giving them the deserved credit in the spirit of civism, integrity and the WordPress way of doing things
122
+ * Revised and optimized code with better WordPress standards and best practices
123
+ * Completely redesigned settings screen
124
+ * Fixed Business Directory Plugin integration (only works with CPT integration activated)
125
+ * Removed Google authorship (link rel="author") tag because **[it isn't used anymore](https://support.google.com/webmasters/answer/6083347)**
126
+ * Added meta `publisher` tag
127
+ * New option to either keep or delete plugin configurations upon uninstall
128
+ * Fixed a bug where a custom taxonomy description was not being correctly set
129
+ * Fixed `og:price:amount` and `og:price:currency` tags now correctly set as `property` instead of `name`
130
+
131
  = 1.7.4.4 =
132
+ * Bug fix: WooCommerce price integration wasn't working on WooCommerce >= 2.6 (Thanks @jluisfreitas)
133
+ * Bumped `Tested up to` tag
134
 
135
  = 1.7.4.3 =
136
+ * Version number fix
137
+ * Portuguese translation update
138
 
139
  = 1.7.4.2 =
140
+ * Overlay PNG will only be used on locally hosted images
141
+ * New `fb_og_image_overlay` filter to be able to disable Overlay PNG programatically based on whatever needs of the developer
142
+ * Better texts about the Overlay PNG function on the settings page
143
+ * Minor fixes
144
 
145
  = 1.7.4.1 =
146
+ * WooCommerce integration: on product pages sets `og:type` to "product" and adds the price including tax to the `product:price` tags
147
 
148
  = 1.7.4 =
149
+ * New beta feature: Add overlay PNG logo to the image
150
+ * Minor fixes
151
 
152
  = 1.7.3.1 =
153
+ * Fix: changed `twitter:image:src` meta name to `twitter:image` (Thanks mahler83)
154
+ * Tested with WordPres 4.5 RC2
155
 
156
  = 1.7.3 =
157
+ * Avoid php notice on the "Members" plugin role edit page
158
 
159
  = 1.7.2 =
160
+ * Better SubHeading plugin compatibility (choose either to add it Before or After the title)
161
+ * Description set the same value as the title if it's empty
162
+ * Correct `og:type` for WPML root pages
163
+ * Added the fb_og_type filter so that plugins or themes can override the Open Graph Type
164
 
165
  = 1.7.1 =
166
+ * Added the fb_og_url filter so that plugins or themes can override the Open Graph URL
167
 
168
  = 1.7 =
169
  * WordPress 4.4, WooCommerce 2.4.12 and PHP 7 compatibility check - All good!
173
  * Several tweaks on the settings page
174
 
175
  = 1.6.3 =
176
+ * Added the fb_og_locale filter so that plugins or themes can override the Open Graph locale tag
177
 
178
  = 1.6.2.2 =
179
+ * Bug fix: Google+, Twitter and Facebook profile fields would not be available on the user profile if Yoast SEO was not active
180
 
181
  = 1.6.2.1 =
182
+ * Fix: Eliminates php notices introduced on 1.6.2
183
 
184
  = 1.6.2 =
185
+ - Fix: Replaces all spaces by %20 on URLs (`og:url`, `og:image`, etc...), thanks to "Doc75"
186
 
187
  = 1.6.1 =
188
  * WPML compatibility: If the frontpage is set as "latest posts" and a custom homepage description is used, it can now be translated to other languages in WPML - String translation
189
 
190
  = 1.6 =
191
+ * Added `og:image:width` and `og:image:height` tags if Facebook is having problems loading the image when the post is shared for the first time
192
  * Added the possibility to choose the Twitter Card Type
193
  * It's now possible to hide the author tags on pages
194
  * Fix: SubHeading plugin was not found on multisite
195
+ * Fix: On the image attachment pages the `og:image` tag was not correctly set
196
  * Fix: Several PHP notices fixed
197
  * Updated FacebookLocales.xml
198
 
262
 
263
  = 1.1 =
264
 
265
+ * WordPress SEO by Yoast, now Yoast SEO, integration: title, url (canonical) and description can now be fetched from this very popular SEO plugin
266
  * Fix: small fix on javascript
267
 
268
  = 1.0.1 =
279
  * Portuguese translation added (we welcome other translations if you want to do it)
280
  * Added webdados as contributor (Wonderm00n's company)
281
  * Fix: Several PHP warnings when WP_DEBUG is turned on. Thanks to @flynsarmy (yet again)
282
+ * Fix: `og:type` was not set correctly for the homepage in case it was a static page. Thanks to yakitori
283
+ * Fix: When the site url was not the same as the WordPress installation folder the wrong url was used in the homepage `og:url`/`canonical` tag. Thanks to theonetruebix
284
+ * Using the requested url as `og:url`/`canonical` on not known areas of WordPress. Not really a canonical url but better than using the homepage one
285
 
286
  = 0.5.4 =
287
 
313
 
314
  = 0.4.3 =
315
 
316
+ * Fixed a bug where the original, WordPress stock, Canonical URL was not being removed.
317
 
318
  = 0.4.2 =
319
 
320
+ * If using the "Business Directory Plugin" integration, the `og:url` tag is now correctly set in the category listing pages.
321
 
322
  = 0.4.1 =
323
 
325
 
326
  = 0.4 =
327
 
328
+ * "Business Directory Plugin" plugin integration. It's now possible to populate `og:title`, `og:url`, `og:description` and `og:image` tags with each listing details. If a featured image is set it will be used. If not, the listing main image is used.
329
 
330
  = 0.3.5 =
331
 
349
 
350
  = 0.3 =
351
 
352
+ * "SubHeading" plugin integration. It's now possible add this field to the `og:title` tag.
353
  * Changed the way defaults and user settings are loaded and saved, to "try" to eliminate the problem some users experienced where the user settings would disappear.
354
  * Bugfix: "Also add image to RSS/RSS2 feeds?" option was not being correctly loaded.
355
  * The plugin version is now showed both as a comment before the open graph tags and on the settings page.
356
 
357
  = 0.2.3 =
358
 
359
+ * No changes. Had a problem updating to 0.2.2 on the WordPress website.
360
 
361
  = 0.2.2 =
362
 
364
 
365
  = 0.2.1 =
366
 
367
+ * Bugfix: when the `og:image` is not hosted on the same domain as the website/blog.
368
 
369
  = 0.2 =
370
 
371
+ * If the option is set to true, the same image obtained to the `og:image` will be added to the RSS feed on the `enclosure` and `media:content` tags so that apps like RSS Graffiti and twitterfeed post them correctly.
372
 
373
  = 0.1.9.5 =
374
 
375
+ * It's now possible to choose how the post/page `og:image` tag is set. It means that if the user doesn't want to use the featured/thumbnail image, or the first image in the post content, or the first image on the media gallery, or even the default image, he can choose not to.
376
 
377
  = 0.1.9 =
378
 
379
+ * Added the `og:locale` tag. This will be the WordPress locale by default, but can be chosen by the user also.
380
+ * The `og:type` tag can now be set as "website" or "blog" for the homepage.
381
  * A final trailing slash can now be added to the homepage url, if the user wants to. Avoids 'circular reference error' on the Facebook debugger.
382
 
383
 
387
 
388
  = 0.1.8 =
389
 
390
+ * Type "website" was being used as default for all the urls beside posts. This is wrong. According to Facebook Open Graph specification only the homepage should be "website" and all the other contents must bu "article". This was fixed.
391
+ * On Category and Tags pages, their descriptions, if not blank, are used for the `og:description` tag.
392
  * If the description comes out empty, the title is used on this tag.
393
 
394
  = 0.1.7 =
405
  = 0.1.5 =
406
 
407
  * Fixed the way Categories and Tags pages links were being retrieved that would cause an error on WP 3.0.
408
+ * Added the option to use a Custom text as homepage `og:description` instead of the Website Tagline.
409
+ * Fixed a bug that wouldn't allow to uncheck the `og:image` tag.
410
 
411
  = 0.1.4 =
412
 
413
+ * Shortcodes are now stripped from `og:description`.
414
+ * Changed `og:app_id` and `og:admins` not to be included by default.
415
 
416
  = 0.1.3 =
417
 
wonderm00n-open-graph.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 1.7.4.4
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
8
  Plugin URI: http://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
9
  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.
10
- Version: 1.7.4.4
11
  Author: Webdados
12
  Author URI: http://www.webdados.pt
13
  Text Domain: wd-fb-og
@@ -16,1259 +16,34 @@ Domain Path: /lang
16
 
17
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
 
19
- $webdados_fb_open_graph_plugin_version='1.7.4.4';
20
- $webdados_fb_open_graph_plugin_name='Facebook Open Graph, Google+ and Twitter Card Tags';
21
- $webdados_fb_open_graph_plugin_settings=array(
22
- 'fb_app_id_show',
23
- 'fb_app_id',
24
- 'fb_admin_id_show',
25
- 'fb_admin_id',
26
- 'fb_locale_show',
27
- 'fb_locale',
28
- 'fb_sitename_show',
29
- 'fb_title_show',
30
- 'fb_title_show_schema',
31
- 'fb_title_show_twitter',
32
- 'fb_url_show',
33
- 'fb_url_show_twitter',
34
- 'fb_url_canonical',
35
- 'fb_url_add_trailing',
36
- 'fb_type_show',
37
- 'fb_type_homepage',
38
- 'fb_article_dates_show',
39
- 'fb_article_sections_show',
40
- 'fb_publisher_show',
41
- 'fb_publisher',
42
- 'fb_publisher_show_schema',
43
- 'fb_publisher_schema',
44
- 'fb_publisher_show_twitter',
45
- 'fb_publisher_twitteruser',
46
- 'fb_author_show',
47
- 'fb_author_show_meta',
48
- 'fb_author_show_linkrelgp',
49
- 'fb_author_show_twitter',
50
- 'fb_author_hide_on_pages',
51
- 'fb_desc_show',
52
- 'fb_desc_show_meta',
53
- 'fb_desc_show_schema',
54
- 'fb_desc_show_twitter',
55
- 'fb_desc_chars',
56
- 'fb_desc_homepage',
57
- 'fb_desc_homepage_customtext',
58
- 'fb_image_show',
59
- 'fb_image_size_show',
60
- 'fb_image_show_schema',
61
- 'fb_image_show_twitter',
62
- 'fb_image',
63
- 'fb_image_rss',
64
- 'fb_image_use_specific',
65
- 'fb_image_use_featured',
66
- 'fb_image_use_content',
67
- 'fb_image_use_media',
68
- 'fb_image_use_default',
69
- 'fb_image_min_size',
70
- 'fb_show_wpseoyoast',
71
- 'fb_show_subheading',
72
- 'fb_subheading_position',
73
- 'fb_show_businessdirectoryplugin',
74
- 'fb_keep_data_uninstall',
75
- 'fb_adv_force_local',
76
- 'fb_adv_notify_fb',
77
- 'fb_adv_supress_fb_notice',
78
- 'fb_twitter_card_type',
79
- 'fb_wc_usecategthumb',
80
- 'fb_wc_useproductgallery',
81
- 'fb_image_overlay',
82
- 'fb_image_overlay_image',
83
- );
84
-
85
- //We have to remove canonical NOW because the plugin runs too late - We're also loading the settings which is cool
86
- if ($webdados_fb_open_graph_settings=webdados_fb_open_graph_load_settings()) { //To avoid activation errors
87
- if (intval($webdados_fb_open_graph_settings['fb_url_show'])==1) {
88
- if (intval($webdados_fb_open_graph_settings['fb_url_canonical'])==1) {
89
- remove_action('wp_head', 'rel_canonical');
90
- }
91
- }
92
- }
93
-
94
- //Languages
95
- function webdados_fb_open_graph_init() {
96
- load_plugin_textdomain('wd-fb-og', false, dirname(plugin_basename(__FILE__)) . '/lang/');
97
- }
98
- add_action('plugins_loaded', 'webdados_fb_open_graph_init');
99
-
100
- function webdados_fb_open_graph() {
101
- global $webdados_fb_open_graph_plugin_settings, $webdados_fb_open_graph_plugin_name, $webdados_fb_open_graph_plugin_version, $webdados_fb_open_graph_settings;
102
-
103
- //Upgrade
104
- webdados_fb_open_graph_upgrade();
105
-
106
- //Get options - OLD (until 0.5.4)
107
- /*foreach($webdados_fb_open_graph_plugin_settings as $key) {
108
- $$key=get_option('wonderm00n_open_graph_'.$key);
109
- }*/
110
- //Get options - NEW (after 0.5.4)
111
- extract($webdados_fb_open_graph_settings);
112
-
113
- //Also set Title Tag?
114
- $fb_set_title_tag=0;
115
-
116
- //Additional images
117
- $fb_image_additional=array();
118
-
119
- //Additional tags
120
- $fb_additional_tags=array();
121
-
122
- $fb_type='article';
123
- if (is_singular()) {
124
- //It's a Post or a Page or an attachment page - It can also be the homepage if it's set as a page
125
- global $post;
126
- $fb_title=esc_attr(strip_tags(stripslashes($post->post_title)));
127
- //SubHeading
128
- if ($fb_show_subheading==1) {
129
- if (webdados_fb_open_graph_subheadingactive()) {
130
- if (isset($fb_subheading_position) && $fb_subheading_position=='before') {
131
- $fb_title=trim(trim(get_the_subheading()).' - '.trim($fb_title), ' -');
132
- } else {
133
- $fb_title=trim(trim($fb_title).' - '.trim(get_the_subheading()), ' -');
134
- }
135
- }
136
- }
137
- $fb_url=get_permalink();
138
- if (is_front_page()) {
139
- /* Fix homepage type when it's a static page */
140
- $fb_url=get_option('home').(intval($fb_url_add_trailing)==1 ? '/' : '');
141
- $fb_type=trim($fb_type_homepage=='' ? 'website' : $fb_type_homepage);
142
- }
143
- if (trim($post->post_excerpt)!='') {
144
- //If there's an excerpt that's what we'll use
145
- $fb_desc=trim($post->post_excerpt);
146
- } else {
147
- //If not we grab it from the content
148
- $fb_desc=trim($post->post_content);
149
- }
150
- $fb_desc=(intval($fb_desc_chars)>0 ? mb_substr(esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))),0,$fb_desc_chars) : esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))));
151
- if (intval($fb_image_show)==1 || intval($fb_image_show_schema)==1 || intval($fb_image_show_twitter)==1) {
152
- $fb_image=webdados_fb_open_graph_post_image($fb_image_use_specific, $fb_image_use_featured, $fb_image_use_content, $fb_image_use_media, $fb_image_use_default, $fb_image);
153
- }
154
- //Author
155
- $author_id=$post->post_author;
156
- if ($author_id>0) {
157
- $fb_author=get_the_author_meta('facebook', $author_id);
158
- $fb_author_meta=get_the_author_meta('display_name', $author_id);
159
- $fb_author_linkrelgp=get_the_author_meta('googleplus', $author_id);
160
- $fb_author_twitter=get_the_author_meta('twitter', $author_id);
161
- } else {
162
- $fb_author='';
163
- $fb_author_meta='';
164
- $fb_author_linkrelgp='';
165
- $fb_author_twitter='';
166
- }
167
- //Author - Hide on pages?
168
- if (is_page() && $fb_author_hide_on_pages==1) {
169
- $fb_author='';
170
- $fb_author_meta='';
171
- $fb_author_linkrelgp='';
172
- $fb_author_twitter='';
173
- }
174
- //Published and Modified time
175
- if (is_singular('post')) {
176
- $fb_article_pub_date=get_the_date('c');
177
- $fb_article_mod_date=get_the_modified_date('c');
178
- } else {
179
- $fb_article_dates_show=0;
180
- $fb_article_pub_date='';
181
- $fb_article_mod_date='';
182
- }
183
- //Categories
184
- if (is_singular('post')) {
185
- $cats = get_the_category();
186
- if (!is_wp_error($cats) && (is_array($cats) && count($cats)>0)) {
187
- $fb_sections=array();
188
- foreach ($cats as $cat) {
189
- $fb_sections[]=$cat->name;
190
- }
191
- }
192
- } else {
193
- $fb_article_sections_show=0;
194
- }
195
- //Business Directory Plugin
196
- if ($fb_show_businessdirectoryplugin==1) {
197
- @include_once(ABSPATH . 'wp-admin/includes/plugin.php');
198
- if (is_plugin_active('business-directory-plugin/wpbusdirman.php')) {
199
- global $wpbdp;
200
- //$bdpaction = _wpbdp_current_action();
201
- $bdpaction=$wpbdp->controller->get_current_action();
202
- switch($bdpaction) {
203
- case 'showlisting':
204
- //Listing
205
- $listing_id = get_query_var('listing') ? wpbdp_get_post_by_slug(get_query_var('listing'))->ID : wpbdp_getv($_GET, 'id', get_query_var('id'));
206
- $bdppost=get_post($listing_id);
207
- $fb_title=esc_attr(strip_tags(stripslashes($bdppost->post_title))).' - '.$fb_title;
208
- $fb_set_title_tag=1;
209
- $fb_url=get_permalink($listing_id);
210
- if (trim($bdppost->post_excerpt)!='') {
211
- //If there's an excerpt that's what we'll use
212
- $fb_desc=trim($bdppost->post_excerpt);
213
- } else {
214
- //If not we grab it from the content
215
- $fb_desc=trim($bdppost->post_content);
216
- }
217
- $fb_desc=(intval($fb_desc_chars)>0 ? mb_substr(esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))),0,$fb_desc_chars) : esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))));
218
- if (intval($fb_image_show)==1 || intval($fb_image_show_schema)==1 || intval($fb_image_show_twitter)==1) {
219
- $thumbdone=false;
220
- if (intval($fb_image_use_featured)==1) {
221
- //Featured
222
- if ($id_attachment=get_post_thumbnail_id($bdppost->ID)) {
223
- //There's a featured/thumbnail image for this listing
224
- $fb_image=wp_get_attachment_url($id_attachment, false);
225
- $thumbdone=true;
226
- }
227
- }
228
- if (!$thumbdone) {
229
- //Main image loaded
230
- if ($thumbnail_id = wpbdp_listings_api()->get_thumbnail_id($bdppost->ID)) {
231
- $fb_image=wp_get_attachment_url($thumbnail_id, false);
232
- }
233
- }
234
- }
235
- break;
236
- case 'browsecategory':
237
- //Categories
238
- $term = get_term_by('slug', get_query_var('category'), wpbdp_categories_taxonomy());
239
- $fb_title=esc_attr(strip_tags(stripslashes($term->name))).' - '.$fb_title;
240
- $fb_set_title_tag=1;
241
- $fb_url=get_term_link($term);
242
- if (trim($term->description)!='') {
243
- $fb_desc=trim($term->description);
244
- }
245
- break;
246
- case 'main':
247
- //Main page
248
- //No changes
249
- break;
250
- default:
251
- //No changes
252
- break;
253
- }
254
- }
255
- }
256
- } else {
257
- global $wp_query;
258
- //Other pages - Defaults
259
- $fb_title=esc_attr(strip_tags(stripslashes(get_bloginfo('name'))));
260
- //$fb_url=get_option('home').(intval($fb_url_add_trailing)==1 ? '/' : ''); //2013-11-4 changed from 'siteurl' to 'home'
261
- $fb_url=((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; //Not really canonical but will work for now
262
-
263
- //These are only used in posts/pages
264
- $fb_article_sections_show=0;
265
- $fb_article_dates_show=0;
266
- $fb_author_show=0;
267
- $fb_author_show_meta=0;
268
- $fb_author_show_linkrelgp=0;
269
- $fb_author_show_twitter=0;
270
-
271
- switch(trim($fb_desc_homepage)) {
272
- case 'custom':
273
- $fb_desc=esc_attr(strip_tags(stripslashes($fb_desc_homepage_customtext)));
274
- //WPML?
275
- if (function_exists('icl_object_id') && function_exists('icl_register_string')) {
276
- global $sitepress;
277
- if (ICL_LANGUAGE_CODE!=$sitepress->get_default_language()) {
278
- $fb_desc=icl_t('wd-fb-og', 'wd_fb_og_desc_homepage_customtext', $fb_desc);
279
- } else {
280
- //We got it already
281
- }
282
- }
283
- break;
284
- default:
285
- $fb_desc=esc_attr(strip_tags(stripslashes(get_bloginfo('description'))));
286
- break;
287
- }
288
-
289
- if (is_category()) {
290
- $fb_title=esc_attr(strip_tags(stripslashes(single_cat_title('', false))));
291
- $term=$wp_query->get_queried_object();
292
- $fb_url=get_term_link($term, $term->taxonomy);
293
- $cat_desc=trim(esc_attr(strip_tags(stripslashes(category_description()))));
294
- if (trim($cat_desc)!='') $fb_desc=$cat_desc;
295
- } else {
296
- if (is_tag()) {
297
- $fb_title=esc_attr(strip_tags(stripslashes(single_tag_title('', false))));
298
- $term=$wp_query->get_queried_object();
299
- $fb_url=get_term_link($term, $term->taxonomy);
300
- $tag_desc=trim(esc_attr(strip_tags(stripslashes(tag_description()))));
301
- if (trim($tag_desc)!='') $fb_desc=$tag_desc;
302
- } else {
303
- if (is_tax()) {
304
- $fb_title=esc_attr(strip_tags(stripslashes(single_term_title('', false))));
305
- $term=$wp_query->get_queried_object();
306
- $fb_url=get_term_link($term, $term->taxonomy);
307
- //WooCommerce
308
- if (intval($fb_image_show)==1 || intval($fb_image_show_schema)==1 || intval($fb_image_show_twitter)==1) {
309
- if ( class_exists('woocommerce') && $fb_wc_usecategthumb==1 && is_product_category() ) {
310
- if ( $thumbnail_id = get_woocommerce_term_meta( $term->term_id, 'thumbnail_id', true ) ) {
311
- if ( $image = wp_get_attachment_url( $thumbnail_id ) ) {
312
- $fb_image = $image;
313
- }
314
- }
315
- }
316
- }
317
- } else {
318
- if (is_search()) {
319
- $fb_title=esc_attr(strip_tags(stripslashes(__('Search for', 'wd-fb-og').' "'.get_search_query().'"')));
320
- $fb_url=get_search_link();
321
- } else {
322
- if (is_author()) {
323
- $fb_title=esc_attr(strip_tags(stripslashes(get_the_author_meta('display_name', get_query_var('author')))));
324
- $fb_url=get_author_posts_url(get_query_var('author'), get_query_var('author_name'));
325
- } else {
326
- if (is_archive()) {
327
- if (is_day()) {
328
- $fb_title=esc_attr(strip_tags(stripslashes(get_query_var('day').' '.single_month_title(' ', false).' '.__('Archives', 'wd-fb-og'))));
329
- $fb_url=get_day_link(get_query_var('year'), get_query_var('monthnum'), get_query_var('day'));
330
- } else {
331
- if (is_month()) {
332
- $fb_title=esc_attr(strip_tags(stripslashes(single_month_title(' ', false).' '.__('Archives', 'wd-fb-og'))));
333
- $fb_url=get_month_link(get_query_var('year'), get_query_var('monthnum'));
334
- } else {
335
- if (is_year()) {
336
- $fb_title=esc_attr(strip_tags(stripslashes(get_query_var('year').' '.__('Archives', 'wd-fb-og'))));
337
- $fb_url=get_year_link(get_query_var('year'));
338
- }
339
- }
340
- }
341
- } else {
342
- if (is_front_page()) {
343
- $fb_url=get_option('home').(intval($fb_url_add_trailing)==1 ? '/' : '');
344
- $fb_type=trim($fb_type_homepage=='' ? 'website' : $fb_type_homepage);
345
- } else {
346
- //Others... Defaults already set up there
347
- }
348
- }
349
- }
350
- }
351
- }
352
- }
353
- }
354
- }
355
-
356
- //og:type for WPML root page?
357
- if (function_exists('icl_object_id') && function_exists('icl_register_string')) {
358
- if (class_exists('WPML_Root_Page')) {
359
- if ( WPML_Root_Page::is_current_request_root() ) {
360
- $fb_type=trim($fb_type_homepage=='' ? 'website' : $fb_type_homepage);
361
- }
362
- }
363
- }
364
-
365
- //YOAST?
366
- if ($fb_show_wpseoyoast==1) {
367
- if ( defined('WPSEO_VERSION') ) {
368
- $wpseo = WPSEO_Frontend::get_instance();
369
- //App ID - From our plugin
370
- //Admin ID - From our plugin
371
- //Locale - From our plugin
372
- //Sitename - From our plugin
373
- //Title - From WPSEO
374
- $fb_title=strip_tags($wpseo->title(false));
375
- //Title - SubHeading plugin
376
- if ($fb_show_subheading==1) {
377
- if (webdados_fb_open_graph_subheadingactive()) {
378
- if (isset($fb_subheading_position) && $fb_subheading_position=='before') {
379
- $fb_title=trim(trim(get_the_subheading()).' - '.trim($fb_title), ' -');
380
- } else {
381
- $fb_title=trim(trim($fb_title).' - '.trim(get_the_subheading()), ' -');
382
- }
383
- }
384
- }
385
- //URL - From WPSEO
386
- $fb_url=$wpseo->canonical(false);
387
- //Description - From WPSEO or our plugin
388
- $fb_desc_temp=$wpseo->metadesc(false);
389
- $fb_desc=strip_tags(trim($fb_desc_temp)!='' ? trim($fb_desc_temp) : $fb_desc);
390
- //Image - From our plugin
391
- }
392
- }
393
-
394
- //WooCommerce - og:type, price, etc...
395
- if ( class_exists('woocommerce') && is_product() ) {
396
- $fb_type = 'product';
397
- global $post;
398
- $product = new WC_Product( $post->ID );
399
- //Price
400
- $fb_additional_tags['og_price_amount']=array(
401
- $product->get_price_including_tax()
402
- );
403
- if (function_exists('get_woocommerce_currency')) $fb_additional_tags['og_price_currency']=array(
404
- get_woocommerce_currency()
405
- );
406
- $fb_additional_tags['twitter_label1']=array(
407
- __('Price', 'wd-fb-og')
408
- );
409
- if (function_exists('get_woocommerce_currency')) $fb_additional_tags['twitter_data1']=array(
410
- $product->get_price_including_tax().' '.get_woocommerce_currency()
411
- );
412
- //Additional product images?
413
- if ( intval($fb_image_show)==1 && $fb_wc_useproductgallery==1 ) {
414
- if ( $attachment_ids = $product->get_gallery_attachment_ids() ) {
415
- foreach ( $attachment_ids as $attachment_id ) {
416
- if ( $image_link = wp_get_attachment_url( $attachment_id ) ) {
417
- if ( trim($image_link)!='' ) $fb_image_additional[]=trim($image_link);
418
- }
419
- }
420
- }
421
- }
422
- }
423
-
424
- //Apply Filters
425
- $fb_locale = apply_filters('fb_og_locale', $fb_locale);
426
- $fb_title = apply_filters('fb_og_title', $fb_title);
427
- $fb_url = apply_filters('fb_og_url', $fb_url);
428
- $fb_type = apply_filters('fb_og_type', $fb_type);
429
- $fb_desc = apply_filters('fb_og_desc', $fb_desc);
430
- $fb_image = apply_filters('fb_og_image', $fb_image);
431
- $fb_image_additional = apply_filters('fb_og_image_additional', $fb_image_additional);
432
-
433
- //Image size
434
- $fb_image_size = false;
435
- if (intval($fb_image_show)==1 && trim($fb_image)!='') {
436
- if (intval($fb_image_size_show)==1) {
437
- if (isset($GLOBALS['webdados_fb_img_size'])) { //Already fetched
438
- $fb_image_size=$GLOBALS['webdados_fb_img_size'];
439
- } else {
440
- $fb_image_size=webdados_fb_open_graph_getimagesize($fb_image);
441
- }
442
- }
443
- } else {
444
- $fb_image_size_show=0;
445
- }
446
-
447
- //Image overlay?
448
- if ( intval($fb_image_overlay)==1 && apply_filters('fb_og_image_overlay', true, $fb_image) ) {
449
- $fb_image_parsed = parse_url($fb_image);
450
- //Only if the image is hosted locally
451
- if ( $fb_image_parsed['host']==$_SERVER['HTTP_HOST'] ) {
452
- $fb_image = plugins_url('/wonderm00ns-simple-facebook-open-graph-tags/fbimg.php?img='.urlencode($fb_image));
453
- //We know the exact size now. We better just show it, right?
454
- $fb_image_size_show = 1;
455
- $fb_image_size = array(1200, 630);
456
- }
457
- }
458
-
459
- //No spaces on URLs
460
- if (isset($fb_url) && trim($fb_url)!='') $fb_url= str_replace(' ', '%20', trim($fb_url));
461
- if (isset($fb_publisher) && trim($fb_publisher)!='') $fb_publisher= str_replace(' ', '%20', trim($fb_publisher));
462
- if (isset($fb_publisher_schema) && trim($fb_publisher_schema)!='') $fb_publisher_schema= str_replace(' ', '%20', trim($fb_publisher_schema));
463
- if (isset($fb_author) && trim($fb_author)!='') $fb_author= str_replace(' ', '%20', trim($fb_author));
464
- if (isset($fb_author_linkrelgp) && trim($fb_author_linkrelgp)!='') $fb_author_linkrelgp= str_replace(' ', '%20', trim($fb_author_linkrelgp));
465
- if (isset($fb_image) && trim($fb_image)!='') $fb_image= str_replace(' ', '%20', trim($fb_image));
466
- if (isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional) ) {
467
- foreach ($fb_image_additional as $key => $value) {
468
- $fb_image_additional[$key] = str_replace(' ', '%20', trim($value));
469
- }
470
- }
471
-
472
- //If no description let's just add the title as a last resort
473
- if (trim($fb_desc)=='') $fb_desc=$fb_title;
474
-
475
- $html='
476
- <!-- START - '.$webdados_fb_open_graph_plugin_name.' '.$webdados_fb_open_graph_plugin_version.' -->
477
- ';
478
- if (intval($fb_app_id_show)==1 && trim($fb_app_id)!='') $html.='<meta property="fb:app_id" content="'.trim(esc_attr($fb_app_id)).'"/>
479
- ';
480
- if (intval($fb_admin_id_show)==1 && trim($fb_admin_id)!='') $html.='<meta property="fb:admins" content="'.trim(esc_attr($fb_admin_id)).'"/>
481
- ';
482
- if (intval($fb_locale_show)==1) $html.='<meta property="og:locale" content="'.trim(esc_attr(trim($fb_locale)!='' ? trim($fb_locale) : trim(get_locale()))).'"/>
483
- ';
484
- if (intval($fb_sitename_show)==1) $html.='<meta property="og:site_name" content="'.trim(esc_attr(get_bloginfo('name'))).'"/>
485
- ';
486
- if (intval($fb_title_show)==1) $html.='<meta property="og:title" content="'.trim(esc_attr($fb_title)).'"/>
487
- ';
488
- if (intval($fb_set_title_tag)==1) {
489
- //Does nothing so far. We try to create the <title> tag but it's too late now
490
- }
491
- if (intval($fb_title_show_schema)==1) $html.='<meta itemprop="name" content="'.trim(esc_attr($fb_title)).'"/>
492
- ';
493
- if (intval($fb_title_show_twitter)==1) $html.='<meta name="twitter:title" content="'.trim(esc_attr($fb_title)).'"/>
494
- ';
495
- if (intval($fb_url_show)==1) $html.='<meta property="og:url" content="'.trim(esc_attr($fb_url)).'"/>
496
- ';
497
- if (intval($fb_url_show_twitter)==1) $html.='<meta name="twitter:url" content="'.trim(esc_attr($fb_url)).'"/>
498
- ';
499
- if (intval($fb_url_canonical)==1) $html.='<link rel="canonical" href="'.trim(esc_attr($fb_url)).'"/>
500
- ';
501
- if (intval($fb_type_show)==1) $html.='<meta property="og:type" content="'.trim(esc_attr($fb_type)).'"/>
502
- ';
503
- if (intval($fb_article_dates_show)==1 && trim($fb_article_pub_date)!='') $html.='<meta property="article:published_time" content="'.trim(esc_attr($fb_article_pub_date)).'"/>
504
- ';
505
- if (intval($fb_article_dates_show)==1 && trim($fb_article_mod_date)!='') $html.='<meta property="article:modified_time" content="'.trim(esc_attr($fb_article_mod_date)).'" />
506
- <meta property="og:updated_time" content="'.trim(esc_attr($fb_article_mod_date)).'" />
507
- ';
508
- if (intval($fb_article_sections_show)==1 && isset($fb_sections) && is_array($fb_sections) && count($fb_sections)>0) {
509
- foreach($fb_sections as $fb_section) {
510
- $html.='<meta property="article:section" content="'.trim(esc_attr($fb_section)).'"/>
511
- ';
512
- }
513
- }
514
- if (intval($fb_publisher_show)==1 && trim($fb_publisher)!='') $html.='<meta property="article:publisher" content="'.trim(esc_attr($fb_publisher)).'"/>
515
- ';
516
- if (intval($fb_publisher_show_schema)==1 && trim($fb_publisher_schema)!='') $html.='<link rel="publisher" href="'.trim(esc_attr($fb_publisher_schema)).'"/>
517
- ';
518
- if (intval($fb_publisher_show_twitter)==1 && trim($fb_publisher_twitteruser)!='') $html.='<meta name="twitter:site" content="@'.trim(esc_attr($fb_publisher_twitteruser)).'"/>
519
- ';
520
- if (intval($fb_author_show)==1 && $fb_author!='') $html.='<meta property="article:author" content="'.trim(esc_attr($fb_author)).'"/>
521
- ';
522
- if (intval($fb_author_show_meta)==1 && $fb_author_meta!='') $html.='<meta name="author" content="'.trim(esc_attr($fb_author_meta)).'"/>
523
- ';
524
- if (intval($fb_author_show_linkrelgp)==1 && trim($fb_author_linkrelgp)!='') $html.='<link rel="author" href="'.trim(esc_attr($fb_author_linkrelgp)).'"/>
525
- ';
526
- if (intval($fb_author_show_twitter)==1 && (trim($fb_author_twitter)!='' || trim($fb_publisher_twitteruser)!='')) $html.='<meta name="twitter:creator" content="@'.trim(esc_attr( (trim($fb_author_twitter)!='' ? trim($fb_author_twitter) : trim($fb_publisher_twitteruser) ))).'"/>
527
- ';
528
- if (intval($fb_desc_show)==1) $html.='<meta property="og:description" content="'.trim(esc_attr($fb_desc)).'"/>
529
- ';
530
- if (intval($fb_desc_show_meta)==1) $html.='<meta name="description" content="'.trim(esc_attr($fb_desc)).'"/>
531
- ';
532
- if (intval($fb_desc_show_schema)==1) $html.='<meta itemprop="description" content="'.trim(esc_attr($fb_desc)).'"/>
533
- ';
534
- if (intval($fb_desc_show_twitter)==1) $html.='<meta name="twitter:description" content="'.trim(esc_attr($fb_desc)).'"/>
535
- ';
536
- if(intval($fb_image_show)==1 && trim($fb_image)!='') $html.='<meta property="og:image" content="'.trim(esc_attr($fb_image)).'"/>
537
- ';
538
- if(intval($fb_image_show)==1 && isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional)>0) {
539
- foreach ($fb_image_additional as $fb_image_additional_temp) {
540
- $html.='<meta property="og:image" content="'.trim(esc_attr($fb_image_additional_temp)).'"/>
541
- ';
542
- }
543
- } else {
544
- //We only show the image size if we only have one image
545
- if(intval($fb_image_size_show)==1 && isset($fb_image_size) && is_array($fb_image_size)!='') $html.='<meta property="og:image:width" content="'.intval(esc_attr($fb_image_size[0])).'"/>
546
- <meta property="og:image:height" content="'.intval(esc_attr($fb_image_size[1])).'"/>
547
- ';
548
- }
549
- if(intval($fb_image_show_schema)==1 && trim($fb_image)!='') $html.='<meta itemprop="image" content="'.trim(esc_attr($fb_image)).'"/>
550
- ';
551
- if(intval($fb_image_show_twitter)==1 && trim($fb_image)!='') $html.='<meta name="twitter:image" content="'.trim(esc_attr($fb_image)).'"/>
552
- ';
553
- if(intval($fb_title_show_twitter)==1 || intval($fb_url_show_twitter)==1 || $fb_author_show_twitter==1 || $fb_publisher_show_twitter==1 || $fb_image_show_twitter==1) $html.='<meta name="twitter:card" content="'.trim(esc_attr($fb_twitter_card_type)).'"/>
554
- ';
555
- foreach ($fb_additional_tags as $tag => $values) {
556
- foreach($values as $value) {
557
- $html.='<meta name="'.str_replace('_', ':', trim($tag)).'" content="'.trim(esc_attr($value)).'"/>
558
- ';
559
- }
560
- }
561
- $html.='<!-- END - '.$webdados_fb_open_graph_plugin_name.' -->
562
-
563
- ';
564
- echo $html;
565
- }
566
- add_action('wp_head', 'webdados_fb_open_graph', 9999);
567
-
568
- function webdados_fb_open_graph_add_opengraph_namespace( $output ) {
569
- if (stristr($output,'xmlns:og')) {
570
- //Already there
571
- } else {
572
- //Let's add it
573
- $output=$output . ' xmlns:og="http://ogp.me/ns#"';
574
- }
575
- if (stristr($output,'xmlns:fb')) {
576
- //Already there
577
- } else {
578
- //Let's add it
579
- $output=$output . ' xmlns:fb="http://ogp.me/ns/fb#"';
580
- }
581
- return $output;
582
- }
583
- //We want to be last to add the namespace because some other plugin may already added it ;-)
584
- add_filter('language_attributes', 'webdados_fb_open_graph_add_opengraph_namespace',9999);
585
-
586
- //Add images also to RSS feed. Most code from WP RSS Images by Alain Gonzalez
587
- function webdados_fb_open_graph_images_on_feed($for_comments) {
588
- global $webdados_fb_open_graph_settings;
589
- if (intval($webdados_fb_open_graph_settings['fb_image_rss'])==1) {
590
- if (!$for_comments) {
591
- add_action('rss2_ns', 'webdados_fb_open_graph_images_on_feed_yahoo_media_tag');
592
- add_action('rss_item', 'webdados_fb_open_graph_images_on_feed_image');
593
- add_action('rss2_item', 'webdados_fb_open_graph_images_on_feed_image');
594
- }
595
- }
596
- }
597
- function webdados_fb_open_graph_images_on_feed_yahoo_media_tag() {
598
- echo 'xmlns:media="http://search.yahoo.com/mrss/"';
599
- }
600
- function webdados_fb_open_graph_images_on_feed_image() {
601
- global $webdados_fb_open_graph_settings;
602
- $fb_image = webdados_fb_open_graph_post_image($webdados_fb_open_graph_settings['fb_image_use_specific'], $webdados_fb_open_graph_settings['fb_image_use_featured'], $webdados_fb_open_graph_settings['fb_image_use_content'], $webdados_fb_open_graph_settings['fb_image_use_media'], $webdados_fb_open_graph_settings['fb_image_use_default'], $webdados_fb_open_graph_settings['fb_image']);
603
- if ($fb_image!='') {
604
- $uploads = wp_upload_dir();
605
- $url = parse_url($fb_image);
606
- $path = $uploads['basedir'] . preg_replace( '/.*uploads(.*)/', '${1}', $url['path'] );
607
- if (file_exists($path)) {
608
- $filesize=filesize($path);
609
- $url=$path;
610
- } else {
611
- $header=get_headers($fb_image, 1);
612
- $filesize=$header['Content-Length'];
613
- $url=$fb_image;
614
- }
615
- list($width, $height, $type, $attr) = webdados_fb_open_graph_getimagesize($url);
616
- echo '<enclosure url="' . $fb_image . '" length="' . $filesize . '" type="'.image_type_to_mime_type($type).'"/>';
617
- echo '<media:content url="'.$fb_image.'" width="'.$width.'" height="'.$height.'" medium="image" type="'.image_type_to_mime_type($type).'"/>';
618
- }
619
- }
620
- add_action("do_feed_rss","webdados_fb_open_graph_images_on_feed",5,1);
621
- add_action("do_feed_rss2","webdados_fb_open_graph_images_on_feed",5,1);
622
-
623
- //Post image
624
- function webdados_fb_open_graph_post_image($fb_image_use_specific=1,$fb_image_use_featured=1, $fb_image_use_content=1, $fb_image_use_media=1, $fb_image_use_default=1, $default_image='') {
625
- global $post, $webdados_fb_open_graph_settings;
626
- $thumbdone=false;
627
- $fb_image='';
628
- $minsize=intval($webdados_fb_open_graph_settings['fb_image_min_size']);
629
- //Attachment page? - This overrides the other options
630
- if (is_attachment()) {
631
- if ($temp=wp_get_attachment_image_src(null, 'full')) {
632
- $fb_image=trim($temp[0]);
633
- $img_size=array(intval($temp[1]), intval($temp[2]));
634
- if (trim($fb_image)!='') {
635
- $thumbdone=true;
636
- }
637
- }
638
- }
639
- //Specific post image
640
- if (!$thumbdone) {
641
- if (intval($fb_image_use_specific)==1) {
642
- if ($fb_image=trim(get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true))) {
643
- if (trim($fb_image)!='') {
644
- $thumbdone=true;
645
- }
646
- }
647
- }
648
- }
649
- //Featured image
650
- if (!$thumbdone) {
651
- if (function_exists('get_post_thumbnail_id')) {
652
- if (intval($fb_image_use_featured)==1) {
653
- if ($id_attachment=get_post_thumbnail_id($post->ID)) {
654
- //There's a featured/thumbnail image for this post
655
- $fb_image=wp_get_attachment_url($id_attachment, false);
656
- $thumbdone=true;
657
- }
658
- }
659
- }
660
- }
661
- //From post/page content
662
- if (!$thumbdone) {
663
- if (intval($fb_image_use_content)==1) {
664
- $imgreg = '/<img .*src=["\']([^ ^"^\']*)["\']/';
665
- preg_match_all($imgreg, trim($post->post_content), $matches);
666
- if ($matches[1]) {
667
- $imagetemp=false;
668
- foreach($matches[1] as $image) {
669
- //There's an image on the content
670
- $pos = strpos($image, site_url());
671
- if ($pos === false) {
672
- if (stristr($image, 'http://') || stristr($image, 'https://') || mb_substr($image, 0, 2)=='//') {
673
- if (mb_substr($image, 0, 2)=='//') $image=((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https:' : 'http:').$image;
674
- //Complete URL - offsite
675
- //if (intval(ini_get('allow_url_fopen'))==1) {
676
- $imagetemp=$image;
677
- $imagetempsize=$imagetemp;
678
- //} else {
679
- //If it's offsite we can't getimagesize'it, so we won't use it
680
- //We could save a temporary version locally and then getimagesize'it but do we want to do this every single time?
681
- //}
682
- } else {
683
- //Partial URL - we guess it's onsite because no http(s)://
684
- $imagetemp=site_url().$image;
685
- $imagetempsize=(
686
- intval(ini_get('allow_url_fopen'))==1
687
- ?
688
- (
689
- intval($webdados_fb_open_graph_settings['fb_adv_force_local'])==1
690
- ?
691
- ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
692
- :
693
- $imagetemp
694
- )
695
- :
696
- ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
697
- );
698
- }
699
- } else {
700
- //Complete URL - onsite
701
- $imagetemp=$image;
702
- $imagetempsize=(
703
- intval(ini_get('allow_url_fopen'))==1
704
- ?
705
- (
706
- intval($webdados_fb_open_graph_settings['fb_adv_force_local'])==1
707
- ?
708
- ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
709
- :
710
- $imagetemp
711
- )
712
- :
713
- ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
714
- );
715
- }
716
- if ($imagetemp) {
717
- if ($img_size = webdados_fb_open_graph_getimagesize($imagetempsize)) {
718
- if ($img_size[0] >= $minsize && $img_size[1] >= $minsize) {
719
- $fb_image=$imagetemp;
720
- $thumbdone=true;
721
- break;
722
- }
723
- }
724
- }
725
- }
726
- }
727
- }
728
- }
729
- //From media gallery
730
- if (!$thumbdone) {
731
- if (intval($fb_image_use_media)==1) {
732
- $images = get_posts(array('post_type' => 'attachment','numberposts' => -1,'post_status' => null,'order' => 'ASC','orderby' => 'menu_order','post_mime_type' => 'image','post_parent' => $post->ID));
733
- if ($images) {
734
- foreach($images as $image) {
735
- $imagetemp=wp_get_attachment_url($image->ID, false);
736
- $imagetempsize=(
737
- intval(ini_get('allow_url_fopen'))==1
738
- ?
739
- (
740
- intval($webdados_fb_open_graph_settings['fb_adv_force_local'])==1
741
- ?
742
- ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
743
- :
744
- $imagetemp
745
- )
746
- :
747
- ABSPATH.str_replace(trailingslashit(site_url()), '', $imagetemp)
748
- );
749
- if ($img_size = webdados_fb_open_graph_getimagesize($imagetempsize)) {
750
- if ($img_size[0] >= $minsize && $img_size[1] >= $minsize) {
751
- $fb_image=$imagetemp;
752
- $thumbdone=true;
753
- break;
754
- }
755
- }
756
- }
757
- }
758
- }
759
- }
760
- //From default
761
- if (!$thumbdone) {
762
- if (intval($fb_image_use_default)==1) {
763
- //Well... We sure did try. We'll just keep the default one!
764
- $fb_image=$default_image;
765
- } else {
766
- //User chose not to use default on pages/posts
767
- $fb_image='';
768
- }
769
- }
770
- return $fb_image;
771
- }
772
-
773
- //Get image size
774
- function webdados_fb_open_graph_getimagesize($image) {
775
- if (stristr($image, 'http://') || stristr($image, 'https://') || mb_substr($image, 0, 2)=='//') {
776
- if (function_exists('curl_version') && function_exists('imagecreatefromstring')) {
777
- //We'll get just a part of the image to speed things up. From http://stackoverflow.com/questions/4635936/super-fast-getimagesize-in-php
778
- $headers = array(
779
- "Range: bytes=0-32768"
780
- );
781
- $curl = curl_init($image);
782
- curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
783
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
784
- //Set HTTP REFERER and USER AGENT just in case. Some servers may have hotlinking protection
785
- curl_setopt($curl, CURLOPT_REFERER, ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
786
- curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
787
- if ($data = curl_exec($curl)) {
788
- if ($im = @imagecreatefromstring($data)) { //Mute errors because we're not loading the all image
789
- if ($x=imagesx($im)) {
790
- //We have to fake the image type - For RSS
791
- $ext = pathinfo($image, PATHINFO_EXTENSION);
792
- switch(strtolower($ext)) {
793
- case 'gif':
794
- $type=1;
795
- break;
796
- case 'jpg':
797
- case 'jpeg':
798
- $type=2;
799
- break;
800
- case 'png':
801
- $type=3;
802
- break;
803
- default:
804
- $type=2;
805
- break;
806
- }
807
- $img_size=array($x, imagesy($im), $type, '');
808
- } else {
809
- $img_size=false;
810
- }
811
- } else {
812
- $img_size=false;
813
- }
814
- } else {
815
- $img_size=false;
816
- }
817
- curl_close($curl);
818
- } else {
819
- if (intval(ini_get('allow_url_fopen'))==1) {
820
- $img_size=getimagesize($image);
821
- } else {
822
- //We give up!
823
- $img_size=false;
824
- }
825
- }
826
- } else {
827
- //Local path
828
- $img_size=getimagesize($image);
829
- }
830
- $GLOBALS['webdados_fb_img_size']=$img_size;
831
- return $img_size;
832
- }
833
-
834
- function webdados_fb_open_graph_add_excerpts_to_pages() {
835
- add_post_type_support('page', 'excerpt');
836
- }
837
- add_action('init', 'webdados_fb_open_graph_add_excerpts_to_pages');
838
-
839
-
840
- //Admin
841
- if (is_admin()) {
842
-
843
- add_action('admin_menu', 'webdados_fb_open_graph_add_options');
844
-
845
- register_activation_hook(__FILE__, 'webdados_fb_open_graph_activate');
846
-
847
- function webdados_fb_open_graph_add_options() {
848
- global $webdados_fb_open_graph_plugin_name;
849
- if(function_exists('add_options_page')){
850
- add_options_page($webdados_fb_open_graph_plugin_name, $webdados_fb_open_graph_plugin_name, 'manage_options', basename(__FILE__), 'webdados_fb_open_graph_admin');
851
- }
852
- }
853
-
854
- function webdados_fb_open_graph_activate() {
855
- //Clear WPSEO notices
856
  global $wpdb;
857
- $wpdb->query(
858
- $wpdb->prepare("DELETE FROM ".$wpdb->usermeta." WHERE meta_key LIKE %s", 'wd_fb_og_wpseo_notice_ignore')
859
- );
860
- }
861
-
862
- function webdados_fb_open_graph_settings_link( $links, $file ) {
863
- if( $file == 'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php' && function_exists( "admin_url" ) ) {
864
- $settings_link = '<a href="' . admin_url( 'options-general.php?page=wonderm00n-open-graph.php' ) . '">' . __('Settings') . '</a>';
865
- array_push( $links, $settings_link ); // after other links
866
- }
867
- return $links;
868
- }
869
- add_filter('plugin_row_meta', 'webdados_fb_open_graph_settings_link', 9, 2 );
870
-
871
-
872
- function webdados_fb_open_graph_admin() {
873
- global $webdados_fb_open_graph_plugin_settings, $webdados_fb_open_graph_plugin_name, $webdados_fb_open_graph_plugin_version;
874
- webdados_fb_open_graph_upgrade();
875
- include_once 'includes/settings-page.php';
876
- }
877
-
878
- function webdados_fb_open_graph_scripts() {
879
- wp_enqueue_script('media-upload');
880
- wp_enqueue_script('thickbox');
881
- wp_enqueue_script('jquery');
882
- }
883
- function webdados_fb_open_graph_styles() {
884
- wp_enqueue_style('thickbox');
885
- }
886
- add_action('admin_print_scripts', 'webdados_fb_open_graph_scripts');
887
- add_action('admin_print_styles', 'webdados_fb_open_graph_styles');
888
-
889
- function webdados_fb_open_graph_add_posts_options() {
890
- global $webdados_fb_open_graph_settings, $webdados_fb_open_graph_plugin_name;
891
- if (intval($webdados_fb_open_graph_settings['fb_image_use_specific'])==1) {
892
- global $post;
893
- //Do not show for some post types
894
- $exclude_types = array(
895
- 'attachment',
896
- 'nav_menu_item',
897
- 'scheduled-action',
898
- );
899
- //WooCommerce?
900
- if ( class_exists('woocommerce') ) {
901
- $exclude_types = array_merge( $exclude_types , array(
902
- 'shop_order',
903
- 'shop_coupon',
904
- ) );
905
- }
906
- $exclude_types = apply_filters( 'fb_og_metabox_exclude_types', $exclude_types );
907
- if (is_object($post)) {
908
- if (!in_array(get_post_type($post->ID), $exclude_types)) {
909
- add_meta_box(
910
- 'webdados_fb_open_graph',
911
- $webdados_fb_open_graph_plugin_name,
912
- 'webdados_fb_open_graph_add_posts_options_box',
913
- $post->post_type
914
- );
915
- }
916
- }
917
- }
918
- }
919
- function webdados_fb_open_graph_add_posts_options_box() {
920
- global $post;
921
- // Add an nonce field so we can check for it later.
922
- wp_nonce_field( 'webdados_fb_open_graph_custom_box', 'webdados_fb_open_graph_custom_box_nonce' );
923
- // Current value
924
- $value = get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true);
925
- echo '<label for="webdados_fb_open_graph_specific_image">';
926
- _e('Use this image:', 'wd-fb-og');
927
- echo '</label> ';
928
- echo '<input type="text" id="webdados_fb_open_graph_specific_image" name="webdados_fb_open_graph_specific_image" value="' . esc_attr( $value ) . '" size="75"/>
929
- <input id="webdados_fb_open_graph_specific_image_button" class="button" type="button" value="'.__('Upload/Choose Open Graph Image','wd-fb-og').'"/>
930
- <input id="webdados_fb_open_graph_specific_image_button_clear" class="button" type="button" value="'.__('Clear field','wd-fb-og').'"/>';
931
- echo '<br/>'.__('Recommended size: 1200x630px', 'wd-fb-og');
932
- echo '<script type="text/javascript">
933
- jQuery(document).ready(function(){
934
- jQuery(\'#webdados_fb_open_graph_specific_image_button\').live(\'click\', function() {
935
- tb_show(\'Upload image\', \'media-upload.php?post_id='.$post->ID.'&type=image&context=webdados_fb_open_graph_specific_image_button&TB_iframe=true\');
936
- });
937
- jQuery(\'#webdados_fb_open_graph_specific_image_button_clear\').live(\'click\', function() {
938
- jQuery(\'#webdados_fb_open_graph_specific_image\').val(\'\');
939
- });
940
- });
941
- </script>';
942
- }
943
- add_action('add_meta_boxes', 'webdados_fb_open_graph_add_posts_options');
944
- function webdados_fb_open_graph_add_posts_options_box_save($post_id) {
945
- global $webdados_fb_open_graph_settings;
946
- $save=true;
947
-
948
- // If this is an autosave, our form has not been submitted, so we don't want to do anything.
949
- if ( (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || empty($_POST['post_type']))
950
- return $post_id;
951
-
952
- // If the post is not publicly_queryable (or a page) this doesn't make sense
953
- $post_type=get_post_type_object(get_post_type($post_id));
954
- if ($post_type->publicly_queryable || $post_type->name=='page') {
955
- //OK - Go on
956
- } else {
957
- //Not publicly_queryable (or page) -> Go away
958
- return $post_id;
959
- }
960
-
961
- // Check if our nonce is set.
962
- if (!isset($_POST['webdados_fb_open_graph_custom_box_nonce']))
963
- $save=false;
964
-
965
- $nonce=(isset($_POST['webdados_fb_open_graph_custom_box_nonce']) ? $_POST['webdados_fb_open_graph_custom_box_nonce'] : '');
966
-
967
- // Verify that the nonce is valid.
968
- if (!wp_verify_nonce($nonce, 'webdados_fb_open_graph_custom_box'))
969
- $save=false;
970
-
971
- // Check the user's permissions.
972
- if ('page' == $_POST['post_type']) {
973
- if (!current_user_can('edit_page', $post_id))
974
- $save=false;
975
- } else {
976
- if (!current_user_can('edit_post', $post_id))
977
- $save=false;
978
- }
979
-
980
- if ($save) {
981
- /* OK, its safe for us to save the data now. */
982
- // Sanitize user input.
983
- $mydata = sanitize_text_field($_POST['webdados_fb_open_graph_specific_image']);
984
- // Update the meta field in the database.
985
- update_post_meta($post_id, '_webdados_fb_open_graph_specific_image', $mydata);
986
- }
987
-
988
- if ($save) {
989
- //Force Facebook update anyway - Our meta box could be hidden - Not really! We'll just update if we got our metabox
990
- if (get_post_status($post_id)=='publish' && intval($webdados_fb_open_graph_settings['fb_adv_notify_fb'])==1) {
991
- $fb_debug_url='http://graph.facebook.com/?id='.urlencode(get_permalink($post_id)).'&scrape=true&method=post';
992
- $response=wp_remote_get($fb_debug_url);
993
- if (is_wp_error($response)) {
994
- $_SESSION['wd_fb_og_updated_error']=1;
995
- $_SESSION['wd_fb_og_updated_error_message']=__('URL failed:', 'wd-fb-og').' '.$fb_debug_url;
996
- } else {
997
- if ($response['response']['code']==200 && intval($webdados_fb_open_graph_settings['fb_adv_supress_fb_notice'])==0) {
998
- $_SESSION['wd_fb_og_updated']=1;
999
- } else {
1000
- if ($response['response']['code']==500) {
1001
- $_SESSION['wd_fb_og_updated_error']=1;
1002
- $error=json_decode($response['body']);
1003
- $_SESSION['wd_fb_og_updated_error_message']=__('Facebook returned:', 'wd-fb-og').' '.$error->error->message;
1004
- }
1005
- }
1006
- }
1007
- }
1008
- }
1009
-
1010
- return $post_id;
1011
-
1012
- }
1013
- add_action('save_post', 'webdados_fb_open_graph_add_posts_options_box_save');
1014
- function webdados_fb_open_graph_facebook_updated() {
1015
- if ($screen = get_current_screen()) {
1016
- if (isset($_SESSION['wd_fb_og_updated']) && $_SESSION['wd_fb_og_updated']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
1017
- global $post;
1018
- ?>
1019
- <div class="updated">
1020
- <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wd-fb-og'); ?> <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wd-fb-og'); ?></a></p>
1021
- </div>
1022
- <?php
1023
- } else {
1024
- if (isset($_SESSION['wd_fb_og_updated_error']) && $_SESSION['wd_fb_og_updated_error']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
1025
- ?>
1026
- <div class="error">
1027
- <p><?php
1028
- echo '<b>'.__('Error: Facebook Open Graph Tags cache NOT updated/purged.', 'wd-fb-og').'</b>';
1029
- echo '<br/>'.$_SESSION['wd_fb_og_updated_error_message'];
1030
- ?></p>
1031
- </div>
1032
- <?php
1033
- }
1034
- }
1035
- }
1036
- unset($_SESSION['wd_fb_og_updated']);
1037
- unset($_SESSION['wd_fb_og_updated_error']);
1038
- unset($_SESSION['wd_fb_og_updated_error_message']);
1039
- }
1040
- add_action('admin_notices', 'webdados_fb_open_graph_facebook_updated');
1041
-
1042
-
1043
- // Media insert code
1044
- function webdados_fb_open_graph_media_admin_head() {
1045
- ?>
1046
- <script type="text/javascript">
1047
- function wdfbogFieldsFileMediaTrigger(guid) {
1048
- window.parent.jQuery('#webdados_fb_open_graph_specific_image').val(guid);
1049
- window.parent.jQuery('#TB_closeWindowButton').trigger('click');
1050
- }
1051
- </script>
1052
- <style type="text/css">
1053
- tr.submit, .ml-submit, #save, #media-items .A1B1 p:last-child { display: none; }
1054
- </style>
1055
- <?php
1056
- }
1057
- function webdados_fb_open_graph_media_fields_to_edit_filter($form_fields, $post) {
1058
- // Reset form
1059
- $form_fields = array();
1060
- $url = wp_get_attachment_url( $post->ID );
1061
- $form_fields['wd-fb-og_fields_file'] = array(
1062
- 'label' => '',
1063
- 'input' => 'html',
1064
- 'html' => '<a href="#" title="' . $url
1065
- . '" class="wd-fb-og-fields-file-insert-button'
1066
- . ' button-primary" onclick="wdfbogFieldsFileMediaTrigger(\''
1067
- . $url . '\')">'
1068
- . __( 'Use as Image Open Graph Tag', 'wd-fb-og') . '</a><br /><br />',
1069
- );
1070
- return $form_fields;
1071
- }
1072
- if ( (isset( $_GET['context'] ) && $_GET['context'] == 'webdados_fb_open_graph_specific_image_button')
1073
- || (isset( $_SERVER['HTTP_REFERER'] )
1074
- && strpos( $_SERVER['HTTP_REFERER'],
1075
- 'context=webdados_fb_open_graph_specific_image_button' ) !== false)
1076
- ) {
1077
- // Add button
1078
- add_filter( 'attachment_fields_to_edit', 'webdados_fb_open_graph_media_fields_to_edit_filter', 9999, 2 );
1079
- // Add JS
1080
- add_action( 'admin_head', 'webdados_fb_open_graph_media_admin_head' );
1081
- }
1082
-
1083
- //Facebook, Google+ and Twitter user fields
1084
- function webdados_fb_open_graph_add_usercontacts($usercontacts) {
1085
- if (!defined('WPSEO_VERSION')) {
1086
- //Google+
1087
- $usercontacts['googleplus'] = __('Google+', 'wd-fb-og');
1088
- //Twitter
1089
- $usercontacts['twitter'] = __('Twitter username (without @)', 'wd-fb-og');
1090
- //Facebook
1091
- $usercontacts['facebook'] = __('Facebook profile URL', 'wd-fb-og');
1092
- }
1093
- return $usercontacts;
1094
- }
1095
- //WPSEO already adds the fields, so we'll just add them if WPSEO is not active
1096
- add_filter('user_contactmethods', 'webdados_fb_open_graph_add_usercontacts', 10, 1);
1097
-
1098
- //WPSEO warning
1099
- function webdados_fb_open_graph_wpseo_notice() {
1100
- if (defined('WPSEO_VERSION')) {
1101
- global $current_user, $webdados_fb_open_graph_plugin_name;
1102
- if (current_user_can('manage_options')) {
1103
- $user_id=$current_user->ID;
1104
- if (!get_user_meta($user_id,'wd_fb_og_wpseo_notice_ignore')) {
1105
- ?>
1106
- <div class="error">
1107
- <p>
1108
- <b><?php echo $webdados_fb_open_graph_plugin_name; ?>:</b>
1109
- <br/>
1110
- <?php _e('Please ignore the (dumb) Yoast WordPress SEO warning regarding open graph issues with this plugin. Just disable WPSEO Social settings at', 'wd-fb-og'); ?>
1111
- <a href="admin.php?page=wpseo_social&amp;wd_fb_og_wpseo_notice_ignore=1"><?php _e('SEO &gt; Social','wd-fb-og'); ?></a>
1112
- </p>
1113
- <p><a href="?wd_fb_og_wpseo_notice_ignore=1">Ignore this message</a></p>
1114
- </div>
1115
- <?php
1116
- }
1117
- }
1118
- }
1119
- }
1120
- add_action('admin_notices', 'webdados_fb_open_graph_wpseo_notice');
1121
- function webdados_fb_open_graph_wpseo_notice_ignore() {
1122
- if (defined('WPSEO_VERSION')) {
1123
- global $current_user;
1124
- $user_id=$current_user->ID;
1125
- if (isset($_GET['wd_fb_og_wpseo_notice_ignore'])) {
1126
- if (intval($_GET['wd_fb_og_wpseo_notice_ignore'])==1) {
1127
- add_user_meta($user_id, 'wd_fb_og_wpseo_notice_ignore', '1', true);
1128
- }
1129
- }
1130
- }
1131
- }
1132
- function webdados_fb_open_graph_register_session(){
1133
- if(!session_id())
1134
- session_start();
1135
- }
1136
- function webdados_fb_open_graph_admin_init() {
1137
- webdados_fb_open_graph_wpseo_notice_ignore();
1138
- webdados_fb_open_graph_register_session();
1139
  }
1140
- add_action('admin_init', 'webdados_fb_open_graph_admin_init');
1141
-
1142
  }
1143
 
1144
-
1145
-
1146
- function webdados_fb_open_graph_default_values() {
1147
- return array(
1148
- 'fb_locale_show' => 1,
1149
- 'fb_sitename_show' => 1,
1150
- 'fb_title_show' => 1,
1151
- 'fb_title_show_schema' => 1,
1152
- 'fb_url_show' => 1,
1153
- 'fb_type_show' => 1,
1154
- 'fb_article_dates_show' => 1,
1155
- 'fb_article_sections_show' => 1,
1156
- 'fb_desc_show' => 1,
1157
- 'fb_desc_show_schema' => 1,
1158
- 'fb_desc_chars' => 300,
1159
- 'fb_image_show' => 1,
1160
- 'fb_image_show_schema' => 1,
1161
- 'fb_image_use_specific' => 1,
1162
- 'fb_image_use_featured' => 1,
1163
- 'fb_image_use_content' => 1,
1164
- 'fb_image_use_media' => 1,
1165
- 'fb_image_use_default' => 1,
1166
- 'fb_keep_data_uninstall' => 1,
1167
- 'fb_image_min_size' => 200,
1168
- 'fb_adv_notify_fb' => 1,
1169
- 'fb_twitter_card_type' => 'summary_large_image',
1170
- 'fb_subheading_position' => 'after',
1171
- );
1172
- }
1173
- function webdados_fb_open_graph_load_settings() {
1174
- global $webdados_fb_open_graph_plugin_settings;
1175
- if (is_array($webdados_fb_open_graph_plugin_settings)) { //To avoid activation errors
1176
- $defaults=webdados_fb_open_graph_default_values();
1177
- //Load the user settings (if they exist)
1178
- if ($usersettings=get_option('wonderm00n_open_graph_settings')) {
1179
- //Merge the settings "all together now" (yes, it's a Beatles reference)
1180
- foreach($webdados_fb_open_graph_plugin_settings as $key) {
1181
- if (isset($usersettings[$key])) {
1182
- if (mb_strlen(trim($usersettings[$key]))==0) {
1183
- if (!empty($defaults[$key])) {
1184
- $usersettings[$key]=$defaults[$key];
1185
- }
1186
- }
1187
- } else {
1188
- if (!empty($defaults[$key])) {
1189
- $usersettings[$key]=$defaults[$key];
1190
- } else {
1191
- $usersettings[$key]=''; //Avoid notices
1192
- }
1193
- }
1194
- }
1195
- /*foreach($usersettings as $key => $value) {
1196
- //if ($value=='') {
1197
- if (mb_strlen(trim($value))==0) {
1198
- if (!empty($defaults[$key])) {
1199
- $usersettings[$key]=$defaults[$key];
1200
- }
1201
- }
1202
- }*/
1203
- } else {
1204
- foreach($webdados_fb_open_graph_plugin_settings as $key) {
1205
- if (!empty($defaults[$key])) {
1206
- $usersettings[$key]=$defaults[$key];
1207
- } else {
1208
- $usersettings[$key]=''; //Avoid notices
1209
- }
1210
- }
1211
- }
1212
- return $usersettings;
1213
  } else {
1214
- return false; //To avoid activation errors
1215
  }
1216
- }
1217
 
1218
- //Subheading plugin active?
1219
- function webdados_fb_open_graph_subheadingactive() {
1220
- //@include_once(ABSPATH . 'wp-admin/includes/plugin.php');
1221
- //if (is_plugin_active('subheading/index.php')) {
1222
- if (class_exists('SubHeading') && function_exists('get_the_subheading')) {
1223
- return true;
1224
- }
1225
- //}
1226
- return false;
1227
  }
1228
 
1229
- function webdados_fb_open_graph_upgrade() {
1230
- global $webdados_fb_open_graph_plugin_version;
1231
- $upgrade=false;
1232
- //Upgrade from 0.5.4 - Last version with individual settings
1233
- if (!$v=get_option('wonderm00n_open_graph_version')) {
1234
- //Convert settings
1235
- $upgrade=true;
1236
- global $webdados_fb_open_graph_plugin_settings;
1237
- foreach($webdados_fb_open_graph_plugin_settings as $key) {
1238
- $webdados_fb_open_graph_settings[$key]=get_option('wonderm00n_open_graph_'.$key);
1239
- }
1240
- // New fb_image_use_specific
1241
- $webdados_fb_open_graph_settings['fb_image_use_specific']=1;
1242
- update_option('wonderm00n_open_graph_settings', $webdados_fb_open_graph_settings);
1243
- foreach($webdados_fb_open_graph_plugin_settings as $key) {
1244
- delete_option('wonderm00n_open_graph_'.$key);
1245
- }
1246
- } else {
1247
- if ($v<$webdados_fb_open_graph_plugin_version) {
1248
- //Any version upgrade
1249
- $upgrade=true;
1250
- }
1251
- }
1252
- //Set version on database
1253
- if ($upgrade) {
1254
- update_option('wonderm00n_open_graph_version', $webdados_fb_open_graph_plugin_version);
1255
- }
1256
- }
1257
-
1258
- //Uninstall stuff
1259
- register_uninstall_hook(__FILE__, 'webdados_fb_open_graph_uninstall'); //NOT WORKING! WHY?
1260
- function webdados_fb_open_graph_uninstall() {
1261
- //NOT WORKING! WHY?
1262
- //global $webdados_fb_open_graph_plugin_settings;
1263
- //Remove data
1264
- /*foreach($webdados_fb_open_graph_plugin_settings as $key) {
1265
- delete_option('wonderm00n_open_graph_'.$key);
1266
- }
1267
- delete_option('wonderm00n_open_graph_activated');*/
1268
- }
1269
-
1270
- //To avoid notices when updating options on settings-page.php
1271
- //Hey @flynsarmy you are here, see?
1272
- function webdados_fb_open_graph_post($var, $default='') {
1273
- return isset($_POST[$var]) ? $_POST[$var] : $default;
1274
- }
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.0
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
8
  Plugin URI: http://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
9
  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.
10
+ Version: 2.0
11
  Author: Webdados
12
  Author URI: http://www.webdados.pt
13
  Text Domain: wd-fb-og
16
 
17
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
 
19
+ define( 'WEBDADOS_FB_VERSION', '2.0' );
20
+ define( 'WEBDADOS_FB_PLUGIN_NAME', 'Facebook Open Graph, Google+ and Twitter Card Tags' );
21
+ define( 'WEBDADOS_FB_W', 1200 );
22
+ define( 'WEBDADOS_FB_H', 630 );
23
+
24
+ /* Include core class */
25
+ require plugin_dir_path( __FILE__ ) . 'includes/class-webdados-fb-open-graph.php';
26
+
27
+ /* Uninstall hook */
28
+ register_uninstall_hook(__FILE__, 'webdados_fb_uninstall');
29
+ function webdados_fb_uninstall() {
30
+ $options = get_option( 'wonderm00n_open_graph_settings' );
31
+ if ( intval($options['fb_keep_data_uninstall'])==0 ) {
32
+ delete_option( 'wonderm00n_open_graph_settings' );
33
+ delete_option( 'wonderm00n_open_graph_version' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  global $wpdb;
35
+ $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key LIKE '_webdados_fb_open_graph%'" );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
 
 
37
  }
38
 
39
+ /* Run it */
40
+ function webdados_fb_run() {
41
+ if ( $webdados_fb = new Webdados_FB( WEBDADOS_FB_VERSION ) ) {
42
+ return $webdados_fb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  } else {
44
+ return false;
45
  }
 
46
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
+ $webdados_fb = webdados_fb_run();