Forums

[resolved] ShareThis on secured pages (1 post)

  1. phkcorp2005
    Member
    Posted 2 years ago #

    When entering a secured page with ShareThis active for that page, you will get the annoying Javascript secured page display warning.
    I modified the st_widget_head function to check for a secured session and if present, will not output/display the sharethis code, and no more warning. Typically a secured page is for checkout or displaying after purchase download links and I certainly do not want (or my customer) to share their credit card info or download links with the rest of the world.

    Here are my code changes:
    function st_widget_head() {
    $widget = get_option('st_widget');
    if ($widget == '') {
    }
    else{
    $widget = st_widget_add_wp_version($widget);
    $widget = st_widget_fix_domain($widget);
    $widget = preg_replace("/\&/", "&", $widget);
    }

    // POI: 02-04-2010 added to turn off share this on secured
    pages, or you will the annoying javascript popup warning.
    if ($_SERVER['HTTPS'] != "on") {
    print($widget);
    }
    }

    http://wordpress.org/extend/plugins/share-this/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags