Skip to content

Commit

Permalink
release 2.0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipsesrl committed Dec 10, 2020
1 parent 54f5a67 commit 7f33f60
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Donate link: https://www.udesly.com/
Tags: webflow to wordpress, editor, page builder, layout design, udesly, webflow
Requires at least: 5.0
Tested up to: 5.2.3
Stable tag: 2.0.17
Stable tag: 2.0.18
License: GPLv3 or later
License URI: https://www.udesly.com/terms-conditions-of-use/#udesly-wordpress-plugin
Requires PHP: 5.6.0
Requires PHP: 7.0.0

Design your website in Webflow and connect it to WordPress with tons of plugins and unlimited features, on your own hosting!

Expand Down Expand Up @@ -81,6 +81,9 @@ That's all!
Absolutely! You can use the Udesly Adapter to create more than one website.

== Changelog ==
= 2.0.18 =
* Added ACF function for tax image field

= 2.0.17 =
* Fixed template redirect for custom post type

Expand Down
26 changes: 26 additions & 0 deletions includes/misc/acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
die;
}

function udesly_get_current_term($term) {
if (!$term || !is_object($term)) {
return get_queried_object();
}
else return get_term_by('term_taxonomy_id', $term->term_id);
}

/**
*
* Gets image url based on ACF field
Expand Down Expand Up @@ -34,6 +41,25 @@ function udesly_get_acf_image_url($field_slug, $subfield = false)
return $image_field;
}

function udesly_get_acf_image_url_term($field_slug, $term)
{
$image_field = get_field($field_slug, $term);
if (empty($image_field)) {
return '';
}
if (is_array($image_field)) {
return $image_field['url'];
}
if (is_numeric($image_field)) {
$image_src = wp_get_attachment_image_src($image_field, 'full');
if ($image_src) {
return $image_src[0];
}
return '';
}
return $image_field;
}

function udesly_acf_subfield_oembed($field)
{
$oembed = get_sub_field($field);
Expand Down
4 changes: 2 additions & 2 deletions udesly-adapter-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: Udesly Adapter
* Plugin URI: https://www.udesly.com
* Description: This is a support plugin for Udesly (Webflow to WordPress converter) that allows you to enable additional features for your theme.
* Version: 2.0.17
* Version: 2.0.18
* Author: Udesly
* Author URI: https://www.udesly.com
* License: GPL-2.0+
Expand All @@ -29,7 +29,7 @@
// Constants
defined('UDESLY_ADAPTER_PLUGIN_DIRECTORY_PATH') ?: define('UDESLY_ADAPTER_PLUGIN_DIRECTORY_PATH', plugin_dir_path(__FILE__));
defined('UDESLY_ADAPTER_PLUGIN_DIRECTORY_URL') ?: define('UDESLY_ADAPTER_PLUGIN_DIRECTORY_URL', plugin_dir_url(__FILE__));
defined('UDESLY_ADAPTER_VERSION') ?: define('UDESLY_ADAPTER_VERSION', "2.0.17");
defined('UDESLY_ADAPTER_VERSION') ?: define('UDESLY_ADAPTER_VERSION', "2.0.18");
defined('UDESLY_TEXT_DOMAIN') ?: define('UDESLY_TEXT_DOMAIN', "udesly-adapter-plugin");

defined('UDESLY_ADAPTER_PLUGIN_MISC_PATH') ?: define('UDESLY_ADAPTER_PLUGIN_MISC_PATH', plugin_dir_path(__FILE__) . 'includes/misc/');
Expand Down

0 comments on commit 7f33f60

Please sign in to comment.