Badge does not display and popup does not populate
-
Hi,
On the front end I do not see the badge displayed. Some troubleshooting of the badge issue reveals that I do get the image’s alt text (“malware removal and website security”) displaying. Also, when I click on the displayed alt text, the pop up that opens does not populate with any verification details. The browser’s Inspect Element function reveals the following html code is generated by the plugin:
<div id=”sitelock_shield_logo_placeholder”> <div id=”sitelock_shield_logo” class=”fixed_btm” style=”bottom:15px;position:fixed;_position:absolute;width:117px;height:67px;right:15px;”> <a hrefhttps://www.sitelock.com/varify.php?site= “ onclick=”window.open(‘https”//www.sitelock.com/verify.php?site’,width=600,height=600,left=160,top=170’);return false;”> <img alt=”malware removal and website security” title=”SiteLock” src=”//shield.sitelock.com/shield/”> </a> </div> </div>
Note that there is no reference to the site domain to be verified. The code for function generating this does not ascertain the domain name it is running on to pass back to sitelock to verify:
function sitelock_add_this_script_footer() { $location = get_option( 'sitelock_badge_location' ); $badge_link = esc_url( get_option( 'sitelock_badge_link' ) ); $badge_img_src = get_option( 'sitelock_badge_img' ); ... }
I added four lines of code to ascertain the domain name and append it to the two variables that are used later in the function to pass to sitelock for verification:
function sitelock_add_this_script_footer() { /* added following two lines to set up for site domain - Ted van Diepen 2016-11-1 */ $urlparts = parse_url(site_url()); $domain = $urlparts [host];</strong> $location = get_option( 'sitelock_badge_location' ); $badge_link = esc_url( get_option( 'sitelock_badge_link' ) ); $badge_img_src = get_option( 'sitelock_badge_img' ); /* added following two lines to get site domain into link and src urls - Ted van Diepen 2016-11-1 */ $badge_link = $badge_link . $domain; $badge_img_src = $badge_img_src . $domain;</strong> ... }
With these modifications made to the function sitelock_add_this_script_footer() found in wp-content/plugins/sitelock/admin/functions-sitelock-admin.php I was able to get the correct badge image displayed and the popup to be fully populated with the SiteLock verified information concerning my site.
For the last three updates to the plugin, I have had to add the same four lines of code to re-establish the intended results. Please look into this issue. I would prefer your solution rather than my workaround.
Thank you,
Ted
- The topic ‘Badge does not display and popup does not populate’ is closed to new replies.