Skip to content

Commit

Permalink
added lightbox featured image
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipsesrl committed Sep 12, 2019
1 parent b1cf55e commit 1aff910
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.2
Stable tag: 2.0.0.22
Stable tag: 2.0.0.23
License: GPLv3 or later
License URI: https://www.udesly.com/terms-conditions-of-use/#udesly-wordpress-plugin
Requires PHP: 5.6.0
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.0.23 =
* Added functions for lightbox featured image

= 2.0.0.22 =
* Fixed featured image on product_tag pages
* Added strongs on woocommerce template review-order
Expand Down
16 changes: 16 additions & 0 deletions includes/misc/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,22 @@ function udesly_get_reset_password_error() {
return $errors;
}

function udesly_get_featured_image_lightbox_json() {

$result = [];

$image = get_the_post_thumbnail_url('full');
$result[] = array(
"caption" => get_the_post_thumbnail_caption(),
"url" => $image ? $image : '',
"type" => "image",
);

return json_encode(array(
"items" => $result
));
}

function udesly_get_archive_featured_image()
{

Expand Down
15 changes: 15 additions & 0 deletions includes/misc/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,21 @@ function udesly_wc_get_single_product_images_lightbox_json() {
));
}

function udesly_wc_get_featured_image_lightbox_json() {
$result = [];

$image = get_the_post_thumbnail_url('full');
$result[] = array(
"caption" => get_the_post_thumbnail_caption(),
"url" => $image ? $image : wc_placeholder_img_src('full'),
"type" => "image",
);

return json_encode(array(
"items" => $result
));
}

function udesly_wc_get_single_product_image($attachment_id, $main_image = false) {

$flexslider = (bool) apply_filters( 'woocommerce_single_product_flexslider_enabled', get_theme_support( 'wc-product-gallery-slider' ) );
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.0.22
* Version: 2.0.0.23
* 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.0.22");
defined('UDESLY_ADAPTER_VERSION') ?: define('UDESLY_ADAPTER_VERSION', "2.0.0.23");
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 1aff910

Please sign in to comment.