Featured Image From URL - Version 1.9.9

Version Description

  • "Featured Image in Content" can be enabled/disabled for pages/posts individually now.
Download this release

Release Info

Developer marceljm
Plugin Icon 128x128 Featured Image From URL
Version 1.9.9
Comparing to
See all releases

Code changes from version 1.9.8 to 1.9.9

admin/html/menu.html CHANGED
@@ -287,25 +287,64 @@
287
  It will sound crazy, but some themes don't show the Featured Image on the posts or pages. If it is your case and you would like to show the Featured Image there, just enable the toggle. The Featured Image will appear at the beginning of the content, before the text.
288
  </div>
289
  <br>
290
- <form
291
- id="fifu_form_content"
292
- action="javascript:void(0)"
293
- method="post">
294
- <input
295
- type="image"
296
- href="javascript:void(0)"
297
- id="fifu_toggle_content"
298
- onclick="invert('content')"
299
- name="fifu_toggle_content"
300
- class="<?php echo $enable_content; ?>"
301
- value=""
302
- style="display:block">
303
- <input
304
- type="hidden"
305
- id="fifu_input_content"
306
- name="fifu_input_content"
307
- value="" >
308
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  </div>
310
 
311
  <div class="box">
287
  It will sound crazy, but some themes don't show the Featured Image on the posts or pages. If it is your case and you would like to show the Featured Image there, just enable the toggle. The Featured Image will appear at the beginning of the content, before the text.
288
  </div>
289
  <br>
290
+ <table style="text-align:left">
291
+ <tr>
292
+ <th>
293
+ <form
294
+ id="fifu_form_content_page"
295
+ action="javascript:void(0)"
296
+ method="post">
297
+
298
+ <input
299
+ type="image"
300
+ href="javascript:void(0)"
301
+ id="fifu_toggle_content_page"
302
+ onclick="invert('content_page')"
303
+ name="fifu_toggle_content_page"
304
+ class="<?php echo $enable_content_page; ?>"
305
+ value=""
306
+ style="display:block">
307
+
308
+ <input
309
+ type="hidden"
310
+ id="fifu_input_content_page"
311
+ name="fifu_input_content_page"
312
+ value="" >
313
+ </form>
314
+ </th>
315
+ <th>
316
+ on page
317
+ </th>
318
+ </tr>
319
+ <tr>
320
+ <th>
321
+ <form
322
+ id="fifu_form_content"
323
+ action="javascript:void(0)"
324
+ method="post">
325
+
326
+ <input
327
+ type="image"
328
+ href="javascript:void(0)"
329
+ id="fifu_toggle_content"
330
+ onclick="invert('content')"
331
+ name="fifu_toggle_content"
332
+ class="<?php echo $enable_content; ?>"
333
+ value=""
334
+ style="display:block">
335
+
336
+ <input
337
+ type="hidden"
338
+ id="fifu_input_content"
339
+ name="fifu_input_content"
340
+ value="" >
341
+ </form>
342
+ </th>
343
+ <th>
344
+ on post
345
+ </th>
346
+ </tr>
347
+ </table>
348
  </div>
349
 
350
  <div class="box">
admin/menu.php CHANGED
@@ -16,6 +16,7 @@ function fifu_get_menu_html() {
16
  $enable_social = get_option('fifu_social');
17
  $enable_lazy = get_option('fifu_lazy');
18
  $enable_content = get_option('fifu_content');
 
19
  $enable_fake = get_option('fifu_fake');
20
  $css_style = get_option('fifu_css');
21
  $default_url = get_option('fifu_default_url');
@@ -48,6 +49,7 @@ function fifu_get_menu_settings() {
48
  fifu_get_setting('fifu_social');
49
  fifu_get_setting('fifu_lazy');
50
  fifu_get_setting('fifu_content');
 
51
  fifu_get_setting('fifu_fake');
52
  fifu_get_setting('fifu_css');
53
  fifu_get_setting('fifu_default_url');
@@ -85,6 +87,7 @@ function fifu_update_menu_options() {
85
  fifu_update_option('fifu_input_social', 'fifu_social');
86
  fifu_update_option('fifu_input_lazy', 'fifu_lazy');
87
  fifu_update_option('fifu_input_content', 'fifu_content');
 
88
  fifu_update_option('fifu_input_fake', 'fifu_fake');
89
  fifu_update_option('fifu_input_css', 'fifu_css');
90
  fifu_update_option('fifu_input_default_url', 'fifu_default_url');
16
  $enable_social = get_option('fifu_social');
17
  $enable_lazy = get_option('fifu_lazy');
18
  $enable_content = get_option('fifu_content');
19
+ $enable_content_page = get_option('fifu_content_page');
20
  $enable_fake = get_option('fifu_fake');
21
  $css_style = get_option('fifu_css');
22
  $default_url = get_option('fifu_default_url');
49
  fifu_get_setting('fifu_social');
50
  fifu_get_setting('fifu_lazy');
51
  fifu_get_setting('fifu_content');
52
+ fifu_get_setting('fifu_content_page');
53
  fifu_get_setting('fifu_fake');
54
  fifu_get_setting('fifu_css');
55
  fifu_get_setting('fifu_default_url');
87
  fifu_update_option('fifu_input_social', 'fifu_social');
88
  fifu_update_option('fifu_input_lazy', 'fifu_lazy');
89
  fifu_update_option('fifu_input_content', 'fifu_content');
90
+ fifu_update_option('fifu_input_content_page', 'fifu_content_page');
91
  fifu_update_option('fifu_input_fake', 'fifu_fake');
92
  fifu_update_option('fifu_input_css', 'fifu_css');
93
  fifu_update_option('fifu_input_default_url', 'fifu_default_url');
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image From URL
5
  * Plugin URI: https://featuredimagefromurl.com/
6
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
7
- * Version: 1.9.8
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
4
  * Plugin Name: Featured Image From URL
5
  * Plugin URI: https://featuredimagefromurl.com/
6
  * Description: Use an external image as Featured Image of your post/page/custom post type (WooCommerce). Includes Auto Set (External Post), Product Gallery, Social Tags and more.
7
+ * Version: 1.9.9
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/thumbnail.php CHANGED
@@ -82,10 +82,7 @@ function fifu_get_html($url, $alt) {
82
  add_filter('the_content', 'fifu_add_to_content');
83
 
84
  function fifu_add_to_content($content) {
85
- if (is_singular() && has_post_thumbnail() && fifu_is_on('fifu_content'))
86
- return get_the_post_thumbnail() . $content;
87
- else
88
- return $content;
89
  }
90
 
91
  add_filter('wp_get_attachment_url', 'fifu_replace_attachment_url', 10, 2);
@@ -173,3 +170,4 @@ function fifu_is_in_editor() {
173
  function fifu_internal_priority() {
174
  return fifu_is_on('fifu_priority');
175
  }
 
82
  add_filter('the_content', 'fifu_add_to_content');
83
 
84
  function fifu_add_to_content($content) {
85
+ return is_singular() && has_post_thumbnail() && ((is_singular('post') && fifu_is_on('fifu_content')) or ( is_singular('page') && fifu_is_on('fifu_content_page'))) ? get_the_post_thumbnail() . $content : $content;
 
 
 
86
  }
87
 
88
  add_filter('wp_get_attachment_url', 'fifu_replace_attachment_url', 10, 2);
170
  function fifu_internal_priority() {
171
  return fifu_is_on('fifu_priority');
172
  }
173
+
readme.txt CHANGED
@@ -159,6 +159,9 @@ Features:
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = 1.9.8 =
163
  * Allows to disable auto set image Alt/Title.
164
 
@@ -411,6 +414,9 @@ was removed. To finish, a Premium version is now been presented.
411
 
412
  == Upgrade Notice ==
413
 
 
 
 
414
  = 1.9.8 =
415
  * Allows to disable auto set image Alt/Title.
416
 
159
 
160
  == Changelog ==
161
 
162
+ = 1.9.9 =
163
+ * "Featured Image in Content" can be enabled/disabled for pages/posts individually now.
164
+
165
  = 1.9.8 =
166
  * Allows to disable auto set image Alt/Title.
167
 
414
 
415
  == Upgrade Notice ==
416
 
417
+ = 1.9.9 =
418
+ * "Featured Image in Content" can be enabled/disabled for pages/posts individually now.
419
+
420
  = 1.9.8 =
421
  * Allows to disable auto set image Alt/Title.
422