Featured Image From URL - Version 3.9.7

Version Description

  • Enhancements: FIFU widget for Elementor (sets the image as featured image now and does not require Elementor PRO); new Elementor widget: Featured Video.
Download this release

Release Info

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

Code changes from version 3.9.6 to 3.9.7

admin/html/troubleshooting.html CHANGED
@@ -659,23 +659,6 @@
659
  2) select "None".<br>
660
  </div>
661
  </div>
662
- <div class="box">
663
- <table>
664
- <tr>
665
- <td style="border-bottom:none">2020-04-03</td>
666
- <td style="border-bottom:none"><h3> Elementor</h3></td>
667
- <td style="border-bottom:none">plugin</td>
668
- </tr>
669
- </table>
670
- <div class="greybox" style="position: relative; top: -10px">
671
- Showing an external featured image/video:<br>
672
- 1) open the default WordPress editor;<br>
673
- 2) add the image URL into "Featured image" field (or the video URL into "Featured video");<br>
674
- 3) click on "Edit with Elementor" button;<br>
675
- 4) search for the "Featured Image" widget;<br>
676
- 5) just drag the widget (no edition required).<br>
677
- </div>
678
- </div>
679
  <div class="box">
680
  <table>
681
  <tr>
659
  2) select "None".<br>
660
  </div>
661
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
  <div class="box">
663
  <table>
664
  <tr>
elementor/elementor-fifu-extension.php CHANGED
@@ -22,6 +22,7 @@ final class Elementor_FIFU_Extension {
22
 
23
  public function i18n() {
24
  load_plugin_textdomain('elementor-fifu-extension');
 
25
  }
26
 
27
  public function init() {
@@ -34,11 +35,12 @@ final class Elementor_FIFU_Extension {
34
  }
35
 
36
  public function init_widgets() {
37
- // Include Widget files
38
  require_once( __DIR__ . '/widgets/widget.php' );
39
-
40
- // Register widget
41
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_FIFU_Widget());
 
 
 
42
  }
43
 
44
  public function init_controls() {
@@ -52,3 +54,4 @@ final class Elementor_FIFU_Extension {
52
  }
53
 
54
  Elementor_FIFU_Extension::instance();
 
22
 
23
  public function i18n() {
24
  load_plugin_textdomain('elementor-fifu-extension');
25
+ load_plugin_textdomain('elementor-fifu-video-extension');
26
  }
27
 
28
  public function init() {
35
  }
36
 
37
  public function init_widgets() {
38
+ // Include Widget files and register widget
39
  require_once( __DIR__ . '/widgets/widget.php' );
 
 
40
  \Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_FIFU_Widget());
41
+
42
+ require_once( __DIR__ . '/widgets/widget-video.php' );
43
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_FIFU_Video_Widget());
44
  }
45
 
46
  public function init_controls() {
54
  }
55
 
56
  Elementor_FIFU_Extension::instance();
57
+
elementor/widgets/widget-video.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Elementor_FIFU_Video_Widget extends \Elementor\Widget_Base {
4
+
5
+ public function get_name() {
6
+ return 'fifu-video-elementor';
7
+ }
8
+
9
+ public function get_title() {
10
+ return __('(FIFU) Featured Video', 'elementor-fifu-video-extension');
11
+ }
12
+
13
+ public function get_icon() {
14
+ return 'eicon-youtube';
15
+ }
16
+
17
+ public function get_categories() {
18
+ return ['basic'];
19
+ }
20
+
21
+ protected function _register_controls() {
22
+
23
+ $this->start_controls_section(
24
+ 'content_section_video',
25
+ [
26
+ 'label' => __('Featured video', 'elementor-fifu-video-extension'),
27
+ 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
28
+ ]
29
+ );
30
+ $this->add_control(
31
+ 'fifu_video_input_url',
32
+ [
33
+ 'label' => __('Video URL', 'elementor-fifu-video-extension'),
34
+ 'show_label' => true,
35
+ 'label_block' => true,
36
+ 'type' => \Elementor\Controls_Manager::TEXT,
37
+ 'input_type' => 'url',
38
+ 'placeholder' => __('https://youtube.com/watch?v=ID', 'elementor-fifu-video-extension'),
39
+ 'description' => 'Requires FIFU PRO',
40
+ ]
41
+ );
42
+ $this->end_controls_section();
43
+ }
44
+
45
+ protected function render() {
46
+
47
+ }
48
+
49
+ }
50
+
elementor/widgets/widget.php CHANGED
@@ -7,7 +7,7 @@ class Elementor_FIFU_Widget extends \Elementor\Widget_Base {
7
  }
8
 
9
  public function get_title() {
10
- return __('Featured Image from URL', 'elementor-fifu-extension');
11
  }
12
 
13
  public function get_icon() {
@@ -23,7 +23,7 @@ class Elementor_FIFU_Widget extends \Elementor\Widget_Base {
23
  $this->start_controls_section(
24
  'content_section_image',
25
  [
26
- 'label' => __('External image', 'elementor-fifu-extension'),
27
  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
28
  ]
29
  );
@@ -35,30 +35,7 @@ class Elementor_FIFU_Widget extends \Elementor\Widget_Base {
35
  'label_block' => true,
36
  'type' => \Elementor\Controls_Manager::TEXT,
37
  'input_type' => 'url',
38
- 'placeholder' => __('https://site.com/image.jpg', 'elementor-fifu-extension'),
39
- ]
40
- );
41
- $this->end_controls_section();
42
-
43
- $this->start_controls_section(
44
- 'content_section2',
45
- [
46
- 'label' => __('FAQ', 'elementor-fifu-extension'),
47
- 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
48
- ]
49
- );
50
- $this->add_control(
51
- 'faq2',
52
- [
53
- 'type' => \Elementor\Controls_Manager::RAW_HTML,
54
- 'raw' => __('<b>How to use the first image as featured image?</b><br><br>1) access FIFU Settings > Automatic > Auto set featured media from post content;<br>2) enable the first toggle.<br><br>', 'plugin-name'),
55
- ]
56
- );
57
- $this->add_control(
58
- 'faq3',
59
- [
60
- 'type' => \Elementor\Controls_Manager::RAW_HTML,
61
- 'raw' => __('<b>I created a grid of images. How to have all with the same height?</b><br><br>1) access FIFU Settings > Featured image;<br>2) enable Same Height;<br>3) add the selector "div.elementor-row".', 'plugin-name'),
62
  ]
63
  );
64
  $this->end_controls_section();
@@ -76,3 +53,23 @@ class Elementor_FIFU_Widget extends \Elementor\Widget_Base {
76
 
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  }
8
 
9
  public function get_title() {
10
+ return __('(FIFU) Featured Image', 'elementor-fifu-extension');
11
  }
12
 
13
  public function get_icon() {
23
  $this->start_controls_section(
24
  'content_section_image',
25
  [
26
+ 'label' => __('Featured image', 'elementor-fifu-extension'),
27
  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
28
  ]
29
  );
35
  'label_block' => true,
36
  'type' => \Elementor\Controls_Manager::TEXT,
37
  'input_type' => 'url',
38
+ 'placeholder' => __('https://example.com/image.jpg', 'elementor-fifu-extension'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  ]
40
  );
41
  $this->end_controls_section();
53
 
54
  }
55
 
56
+ function fifu_image_after_save_elementor_data($post_id, $editor_data) {
57
+ foreach ($editor_data as $data) {
58
+ if (isset($data['elements'][0]['elements'][0]['widgetType'])) {
59
+ $widgetType = $data['elements'][0]['elements'][0]['widgetType'];
60
+ if (strpos($widgetType, 'fifu') !== false) {
61
+ $settings = $data['elements'][0]['elements'][0]['settings'];
62
+
63
+ if ($widgetType == 'fifu-elementor') {
64
+ if (isset($settings['fifu_input_url'])) {
65
+ $image_url = $settings['fifu_input_url'];
66
+ fifu_dev_set_image($post_id, $image_url);
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ add_action('elementor/editor/after_save', 'fifu_image_after_save_elementor_data', 10, 2);
75
+
featured-image-from-url.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video as featured image/video of a post or WooCommerce product.
7
- * Version: 3.9.6
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
4
  * Plugin Name: Featured Image from URL (FIFU)
5
  * Plugin URI: https://fifu.app/
6
  * Description: Use an external image/video as featured image/video of a post or WooCommerce product.
7
+ * Version: 3.9.7
8
  * Author: fifu.app
9
  * Author URI: https://fifu.app/
10
  * WC requires at least: 4.0
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://donorbox.org/fifu
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
  Tested up to: 6.0
7
- Stable tag: 3.9.6
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -100,6 +100,7 @@ Supports videos from YouTube, Vimeo, Imgur, 9GAG, Cloudinary, Tumblr, Publitio,
100
  * **[PRO]** Background video
101
  * **[PRO]** Related videos
102
  * **[PRO]** Gallery icon
 
103
 
104
  #### WIDGETS
105
 
@@ -227,20 +228,20 @@ Featured Image, Figurë e Zgjedhur, Image mise en avant, Uitgelichte afbeelding,
227
 
228
  == Changelog ==
229
 
 
 
 
230
  = 3.9.6 =
231
  * Enhancement: CDN + Optimized Thumbnails (more precision).
232
 
233
  = 3.9.5 =
234
  * New option: Autoplay > on home; fix: FIFU Column (no title on Screen Options).
235
 
236
- = 3.9.4 =
237
- * New feature: Video Controls; enhancement: CDN + Optimized Thumbnails (works on Product Categories page now); deprecated: Black Background; fix: Quick Edit Column (style issues).
238
-
239
  = others =
240
  * [more](https://fifu.app/changelog)
241
 
242
 
243
  == Upgrade Notice ==
244
 
245
- = 3.9.6 =
246
- * Enhancement: CDN + Optimized Thumbnails (more precision).
4
  Tags: featured, image, url, video, woocommerce
5
  Requires at least: 5.3
6
  Tested up to: 6.0
7
+ Stable tag: 3.9.7
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
100
  * **[PRO]** Background video
101
  * **[PRO]** Related videos
102
  * **[PRO]** Gallery icon
103
+ * **[PRO]** Elementor widget
104
 
105
  #### WIDGETS
106
 
228
 
229
  == Changelog ==
230
 
231
+ = 3.9.7 =
232
+ * Enhancements: FIFU widget for Elementor (sets the image as featured image now and does not require Elementor PRO); new Elementor widget: Featured Video.
233
+
234
  = 3.9.6 =
235
  * Enhancement: CDN + Optimized Thumbnails (more precision).
236
 
237
  = 3.9.5 =
238
  * New option: Autoplay > on home; fix: FIFU Column (no title on Screen Options).
239
 
 
 
 
240
  = others =
241
  * [more](https://fifu.app/changelog)
242
 
243
 
244
  == Upgrade Notice ==
245
 
246
+ = 3.9.7 =
247
+ * Enhancements: FIFU widget for Elementor (sets the image as featured image now and does not require Elementor PRO); new Elementor widget: Featured Video.