Dear Michael and Ewout,
Thank you very much for your observations. We really appreciate your attention.
Please go to lightbox.php file and add the
global $wpdb;
$all_urls = array();
if ( empty( $_POST[‘urls’] ) ) { return; }
foreach ($_POST[‘urls’] as $value) {
$image_urls[] = esc_url($value);
}
….
die();
}
to the
hugeit_lightbox_get_images_url() function.
Please let us know if that worked for you.
We will wait for your results.
Thanks
Its time to release an update or at least post an accurate solution with clear instructions.
The function hugeit_lightbox_get_images_url() does not exist in v2.1.0.
The post from @kluver clearly states the function is get_images_url(). I’m puzzled as to how you can be confused about your own plugin.
Please keep in mind that you have WordPress users who require a clearly stated solution rather than a paraphrased code reference.
Dear awtx,
Thank you very much for your post and feedback.
The solution we have provided is absolutely efficient. We have checked the codes in the version you have mentioned(2.1.0) and they exist in there.
Please check out the screenshots here: https://prnt.sc/gpw7ry , https://prnt.sc/gpw7ex
Please be kindly informed that we will fix this issue in our upcoming update but this temporary solution can be applied until we release a new update.
If you need our help, please contact us directly and we will be glad to help you to resolve the issue
Thanks
The corrected code in lightbox.php is:
function get_images_url(){
global $wpdb;
//$image_urls = $_POST['urls'];
$all_urls = array();
if ( empty( $_POST['urls'] ) ) { return; }
foreach ($_POST['urls'] as $value) {
$image_urls[] = esc_url($value);
}
foreach ($image_urls as $image_url) {
$query = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s'", $image_url);
$id = $wpdb->get_var($query);
$attachment = get_post( $id );
$description = $attachment->post_content;
array_push($all_urls,$description);
}
echo json_encode($all_urls);
die();
}
I’m using Version 2.1.0. hugeit_lightbox_get_images_url() does not exist. You must edit get_images_url() as I have above.
The fix is to simply copy and paste my function, replacing the one that exists.
As regards support, its incredible to see instances of this from April 2017 and its still not fixed in November 2017.
-
This reply was modified 8 years, 5 months ago by
cbcjock.
Dear cbcjock,
Thank you very much for sharing your experience with us.
Let me kindly not that we have posted this solution in one of our topic threads and we will include this fix in our upcoming update.
We are begging your pardon for the inconveniences you have faced
Is there anything else we can help you with, feel free to ask 🙂
Thanks