Featured Image From URL - Version 2.3.2

Version Description

  • Improvement: sanitize the URL before saving.
Download this release

Release Info

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

Code changes from version 2.3.1 to 2.3.2

admin/category.php CHANGED
@@ -52,7 +52,7 @@ function fifu_ctgr_save_properties($term_id) {
52
  update_term_meta($term_id, 'fifu_image_alt', wp_strip_all_tags($_POST['fifu_input_alt']));
53
 
54
  if (isset($_POST['fifu_input_url'])) {
55
- $url = $_POST['fifu_input_url'];
56
  update_term_meta($term_id, 'fifu_image_url', fifu_convert($url));
57
  fifu_db_ctgr_update_fake_attach_id($term_id);
58
  }
52
  update_term_meta($term_id, 'fifu_image_alt', wp_strip_all_tags($_POST['fifu_input_alt']));
53
 
54
  if (isset($_POST['fifu_input_url'])) {
55
+ $url = esc_url_raw($_POST['fifu_input_url']);
56
  update_term_meta($term_id, 'fifu_image_url', fifu_convert($url));
57
  fifu_db_ctgr_update_fake_attach_id($term_id);
58
  }
admin/html/menu.html CHANGED
@@ -20,7 +20,7 @@
20
  <li><a href="#tabs-c">Video</a></li>
21
  <li><a href="#tabs-o">WooCommerce</a></li>
22
  <li><a href="#tabs-p">WP All Import</a></li>
23
- <li><a href="#tabs-a">Offer: Premium version + lifetime updates for <b>US$ 45</b></a></li>
24
  <br>
25
  <br>
26
  <div id="tabs-a">
@@ -2133,7 +2133,7 @@
2133
 
2134
  <div id="dialog" title="About">
2135
  <textarea id="bar" style="width:600px;height:500px;resize:none;" readonly>
2136
- <?php echo fifu_version() ?>;
2137
  Site:<?php echo get_home_url() ?>;
2138
  Theme:<?php echo wp_get_theme() ?>;
2139
  PHP:<?php echo phpversion() ?>;
20
  <li><a href="#tabs-c">Video</a></li>
21
  <li><a href="#tabs-o">WooCommerce</a></li>
22
  <li><a href="#tabs-p">WP All Import</a></li>
23
+ <li><a href="#tabs-a">Offer: Premium version + lifetime updates: <b>US$ 45</b></a></li>
24
  <br>
25
  <br>
26
  <div id="tabs-a">
2133
 
2134
  <div id="dialog" title="About">
2135
  <textarea id="bar" style="width:600px;height:500px;resize:none;" readonly>
2136
+ Version:<?php echo fifu_version() ?>;
2137
  Site:<?php echo get_home_url() ?>;
2138
  Theme:<?php echo wp_get_theme() ?>;
2139
  PHP:<?php echo phpversion() ?>;
admin/menu.php CHANGED
@@ -5,6 +5,7 @@ define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_original', 'fifu_la
5
  add_action('admin_menu', 'fifu_insert_menu');
6
 
7
  function fifu_insert_menu() {
 
8
  wp_enqueue_style('jquery-ui-style', '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css');
9
  wp_enqueue_script('jquery-ui', 'https://code.jquery.com/ui/1.11.4/jquery-ui.min.js');
10
  wp_enqueue_script('jquery', 'https://code.jquery.com/jquery-1.11.3.min.js');
5
  add_action('admin_menu', 'fifu_insert_menu');
6
 
7
  function fifu_insert_menu() {
8
+ wp_enqueue_style('font-awesome', 'https://use.fontawesome.com/releases/v5.7.0/css/all.css');
9
  wp_enqueue_style('jquery-ui-style', '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.min.css');
10
  wp_enqueue_script('jquery-ui', 'https://code.jquery.com/ui/1.11.4/jquery-ui.min.js');
11
  wp_enqueue_script('jquery', 'https://code.jquery.com/jquery-1.11.3.min.js');
admin/meta-box.php CHANGED
@@ -71,7 +71,7 @@ function fifu_save_properties($post_id) {
71
 
72
  /* image url */
73
  if (isset($_POST['fifu_input_url'])) {
74
- $url = $_POST['fifu_input_url'];
75
  $first = fifu_first_url_in_content($post_id);
76
  if ($first && fifu_is_on('fifu_get_first') && (!$url || fifu_is_on('fifu_ovw_first')))
77
  $url = $first;
71
 
72
  /* image url */
73
  if (isset($_POST['fifu_input_url'])) {
74
+ $url = esc_url_raw($_POST['fifu_input_url']);
75
  $first = fifu_first_url_in_content($post_id);
76
  if ($first && fifu_is_on('fifu_get_first') && (!$url || fifu_is_on('fifu_ovw_first')))
77
  $url = $first;
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: 2.3.1
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: 2.3.2
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
readme.txt CHANGED
@@ -157,6 +157,9 @@ Features:
157
 
158
  == Changelog ==
159
 
 
 
 
160
  = 2.3.1 =
161
  * Improvement: compatible with WooCommerce Import feature now.
162
 
@@ -520,6 +523,9 @@ was removed. To finish, a Premium version is now been presented.
520
 
521
  == Upgrade Notice ==
522
 
 
 
 
523
  = 2.3.1 =
524
  * Improvement: compatible with WooCommerce Import feature now.
525
 
157
 
158
  == Changelog ==
159
 
160
+ = 2.3.2 =
161
+ * Improvement: sanitize the URL before saving.
162
+
163
  = 2.3.1 =
164
  * Improvement: compatible with WooCommerce Import feature now.
165
 
523
 
524
  == Upgrade Notice ==
525
 
526
+ = 2.3.2 =
527
+ * Improvement: sanitize the URL before saving.
528
+
529
  = 2.3.1 =
530
  * Improvement: compatible with WooCommerce Import feature now.
531