Featured Image From URL - Version 1.5.7

Version Description

  • Resize featured image column.

=

Download this release

Release Info

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

Code changes from version 1.5.6 to 1.5.7

admin/column.php CHANGED
@@ -12,7 +12,7 @@ function fifu_column() {
12
  }
13
 
14
  function fifu_column_head($default) {
15
- $default['featured_image'] = 'Featured Image';
16
  return $default;
17
  }
18
 
@@ -20,7 +20,7 @@ function fifu_cat_column_content($internal_image, $column, $term_id) {
20
  if ($column == 'featured_image') {
21
  $url = get_term_meta($term_id, 'fifu_image_url', true);
22
  if ($url != '')
23
- echo sprintf('<img src="%s" width="32"/>', $url);
24
  } else
25
  echo $internal_image;
26
  }
@@ -30,6 +30,6 @@ function fifu_column_content($column, $post_id) {
30
  $url = get_post_meta($post_id, 'fifu_image_url', true);
31
  if ($url == '')
32
  $url = wp_get_attachment_url(get_post_thumbnail_id());
33
- echo sprintf('<img src="%s" width="32"/>', $url);
34
  }
35
  }
12
  }
13
 
14
  function fifu_column_head($default) {
15
+ $default['featured_image'] = 'FIFU';
16
  return $default;
17
  }
18
 
20
  if ($column == 'featured_image') {
21
  $url = get_term_meta($term_id, 'fifu_image_url', true);
22
  if ($url != '')
23
+ echo sprintf('<img src="%s" height="%s"/>', $url, get_option('fifu_column_height'));
24
  } else
25
  echo $internal_image;
26
  }
30
  $url = get_post_meta($post_id, 'fifu_image_url', true);
31
  if ($url == '')
32
  $url = wp_get_attachment_url(get_post_thumbnail_id());
33
+ echo sprintf('<img src="%s" height="%s"/>', $url, get_option('fifu_column_height'));
34
  }
35
  }
admin/html/menu.html CHANGED
@@ -120,6 +120,21 @@
120
  </form>
121
  </div>
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  <div class="box">
124
  <h2>Featured Image in Content</h2>
125
  <div class="greybox" style="background:#e3ffe2">
@@ -301,6 +316,19 @@
301
  <div style="font-style: italic;font-weight:normal;">e.g.: 1, 2, 3...</div>
302
  </th>
303
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  <tr>
305
  <th>
306
  Archive:
120
  </form>
121
  </div>
122
 
123
+ <div class="box">
124
+ <h2>Featured Image Column</h2>
125
+ <div class="greybox" style="background:#e3ffe2">
126
+ The plugin adds a new column "FIFU" (Featured Image from URL) to your table of posts/pages/products in admin area. Below you can choose the height (px) of the image in the column. To disable that, just uncheck "FIFU" in the Screen Options.
127
+ </div>
128
+ <br>
129
+ <form
130
+ id="fifu_form_column"
131
+ action="javascript:void(0)"
132
+ method="post">
133
+ <input id="fifu_input_column_height" type="text" name="fifu_input_column_height" value="<?php echo $column_height; ?>" placeholder="e.g.: 64" size="4">
134
+ <input type="submit" value="Submit" >
135
+ </form>
136
+ </div>
137
+
138
  <div class="box">
139
  <h2>Featured Image in Content</h2>
140
  <div class="greybox" style="background:#e3ffe2">
316
  <div style="font-style: italic;font-weight:normal;">e.g.: 1, 2, 3...</div>
317
  </th>
318
  </tr>
319
+ <tr>
320
+ <th>
321
+ Margin Bottom:
322
+ </th>
323
+ <th>
324
+ <input id="fifu_input_video_margin_bottom"
325
+ name="fifu_input_video_margin_bottom"
326
+ size="4">
327
+ </th>
328
+ <th>
329
+ <div style="font-style: italic;font-weight:normal;">e.g.: 300px, 8cm...</div>
330
+ </th>
331
+ </tr>
332
  <tr>
333
  <th>
334
  Archive:
admin/html/meta-box.html CHANGED
@@ -1,21 +1,5 @@
1
  <script><?php include 'js/meta-box.js' ?></script>
2
 
3
- <div style="<?php echo $show_news?>">
4
- <table>
5
- <tbody>
6
- <tr>
7
- <th>Premium Live Preview:</th>
8
- <th><a href="http://blog.featuredimagefromurl.com/">Blog
9
- </a></th>
10
- <th><a href="http://shop.featuredimagefromurl.com/">Shop
11
- </a></th>
12
- </tr>
13
- </tbody>
14
- </table>
15
- <p style="font-size: 12px; padding: 5px; border-left: 6px solid red; color: white;
16
- background-color: black; border-radius: 15px 50px;">free and premium version are compatible with any theme now</p>
17
- </div>
18
-
19
  <!-- show alt field, image and link if URL was already provided -->
20
 
21
  <input id="fifu_input_alt"
@@ -60,3 +44,27 @@
60
  class="button sirv-add-image-modal-click"
61
  title="Add image from Sirv"
62
  style="<?php echo $show_sirv?>">Choose Sirv image</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <script><?php include 'js/meta-box.js' ?></script>
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  <!-- show alt field, image and link if URL was already provided -->
4
 
5
  <input id="fifu_input_alt"
44
  class="button sirv-add-image-modal-click"
45
  title="Add image from Sirv"
46
  style="<?php echo $show_sirv?>">Choose Sirv image</a>
47
+
48
+
49
+ <div style="<?php echo $show_news?>">
50
+ <br>
51
+ <hr>
52
+ <p style="font-size: 12px; padding: 5px; border-left: 6px solid red; color: black;
53
+ background-color: #eee; border-radius: 15px 50px;">free and premium version are compatible with any theme now</p>
54
+ <p style="font-size: 12px; padding: 5px; border-left: 6px solid green; color: black;
55
+ background-color: #eee; border-radius: 15px 50px;">new free feature: resize featured image column (64px default)</p>
56
+ <center>
57
+ <table>
58
+ <tbody>
59
+ <tr>
60
+ <th>premium live preview:</th>
61
+ <th><a href="http://blog.featuredimagefromurl.com/">blog
62
+ </a></th>
63
+ <th><a href="http://shop.featuredimagefromurl.com/">shop
64
+ </a></th>
65
+ </tr>
66
+ </tbody>
67
+ </table>
68
+ </center>
69
+ </div>
70
+
admin/menu.php CHANGED
@@ -21,6 +21,7 @@ function fifu_get_menu_html() {
21
  $enable_get_first = get_option('fifu_get_first');
22
  $enable_pop_first = get_option('fifu_pop_first');
23
  $enable_ovw_first = get_option('fifu_ovw_first');
 
24
 
25
  $array_cpt = array();
26
  for ($x = 0; $x <= 4; $x++)
@@ -42,6 +43,7 @@ function fifu_get_menu_settings() {
42
  fifu_get_setting('fifu_get_first');
43
  fifu_get_setting('fifu_pop_first');
44
  fifu_get_setting('fifu_ovw_first');
 
45
 
46
  for ($x = 0; $x <= 4; $x++)
47
  fifu_get_setting('fifu_cpt' . $x);
@@ -53,6 +55,8 @@ function fifu_get_setting($type) {
53
  if (!get_option($type)) {
54
  if (strpos($type, "cpt") !== false)
55
  update_option($type, '');
 
 
56
  else
57
  update_option($type, 'toggleoff');
58
  }
@@ -67,6 +71,7 @@ function fifu_update_menu_options() {
67
  fifu_update_option('fifu_input_get_first', 'fifu_get_first');
68
  fifu_update_option('fifu_input_pop_first', 'fifu_pop_first');
69
  fifu_update_option('fifu_input_ovw_first', 'fifu_ovw_first');
 
70
 
71
  for ($x = 0; $x <= 4; $x++)
72
  fifu_update_option('fifu_input_cpt' . $x, 'fifu_cpt' . $x);
21
  $enable_get_first = get_option('fifu_get_first');
22
  $enable_pop_first = get_option('fifu_pop_first');
23
  $enable_ovw_first = get_option('fifu_ovw_first');
24
+ $column_height = get_option('fifu_column_height');
25
 
26
  $array_cpt = array();
27
  for ($x = 0; $x <= 4; $x++)
43
  fifu_get_setting('fifu_get_first');
44
  fifu_get_setting('fifu_pop_first');
45
  fifu_get_setting('fifu_ovw_first');
46
+ fifu_get_setting('fifu_column_height');
47
 
48
  for ($x = 0; $x <= 4; $x++)
49
  fifu_get_setting('fifu_cpt' . $x);
55
  if (!get_option($type)) {
56
  if (strpos($type, "cpt") !== false)
57
  update_option($type, '');
58
+ else if (strpos($type, "fifu_column_height") !== false)
59
+ update_option($type, "64");
60
  else
61
  update_option($type, 'toggleoff');
62
  }
71
  fifu_update_option('fifu_input_get_first', 'fifu_get_first');
72
  fifu_update_option('fifu_input_pop_first', 'fifu_pop_first');
73
  fifu_update_option('fifu_input_ovw_first', 'fifu_ovw_first');
74
+ fifu_update_option('fifu_input_column_height', 'fifu_column_height');
75
 
76
  for ($x = 0; $x <= 4; $x++)
77
  fifu_update_option('fifu_input_cpt' . $x, 'fifu_cpt' . $x);
featured-image-from-url.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * 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.
6
- * Version: 1.5.6
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://featuredimagefromurl.com/
9
  */
3
  /*
4
  * Plugin Name: Featured Image From URL
5
  * 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.
6
+ * Version: 1.5.7
7
  * Author: Marcel Jacques Machado
8
  * Author URI: http://featuredimagefromurl.com/
9
  */
readme.txt CHANGED
@@ -112,9 +112,9 @@ Click <a href="http://featuredimagefromurl.com/" targe="_blank">here</a> to know
112
 
113
  * Because you are not filling the alt attribute field. It's required by WooCommerce.
114
 
115
- = When accessing "All Pages", "All Posts", "Products" or "Product Categories" in admin menu, how can I enable or disable "Featured Image" column? =
116
 
117
- * Just click on "Screen Options", and check or uncheck "Featured Image".
118
 
119
  = How to show the Featured Image (internal or external) at the beginning of the content of a Post, Page or Product? =
120
 
@@ -130,49 +130,45 @@ Click <a href="http://featuredimagefromurl.com/" targe="_blank">here</a> to know
130
 
131
  == Screenshots ==
132
 
133
- 1. This plugin allows you to use an external image as Featured Image of your pages. Just fill the URL field with the image address and click on preview button.
134
 
135
- 2. If the URL is correct, the image preview will be shown. Then you can define the image title, filling the ALT field.
136
 
137
- 3. The external image will be displayed on your page.
138
 
139
- 4. The external image will be displayed when someone shares your page on social networks.
140
 
141
- 5. The external image will be displayed in the list of Pages.
142
 
143
- 6. Besides that, this plugin allows you to use an external image as Featured Image of your posts. Just fill the URL field with the image address and click on preview button.
144
 
145
- 7. If the URL is correct, the image preview will be shown. Then you can define the image title, filling the ALT field.
146
 
147
- 8. The external image will be displayed in your post gallery.
148
 
149
- 9. The external image will be displayed in your post.
150
 
151
- 10. The external image will be displayed when someone shares your post on social networks.
152
 
153
- 11. The external image will be displayed in the list of Posts.
154
 
155
- 12. Moreover, you can integrate this plugin to WooCommerce. Just access Featured Image From URL settings and enable that. Then a shell script will be executed to overwrite some code lines from WooCommerce plugin. But don't worry about that, because moving the toggle to off will undone the changes. Unfortunatelly, the integration requires your site be running in a Linux server. So, if the toggle didn't appear, it's because your server uses a different system.
156
 
157
- 13. Now you can use an external image as Featured Image of your WooCommerce products. Just fill the URL field with the image address and click on preview button.
158
 
159
- 14. If the URL is correct, the image preview will be shown. Then you can define the image title, filling the ALT field.
160
 
161
- 15. It's also possible to use external images in the WooCommerce Product Gallery. Fill an URL field with the image address and click on preview button.
162
 
163
- 16. If the URL is correct, the image preview will be shown. Then you must define the image title, filling the ALT field.
164
 
165
- 17. And if you have more images, just fill the others URL fields with the image address and click on preview button.
166
 
167
- 18. If the URL is correct, the image preview will be shown. Then you must define the image title, filling the ALT field.
168
 
169
- 19. The external images will be displayed on your product.
170
 
171
- 20. The same effects of the internal featured image will work for your external featured image.
172
-
173
- 21. The same effects of internal images will work for your external images in the product gallery.
174
-
175
- 22. The external image will be displayed in the list of Products.
176
 
177
  == Changelog ==
178
 
@@ -300,6 +296,9 @@ was removed. To finish, a Premium version is now been presented.
300
  = 1.5.6 =
301
  * Compatible with any theme now.
302
 
 
 
 
303
  == Upgrade Notice ==
304
 
305
  = 1.0 =
@@ -424,4 +423,7 @@ was removed. To finish, a Premium version is now been presented.
424
  * URL field isn't hidden anymore.
425
 
426
  = 1.5.6 =
427
- * Compatible with any theme now.
 
 
 
112
 
113
  * Because you are not filling the alt attribute field. It's required by WooCommerce.
114
 
115
+ = When accessing "All Pages", "All Posts", "Products" or "Product Categories" in admin menu, how can I enable or disable "FIFU" column? =
116
 
117
+ * Just click on "Screen Options", and check or uncheck "FIFU".
118
 
119
  = How to show the Featured Image (internal or external) at the beginning of the content of a Post, Page or Product? =
120
 
130
 
131
  == Screenshots ==
132
 
133
+ 1. Just fill the URL field with the image address and click on preview button.
134
 
135
+ 2. If the URL is correct, the image will be shown.
136
 
137
+ 3. Premium feature: featured video from URL.
138
 
139
+ 4. Premium feature: featured slider from URL.
140
 
141
+ 5. Featured image column.
142
 
143
+ 6. External featured media on home.
144
 
145
+ 7. External featured image on post (it could be a page or a custom post type).
146
 
147
+ 8. Premium feature: featured video from URL.
148
 
149
+ 9. Premium feature: featured slider from URL.
150
 
151
+ 10. A lot of settings to adapt the plugin to your needs.
152
 
153
+ 11. Premium feature: image gallery from URL.
154
 
155
+ 12. Premium feature: video gallery from URL.
156
 
157
+ 13. External featured media on WooCommerce shop.
158
 
159
+ 14. External featured media on cart.
160
 
161
+ 15. Premium feature: image gallery from URL.
162
 
163
+ 16. External featured image on Lightbox.
164
 
165
+ 17. Lightbox zoom.
166
 
167
+ 18. Premium feature: video gallery from URL.
168
 
169
+ 19. Premium feature: external featured video on Lightbox.
170
 
171
+ 20. Lightbox zoom.
 
 
 
 
172
 
173
  == Changelog ==
174
 
296
  = 1.5.6 =
297
  * Compatible with any theme now.
298
 
299
+ = 1.5.7 =
300
+ * Resize featured image column.
301
+
302
  == Upgrade Notice ==
303
 
304
  = 1.0 =
423
  * URL field isn't hidden anymore.
424
 
425
  = 1.5.6 =
426
+ * Compatible with any theme now.
427
+
428
+ = 1.5.7 =
429
+ * Resize featured image column.