Featured Image From URL - Version 2.5.7

Version Description

  • Improvement: documentation added to REST API; bug fix: Save Image Dimensions.
Download this release

Release Info

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

Code changes from version 2.5.6 to 2.5.7

admin/html/menu.html CHANGED
@@ -2032,7 +2032,9 @@
2032
  <li><a href="#tabs-6">product category</a></li>
2033
  <li><a href="#tabs-7">product variable</a></li>
2034
  <li><a href="#tabs-4">product variation</a></li>
 
2035
  <li><a href="#tabs-5">post</a></li>
 
2036
  </ul>
2037
  <div id="tabs-1">
2038
  <table style="text-align:left">
@@ -2046,31 +2048,37 @@
2046
  <tr>
2047
  <th>Product</th>
2048
  <th>
2049
- http://yourdomain/wp-json/wc/v3/products
2050
  </th>
2051
  </tr>
2052
  <tr>
2053
  <th>Product Category</th>
2054
  <th>
2055
- http://yourdomain/wp-json/wc/v3/products/categories
2056
  </th>
2057
  </tr>
2058
  <tr>
2059
  <th>Product Variation</th>
2060
  <th>
2061
- http://yourdomain/wp-json/wc/v3/products/{id}/variations/
 
 
 
 
 
 
2062
  </th>
2063
  </tr>
2064
  <tr>
2065
  <th>Post</th>
2066
  <th>
2067
- http://yourdomain/wp-json/wp/v2/posts
2068
  </th>
2069
  </tr>
2070
  <tr>
2071
  <th>Custom Post Type</th>
2072
  <th>
2073
- http://yourdomain/wp-json/wp/v2/{post_type}
2074
  </th>
2075
  </tr>
2076
  </table>
@@ -2087,31 +2095,31 @@
2087
  <tr>
2088
  <th>Product</th>
2089
  <th>
2090
- http://yourdomain/wp-json/wc/v3/products/{id}
2091
  </th>
2092
  </tr>
2093
  <tr>
2094
  <th>Product Category</th>
2095
  <th>
2096
- http://yourdomain/wp-json/wc/v3/products/categories/{id}
2097
  </th>
2098
  </tr>
2099
  <tr>
2100
  <th>Product Variation</th>
2101
  <th>
2102
- http://yourdomain/wp-json/wc/v3/products/{id}/variations/{variation_id}
2103
  </th>
2104
  </tr>
2105
  <tr>
2106
  <th>Post</th>
2107
  <th>
2108
- http://yourdomain/wp-json/wp/v2/posts/{id}
2109
  </th>
2110
  </tr>
2111
  <tr>
2112
  <th>Custom Post Type</th>
2113
  <th>
2114
- http://yourdomain/wp-json/wp/v2/{post_type}/{id}
2115
  </th>
2116
  </tr>
2117
  </table>
@@ -2219,6 +2227,37 @@
2219
 
2220
  </div>
2221
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2222
  </div>
2223
 
2224
  </div>
2032
  <li><a href="#tabs-6">product category</a></li>
2033
  <li><a href="#tabs-7">product variable</a></li>
2034
  <li><a href="#tabs-4">product variation</a></li>
2035
+ <li><a href="#tabs-8">batch</a></li>
2036
  <li><a href="#tabs-5">post</a></li>
2037
+ <li><a href="#tabs-9">Documentation</a></li>
2038
  </ul>
2039
  <div id="tabs-1">
2040
  <table style="text-align:left">
2048
  <tr>
2049
  <th>Product</th>
2050
  <th>
2051
+ /wp-json/wc/v3/products
2052
  </th>
2053
  </tr>
2054
  <tr>
2055
  <th>Product Category</th>
2056
  <th>
2057
+ /wp-json/wc/v3/products/categories
2058
  </th>
2059
  </tr>
2060
  <tr>
2061
  <th>Product Variation</th>
2062
  <th>
2063
+ /wp-json/wc/v3/products/{id}/variations/
2064
+ </th>
2065
+ </tr>
2066
+ <tr>
2067
+ <th>Batch</th>
2068
+ <th>
2069
+ /wp-json/wc/v3/products/batch
2070
  </th>
2071
  </tr>
2072
  <tr>
2073
  <th>Post</th>
2074
  <th>
2075
+ /wp-json/wp/v2/posts
2076
  </th>
2077
  </tr>
2078
  <tr>
2079
  <th>Custom Post Type</th>
2080
  <th>
2081
+ /wp-json/wp/v2/{post_type}
2082
  </th>
2083
  </tr>
2084
  </table>
2095
  <tr>
2096
  <th>Product</th>
2097
  <th>
2098
+ /wp-json/wc/v3/products/{id}
2099
  </th>
2100
  </tr>
2101
  <tr>
2102
  <th>Product Category</th>
2103
  <th>
2104
+ /wp-json/wc/v3/products/categories/{id}
2105
  </th>
2106
  </tr>
2107
  <tr>
2108
  <th>Product Variation</th>
2109
  <th>
2110
+ /wp-json/wc/v3/products/{id}/variations/{variation_id}
2111
  </th>
2112
  </tr>
2113
  <tr>
2114
  <th>Post</th>
2115
  <th>
2116
+ /wp-json/wp/v2/posts/{id}
2117
  </th>
2118
  </tr>
2119
  <tr>
2120
  <th>Custom Post Type</th>
2121
  <th>
2122
+ /wp-json/wp/v2/{post_type}/{id}
2123
  </th>
2124
  </tr>
2125
  </table>
2227
 
2228
  </div>
2229
 
2230
+ <div id="tabs-8">
2231
+
2232
+ <iframe src="<?php echo plugins_url()?>/featured-image-from-url/admin/html/txt/batch.txt"
2233
+ width="800px" height="425px" ></iframe>
2234
+
2235
+ </div>
2236
+
2237
+ <div id="tabs-9">
2238
+
2239
+ <table style="text-align:left">
2240
+ <tr>
2241
+ <th>
2242
+ 1)
2243
+ </th>
2244
+ <th>
2245
+ <a href="https://developer.wordpress.org/rest-api/reference/">WordPress REST API</a>
2246
+ </th>
2247
+ </tr>
2248
+ <tr>
2249
+ <th>
2250
+ 2)
2251
+ </th>
2252
+ <th>
2253
+ <a href="https://woocommerce.github.io/woocommerce-rest-api-docs/?php#introduction">WooCommerce REST API</a>
2254
+ </th>
2255
+ </tr>
2256
+ </table>
2257
+
2258
+ <br/>
2259
+ </div>
2260
+
2261
  </div>
2262
 
2263
  </div>
admin/html/meta-box.html CHANGED
@@ -61,9 +61,9 @@
61
  <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid orange; border-top: 2px solid orange; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
62
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Product Gallery, Video and Slider fields are only available in <a href="admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version</p>
63
  <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #34ba1c; border-top: 2px solid #34ba1c; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
64
- background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: countdown added to "Save Image Dimensions"</p>
65
- <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #538dd3; border-top: 2px solid #538dd3; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
66
- background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: FAQ added to "WP All Import"</p>
67
  <!--p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #7e600e ; border-top: 2px solid #7e600e ; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
68
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: integration with WooCommerce TM Extra Product Options</b></a> plugin</p-->
69
  </div>
61
  <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid orange; border-top: 2px solid orange; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
62
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Product Gallery, Video and Slider fields are only available in <a href="admin.php?page=featured-image-from-url#tabs-a"><b>premium</b></a> version</p>
63
  <p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #34ba1c; border-top: 2px solid #34ba1c; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
64
+ background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: documentation and batch example added to "REST API"</p>
65
+ <!--p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #538dd3; border-top: 2px solid #538dd3; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
66
+ background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: FAQ added to "WP All Import"</p-->
67
  <!--p style="font-size: 12px; padding: 10px; border-bottom: 2px solid #7e600e ; border-top: 2px solid #7e600e ; color: black; background: repeating-linear-gradient(-55deg,white,white 2px,whitesmoke 2px,white 5px);
68
  background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New: integration with WooCommerce TM Extra Product Options</b></a> plugin</p-->
69
  </div>
admin/html/txt/batch.txt ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "update": [
3
+ {
4
+ "id": 1,
5
+ "meta_data": [
6
+ {
7
+ "key": "fifu_list_url",
8
+ "value": "https://farm5.staticflickr.com/4411/36159714680_cc552f124f_q.jpg|https://farm5.staticflickr.com/4415/35747392283_e685519b88_q.jpg"
9
+ },
10
+ {
11
+ "key": "fifu_list_alt",
12
+ "value": "avengers|hulk"
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "id": 2,
18
+ "meta_data": [
19
+ {
20
+ "key": "fifu_list_url",
21
+ "value": "https://farm5.staticflickr.com/4411/36159714680_cc552f124f_q.jpg|https://farm5.staticflickr.com/4415/36510266406_ee630f55e7_q.jpg"
22
+ },
23
+ {
24
+ "key": "fifu_list_alt",
25
+ "value": "avengers|iron man"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ }
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.5.6
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.5.7
8
  * Author: Marcel Jacques Machado
9
  * Author URI: https://www.linkedin.com/in/marceljm/
10
  */
includes/util.php CHANGED
@@ -71,6 +71,6 @@ function fifu_get_dimension_backend($url) {
71
  $img = imagecreatefromstring($raw);
72
  $width = imagesx($img);
73
  $height = imagesy($img);
74
- return $width . ";" . $height;
75
  }
76
 
71
  $img = imagecreatefromstring($raw);
72
  $width = imagesx($img);
73
  $height = imagesy($img);
74
+ return ($width && $height) ? $width . ";" . $height : null;
75
  }
76
 
readme.txt CHANGED
@@ -159,6 +159,9 @@ Features:
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = 2.5.6 =
163
  * Improvements: countdown added to Save Image Dimensions; FAQ added to WP All Import.
164
 
@@ -597,6 +600,9 @@ was removed. To finish, a Premium version is now been presented.
597
 
598
  == Upgrade Notice ==
599
 
 
 
 
600
  = 2.5.6 =
601
  * Improvements: countdown added to Save Image Dimensions; FAQ added to WP All Import.
602
 
159
 
160
  == Changelog ==
161
 
162
+ = 2.5.7 =
163
+ * Improvement: documentation added to REST API; bug fix: Save Image Dimensions.
164
+
165
  = 2.5.6 =
166
  * Improvements: countdown added to Save Image Dimensions; FAQ added to WP All Import.
167
 
600
 
601
  == Upgrade Notice ==
602
 
603
+ = 2.5.7 =
604
+ * Improvement: documentation added to REST API; bug fix: Save Image Dimensions.
605
+
606
  = 2.5.6 =
607
  * Improvements: countdown added to Save Image Dimensions; FAQ added to WP All Import.
608