Featured Image From URL - Version 2.1.2

Version Description

  • Bug fix: parse error on util.php
Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.2

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.1.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.1.2
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/html/js/image.js CHANGED
@@ -4,7 +4,7 @@ jQuery(document).ready(function ($) {
4
  setTimeout(function () {
5
  resizeImg($);
6
  jQuery('a.woocommerce-product-gallery__trigger').css('visibility', 'visible');
7
- }, 2000);
8
  });
9
 
10
  jQuery(window).on('load', function () {
4
  setTimeout(function () {
5
  resizeImg($);
6
  jQuery('a.woocommerce-product-gallery__trigger').css('visibility', 'visible');
7
+ }, 2500);
8
  });
9
 
10
  jQuery(window).on('load', function () {
includes/util.php CHANGED
@@ -1,28 +1,5 @@
1
  <?php
2
 
3
- function fifu_get_img_width_from_html($html) {
4
- if (strpos($html, 'img width=') === false)
5
- return $html;
6
- $aux = explode('img width=', $html)[1];
7
- return explode('"', $aux)[1];
8
- }
9
-
10
- function fifu_get_src_from_html($html) {
11
- if (strpos($html, 'src=') === false)
12
- return $html;
13
- $aux = explode('src=', $html)[1];
14
- return explode('"', $aux)[1];
15
- }
16
-
17
- function fifu_get_data_large_from_html($html) {
18
- if (strpos($html, 'data-large_image=') === false)
19
- return $html;
20
- $aux = explode('data-large_image=', $html);
21
- $aux = $aux && count($aux) > 1 ? $aux[1] : null;
22
- $url = $aux ? explode('"', $aux)[1] : null;
23
- return $url;
24
- }
25
-
26
  function fifu_get_attribute($attribute, $html) {
27
  $attribute = $attribute . '=';
28
  if (strpos($html, $attribute) === false)
@@ -31,15 +8,6 @@ function fifu_get_attribute($attribute, $html) {
31
  return explode('"', $aux)[1];
32
  }
33
 
34
- function fifu_replace_attribute($html, $attribute, $value) {
35
- $attribute = $attribute . '=';
36
- if (strpos($html, $attribute) === false)
37
- return $html;
38
- $matches = array();
39
- preg_match('/' . $attribute . '[^ ]+/', $html, $matches);
40
- return str_replace($matches[0], $attribute . '"' . $value . '"', $html);
41
- }
42
-
43
  function fifu_is_on($option) {
44
  return get_option($option) == 'toggleon';
45
  }
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  function fifu_get_attribute($attribute, $html) {
4
  $attribute = $attribute . '=';
5
  if (strpos($html, $attribute) === false)
8
  return explode('"', $aux)[1];
9
  }
10
 
 
 
 
 
 
 
 
 
 
11
  function fifu_is_on($option) {
12
  return get_option($option) == 'toggleon';
13
  }
readme.txt CHANGED
@@ -161,6 +161,9 @@ Features:
161
 
162
  == Changelog ==
163
 
 
 
 
164
  = 2.1.1 =
165
  * Deprecated: WooCommerce Theme Support feature.
166
 
@@ -464,6 +467,9 @@ was removed. To finish, a Premium version is now been presented.
464
 
465
  == Upgrade Notice ==
466
 
 
 
 
467
  = 2.1.1 =
468
  * Deprecated: WooCommerce Theme Support feature.
469
 
161
 
162
  == Changelog ==
163
 
164
+ = 2.1.2 =
165
+ * Bug fix: parse error on util.php
166
+
167
  = 2.1.1 =
168
  * Deprecated: WooCommerce Theme Support feature.
169
 
467
 
468
  == Upgrade Notice ==
469
 
470
+ = 2.1.2 =
471
+ * Bug fix: parse error on util.php
472
+
473
  = 2.1.1 =
474
  * Deprecated: WooCommerce Theme Support feature.
475