Skip to content

Commit

Permalink
#2873 Resolve image issue in Master
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetku committed Feb 13, 2019
1 parent 2ffb072 commit 6e1c779
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function render() {
// variable to use later on when we want to extract its associted
// url.
if ( '' != $selected ) {
$arrNum = $x;
$arrNum = $k;
}
// No alt? Set it to title. We do this so the alt tag shows
// something. It also makes HTML/SEO purists happy.
Expand Down Expand Up @@ -138,7 +138,7 @@ function render() {
// variable to use later on when we want to extract its associted
// url.
if ( '' != $selected ) {
$arrNum = $x;
$arrNum = $k;
}

// Add the option tag, with values.
Expand Down Expand Up @@ -171,11 +171,11 @@ function render() {
echo '<img src="#" class="redux-preview-image" style="visibility:hidden;" id="image_' . $this->field['id'] . '">';
} else {
$demo="#";
if (isset($this->field['options'][ $arrNum - 1 ]['demo_link'])) {
$demo = $this->field['options'][ $arrNum - 1 ]['demo_link'];
if (isset($this->field['options'][ $arrNum ]['demo_link'])) {
$demo = $this->field['options'][ $arrNum ]['demo_link'];
}
echo '<img src=' . esc_url($this->field['options'][ $arrNum - 1 ]['img']) . ' class="redux-preview-image" id="image_' . $this->field['id'] . '" onclick="return window.open(\''.$demo.'\')">';
if (isset($this->field['options'][ $arrNum - 1 ]['demo_link'])) {
echo '<img src="' . esc_url($this->field['options'][ $arrNum ]['img']) . '" class="redux-preview-image" id="image_' . $this->field['id'] . '" onclick="return window.open(\''.$demo.'\')">';
if (isset($this->field['options'][ $arrNum ]['demo_link'])) {
echo '<a href="'. esc_url($demo) .'" id="theme-selected-demo-link" target="_blank">
Demo
</a>';
Expand Down

0 comments on commit 6e1c779

Please sign in to comment.