Version Description
- New feature: Text > Auto Set Image Alt > always use the post title; Improvement: icons added to menu settings.
Download this release
Release Info
Developer | marceljm |
Plugin | Featured Image From URL |
Version | 2.7.1 |
Comparing to | |
See all releases |
Code changes from version 2.7.0 to 2.7.1
- admin/html/menu.html +79 -23
- admin/html/meta-box.html +2 -2
- admin/menu.php +4 -2
- featured-image-from-url.php +1 -1
- includes/thumbnail.php +8 -4
- readme.txt +7 -1
admin/html/menu.html
CHANGED
@@ -6,22 +6,22 @@
|
|
6 |
|
7 |
<div id="tabs-top">
|
8 |
<ul>
|
9 |
-
<li><a href="#tabs-d">Help</a></li>
|
10 |
-
<li><a href="#tabs-k">Admin Area</a></li>
|
11 |
-
<li><a href="#tabs-b">Auto Set First Image/Video</a></li>
|
12 |
-
<li><a href="#tabs-g">Featured Image</a></li>
|
13 |
-
<li><a href="#tabs-j">Metadata</a></li>
|
14 |
-
<li><a href="#tabs-i">Performance</a></li>
|
15 |
-
<li><a href="#tabs-q">REST API</a></li>
|
16 |
-
<li><a href="#tabs-l">Shortcode</a></li>
|
17 |
-
<li><a href="#tabs-m">Slider</a></li>
|
18 |
-
<li><a href="#tabs-n">Social</a></li>
|
19 |
-
<li><a href="#tabs-e">Text</a></li>
|
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-t">Troubleshooting</a></li>
|
24 |
-
<li><a href="#tabs-a">Premium version <b style="border-radius:2px;padding:3px;background-color:#32373c;color:white">20%OFF</b></a></li>
|
25 |
<br>
|
26 |
<br>
|
27 |
<div id="tabs-a">
|
@@ -1371,7 +1371,7 @@
|
|
1371 |
|
1372 |
<div class="greybox">
|
1373 |
|
1374 |
-
|
1375 |
|
1376 |
</div>
|
1377 |
|
@@ -1402,9 +1402,36 @@
|
|
1402 |
</form>
|
1403 |
</th>
|
1404 |
<th>
|
1405 |
-
|
1406 |
</th>
|
1407 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1408 |
</table>
|
1409 |
|
1410 |
</div>
|
@@ -2627,6 +2654,34 @@
|
|
2627 |
From <b>September 2019</b>, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
|
2628 |
</div>
|
2629 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2630 |
<div class="box">
|
2631 |
<table>
|
2632 |
<tr>
|
@@ -2662,7 +2717,7 @@
|
|
2662 |
<tr>
|
2663 |
<td style="border-bottom:none">2019-10-02</td>
|
2664 |
<td style="border-bottom:none"><h3>WPML Multilingual CMS + Translation Management</h3></td>
|
2665 |
-
<td style="border-bottom:none">
|
2666 |
</tr>
|
2667 |
</table>
|
2668 |
<div class="greybox" style="position: relative; top: -10px">
|
@@ -2750,13 +2805,13 @@
|
|
2750 |
<table>
|
2751 |
<tr>
|
2752 |
<td style="border-bottom:none">2019-09-13</td>
|
2753 |
-
<td style="border-bottom:none"><h3>Toolset Forms</h3></td>
|
2754 |
-
<td style="border-bottom:none">
|
2755 |
</tr>
|
2756 |
</table>
|
2757 |
<div class="greybox" style="position: relative; top: -10px">
|
2758 |
Adding "Featured Image from URL" field to an external post form:<br>
|
2759 |
-
1) add a new "Group";<br>
|
2760 |
2) add a new "Field";<br>
|
2761 |
3) set "fifu_image_url" for "Field slug".<br>
|
2762 |
</div>
|
@@ -2791,6 +2846,7 @@ fifu_content_page:<?php echo $enable_content_page ?>;
|
|
2791 |
fifu_css:<?php echo $css_style ?>;
|
2792 |
fifu_data_clean:<?php echo $enable_data_clean ?>;
|
2793 |
fifu_default_url:<?php echo $default_url ?>;
|
|
|
2794 |
fifu_enable_default_url:<?php echo $enable_default_url ?>;
|
2795 |
fifu_fake:<?php echo $enable_fake ?>;
|
2796 |
fifu_fake2:<?php echo $enable_fake2 ?>;
|
6 |
|
7 |
<div id="tabs-top">
|
8 |
<ul>
|
9 |
+
<li><a href="#tabs-d"><i class="fas fa-envelope"></i> Help</a></li>
|
10 |
+
<li><a href="#tabs-k"><i class="fas fa-user-cog"></i> Admin Area</a></li>
|
11 |
+
<li><a href="#tabs-b"><i class="fas fa-flag-checkered"></i> Auto Set First Image/Video</a></li>
|
12 |
+
<li><a href="#tabs-g"><i class="fas fa-image"></i> Featured Image</a></li>
|
13 |
+
<li><a href="#tabs-j"><i class="fas fa-database"></i> Metadata</a></li>
|
14 |
+
<li><a href="#tabs-i"><i class="fas fa-tachometer-alt"></i> Performance</a></li>
|
15 |
+
<li><a href="#tabs-q"><i class="fas fa-robot"></i> REST API</a></li>
|
16 |
+
<li><a href="#tabs-l"><i class="fas fa-code"></i> Shortcode</a></li>
|
17 |
+
<li><a href="#tabs-m"><i class="fas fa-images"></i> Slider</a></li>
|
18 |
+
<li><a href="#tabs-n"><i class="fas fa-share-alt"></i> Social</a></li>
|
19 |
+
<li><a href="#tabs-e"><i class="fas fa-quote-left"></i> Text</a></li>
|
20 |
+
<li><a href="#tabs-c"><i class="fas fa-play"></i> Video</a></li>
|
21 |
+
<li><a href="#tabs-o"><i class="fas fa-shopping-cart"></i> WooCommerce</a></li>
|
22 |
+
<li><a href="#tabs-p"><i class="fas fa-file-import"></i> WP All Import</a></li>
|
23 |
+
<li><a href="#tabs-t"><i class="fas fa-info-circle"></i> Troubleshooting</a></li>
|
24 |
+
<li><a href="#tabs-a"><i class="fas fa-star"></i> Premium version <b style="border-radius:2px;padding:3px;background-color:#32373c;color:white">20%OFF</b></a></li>
|
25 |
<br>
|
26 |
<br>
|
27 |
<div id="tabs-a">
|
1371 |
|
1372 |
<div class="greybox">
|
1373 |
|
1374 |
+
You can automatically set the attibutes "alt" and "title" of an external image with the title of the post/page.
|
1375 |
|
1376 |
</div>
|
1377 |
|
1402 |
</form>
|
1403 |
</th>
|
1404 |
<th>
|
1405 |
+
copy the post title to FIFU alt/title field (it will have effect when you click on publish/update button of your post/page)
|
1406 |
</th>
|
1407 |
+
</tr>
|
1408 |
+
<tr>
|
1409 |
+
<th>
|
1410 |
+
<form
|
1411 |
+
id="fifu_form_dynamic_alt"
|
1412 |
+
action="javascript:void(0)"
|
1413 |
+
method="post">
|
1414 |
+
<input
|
1415 |
+
type="image"
|
1416 |
+
href="javascript:void(0)"
|
1417 |
+
id="fifu_toggle_dynamic_alt"
|
1418 |
+
onclick="invert('dynamic_alt')"
|
1419 |
+
name="fifu_toggle_dynamic_alt"
|
1420 |
+
class="<?php echo $enable_dynamic_alt; ?>"
|
1421 |
+
value=""
|
1422 |
+
style="display:block">
|
1423 |
+
|
1424 |
+
<input
|
1425 |
+
type="hidden"
|
1426 |
+
id="fifu_input_dynamic_alt"
|
1427 |
+
name="fifu_input_dynamic_alt"
|
1428 |
+
value="" >
|
1429 |
+
</form>
|
1430 |
+
</th>
|
1431 |
+
<th>
|
1432 |
+
always use the post title as image alt/title (it will ignore FIFU alt/title field)
|
1433 |
+
</th>
|
1434 |
+
</tr>
|
1435 |
</table>
|
1436 |
|
1437 |
</div>
|
2654 |
From <b>September 2019</b>, always you guys report an issue between FIFU and another plugin or theme, the solution will be posted here.
|
2655 |
</div>
|
2656 |
</div>
|
2657 |
+
<div class="box">
|
2658 |
+
<table>
|
2659 |
+
<tr>
|
2660 |
+
<td style="border-bottom:none">2019-11-02</td>
|
2661 |
+
<td style="border-bottom:none"><h3>Techwise</h3></td>
|
2662 |
+
<td style="border-bottom:none">theme</td>
|
2663 |
+
</tr>
|
2664 |
+
</table>
|
2665 |
+
<div class="greybox" style="position: relative; top: -10px">
|
2666 |
+
Avoiding external featured images overlay:<br>
|
2667 |
+
1) enable "FIFU settings > Featured Image > Save Image Dimensions > save and use image dimensions";<br>
|
2668 |
+
2) enable "save the image dimensions of all external featured images now" (it will be automatically disabled when finished).<br>
|
2669 |
+
</div>
|
2670 |
+
</div>
|
2671 |
+
<div class="box">
|
2672 |
+
<table>
|
2673 |
+
<tr>
|
2674 |
+
<td style="border-bottom:none">2019-10-29</td>
|
2675 |
+
<td style="border-bottom:none"><h3>The7 + The7 Elements + The7 WPBakery Page Builder</h3></td>
|
2676 |
+
<td style="border-bottom:none">theme + plugins</td>
|
2677 |
+
</tr>
|
2678 |
+
</table>
|
2679 |
+
<div class="greybox" style="position: relative; top: -10px">
|
2680 |
+
Showing external featured images on "Blog Carousel":<br>
|
2681 |
+
1) enable "FIFU settings > Featured Image > Save Image Dimensions > save and use image dimensions";<br>
|
2682 |
+
2) enable "save the image dimensions of all external featured images now" (it will be automatically disabled when finished).<br>
|
2683 |
+
</div>
|
2684 |
+
</div>
|
2685 |
<div class="box">
|
2686 |
<table>
|
2687 |
<tr>
|
2717 |
<tr>
|
2718 |
<td style="border-bottom:none">2019-10-02</td>
|
2719 |
<td style="border-bottom:none"><h3>WPML Multilingual CMS + Translation Management</h3></td>
|
2720 |
+
<td style="border-bottom:none">plugins</td>
|
2721 |
</tr>
|
2722 |
</table>
|
2723 |
<div class="greybox" style="position: relative; top: -10px">
|
2805 |
<table>
|
2806 |
<tr>
|
2807 |
<td style="border-bottom:none">2019-09-13</td>
|
2808 |
+
<td style="border-bottom:none"><h3>Toolset Forms + Toolset Types</h3></td>
|
2809 |
+
<td style="border-bottom:none">plugins</td>
|
2810 |
</tr>
|
2811 |
</table>
|
2812 |
<div class="greybox" style="position: relative; top: -10px">
|
2813 |
Adding "Featured Image from URL" field to an external post form:<br>
|
2814 |
+
1) add a new "Custom Fields Group";<br>
|
2815 |
2) add a new "Field";<br>
|
2816 |
3) set "fifu_image_url" for "Field slug".<br>
|
2817 |
</div>
|
2846 |
fifu_css:<?php echo $css_style ?>;
|
2847 |
fifu_data_clean:<?php echo $enable_data_clean ?>;
|
2848 |
fifu_default_url:<?php echo $default_url ?>;
|
2849 |
+
fifu_dynamic_alt:<?php echo $enable_dynamic_alt ?>;
|
2850 |
fifu_enable_default_url:<?php echo $enable_default_url ?>;
|
2851 |
fifu_fake:<?php echo $enable_fake ?>;
|
2852 |
fifu_fake2:<?php echo $enable_fake2 ?>;
|
admin/html/meta-box.html
CHANGED
@@ -60,8 +60,8 @@
|
|
60 |
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Please report any problem to <b>marcel@featuredimagefromurl.com</b></p>
|
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 |
-
|
64 |
-
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">New
|
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: tips about the integration between FIFU and other plugins will be posted <a href='admin.php?page=featured-image-from-url#tabs-t'>here</a></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);
|
60 |
background-color: whitesmoke; border-radius: 15px 5px 15px 5px; position: relative; top: 5px;">Please report any problem to <b>marcel@featuredimagefromurl.com</b></p>
|
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 feature: Text > Auto Set Image Alt/Title > <a href='admin.php?page=featured-image-from-url#tabs-e'>always use the post title</a></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: tips about the integration between FIFU and other plugins will be posted <a href='admin.php?page=featured-image-from-url#tabs-t'>here</a></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);
|
admin/menu.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_original', 'fifu_lazy', 'fifu_media_library', 'fifu_content', 'fifu_content_page', 'fifu_enable_default_url', 'fifu_fake', 'fifu_fake2', 'fifu_css', 'fifu_default_url', 'fifu_wc_lbox', 'fifu_wc_zoom', 'fifu_hide_page', 'fifu_hide_post', 'fifu_class', 'fifu_get_first', 'fifu_pop_first', 'fifu_ovw_first', 'fifu_query_strings', 'fifu_column_height', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_data_generation', 'fifu_data_clean', 'fifu_image_height_shop', 'fifu_image_width_shop', 'fifu_image_height_prod', 'fifu_image_width_prod', 'fifu_image_height_cart', 'fifu_image_width_cart', 'fifu_image_height_ctgr', 'fifu_image_width_ctgr', 'fifu_image_height_arch', 'fifu_image_width_arch', 'fifu_image_height_home', 'fifu_image_width_home', 'fifu_image_height_page', 'fifu_image_width_page', 'fifu_image_height_post', 'fifu_image_width_post', 'fifu_save_dimensions', 'fifu_save_dimensions_redirect', 'fifu_save_dimensions_all', 'fifu_clean_dimensions_all')));
|
4 |
|
5 |
add_action('admin_menu', 'fifu_insert_menu');
|
6 |
|
7 |
function fifu_insert_menu() {
|
8 |
if (strpos($_SERVER['REQUEST_URI'], 'featured-image-from-url') !== false) {
|
9 |
-
|
10 |
wp_enqueue_style('jquery-ui-style', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/base/jquery-ui.min.css');
|
11 |
wp_enqueue_script('jquery-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js');
|
12 |
wp_enqueue_script('jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js');
|
@@ -48,6 +48,7 @@ function fifu_get_menu_html() {
|
|
48 |
$column_height = get_option('fifu_column_height');
|
49 |
$enable_grid_category = get_option('fifu_grid_category');
|
50 |
$enable_auto_alt = get_option('fifu_auto_alt');
|
|
|
51 |
$enable_data_clean = 'toggleoff';
|
52 |
$max_image_height_shop = get_option('fifu_image_height_shop');
|
53 |
$max_image_width_shop = get_option('fifu_image_width_shop');
|
@@ -147,6 +148,7 @@ function fifu_update_menu_options() {
|
|
147 |
fifu_update_option('fifu_input_column_height', 'fifu_column_height');
|
148 |
fifu_update_option('fifu_input_grid_category', 'fifu_grid_category');
|
149 |
fifu_update_option('fifu_input_auto_alt', 'fifu_auto_alt');
|
|
|
150 |
fifu_update_option('fifu_input_data_clean', 'fifu_data_clean');
|
151 |
fifu_update_option('fifu_input_image_height_shop', 'fifu_image_height_shop');
|
152 |
fifu_update_option('fifu_input_image_width_shop', 'fifu_image_width_shop');
|
1 |
<?php
|
2 |
|
3 |
+
define('FIFU_SETTINGS', serialize(array('fifu_social', 'fifu_original', 'fifu_lazy', 'fifu_media_library', 'fifu_content', 'fifu_content_page', 'fifu_enable_default_url', 'fifu_fake', 'fifu_fake2', 'fifu_css', 'fifu_default_url', 'fifu_wc_lbox', 'fifu_wc_zoom', 'fifu_hide_page', 'fifu_hide_post', 'fifu_class', 'fifu_get_first', 'fifu_pop_first', 'fifu_ovw_first', 'fifu_query_strings', 'fifu_column_height', 'fifu_grid_category', 'fifu_auto_alt', 'fifu_dynamic_alt', 'fifu_data_generation', 'fifu_data_clean', 'fifu_image_height_shop', 'fifu_image_width_shop', 'fifu_image_height_prod', 'fifu_image_width_prod', 'fifu_image_height_cart', 'fifu_image_width_cart', 'fifu_image_height_ctgr', 'fifu_image_width_ctgr', 'fifu_image_height_arch', 'fifu_image_width_arch', 'fifu_image_height_home', 'fifu_image_width_home', 'fifu_image_height_page', 'fifu_image_width_page', 'fifu_image_height_post', 'fifu_image_width_post', 'fifu_save_dimensions', 'fifu_save_dimensions_redirect', 'fifu_save_dimensions_all', 'fifu_clean_dimensions_all')));
|
4 |
|
5 |
add_action('admin_menu', 'fifu_insert_menu');
|
6 |
|
7 |
function fifu_insert_menu() {
|
8 |
if (strpos($_SERVER['REQUEST_URI'], 'featured-image-from-url') !== false) {
|
9 |
+
wp_enqueue_script('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/js/all.min.js');
|
10 |
wp_enqueue_style('jquery-ui-style', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/base/jquery-ui.min.css');
|
11 |
wp_enqueue_script('jquery-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js');
|
12 |
wp_enqueue_script('jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js');
|
48 |
$column_height = get_option('fifu_column_height');
|
49 |
$enable_grid_category = get_option('fifu_grid_category');
|
50 |
$enable_auto_alt = get_option('fifu_auto_alt');
|
51 |
+
$enable_dynamic_alt = get_option('fifu_dynamic_alt');
|
52 |
$enable_data_clean = 'toggleoff';
|
53 |
$max_image_height_shop = get_option('fifu_image_height_shop');
|
54 |
$max_image_width_shop = get_option('fifu_image_width_shop');
|
148 |
fifu_update_option('fifu_input_column_height', 'fifu_column_height');
|
149 |
fifu_update_option('fifu_input_grid_category', 'fifu_grid_category');
|
150 |
fifu_update_option('fifu_input_auto_alt', 'fifu_auto_alt');
|
151 |
+
fifu_update_option('fifu_input_dynamic_alt', 'fifu_dynamic_alt');
|
152 |
fifu_update_option('fifu_input_data_clean', 'fifu_data_clean');
|
153 |
fifu_update_option('fifu_input_image_height_shop', 'fifu_image_height_shop');
|
154 |
fifu_update_option('fifu_input_image_width_shop', 'fifu_image_width_shop');
|
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.7.
|
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.7.1
|
8 |
* Author: Marcel Jacques Machado
|
9 |
* Author URI: https://www.linkedin.com/in/marceljm/
|
10 |
*/
|
includes/thumbnail.php
CHANGED
@@ -60,6 +60,14 @@ function fifu_woo_replace($html, $product, $woosize) {
|
|
60 |
add_filter('post_thumbnail_html', 'fifu_replace', 10, 4);
|
61 |
|
62 |
function fifu_replace($html, $post_id, $post_thumbnail_id, $size) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
if (fifu_is_off('fifu_data_generation')) {
|
64 |
$width = fifu_get_attribute('width', $html);
|
65 |
$height = fifu_get_attribute('height', $html);
|
@@ -67,8 +75,6 @@ function fifu_replace($html, $post_id, $post_thumbnail_id, $size) {
|
|
67 |
if (fifu_is_on('fifu_lazy') && !is_admin())
|
68 |
$html = str_replace("src", "data-src", $html);
|
69 |
|
70 |
-
$url = get_post_meta($post_id, 'fifu_image_url', true);
|
71 |
-
$alt = get_post_meta($post_id, 'fifu_image_alt', true);
|
72 |
$css = get_option('fifu_css');
|
73 |
|
74 |
if ($url) {
|
@@ -84,8 +90,6 @@ function fifu_replace($html, $post_id, $post_thumbnail_id, $size) {
|
|
84 |
|
85 |
return !$url ? $html : fifu_get_html($url, $alt, $width, $height);
|
86 |
}
|
87 |
-
$url = get_post_meta($post_id, 'fifu_image_url', true);
|
88 |
-
$alt = get_post_meta($post_id, 'fifu_image_alt', true);
|
89 |
|
90 |
return !$url || fifu_show_internal_instead_of_external($post_id) ? $html : fifu_get_html($url, $alt, null, null);
|
91 |
}
|
60 |
add_filter('post_thumbnail_html', 'fifu_replace', 10, 4);
|
61 |
|
62 |
function fifu_replace($html, $post_id, $post_thumbnail_id, $size) {
|
63 |
+
$url = get_post_meta($post_id, 'fifu_image_url', true);
|
64 |
+
|
65 |
+
if (fifu_is_on('fifu_dynamic_alt')) {
|
66 |
+
$alt = get_the_title($post_id);
|
67 |
+
$html = preg_replace('/alt=[\'\"][^[\'\"]*[\'\"]/', 'alt="' . $alt . '"', $html);
|
68 |
+
} else
|
69 |
+
$alt = get_post_meta($post_id, 'fifu_image_alt', true);
|
70 |
+
|
71 |
if (fifu_is_off('fifu_data_generation')) {
|
72 |
$width = fifu_get_attribute('width', $html);
|
73 |
$height = fifu_get_attribute('height', $html);
|
75 |
if (fifu_is_on('fifu_lazy') && !is_admin())
|
76 |
$html = str_replace("src", "data-src", $html);
|
77 |
|
|
|
|
|
78 |
$css = get_option('fifu_css');
|
79 |
|
80 |
if ($url) {
|
90 |
|
91 |
return !$url ? $html : fifu_get_html($url, $alt, $width, $height);
|
92 |
}
|
|
|
|
|
93 |
|
94 |
return !$url || fifu_show_internal_instead_of_external($post_id) ? $html : fifu_get_html($url, $alt, null, null);
|
95 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, 9gag, wcfm
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 2.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -159,6 +159,9 @@ Features:
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
|
|
|
|
|
|
162 |
= 2.7.0 =
|
163 |
* Deprecated: Metadata > Metadata Generation; Improvement: Metadata > Fake Internal Featured Image layout is more intuitive now.
|
164 |
|
@@ -639,6 +642,9 @@ was removed. To finish, a Premium version is now been presented.
|
|
639 |
|
640 |
== Upgrade Notice ==
|
641 |
|
|
|
|
|
|
|
642 |
= 2.7.0 =
|
643 |
* Deprecated: Metadata > Metadata Generation; Improvement: Metadata > Fake Internal Featured Image layout is more intuitive now.
|
644 |
|
4 |
Tags: featured image, external featured image, featured image from url, url featured image, featured, image, external, url, flickr, s3, picasa, woocommerce, product image, product gallery, product, gallery, column, list, page, post, all, content, custom, type, custom post type, category, video, external video, youtube, vimeo, featured video, hover, effects, hover effects, sirv, wp all import, css, style, slider, thumbnail, social, network, auto, publish, hide, first image, content, lightbox, size, grid, auto post thumbnail, link, uri, affiliate, wp, rest, api, wp rest api, lazy, load, google, drive, instagram, validation, jetpack, visual composer, play, pause, crop, resize, zoom, enable, disable, default, automatic, auto set, cloudinary, schedule, event, cron, seo, variable, tumblr, variation, product variation, shortcode, facebook, instagram, imgur, 9gag, wcfm
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 2.7.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
159 |
|
160 |
== Changelog ==
|
161 |
|
162 |
+
= 2.7.1 =
|
163 |
+
* New feature: Text > Auto Set Image Alt > always use the post title; Improvement: icons added to menu settings.
|
164 |
+
|
165 |
= 2.7.0 =
|
166 |
* Deprecated: Metadata > Metadata Generation; Improvement: Metadata > Fake Internal Featured Image layout is more intuitive now.
|
167 |
|
642 |
|
643 |
== Upgrade Notice ==
|
644 |
|
645 |
+
= 2.7.1 =
|
646 |
+
* New feature: Text > Auto Set Image Alt > always use the post title; Improvement: icons added to menu settings.
|
647 |
+
|
648 |
= 2.7.0 =
|
649 |
* Deprecated: Metadata > Metadata Generation; Improvement: Metadata > Fake Internal Featured Image layout is more intuitive now.
|
650 |
|