Version Description
Download this release
Release Info
Developer | koralyne |
Plugin | RSS Post Importer |
Version | 2.1.9 |
Comparing to | |
See all releases |
Code changes from version 2.1.8 to 2.1.9
- app/assets/img/03-04-feedsapi-api.jpg +0 -0
- app/classes/admin/class-rss-pi-admin-processor.php +4 -0
- app/classes/admin/class-rss-pi-opml.php +2 -1
- app/classes/front/class-rss-pi-front.php +155 -1
- app/classes/import/class-rss-pi-engine.php +5 -2
- app/templates/feed-table-row.php +20 -2
- app/templates/metatags.php +990 -0
- app/templates/settings-table.php +24 -2
- index.php +2 -2
- readme.txt +6 -1
app/assets/img/03-04-feedsapi-api.jpg
ADDED
Binary file
|
app/classes/admin/class-rss-pi-admin-processor.php
CHANGED
@@ -222,6 +222,9 @@ class rssPIAdminProcessor {
|
|
222 |
'block_indexing' => $_POST['block_indexing'],
|
223 |
'nofollow_outbound' => $_POST['nofollow_outbound'],
|
224 |
'enable_logging' => $_POST['enable_logging'],
|
|
|
|
|
|
|
225 |
'import_images_locally' => $_POST['import_images_locally'],
|
226 |
'disable_thumbnail' => $_POST['disable_thumbnail'],
|
227 |
// these values are setup after key_validity check via filter()
|
@@ -308,6 +311,7 @@ class rssPIAdminProcessor {
|
|
308 |
'strip_html' => (isset($_POST[$id . '-strip_html'])) ? $_POST[$id . '-strip_html'] : '',
|
309 |
'nofollow_outbound' => (isset($_POST[$id . '-nofollow_outbound'])) ? $_POST[$id . '-nofollow_outbound'] : '',
|
310 |
'automatic_import_categories' => (isset($_POST[$id . '-automatic_import_categories'])) ? $_POST[$id . '-automatic_import_categories'] : '', 'automatic_import_author' => (isset($_POST[$id . '-automatic_import_author'])) ? $_POST[$id . '-automatic_import_author'] : '',
|
|
|
311 |
'feed_status' => $feed_status
|
312 |
));
|
313 |
}
|
222 |
'block_indexing' => $_POST['block_indexing'],
|
223 |
'nofollow_outbound' => $_POST['nofollow_outbound'],
|
224 |
'enable_logging' => $_POST['enable_logging'],
|
225 |
+
'tw_show' => $_POST['tw_show'],
|
226 |
+
'gg_show' => $_POST['gg_show'],
|
227 |
+
'og_show' => $_POST['og_show'],
|
228 |
'import_images_locally' => $_POST['import_images_locally'],
|
229 |
'disable_thumbnail' => $_POST['disable_thumbnail'],
|
230 |
// these values are setup after key_validity check via filter()
|
311 |
'strip_html' => (isset($_POST[$id . '-strip_html'])) ? $_POST[$id . '-strip_html'] : '',
|
312 |
'nofollow_outbound' => (isset($_POST[$id . '-nofollow_outbound'])) ? $_POST[$id . '-nofollow_outbound'] : '',
|
313 |
'automatic_import_categories' => (isset($_POST[$id . '-automatic_import_categories'])) ? $_POST[$id . '-automatic_import_categories'] : '', 'automatic_import_author' => (isset($_POST[$id . '-automatic_import_author'])) ? $_POST[$id . '-automatic_import_author'] : '',
|
314 |
+
'canonical_urls' => (isset($_POST[$id . '-canonical_urls'])) ? $_POST[$id . '-canonical_urls'] : '',
|
315 |
'feed_status' => $feed_status
|
316 |
));
|
317 |
}
|
app/classes/admin/class-rss-pi-opml.php
CHANGED
@@ -121,7 +121,8 @@ if (!class_exists("Rss_pi_opml")) {
|
|
121 |
'nofollow_outbound' => 'false',
|
122 |
'automatic_import_categories' => 'false',
|
123 |
'automatic_import_author' => 'false',
|
124 |
-
'feed_status' => 'active'
|
|
|
125 |
));
|
126 |
|
127 |
} else {
|
121 |
'nofollow_outbound' => 'false',
|
122 |
'automatic_import_categories' => 'false',
|
123 |
'automatic_import_author' => 'false',
|
124 |
+
'feed_status' => 'active',
|
125 |
+
'canonical_urls' => 'my_blog'
|
126 |
));
|
127 |
|
128 |
} else {
|
app/classes/front/class-rss-pi-front.php
CHANGED
@@ -35,7 +35,11 @@ class rssPIFront {
|
|
35 |
|
36 |
// add noidex to front
|
37 |
add_action('wp_head', array($this, 'rss_pi_noindex_meta_tag'));
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
// add options
|
40 |
$this->options = $rss_post_importer->options;
|
41 |
|
@@ -43,6 +47,16 @@ class rssPIFront {
|
|
43 |
if ($this->options['settings']['nofollow_outbound'] == 'true') {
|
44 |
add_filter('the_content', array($this, 'rss_pi_url_parse'));
|
45 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
function rss_pi_noindex_meta_tag() {
|
@@ -73,6 +87,63 @@ class rssPIFront {
|
|
73 |
}
|
74 |
}
|
75 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
function rss_pi_url_parse($content) {
|
78 |
|
@@ -112,5 +183,88 @@ class rssPIFront {
|
|
112 |
$content = str_replace(']]>', ']]>', $content);
|
113 |
return $content;
|
114 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
}
|
35 |
|
36 |
// add noidex to front
|
37 |
add_action('wp_head', array($this, 'rss_pi_noindex_meta_tag'));
|
38 |
+
// add canonical urls
|
39 |
+
|
40 |
+
remove_action( 'wp_head', 'rel_canonical' );
|
41 |
+
add_action('wp_head', array($this, 'rss_pi_canonical_urls_meta_tag'));
|
42 |
+
|
43 |
// add options
|
44 |
$this->options = $rss_post_importer->options;
|
45 |
|
47 |
if ($this->options['settings']['nofollow_outbound'] == 'true') {
|
48 |
add_filter('the_content', array($this, 'rss_pi_url_parse'));
|
49 |
}
|
50 |
+
if($this->options['settings']['og_show']==1){
|
51 |
+
add_action('wp_head', array($this, 'fb_opengraph'));
|
52 |
+
}
|
53 |
+
if($this->options['settings']['tw_show']==1){
|
54 |
+
add_action('wp_head', array($this, 'add_twitter_cards'));
|
55 |
+
}
|
56 |
+
if($this->options['settings']['gg_show']==1){
|
57 |
+
add_action('wp_head', array($this, 'add_google_item'));
|
58 |
+
}
|
59 |
+
|
60 |
}
|
61 |
|
62 |
function rss_pi_noindex_meta_tag() {
|
87 |
}
|
88 |
}
|
89 |
}
|
90 |
+
|
91 |
+
|
92 |
+
function rss_pi_canonical_urls_meta_tag() {
|
93 |
+
global $post, $rss_post_importer;
|
94 |
+
|
95 |
+
// Check if single post
|
96 |
+
if (is_single()) {
|
97 |
+
|
98 |
+
// Get current post id
|
99 |
+
$current_post_id = $post->ID;
|
100 |
+
// add options
|
101 |
+
$this->options = $rss_post_importer->options;
|
102 |
+
|
103 |
+
// Check for block indexing
|
104 |
+
|
105 |
+
$meta_rss_pi_canonical_url = get_post_meta($current_post_id, 'rss_pi_canonical_url', false);
|
106 |
+
if(!empty($meta_rss_pi_canonical_url) && $meta_rss_pi_canonical_url[0]=="source_blog"){
|
107 |
+
$meta_values_source = get_post_meta($current_post_id, 'rss_pi_source_url', false);
|
108 |
+
if (!empty($meta_values_source)) {
|
109 |
+
$pieces = parse_url($meta_values_source[0]);
|
110 |
+
$domain = isset($pieces['host']) ? $pieces['host'] : '';
|
111 |
+
if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) {
|
112 |
+
$domain= $regs['domain'];
|
113 |
+
}
|
114 |
+
$domain= $regs['domain'];
|
115 |
+
$check_domain = explode('.',$domain);
|
116 |
+
//Check URL for Google Only
|
117 |
+
if(isset($check_domain[0]) && $check_domain[0]=="google"){
|
118 |
+
$google_url = $pieces['fragment'];
|
119 |
+
$google_explode = explode("url=",$google_url);
|
120 |
+
if(isset($google_explode[1]) && $google_explode[1]!='')
|
121 |
+
{
|
122 |
+
$canonical_urls = $google_explode[1];
|
123 |
+
}
|
124 |
+
}else{
|
125 |
+
$canonical_urls = $meta_values_source[0];
|
126 |
+
}
|
127 |
+
|
128 |
+
// if meta value array is empty it means post is not imported by this plugin.
|
129 |
+
if (!empty($meta_values_source)) {
|
130 |
+
|
131 |
+
echo "<link rel='canonical' href='".$canonical_urls."' />";
|
132 |
+
}
|
133 |
+
|
134 |
+
}
|
135 |
+
}else
|
136 |
+
{
|
137 |
+
// original code
|
138 |
+
$link = get_permalink( $current_post_id );
|
139 |
+
echo "<link rel='canonical' href='$link' />\n";
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
|
148 |
function rss_pi_url_parse($content) {
|
149 |
|
183 |
$content = str_replace(']]>', ']]>', $content);
|
184 |
return $content;
|
185 |
}
|
186 |
+
|
187 |
+
function add_twitter_cards() {
|
188 |
+
global $post;
|
189 |
+
if($this->options['settings']['tw_show']==1){
|
190 |
+
if(is_single()) {
|
191 |
+
$tc_url = get_permalink();
|
192 |
+
$tc_title = get_the_title();
|
193 |
+
if($excerpt = $post->post_content) {
|
194 |
+
$excerpt = strip_tags($post->post_content);
|
195 |
+
$excerpt = str_replace("", "'", $excerpt);
|
196 |
+
}
|
197 |
+
$tc_description = trim(substr($excerpt, 0,150));
|
198 |
+
if(has_post_thumbnail($post->ID)) {
|
199 |
+
$img_src = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), full );
|
200 |
+
$tc_image_thumb = $img_src[0];
|
201 |
+
} else {
|
202 |
+
$tc_image_thumb = site_url() . '/wp-content/plugins/rss-post-importer/app/assets/img/03-04-feedsapi-api.jpg';
|
203 |
+
}
|
204 |
+
echo '<meta name="twitter:card" value="summary" />';
|
205 |
+
echo '<meta name="twitter:site" value="@feedsapi" />';
|
206 |
+
echo '<meta name="twitter:title" value="'.$tc_title.'" />';
|
207 |
+
echo '<meta name="twitter:description" value="'.$tc_description.'" />';
|
208 |
+
echo '<meta name="twitter:url" value="'.$tc_url.'" />';
|
209 |
+
echo '<meta name="twitter:image" value="'.$tc_image_thumb.'" />';
|
210 |
+
echo '<meta name="twitter:creator" value="@feedsapi" />';
|
211 |
+
}
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
function fb_opengraph() {
|
216 |
+
global $post;
|
217 |
+
if($this->options['settings']['og_show']==1){
|
218 |
+
if(is_single()) {
|
219 |
+
if(has_post_thumbnail($post->ID)) {
|
220 |
+
$img_src = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), 'medium');
|
221 |
+
$tc_image_thumb = $img_src[0];
|
222 |
+
} else {
|
223 |
+
$tc_image_thumb = site_url() . '/wp-content/plugins/rss-post-importer/app/assets/img/03-04-feedsapi-api.jpg';
|
224 |
+
}
|
225 |
+
|
226 |
+
if($excerpt = $post->post_content) {
|
227 |
+
$excerpt = strip_tags($post->post_content);
|
228 |
+
$excerpt = str_replace("", "'", $excerpt);
|
229 |
+
}
|
230 |
+
$rest = trim(substr($excerpt, 0,150));
|
231 |
+
$post_date = $post->post_date;
|
232 |
+
$og_title = get_the_title();
|
233 |
+
$og_url = get_permalink();
|
234 |
+
echo '<meta property="og:title" content="'.$og_title.'"/>';
|
235 |
+
echo '<meta property="og:image" content="'.$tc_image_thumb.'"/>';
|
236 |
+
echo '<meta property="og:image:width" content="681" />';
|
237 |
+
echo '<meta property="og:image:height" content="358" />';
|
238 |
+
echo '<meta property="og:site_name" content="'.get_bloginfo().'"/>';
|
239 |
+
echo '<meta property="og:description" content="'.$rest.'"/>';
|
240 |
+
}
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
function add_google_item() {
|
245 |
+
global $post;
|
246 |
+
if($this->options['settings']['gg_show']==1){
|
247 |
+
if(is_single()) {
|
248 |
+
if(has_post_thumbnail($post->ID)) {
|
249 |
+
$img_src = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), full );
|
250 |
+
$tc_image_thumb = $img_src[0];
|
251 |
+
} else {
|
252 |
+
$tc_image_thumb = site_url() . '/wp-content/plugins/rss-post-importer/app/assets/img/03-04-feedsapi-api.jpg';
|
253 |
+
}
|
254 |
+
|
255 |
+
if($excerpt = $post->post_content) {
|
256 |
+
$excerpt = strip_tags($post->post_content);
|
257 |
+
$excerpt = str_replace("", "'", $excerpt);
|
258 |
+
}
|
259 |
+
$rest = trim(substr($excerpt, 0,150));
|
260 |
+
$gg_url = get_permalink();
|
261 |
+
$gg_title = get_the_title();
|
262 |
+
echo '<meta itemprop="name" content="'.$gg_title.'">';
|
263 |
+
echo '<meta itemprop="description" content="'.$rest.'">';
|
264 |
+
echo '<meta itemprop="image" content="'.$tc_image_thumb.'">';
|
265 |
+
}
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
|
270 |
}
|
app/classes/import/class-rss-pi-engine.php
CHANGED
@@ -142,6 +142,7 @@ class rssPIEngine {
|
|
142 |
'automatic_import_categories' => $f['automatic_import_categories'],
|
143 |
'automatic_import_author' => $f['automatic_import_author'],
|
144 |
'feed_status' => $f['feed_status'],
|
|
|
145 |
'save_to_db' => true
|
146 |
);
|
147 |
return $this->_import($f['url'], $args);
|
@@ -172,7 +173,8 @@ class rssPIEngine {
|
|
172 |
'nofollow_outbound' => true,
|
173 |
'automatic_import_categories' => true,
|
174 |
'automatic_import_author' => true,
|
175 |
-
'feed_status' => 'active'
|
|
|
176 |
);
|
177 |
|
178 |
if($args['feed_status']=='pause'){
|
@@ -514,7 +516,8 @@ class rssPIEngine {
|
|
514 |
wp_update_post($_post);
|
515 |
$post['post_content'] = $_post_content;
|
516 |
}
|
517 |
-
|
|
|
518 |
array_push($saved_posts, $post);
|
519 |
}
|
520 |
}
|
142 |
'automatic_import_categories' => $f['automatic_import_categories'],
|
143 |
'automatic_import_author' => $f['automatic_import_author'],
|
144 |
'feed_status' => $f['feed_status'],
|
145 |
+
'canonical_urls' => $f['canonical_urls'],
|
146 |
'save_to_db' => true
|
147 |
);
|
148 |
return $this->_import($f['url'], $args);
|
173 |
'nofollow_outbound' => true,
|
174 |
'automatic_import_categories' => true,
|
175 |
'automatic_import_author' => true,
|
176 |
+
'feed_status' => 'active',
|
177 |
+
'canonical_urls' => 'my_blog'
|
178 |
);
|
179 |
|
180 |
if($args['feed_status']=='pause'){
|
516 |
wp_update_post($_post);
|
517 |
$post['post_content'] = $_post_content;
|
518 |
}
|
519 |
+
// canonical_urls
|
520 |
+
update_post_meta($post_id, 'rss_pi_canonical_url',$args['canonical_urls']);
|
521 |
array_push($saved_posts, $post);
|
522 |
}
|
523 |
}
|
app/templates/feed-table-row.php
CHANGED
@@ -13,7 +13,8 @@ if (!isset($f)) {
|
|
13 |
'strip_html' => 'false',
|
14 |
'nofollow_outbound' => 'false',
|
15 |
'automatic_import_categories' => 'false',
|
16 |
-
'automatic_import_author' => 'false'
|
|
|
17 |
);
|
18 |
$show = ' show';
|
19 |
}
|
@@ -110,7 +111,24 @@ if (is_array($f['category_id'])) {
|
|
110 |
</li>
|
111 |
</ul>
|
112 |
</td>
|
113 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
<tr>
|
116 |
<td>
|
13 |
'strip_html' => 'false',
|
14 |
'nofollow_outbound' => 'false',
|
15 |
'automatic_import_categories' => 'false',
|
16 |
+
'automatic_import_author' => 'false',
|
17 |
+
'canonical_urls' => 'my_blog'
|
18 |
);
|
19 |
$show = ' show';
|
20 |
}
|
111 |
</li>
|
112 |
</ul>
|
113 |
</td>
|
114 |
+
</tr>
|
115 |
+
|
116 |
+
<tr>
|
117 |
+
<td>
|
118 |
+
<label for="<?php echo ($f['id']); ?>-canonical_urls"><?php _e('SEO canonical URLs ?', "rss_pi"); ?></label>
|
119 |
+
<!--<p class="description"><?php _e('Add rel="nofollow" to all outbounded links.', "rss_pi"); ?></p>-->
|
120 |
+
</td>
|
121 |
+
<td>
|
122 |
+
<ul class="radiolist">
|
123 |
+
<li>
|
124 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-canonical_urls_myblog" name="<?php echo($f['id']); ?>-canonical_urls" value="my_blog" <?php echo($f['canonical_urls'] == 'my_blog' || $f['canonical_urls'] == '' ? 'checked="checked"' : ''); ?> /> <?php _e('My Blog URLs', 'rss_pi'); ?></label>
|
125 |
+
</li>
|
126 |
+
<li>
|
127 |
+
<label><input type="radio" id="<?php echo($f['id']); ?>-canonical_urls_sourceblog" name="<?php echo($f['id']); ?>-canonical_urls" value="source_blog" <?php echo($f['canonical_urls'] == 'source_blog' ? 'checked="checked"' : ''); ?> /> <?php _e('Source Blog URLs', 'rss_pi'); ?></label>
|
128 |
+
</li>
|
129 |
+
</ul>
|
130 |
+
</td>
|
131 |
+
</tr>
|
132 |
|
133 |
<tr>
|
134 |
<td>
|
app/templates/metatags.php
ADDED
@@ -0,0 +1,990 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_show_businessdirectoryplugin']= intval(webdados_fb_open_graph_post('fb_show_businessdirectoryplugin'));
|
68 |
+
$usersettings['fb_adv_force_local']= intval(webdados_fb_open_graph_post('fb_adv_force_local'));
|
69 |
+
$usersettings['fb_adv_notify_fb']= intval(webdados_fb_open_graph_post('fb_adv_notify_fb'));
|
70 |
+
$usersettings['fb_adv_supress_fb_notice']= intval(webdados_fb_open_graph_post('fb_adv_supress_fb_notice'));
|
71 |
+
$usersettings['fb_twitter_card_type']= trim(webdados_fb_open_graph_post('fb_twitter_card_type'));
|
72 |
+
//Update
|
73 |
+
update_option('wonderm00n_open_graph_settings', $usersettings);
|
74 |
+
//WPML - Register custom website description
|
75 |
+
if (function_exists('icl_object_id') && function_exists('icl_register_string')) {
|
76 |
+
icl_register_string('wd-fb-og', 'wd_fb_og_desc_homepage_customtext', trim(webdados_fb_open_graph_post('fb_desc_homepage_customtext')));
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
//Load the settings
|
82 |
+
extract(webdados_fb_open_graph_load_settings());
|
83 |
+
|
84 |
+
?>
|
85 |
+
<div class="wrap">
|
86 |
+
|
87 |
+
<?php screen_icon(); ?>
|
88 |
+
<h2><?php echo $webdados_fb_open_graph_plugin_name; ?> (<?php echo $webdados_fb_open_graph_plugin_version; ?>)</h2>
|
89 |
+
<br class="clear"/>
|
90 |
+
<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>
|
91 |
+
|
92 |
+
<?php
|
93 |
+
settings_fields('wonderm00n_open_graph');
|
94 |
+
?>
|
95 |
+
|
96 |
+
<div class="postbox-container og_left_col">
|
97 |
+
<div id="poststuff">
|
98 |
+
<form name="form1" method="post">
|
99 |
+
|
100 |
+
<div id="webdados_fb_open_graph-settings" class="postbox">
|
101 |
+
<h3 id="settings"><?php _e('Settings'); ?></h3>
|
102 |
+
<div class="inside">
|
103 |
+
<table width="100%" class="form-table">
|
104 |
+
<tr>
|
105 |
+
<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>
|
106 |
+
<td>
|
107 |
+
<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();"/>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
<tr class="fb_app_id_options">
|
111 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Facebook Platform App ID', 'wd-fb-og'); ?>:</th>
|
112 |
+
<td>
|
113 |
+
<input type="text" name="fb_app_id" id="fb_app_id" size="30" value="<?php echo trim(esc_attr($fb_app_id)); ?>"/>
|
114 |
+
</td>
|
115 |
+
</tr>
|
116 |
+
<tr>
|
117 |
+
<td colspan="2"><hr/></td>
|
118 |
+
</tr>
|
119 |
+
<tr>
|
120 |
+
<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>
|
121 |
+
<td>
|
122 |
+
<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();"/>
|
123 |
+
</td>
|
124 |
+
</tr>
|
125 |
+
<tr class="fb_admin_id_options">
|
126 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Facebook Admin(s) ID', 'wd-fb-og'); ?>:</th>
|
127 |
+
<td>
|
128 |
+
<input type="text" name="fb_admin_id" id="fb_admin_id" size="30" value="<?php echo trim(esc_attr($fb_admin_id)); ?>"/>
|
129 |
+
<br/>
|
130 |
+
<?php _e('Comma separated if more than one', 'wd-fb-og'); ?>
|
131 |
+
</td>
|
132 |
+
</tr>
|
133 |
+
<tr>
|
134 |
+
<td colspan="2"><hr/></td>
|
135 |
+
</tr>
|
136 |
+
<tr>
|
137 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include locale (fb:locale) tag', 'wd-fb-og'); ?></th>
|
138 |
+
<td>
|
139 |
+
<input type="checkbox" name="fb_locale_show" id="fb_locale_show" value="1" <?php echo (intval($fb_locale_show)==1 ? ' checked="checked"' : ''); ?> onclick="showLocaleOptions();"/>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
<tr class="fb_locale_options">
|
143 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Locale', 'wd-fb-og'); ?>:</th>
|
144 |
+
<td>
|
145 |
+
<select name="fb_locale" id="fb_locale">
|
146 |
+
<option value=""<?php if (trim($fb_locale)=='') echo ' selected="selected"'; ?>><?php _e('WordPress current locale/language', 'wd-fb-og'); ?> (<?php echo get_locale(); ?>) </option>
|
147 |
+
<?php
|
148 |
+
$listLocales=false;
|
149 |
+
$loadedOnline=false;
|
150 |
+
$loadedOffline=false;
|
151 |
+
//Online
|
152 |
+
if (!empty($_GET['localeOnline'])) {
|
153 |
+
if (intval($_GET['localeOnline'])==1) {
|
154 |
+
if ($ch = curl_init('http://www.facebook.com/translations/FacebookLocales.xml')) {
|
155 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
156 |
+
$fb_locales=curl_exec($ch);
|
157 |
+
if (curl_errno($ch)) {
|
158 |
+
//echo curl_error($ch);
|
159 |
+
} else {
|
160 |
+
$info = curl_getinfo($ch);
|
161 |
+
if (intval($info['http_code'])==200) {
|
162 |
+
//Save the file locally
|
163 |
+
$fh = fopen(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml', 'w') or die("Can't open file");
|
164 |
+
fwrite($fh, $fb_locales);
|
165 |
+
fclose($fh);
|
166 |
+
$listLocales=true;
|
167 |
+
$loadedOnline=true;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
curl_close($ch);
|
171 |
+
}
|
172 |
+
}
|
173 |
+
}
|
174 |
+
//Offline
|
175 |
+
if (!$listLocales) {
|
176 |
+
if ($fb_locales=file_get_contents(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml')) {
|
177 |
+
$listLocales=true;
|
178 |
+
$loadedOffline=true;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
//OK
|
182 |
+
if ($listLocales) {
|
183 |
+
$xml=simplexml_load_string($fb_locales);
|
184 |
+
$json = json_encode($xml);
|
185 |
+
$locales = json_decode($json,TRUE);
|
186 |
+
if (is_array($locales['locale'])) {
|
187 |
+
foreach ($locales['locale'] as $locale) {
|
188 |
+
?><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
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
192 |
+
?>
|
193 |
+
</select>
|
194 |
+
<br/>
|
195 |
+
<?php
|
196 |
+
if ($loadedOnline) {
|
197 |
+
_e('List loaded from Facebook (online)', 'wd-fb-og');
|
198 |
+
} else {
|
199 |
+
if ($loadedOffline) {
|
200 |
+
_e('List loaded from local cache (offline)', 'wd-fb-og'); ?> - <a href="?page=wonderm00n-open-graph.php&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
|
201 |
+
} else {
|
202 |
+
_e('List not loaded', 'wd-fb-og');
|
203 |
+
}
|
204 |
+
}
|
205 |
+
?>
|
206 |
+
</td>
|
207 |
+
</tr>
|
208 |
+
<tr>
|
209 |
+
<td colspan="2"><hr/></td>
|
210 |
+
</tr>
|
211 |
+
<tr>
|
212 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Site Name (og:site_name) tag', 'wd-fb-og');?></th>
|
213 |
+
<td>
|
214 |
+
<input type="checkbox" name="fb_sitename_show" id="fb_sitename_show" value="1" <?php echo (intval($fb_sitename_show)==1 ? ' checked="checked"' : ''); ?>/>
|
215 |
+
</td>
|
216 |
+
</tr>
|
217 |
+
<tr>
|
218 |
+
<td colspan="2"><hr/></td>
|
219 |
+
</tr>
|
220 |
+
<tr>
|
221 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Post/Page title (og:title) tag', 'wd-fb-og');?></th>
|
222 |
+
<td>
|
223 |
+
<input type="checkbox" name="fb_title_show" id="fb_title_show" value="1" <?php echo (intval($fb_title_show)==1 ? ' checked="checked"' : ''); ?> onclick="showTitleOptions();"/>
|
224 |
+
</td>
|
225 |
+
</tr>
|
226 |
+
<tr class="fb_title_options">
|
227 |
+
<th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Schema.org "itemprop" Name tag', 'wd-fb-og');?></th>
|
228 |
+
<td>
|
229 |
+
<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"' : ''); ?>/>
|
230 |
+
<br/>
|
231 |
+
<i><meta itemprop="name" content="..."/></i>
|
232 |
+
<br/>
|
233 |
+
<?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
234 |
+
</td>
|
235 |
+
</tr>
|
236 |
+
<tr class="fb_title_options">
|
237 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Title tag', 'wd-fb-og');?></th>
|
238 |
+
<td>
|
239 |
+
<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"' : ''); ?>/>
|
240 |
+
<br/>
|
241 |
+
<i><meta name="twitter:title" content=..."/></i>
|
242 |
+
<br/>
|
243 |
+
<?php _e('Recommended for Twitter sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
244 |
+
</td>
|
245 |
+
</tr>
|
246 |
+
<tr>
|
247 |
+
<td colspan="2"><hr/></td>
|
248 |
+
</tr>
|
249 |
+
<tr>
|
250 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include URL (og:url) tag', 'wd-fb-og');?></th>
|
251 |
+
<td>
|
252 |
+
<input type="checkbox" name="fb_url_show" id="fb_url_show" value="1" <?php echo (intval($fb_url_show)==1 ? ' checked="checked"' : ''); ?> onclick="showUrlOptions();"/>
|
253 |
+
</td>
|
254 |
+
</tr>
|
255 |
+
<tr>
|
256 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card URL tag', 'wd-fb-og');?></th>
|
257 |
+
<td>
|
258 |
+
<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"' : ''); ?>/>
|
259 |
+
</td>
|
260 |
+
</tr>
|
261 |
+
<tr class="fb_url_options">
|
262 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Add trailing slash at the end', 'wd-fb-og');?>:</th>
|
263 |
+
<td>
|
264 |
+
<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();"/>
|
265 |
+
<br/>
|
266 |
+
<?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>
|
267 |
+
</td>
|
268 |
+
</tr>
|
269 |
+
<tr class="fb_url_options">
|
270 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Set Canonical URL', 'wd-fb-og');?>:</th>
|
271 |
+
<td>
|
272 |
+
<input type="checkbox" name="fb_url_canonical" id="fb_url_canonical" value="1" <?php echo (intval($fb_url_canonical)==1 ? ' checked="checked"' : ''); ?>/>
|
273 |
+
<br/>
|
274 |
+
<i><link rel="canonical" href="..."/></i>
|
275 |
+
</td>
|
276 |
+
</tr>
|
277 |
+
<tr>
|
278 |
+
<td colspan="2"><hr/></td>
|
279 |
+
</tr>
|
280 |
+
<tr>
|
281 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Type (og:type) tag', 'wd-fb-og');?></th>
|
282 |
+
<td>
|
283 |
+
<input type="checkbox" name="fb_type_show" id="fb_type_show" value="1" <?php echo (intval($fb_type_show)==1 ? ' checked="checked"' : ''); ?> onclick="showTypeOptions();"/>
|
284 |
+
<br/>
|
285 |
+
<?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' );?>
|
286 |
+
</td>
|
287 |
+
</tr>
|
288 |
+
<tr class="fb_type_options">
|
289 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Homepage type', 'wd-fb-og');?>:</th>
|
290 |
+
<td>
|
291 |
+
<?php _e('Use', 'wd-fb-og');?>
|
292 |
+
<select name="fb_type_homepage" id="fb_type_homepage">
|
293 |
+
<option value="website"<?php if (trim($fb_type_homepage)=='' || trim($fb_type_homepage)=='website') echo ' selected="selected"'; ?>>website </option>
|
294 |
+
<option value="blog"<?php if (trim($fb_type_homepage)=='blog') echo ' selected="selected"'; ?>>blog </option>
|
295 |
+
</select>
|
296 |
+
</td>
|
297 |
+
</tr>
|
298 |
+
<tr>
|
299 |
+
<td colspan="2"><hr/></td>
|
300 |
+
</tr>
|
301 |
+
<tr>
|
302 |
+
<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>
|
303 |
+
<td>
|
304 |
+
<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"' : ''); ?>/>
|
305 |
+
<br/>
|
306 |
+
<?php _e('Works for posts only', 'wd-fb-og'); ?>
|
307 |
+
</td>
|
308 |
+
</tr>
|
309 |
+
<tr>
|
310 |
+
<td colspan="2"><hr/></td>
|
311 |
+
</tr>
|
312 |
+
<tr>
|
313 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include article section (article:section) tags', 'wd-fb-og');?></th>
|
314 |
+
<td>
|
315 |
+
<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"' : ''); ?>/>
|
316 |
+
<br/>
|
317 |
+
<?php _e('Works for posts only', 'wd-fb-og'); ?>, <?php _e('from the categories', 'wd-fb-og'); ?>
|
318 |
+
</td>
|
319 |
+
</tr>
|
320 |
+
<tr>
|
321 |
+
<td colspan="2"><hr/></td>
|
322 |
+
</tr>
|
323 |
+
<tr>
|
324 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Publisher Page (article:publisher) tag', 'wd-fb-og');?></th>
|
325 |
+
<td>
|
326 |
+
<input type="checkbox" name="fb_publisher_show" id="fb_publisher_show" value="1" <?php echo (intval($fb_publisher_show)==1 ? ' checked="checked"' : ''); ?> onclick="showPublisherOptions();"/>
|
327 |
+
<br/>
|
328 |
+
<?php _e('Links the website to the publisher Facebook Page.', 'wd-fb-og');?>
|
329 |
+
</td>
|
330 |
+
</tr>
|
331 |
+
<tr class="fb_publisher_options">
|
332 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Website\'s Facebook Page', 'wd-fb-og');?>:</th>
|
333 |
+
<td>
|
334 |
+
<input type="text" name="fb_publisher" id="fb_publisher" size="50" value="<?php echo trim(esc_attr($fb_publisher)); ?>"/>
|
335 |
+
<br/>
|
336 |
+
<?php _e('Full URL with http://', 'wd-fb-og');?>
|
337 |
+
</td>
|
338 |
+
</tr>
|
339 |
+
<tr>
|
340 |
+
<th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Google+ "publisher" tag', 'wd-fb-og');?>:</th>
|
341 |
+
<td>
|
342 |
+
<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();"/>
|
343 |
+
<br/>
|
344 |
+
<?php _e('Links the website to the publisher Google+ Page.', 'wd-fb-og');?>
|
345 |
+
</td>
|
346 |
+
|
347 |
+
</tr>
|
348 |
+
<tr class="fb_publisher_schema_options">
|
349 |
+
<th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Website\'s Google+ Page', 'wd-fb-og');?>:</th>
|
350 |
+
<td>
|
351 |
+
<input type="text" name="fb_publisher_schema" id="fb_publisher_schema" size="50" value="<?php echo trim(esc_attr($fb_publisher_schema)); ?>"/>
|
352 |
+
<br/>
|
353 |
+
<?php _e('Full URL with http://', 'wd-fb-og');?>
|
354 |
+
</td>
|
355 |
+
</tr>
|
356 |
+
<tr>
|
357 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Website Username tag', 'wd-fb-og');?>:</th>
|
358 |
+
<td>
|
359 |
+
<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();"/>
|
360 |
+
<br/>
|
361 |
+
<?php _e('Links the website to the publisher Twitter Username.', 'wd-fb-og');?>
|
362 |
+
</td>
|
363 |
+
</tr>
|
364 |
+
<tr class="fb_publisher_twitter_options">
|
365 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Website\'s Twitter Username', 'wd-fb-og');?>:</th>
|
366 |
+
<td>
|
367 |
+
<input type="text" name="fb_publisher_twitteruser" id="fb_publisher_twitteruser" size="20" value="<?php echo trim(esc_attr($fb_publisher_twitteruser)); ?>"/>
|
368 |
+
<br/>
|
369 |
+
<?php _e('Twitter username (without @)', 'wd-fb-og');?>
|
370 |
+
</td>
|
371 |
+
</tr>
|
372 |
+
<tr>
|
373 |
+
<td colspan="2"><hr/></td>
|
374 |
+
</tr>
|
375 |
+
|
376 |
+
<tr>
|
377 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Author Profile (article:author) tag', 'wd-fb-og');?></th>
|
378 |
+
<td>
|
379 |
+
<input type="checkbox" name="fb_author_show" id="fb_author_show" value="1" <?php echo (intval($fb_author_show)==1 ? ' checked="checked"' : ''); ?> onclick="showAuthorOptions();"/>
|
380 |
+
<br/>
|
381 |
+
<?php _e('Links the article to the author Facebook Profile. The user\'s Facebook profile URL must be filled in.', 'wd-fb-og');?>
|
382 |
+
</td>
|
383 |
+
</tr>
|
384 |
+
<tr class="fb_author_options">
|
385 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Include Meta Author tag', 'wd-fb-og');?></th>
|
386 |
+
<td>
|
387 |
+
<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"' : ''); ?>/>
|
388 |
+
<br/>
|
389 |
+
<i><meta name="author" content="..."/></i>
|
390 |
+
<br/>
|
391 |
+
<?php _e('Sets the article author name', 'wd-fb-og');?>
|
392 |
+
</td>
|
393 |
+
</tr>
|
394 |
+
<tr class="fb_author_options">
|
395 |
+
<th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Google+ link rel "author" tag', 'wd-fb-og');?></th>
|
396 |
+
<td>
|
397 |
+
<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"' : ''); ?>/>
|
398 |
+
<br/>
|
399 |
+
<i><link rel="author" href="..."/></i>
|
400 |
+
<br/>
|
401 |
+
<?php _e('Links the article to the author Google+ Profile (authorship). The user\'s Google+ profile URL must be filled in.', 'wd-fb-og');?>
|
402 |
+
</td>
|
403 |
+
</tr>
|
404 |
+
<tr class="fb_author_options">
|
405 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Creator tag', 'wd-fb-og');?></th>
|
406 |
+
<td>
|
407 |
+
<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"' : ''); ?>/>
|
408 |
+
<br/>
|
409 |
+
<i><meta name="twitter:creator" content="@..."/></i>
|
410 |
+
<br/>
|
411 |
+
<?php _e('Links the article to the author Twitter profile. The user\'s Twitter user must be filled in.', 'wd-fb-og');?>
|
412 |
+
</td>
|
413 |
+
</tr>
|
414 |
+
<tr class="fb_author_options">
|
415 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Hide author on pages', 'wd-fb-og');?></th>
|
416 |
+
<td>
|
417 |
+
<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"' : ''); ?>/>
|
418 |
+
<br/>
|
419 |
+
<?php _e('Hides all author tags on pages.', 'wd-fb-og');?>
|
420 |
+
</td>
|
421 |
+
</tr>
|
422 |
+
<tr>
|
423 |
+
<td colspan="2"><hr/></td>
|
424 |
+
</tr>
|
425 |
+
|
426 |
+
<tr>
|
427 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Description (og:description) tag', 'wd-fb-og');?></th>
|
428 |
+
<td>
|
429 |
+
<input type="checkbox" name="fb_desc_show" id="fb_desc_show" value="1" <?php echo (intval($fb_desc_show)==1 ? ' checked="checked"' : ''); ?> onclick="showDescriptionOptions();"/>
|
430 |
+
</td>
|
431 |
+
</tr>
|
432 |
+
<tr class="fb_description_options">
|
433 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Include Meta Description tag', 'wd-fb-og');?></th>
|
434 |
+
<td>
|
435 |
+
<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"' : ''); ?>/>
|
436 |
+
<br/>
|
437 |
+
<i><meta name="description" content="..."/></i>
|
438 |
+
<br/>
|
439 |
+
<?php _e('Recommended for SEO purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
440 |
+
</td>
|
441 |
+
</tr>
|
442 |
+
<tr class="fb_description_options">
|
443 |
+
<th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Schema.org "itemprop" Description tag', 'wd-fb-og');?></th>
|
444 |
+
<td>
|
445 |
+
<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"' : ''); ?>/>
|
446 |
+
<br/>
|
447 |
+
<i><meta itemprop="description" content="..."/></i>
|
448 |
+
<br/>
|
449 |
+
<?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
450 |
+
</td>
|
451 |
+
</tr>
|
452 |
+
<tr class="fb_description_options">
|
453 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Description tag', 'wd-fb-og');?></th>
|
454 |
+
<td>
|
455 |
+
<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"' : ''); ?>/>
|
456 |
+
<br/>
|
457 |
+
<i><meta name="twitter:description" content"..."/></i>
|
458 |
+
<br/>
|
459 |
+
<?php _e('Recommended for Twitter sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
460 |
+
</td>
|
461 |
+
</tr>
|
462 |
+
<tr class="fb_description_options">
|
463 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Description maximum length', 'wd-fb-og');?>:</th>
|
464 |
+
<td>
|
465 |
+
<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,
|
466 |
+
<br/>
|
467 |
+
<?php _e('0 or blank for no maximum length', 'wd-fb-og');?>
|
468 |
+
</td>
|
469 |
+
</tr>
|
470 |
+
<tr class="fb_description_options">
|
471 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Homepage description', 'wd-fb-og');?>:</th>
|
472 |
+
<td>
|
473 |
+
<?php
|
474 |
+
$hide_home_description=false;
|
475 |
+
if (get_option('show_on_front')=='page') {
|
476 |
+
$hide_home_description=true;
|
477 |
+
_e('The description of your front page:', 'wd-fb-og');
|
478 |
+
echo ' <a href="'.get_edit_post_link(get_option('page_on_front')).'" target="_blank">'.get_the_title(get_option('page_on_front')).'</a>';
|
479 |
+
}; ?>
|
480 |
+
<div<?php if ($hide_home_description) echo ' style="display: none;"'; ?>><?php _e('Use', 'wd-fb-og');?>
|
481 |
+
<select name="fb_desc_homepage" id="fb_desc_homepage" onchange="showDescriptionCustomText();">
|
482 |
+
<option value=""<?php if (trim($fb_desc_homepage)=='') echo ' selected="selected"'; ?>><?php _e('Website tagline', 'wd-fb-og');?> </option>
|
483 |
+
<option value="custom"<?php if (trim($fb_desc_homepage)=='custom') echo ' selected="selected"'; ?>><?php _e('Custom text', 'wd-fb-og');?> </option>
|
484 |
+
</select>
|
485 |
+
<div id="fb_desc_homepage_customtext_div">
|
486 |
+
<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>
|
487 |
+
<?php
|
488 |
+
if (function_exists('icl_object_id') && function_exists('icl_register_string')) {
|
489 |
+
?>
|
490 |
+
<br/>
|
491 |
+
<?php
|
492 |
+
printf(
|
493 |
+
__('WPML users: Set the default language description here, save changes and then go to <a href="%s">WPML > String translation</a> to set it for other languages.', 'wd-fb-og'),
|
494 |
+
'admin.php?page=wpml-string-translation/menu/string-translation.php&context=wd-fb-og'
|
495 |
+
);
|
496 |
+
}
|
497 |
+
?>
|
498 |
+
</div>
|
499 |
+
</div>
|
500 |
+
</td>
|
501 |
+
</tr>
|
502 |
+
<tr>
|
503 |
+
<td colspan="2"><hr/></td>
|
504 |
+
</tr>
|
505 |
+
<tr>
|
506 |
+
<th scope="row"><i class="dashicons-before dashicons-facebook-alt"></i><?php _e('Include Image (og:image) tag', 'wd-fb-og');?></th>
|
507 |
+
<td>
|
508 |
+
<input type="checkbox" name="fb_image_show" id="fb_image_show" value="1" <?php echo (intval($fb_image_show)==1 ? ' checked="checked"' : ''); ?> onclick="showImageOptions();"/>
|
509 |
+
<br/>
|
510 |
+
<?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');?>
|
511 |
+
</td>
|
512 |
+
</tr>
|
513 |
+
<tr class="fb_image_options">
|
514 |
+
<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>
|
515 |
+
<td>
|
516 |
+
<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"' : ''); ?>/>
|
517 |
+
<br/>
|
518 |
+
<?php _e('Recommended only if Facebook is having problems loading the image when the post is shared for the first time.', 'wd-fb-og');?>
|
519 |
+
</td>
|
520 |
+
</tr>
|
521 |
+
<tr class="fb_image_options">
|
522 |
+
<th scope="row"><i class="dashicons-before dashicons-googleplus"></i><?php _e('Include Schema.org "itemprop" Image tag', 'wd-fb-og');?></th>
|
523 |
+
<td>
|
524 |
+
<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"' : ''); ?>/>
|
525 |
+
<br/>
|
526 |
+
<i><meta itemprop="image" content="..."/></i>
|
527 |
+
<br/>
|
528 |
+
<?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
529 |
+
</td>
|
530 |
+
</tr>
|
531 |
+
<tr class="fb_image_options">
|
532 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Include Twitter Card Image tag', 'wd-fb-og');?></th>
|
533 |
+
<td>
|
534 |
+
<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"' : ''); ?>/>
|
535 |
+
<br/>
|
536 |
+
<i><meta name="twitter:image:src" content="..."/></i>
|
537 |
+
<br/>
|
538 |
+
<?php _e('Recommended for Twitter sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
539 |
+
</td>
|
540 |
+
</tr>
|
541 |
+
<tr class="fb_image_options">
|
542 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Default image', 'wd-fb-og');?>:</th>
|
543 |
+
<td>
|
544 |
+
<input type="text" name="fb_image" id="fb_image" size="50" value="<?php echo trim(esc_attr($fb_image)); ?>"/>
|
545 |
+
<input id="fb_image_button" class="button" type="button" value="Upload/Choose image" />
|
546 |
+
<br/>
|
547 |
+
<?php _e('Full URL with http://', 'wd-fb-og');?>
|
548 |
+
<br/>
|
549 |
+
<?php _e('Recommended size: 1200x630px', 'wd-fb-og'); ?>
|
550 |
+
</td>
|
551 |
+
</tr>
|
552 |
+
<tr class="fb_image_options">
|
553 |
+
<th scope="row"><i class="dashicons-before dashicons-rss"></i><?php _e('Add image to RSS/RSS2 feeds', 'wd-fb-og');?></th>
|
554 |
+
<td>
|
555 |
+
<input type="checkbox" name="fb_image_rss" id="fb_image_rss" value="1" <?php echo (intval($fb_image_rss)==1 ? ' checked="checked"' : ''); ?> onclick="showImageOptions();"/>
|
556 |
+
<br/>
|
557 |
+
<?php _e('For auto-posting apps like RSS Graffiti, twitterfeed, ...', 'wd-fb-og');?>
|
558 |
+
</td>
|
559 |
+
</tr>
|
560 |
+
<tr class="fb_image_options">
|
561 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('On posts/pages', 'wd-fb-og');?>:</th>
|
562 |
+
<td>
|
563 |
+
<div>
|
564 |
+
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"' : ''); ?>/>
|
565 |
+
<?php _e('Image will be fetched from the specific "Open Graph Image" custom field on the post', 'wd-fb-og');?>
|
566 |
+
</div>
|
567 |
+
<div>
|
568 |
+
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"' : ''); ?>/>
|
569 |
+
<?php _e('If it\'s not set, image will be fetched from post/page featured/thumbnail picture', 'wd-fb-og');?>
|
570 |
+
</div>
|
571 |
+
<div>
|
572 |
+
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"' : ''); ?>/>
|
573 |
+
<?php _e('If it doesn\'t exist, use the first image from the post/page content', 'wd-fb-og');?>
|
574 |
+
</div>
|
575 |
+
<div>
|
576 |
+
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"' : ''); ?>/>
|
577 |
+
<?php _e('If it doesn\'t exist, use first image from the post/page media gallery', 'wd-fb-og');?>
|
578 |
+
</div>
|
579 |
+
<div>
|
580 |
+
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"' : ''); ?>/>
|
581 |
+
<?php _e('If it doesn\'t exist, use the default image above', 'wd-fb-og');?>
|
582 |
+
</div>
|
583 |
+
</td>
|
584 |
+
</tr>
|
585 |
+
<tr>
|
586 |
+
<td colspan="2"><hr/></td>
|
587 |
+
</tr>
|
588 |
+
<tr>
|
589 |
+
<th scope="row"><i class="dashicons-before dashicons-twitter"></i><?php _e('Twitter Card Type', 'wd-fb-og');?>:</th>
|
590 |
+
<td>
|
591 |
+
<select name="fb_twitter_card_type" id="fb_twitter_card_type">
|
592 |
+
<option value="summary"<?php if (trim($fb_twitter_card_type)=='summary') echo ' selected="selected"'; ?>><?php _e('Summary Card', 'wd-fb-og');?></option>
|
593 |
+
<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>
|
594 |
+
</select>
|
595 |
+
</td>
|
596 |
+
</tr>
|
597 |
+
</table>
|
598 |
+
</div>
|
599 |
+
</div>
|
600 |
+
|
601 |
+
<div id="webdados_fb_open_graph-thirdparty" class="postbox">
|
602 |
+
<h3 id="thirdparty"><?php _e('3rd Party Integration', 'wd-fb-og');?></h3>
|
603 |
+
<div class="inside">
|
604 |
+
<?php
|
605 |
+
$thirdparty=false;
|
606 |
+
//WordPress SEO by Yoast
|
607 |
+
if ( defined('WPSEO_VERSION') ) {
|
608 |
+
$thirdparty=true;
|
609 |
+
?>
|
610 |
+
<hr/>
|
611 |
+
<a name="wpseo"></a>
|
612 |
+
<h4><a href="http://wordpress.org/plugins/wordpress-seo/" target="_blank">WordPress SEO by Yoast</a></h4>
|
613 |
+
<p><?php _e('It\'s HIGHLY recommended to go to <a href="admin.php?page=wpseo_social" target="_blank">SEO > 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>
|
614 |
+
<table width="100%" class="form-table">
|
615 |
+
<tr>
|
616 |
+
<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>
|
617 |
+
<td>
|
618 |
+
<input type="checkbox" name="fb_show_wpseoyoast" id="fb_show_wpseoyoast" value="1" <?php echo (intval($fb_show_wpseoyoast)==1 ? ' checked="checked"' : ''); ?>/>
|
619 |
+
</td>
|
620 |
+
</tr>
|
621 |
+
</table>
|
622 |
+
<?php
|
623 |
+
}
|
624 |
+
//SubHeading
|
625 |
+
if (webdados_fb_open_graph_subheadingactive()) {
|
626 |
+
$thirdparty=true;
|
627 |
+
?>
|
628 |
+
<hr/>
|
629 |
+
<h4><a href="http://wordpress.org/extend/plugins/subheading/" target="_blank">SubHeading</a></h4>
|
630 |
+
<table width="100%" class="form-table">
|
631 |
+
<tr>
|
632 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Add SubHeading to Post/Page title', 'wd-fb-og');?></th>
|
633 |
+
<td>
|
634 |
+
<input type="checkbox" name="fb_show_subheading" id="fb_show_subheading" value="1" <?php echo (intval($fb_show_subheading)==1 ? ' checked="checked"' : ''); ?>/>
|
635 |
+
</td>
|
636 |
+
</tr>
|
637 |
+
</table>
|
638 |
+
<?php
|
639 |
+
}
|
640 |
+
//Business Directory Plugin
|
641 |
+
if(is_plugin_active('business-directory-plugin/wpbusdirman.php')) {
|
642 |
+
$thirdparty=true;
|
643 |
+
?>
|
644 |
+
<hr/>
|
645 |
+
<h4><a href="http://wordpress.org/extend/plugins/business-directory-plugin/" target="_blank">Business Directory Plugin</a></h4>
|
646 |
+
<table width="100%" class="form-table">
|
647 |
+
<tr>
|
648 |
+
<th scope="row"><i class="dashicons-before dashicons-admin-site"></i><?php _e('Use BDP listing contents as OG tags', 'wd-fb-og');?></th>
|
649 |
+
<td>
|
650 |
+
<input type="checkbox" name="fb_show_businessdirectoryplugin" id="fb_show_businessdirectoryplugin" value="1" <?php echo (intval($fb_show_businessdirectoryplugin)==1 ? ' checked="checked"' : ''); ?>/>
|
651 |
+
<br/>
|
652 |
+
<?php _e('Setting "Include URL", "Set Canonical URL", "Include Description" and "Include Image" options above is HIGHLY recommended', 'wd-fb-og');?>
|
653 |
+
</td>
|
654 |
+
</tr>
|
655 |
+
</table>
|
656 |
+
<?php
|
657 |
+
}
|
658 |
+
if (!$thirdparty) {
|
659 |
+
?>
|
660 |
+
<p><?php _e('You don\'t have any compatible 3rd Party plugin installed/active.', 'wd-fb-og');?></p>
|
661 |
+
<p><?php _e('This plugin is currently compatible with:', 'wd-fb-og');?></p>
|
662 |
+
<ul>
|
663 |
+
<li><a href="http://wordpress.org/extend/plugins/wordpress-seo/" target="_blank">WordPress SEO by Yoast</a></li>
|
664 |
+
<li><a href="http://wordpress.org/extend/plugins/subheading/" target="_blank">SubHeading</a></li>
|
665 |
+
<li><a href="http://wordpress.org/extend/plugins/business-directory-plugin/" target="_blank">Business Directory Plugin</a></li>
|
666 |
+
</ul>
|
667 |
+
<?php
|
668 |
+
}
|
669 |
+
?>
|
670 |
+
</div>
|
671 |
+
</div>
|
672 |
+
|
673 |
+
<div id="webdados_fb_open_graph-advanced" class="postbox">
|
674 |
+
<h3 id="advanced"><?php _e('Advanced settings', 'wd-fb-og');?></h3>
|
675 |
+
<div class="inside">
|
676 |
+
<p><?php _e('Don\'t mess with this unless you know what you\'re doing', 'wd-fb-og');?></p>
|
677 |
+
<table width="100%" class="form-table">
|
678 |
+
<tr>
|
679 |
+
<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>
|
680 |
+
<td>
|
681 |
+
<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"' : ''); ?>/>
|
682 |
+
<br/>
|
683 |
+
<?php _e('May cause problems with some multisite configurations but fix "HTTP request failed" errors', 'wd-fb-og');?>
|
684 |
+
</td>
|
685 |
+
</tr>
|
686 |
+
<tr>
|
687 |
+
<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>
|
688 |
+
<td>
|
689 |
+
<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"' : ''); ?>/>
|
690 |
+
</td>
|
691 |
+
</tr>
|
692 |
+
<tr class="fb_adv_notify_fb_options">
|
693 |
+
<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>
|
694 |
+
<td>
|
695 |
+
<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"' : ''); ?>/>
|
696 |
+
</td>
|
697 |
+
</tr>
|
698 |
+
</table>
|
699 |
+
</div>
|
700 |
+
</div>
|
701 |
+
|
702 |
+
<p class="submit">
|
703 |
+
<input type="hidden" name="action" value="save"/>
|
704 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
705 |
+
</p>
|
706 |
+
|
707 |
+
</form>
|
708 |
+
</div>
|
709 |
+
</div>
|
710 |
+
|
711 |
+
<?php
|
712 |
+
$links[0]['text']=__('Test your URLs at Facebook URL Linter / Debugger', 'wd-fb-og');
|
713 |
+
$links[0]['url']='https://developers.facebook.com/tools/debug';
|
714 |
+
|
715 |
+
$links[5]['text']=__('Test (and request approval for) your URLs at Twitter Card validator', 'wd-fb-og');
|
716 |
+
$links[5]['url']='https://cards-dev.twitter.com/validator';
|
717 |
+
|
718 |
+
$links[10]['text']=__('About the Open Graph Protocol (on Facebook)', 'wd-fb-og');
|
719 |
+
$links[10]['url']='https://developers.facebook.com/docs/opengraph/';
|
720 |
+
|
721 |
+
$links[20]['text']=__('The Open Graph Protocol (official website)', 'wd-fb-og');
|
722 |
+
$links[20]['url']='http://ogp.me/';
|
723 |
+
|
724 |
+
$links[25]['text']=__('About Twitter Cards', 'wd-fb-og');
|
725 |
+
$links[25]['url']='hhttps://dev.twitter.com/cards/getting-started';
|
726 |
+
|
727 |
+
$links[30]['text']=__('Plugin official URL', 'wd-fb-og');
|
728 |
+
$links[30]['url']='http://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/?utm_source=fb_og_wp_plugin_settings&utm_medium=link&utm_campaign=fb_og_wp_plugin';
|
729 |
+
|
730 |
+
$links[40]['text']=__('Author\'s website: Webdados', 'wd-fb-og');
|
731 |
+
$links[40]['url']='http://www.webdados.pt/?utm_source=fb_og_wp_plugin_settings&utm_medium=link&utm_campaign=fb_og_wp_plugin';
|
732 |
+
|
733 |
+
$links[50]['text']=__('Author\'s Facebook page: Webdados', 'wd-fb-og');
|
734 |
+
$links[50]['url']='http://www.facebook.com/Webdados';
|
735 |
+
|
736 |
+
$links[60]['text']=__('Author\'s Twitter account: @Wonderm00n<br/>(Webdados founder)', 'wd-fb-og');
|
737 |
+
$links[60]['url']='http://twitter.com/wonderm00n';
|
738 |
+
?>
|
739 |
+
<div class="postbox-container og_right_col">
|
740 |
+
|
741 |
+
<div id="poststuff">
|
742 |
+
<div id="webdados_fb_open_graph_links" class="postbox">
|
743 |
+
<h3 id="settings"><?php _e('Rate this plugin', 'wd-fb-og');?></h3>
|
744 |
+
<div class="inside">
|
745 |
+
<?php _e('If you like this plugin,', 'wd-fb-og');?> <a href="http://wordpress.org/extend/plugins/wonderm00ns-simple-facebook-open-graph-tags/" target="_blank"><?php _e('please give it a high Rating', 'wd-fb-og');?></a>.
|
746 |
+
</div>
|
747 |
+
</div>
|
748 |
+
</div>
|
749 |
+
|
750 |
+
<div id="poststuff">
|
751 |
+
<div id="webdados_fb_open_graph_links" class="postbox">
|
752 |
+
<h3 id="settings"><?php _e('Useful links', 'wd-fb-og');?></h3>
|
753 |
+
<div class="inside">
|
754 |
+
<ul>
|
755 |
+
<?php foreach($links as $link) { ?>
|
756 |
+
<li>- <a href="<?php echo $link['url']; ?>" target="_blank"><?php echo $link['text']; ?></a></li>
|
757 |
+
<?php } ?>
|
758 |
+
</ul>
|
759 |
+
</div>
|
760 |
+
</div>
|
761 |
+
</div>
|
762 |
+
|
763 |
+
<div id="poststuff">
|
764 |
+
<div id="webdados_fb_open_graph_donation" class="postbox">
|
765 |
+
<h3 id="settings"><?php _e('Donate', 'wd-fb-og');?></h3>
|
766 |
+
<div class="inside">
|
767 |
+
<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>
|
768 |
+
<center><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
769 |
+
<input type="hidden" name="cmd" value="_donations">
|
770 |
+
<input type="hidden" name="business" value="wonderm00n@gmail.com">
|
771 |
+
<input type="hidden" name="lc" value="PT">
|
772 |
+
<input type="hidden" name="item_name" value="Marco Almeida (Wonderm00n)">
|
773 |
+
<input type="hidden" name="item_number" value="wonderm00n_open_graph">
|
774 |
+
<input type="hidden" name="currency_code" value="USD">
|
775 |
+
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
|
776 |
+
<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!">
|
777 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
778 |
+
</form></center>
|
779 |
+
</div>
|
780 |
+
</div>
|
781 |
+
</div>
|
782 |
+
|
783 |
+
</div>
|
784 |
+
|
785 |
+
<div class="clear">
|
786 |
+
<p><br/>© 2011<?php if(date('Y')>2011) echo '-'.date('Y'); ?> <a href="http://www.webdados.pt/?utm_source=fb_og_wp_plugin_settings&utm_medium=link&utm_campaign=fb_og_wp_plugin" target="_blank">Webdados</a> & <a href="http://wonderm00n.com/?utm_source=fb_og_wp_plugin_settings&utm_medium=link&utm_campaign=fb_og_wp_plugin" target="_blank">Marco Almeida (Wonderm00n)</a></p>
|
787 |
+
</div>
|
788 |
+
|
789 |
+
</div>
|
790 |
+
|
791 |
+
<script type="text/javascript">
|
792 |
+
jQuery(document).ready(function() {
|
793 |
+
jQuery('#fb_image_button').click(function(){
|
794 |
+
tb_show('',"media-upload.php?type=image&TB_iframe=true");
|
795 |
+
});
|
796 |
+
window.send_to_editor = function(html) {
|
797 |
+
var imgurl = jQuery('<div>'+html+'</div>').find('img').attr('src');
|
798 |
+
jQuery("input"+"#fb_image").val(imgurl);
|
799 |
+
tb_remove();
|
800 |
+
}
|
801 |
+
showAppidOptions();
|
802 |
+
showAdminOptions();
|
803 |
+
showLocaleOptions();
|
804 |
+
showTypeOptions();
|
805 |
+
showPublisherOptions();
|
806 |
+
showPublisherSchemaOptions();
|
807 |
+
showPublisherTwitterOptions();
|
808 |
+
showAuthorOptions();
|
809 |
+
showUrlOptions();
|
810 |
+
showUrlTrail();
|
811 |
+
jQuery('.fb_description_options').hide();
|
812 |
+
showDescriptionOptions();
|
813 |
+
showTitleOptions();
|
814 |
+
jQuery('#fb_desc_homepage_customtext').hide();
|
815 |
+
showDescriptionCustomText();
|
816 |
+
showImageOptions();
|
817 |
+
showFBNotifyOptions();
|
818 |
+
});
|
819 |
+
function showAppidOptions() {
|
820 |
+
if (jQuery('#fb_app_id_show').is(':checked')) {
|
821 |
+
jQuery('.fb_app_id_options').show();
|
822 |
+
} else {
|
823 |
+
jQuery('.fb_app_id_options').hide();
|
824 |
+
}
|
825 |
+
}
|
826 |
+
function showAdminOptions() {
|
827 |
+
if (jQuery('#fb_admin_id_show').is(':checked')) {
|
828 |
+
jQuery('.fb_admin_id_options').show();
|
829 |
+
} else {
|
830 |
+
jQuery('.fb_admin_id_options').hide();
|
831 |
+
}
|
832 |
+
}
|
833 |
+
function showLocaleOptions() {
|
834 |
+
if (jQuery('#fb_locale_show').is(':checked')) {
|
835 |
+
jQuery('.fb_locale_options').show();
|
836 |
+
} else {
|
837 |
+
jQuery('.fb_locale_options').hide();
|
838 |
+
}
|
839 |
+
}
|
840 |
+
function showUrlOptions() {
|
841 |
+
/*if (jQuery('#fb_url_show').is(':checked')) {
|
842 |
+
jQuery('.fb_url_options').show();
|
843 |
+
} else {
|
844 |
+
jQuery('.fb_url_options').hide();
|
845 |
+
}*/
|
846 |
+
jQuery('.fb_url_options').show();
|
847 |
+
}
|
848 |
+
function showUrlTrail() {
|
849 |
+
if (jQuery('#fb_url_add_trailing').is(':checked')) {
|
850 |
+
jQuery('#fb_url_add_trailing_example').show();
|
851 |
+
} else {
|
852 |
+
jQuery('#fb_url_add_trailing_example').hide();
|
853 |
+
}
|
854 |
+
}
|
855 |
+
function showTypeOptions() {
|
856 |
+
if (jQuery('#fb_type_show').is(':checked')) {
|
857 |
+
jQuery('.fb_type_options').show();
|
858 |
+
} else {
|
859 |
+
jQuery('.fb_type_options').hide();
|
860 |
+
}
|
861 |
+
}
|
862 |
+
function showAuthorOptions() {
|
863 |
+
/*if (jQuery('#fb_author_show').is(':checked')) {
|
864 |
+
jQuery('.fb_author_options').show();
|
865 |
+
} else {
|
866 |
+
jQuery('.fb_author_options').hide();
|
867 |
+
}*/
|
868 |
+
jQuery('.fb_author_options').show();
|
869 |
+
}
|
870 |
+
function showPublisherOptions() {
|
871 |
+
if (jQuery('#fb_publisher_show').is(':checked')) {
|
872 |
+
jQuery('.fb_publisher_options').show();
|
873 |
+
} else {
|
874 |
+
jQuery('.fb_publisher_options').hide();
|
875 |
+
}
|
876 |
+
}
|
877 |
+
function showPublisherTwitterOptions() {
|
878 |
+
if (jQuery('#fb_publisher_show_twitter').is(':checked')) {
|
879 |
+
jQuery('.fb_publisher_twitter_options').show();
|
880 |
+
} else {
|
881 |
+
jQuery('.fb_publisher_twitter_options').hide();
|
882 |
+
}
|
883 |
+
}
|
884 |
+
function showPublisherSchemaOptions() {
|
885 |
+
if (jQuery('#fb_publisher_show_schema').is(':checked')) {
|
886 |
+
jQuery('.fb_publisher_schema_options').show();
|
887 |
+
} else {
|
888 |
+
jQuery('.fb_publisher_schema_options').hide();
|
889 |
+
}
|
890 |
+
}
|
891 |
+
function showTypeOptions() {
|
892 |
+
if (jQuery('#fb_author_show').is(':checked')) {
|
893 |
+
jQuery('.fb_author_options').show();
|
894 |
+
} else {
|
895 |
+
jQuery('.fb_author_options').hide();
|
896 |
+
}
|
897 |
+
}
|
898 |
+
function showDescriptionOptions() {
|
899 |
+
/*if (jQuery('#fb_desc_show').is(':checked')) {
|
900 |
+
jQuery('.fb_description_options').show();
|
901 |
+
} else {
|
902 |
+
jQuery('.fb_description_options').hide();
|
903 |
+
}*/
|
904 |
+
jQuery('.fb_description_options').show();
|
905 |
+
}
|
906 |
+
function showTitleOptions() {
|
907 |
+
/*if (jQuery('#fb_title_show').is(':checked')) {
|
908 |
+
jQuery('.fb_title_options').show();
|
909 |
+
} else {
|
910 |
+
jQuery('.fb_title_options').hide();
|
911 |
+
}*/
|
912 |
+
jQuery('.fb_title_options').show(); //Not exclusive
|
913 |
+
}
|
914 |
+
function showDescriptionCustomText() {
|
915 |
+
if (jQuery('#fb_desc_homepage').val()=='custom') {
|
916 |
+
jQuery('#fb_desc_homepage_customtext').show().focus();
|
917 |
+
} else {
|
918 |
+
jQuery('#fb_desc_homepage_customtext').hide();
|
919 |
+
}
|
920 |
+
}
|
921 |
+
function showImageOptions() {
|
922 |
+
/*if (jQuery('#fb_image_show').is(':checked')) {
|
923 |
+
jQuery('.fb_image_options').show();
|
924 |
+
} else {
|
925 |
+
jQuery('.fb_image_options').hide();
|
926 |
+
}*/
|
927 |
+
jQuery('.fb_image_options').show();
|
928 |
+
}
|
929 |
+
function showFBNotifyOptions() {
|
930 |
+
if (jQuery('#fb_adv_notify_fb').is(':checked')) {
|
931 |
+
jQuery('.fb_adv_notify_fb_options').show();
|
932 |
+
} else {
|
933 |
+
jQuery('.fb_adv_notify_fb_options').hide();
|
934 |
+
}
|
935 |
+
}
|
936 |
+
</script>
|
937 |
+
<style type="text/css">
|
938 |
+
.og_left_col {
|
939 |
+
width: 69%;
|
940 |
+
}
|
941 |
+
.og_right_col {
|
942 |
+
width: 29%;
|
943 |
+
float: right;
|
944 |
+
}
|
945 |
+
.og_left_col #poststuff,
|
946 |
+
.og_right_col #poststuff {
|
947 |
+
min-width: 0;
|
948 |
+
}
|
949 |
+
table.form-table tr th,
|
950 |
+
table.form-table tr td {
|
951 |
+
line-height: 1.5;
|
952 |
+
}
|
953 |
+
table.form-table tr th {
|
954 |
+
font-weight: bold;
|
955 |
+
}
|
956 |
+
table.form-table tr th[scope=row] {
|
957 |
+
min-width: 300px;
|
958 |
+
}
|
959 |
+
table.form-table tr td hr {
|
960 |
+
height: 1px;
|
961 |
+
margin: 0px;
|
962 |
+
background-color: #DFDFDF;
|
963 |
+
border: none;
|
964 |
+
}
|
965 |
+
table.form-table .dashicons-before {
|
966 |
+
margin-right: 10px;
|
967 |
+
font-size: 12px;
|
968 |
+
opacity: 0.5;
|
969 |
+
}
|
970 |
+
table.form-table .dashicons-facebook-alt {
|
971 |
+
color: #3B5998;
|
972 |
+
}
|
973 |
+
table.form-table .dashicons-googleplus {
|
974 |
+
color: #D34836;
|
975 |
+
}
|
976 |
+
table.form-table .dashicons-twitter {
|
977 |
+
color: #55ACEE;
|
978 |
+
}
|
979 |
+
table.form-table .dashicons-rss {
|
980 |
+
color: #FF6600;
|
981 |
+
}
|
982 |
+
table.form-table .dashicons-admin-site,
|
983 |
+
table.form-table .dashicons-admin-generic {
|
984 |
+
color: #666;
|
985 |
+
}
|
986 |
+
</style>
|
987 |
+
|
988 |
+
|
989 |
+
|
990 |
+
|
app/templates/settings-table.php
CHANGED
@@ -37,8 +37,8 @@
|
|
37 |
<option value="custom_frequency" <?php if ($this->options['settings']['custom_frequency'] == "true"){ echo('selected="selected"');} ?>><?php _e('Custom frequency', "rss_pi"); ?></option>
|
38 |
</select>
|
39 |
|
40 |
-
|
41 |
-
<input type="text" id="rss_custom_frequency" name="rss_custom_frequency" value="<?php echo $rss_custom_cron['time']; ?>" placeholder="Minutes" <?php if ($this->options['settings']['custom_frequency'] == 'true'){ echo('style="display:inline"');} ?>/>
|
42 |
|
43 |
|
44 |
</td>
|
@@ -352,6 +352,28 @@ strip_html = strip html tags - "true" or "false"', "rss_pi"); ?></p>
|
|
352 |
<input type="file" name="import_opml"<?php echo $disabled; ?> />
|
353 |
</td>
|
354 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
</table>
|
356 |
</td>
|
357 |
</tr>
|
37 |
<option value="custom_frequency" <?php if ($this->options['settings']['custom_frequency'] == "true"){ echo('selected="selected"');} ?>><?php _e('Custom frequency', "rss_pi"); ?></option>
|
38 |
</select>
|
39 |
|
40 |
+
|
41 |
+
<input type="text" id="rss_custom_frequency" name="rss_custom_frequency" value="<?php echo $rss_custom_cron['time']; ?>" placeholder="Minutes" <?php if ($this->options['settings']['custom_frequency'] == 'true'){ echo('style="display:inline"');}else{ echo('style="display:none"');} ?>/>
|
42 |
|
43 |
|
44 |
</td>
|
352 |
<input type="file" name="import_opml"<?php echo $disabled; ?> />
|
353 |
</td>
|
354 |
</tr>
|
355 |
+
|
356 |
+
<tr>
|
357 |
+
<td>
|
358 |
+
<?php _e('Social Media Optimization and Open Graph', "rss_pi"); ?>
|
359 |
+
<p class="description"><?php _e('Social Media and Open Graph optimization', "rss_pi"); ?></p>
|
360 |
+
</td>
|
361 |
+
<td>
|
362 |
+
<ul class="radiolist">
|
363 |
+
<li>
|
364 |
+
<label><label><input type="checkbox" name="tw_show" id="tw_show" value="1" <?php echo($this->options['settings']['tw_show'] == '1' ? 'checked="checked"' : ''); ?> /> <?php _e('Twitter', 'rss_pi'); ?></label>
|
365 |
+
</li>
|
366 |
+
<li>
|
367 |
+
<label><label><input type="checkbox" name="gg_show" id="gg_show" value="1" <?php echo($this->options['settings']['gg_show'] == '1' ? 'checked="checked"' : ''); ?> /> <?php _e('Google+', 'rss_pi'); ?></label>
|
368 |
+
</li>
|
369 |
+
<li>
|
370 |
+
<label><label><input type="checkbox" name="og_show" id="og_show" value="1" <?php echo($this->options['settings']['og_show'] == '1' ? 'checked="checked"' : ''); ?> /> <?php _e('Facebook Opengraph', 'rss_pi'); ?></label>
|
371 |
+
</li>
|
372 |
+
</ul>
|
373 |
+
</td>
|
374 |
+
</tr>
|
375 |
+
|
376 |
+
|
377 |
</table>
|
378 |
</td>
|
379 |
</tr>
|
index.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
6 |
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
7 |
Author: feedsapi
|
8 |
-
Version: 2.1.
|
9 |
Author URI: https://www.feedsapi.org/
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -27,7 +27,7 @@ if (!defined('RSS_PI_BASENAME')) {
|
|
27 |
}
|
28 |
|
29 |
if (!defined('RSS_PI_VERSION')) {
|
30 |
-
define('RSS_PI_VERSION', '2.1.
|
31 |
}
|
32 |
|
33 |
if (!defined('RSS_PI_LOG_PATH')) {
|
5 |
Plugin URI: https://wordpress.org/plugins/rss-post-importer/
|
6 |
Description: This plugin lets you set up an import posts from one or several rss-feeds and save them as posts on your site, simple and flexible.
|
7 |
Author: feedsapi
|
8 |
+
Version: 2.1.9
|
9 |
Author URI: https://www.feedsapi.org/
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
27 |
}
|
28 |
|
29 |
if (!defined('RSS_PI_VERSION')) {
|
30 |
+
define('RSS_PI_VERSION', '2.1.9');
|
31 |
}
|
32 |
|
33 |
if (!defined('RSS_PI_LOG_PATH')) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.feedsapi.org/
|
|
4 |
Tags: rss, feeds, import, feed, autoblog, feed aggregation, rss-feed, aggregation, atom, feed, rss, syndication, FeedWordPress, autoblog aggregator, Autoblogger, autoblogging, feed import, rss multi importer, feed reader, feed to post, multi feed import, multi feed importer, multi import, multi rss feeds, multiple feed import, multiple feeds, multiple rss feeds, rss, rss aggregator, rss feader, RSS import, rss to post, content curation, RSS Retriever, RSS fetch feed, WP RSS Aggregator, AutoPost, RSS Feed to Post, RSSImport, yahoo pipes, WP Pipes, Import XML feed , FeedSyndicate, RSSpost, RSS in Page
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.2.4
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -124,6 +124,11 @@ Learn more (and get detailed instructions) in our [contribute guide](http://jetp
|
|
124 |
|
125 |
== Change Log ==
|
126 |
|
|
|
|
|
|
|
|
|
|
|
127 |
= Version 2.1.8 =
|
128 |
* New: Pause / Play feed processing and content import from a a specific feed.
|
129 |
* BUG Fix: Charting time-out for big content DB has been fixed.
|
4 |
Tags: rss, feeds, import, feed, autoblog, feed aggregation, rss-feed, aggregation, atom, feed, rss, syndication, FeedWordPress, autoblog aggregator, Autoblogger, autoblogging, feed import, rss multi importer, feed reader, feed to post, multi feed import, multi feed importer, multi import, multi rss feeds, multiple feed import, multiple feeds, multiple rss feeds, rss, rss aggregator, rss feader, RSS import, rss to post, content curation, RSS Retriever, RSS fetch feed, WP RSS Aggregator, AutoPost, RSS Feed to Post, RSSImport, yahoo pipes, WP Pipes, Import XML feed , FeedSyndicate, RSSpost, RSS in Page
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.2.4
|
7 |
+
Stable tag: 2.1.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
124 |
|
125 |
== Change Log ==
|
126 |
|
127 |
+
= Version 2.1.9 =
|
128 |
+
* Diverse bug fixes.
|
129 |
+
* SEO Best Practices implementation.
|
130 |
+
* Social Media and Open Graph optimization.
|
131 |
+
|
132 |
= Version 2.1.8 =
|
133 |
* New: Pause / Play feed processing and content import from a a specific feed.
|
134 |
* BUG Fix: Charting time-out for big content DB has been fixed.
|