Plugin Directory

Changeset 1869371


Ignore:
Timestamp:
05/06/2018 04:59:20 AM (8 years ago)
Author:
sparrowapps
Message:

Fixed key check in array

File:
1 edited

Legend:

Unmodified
Added
Removed
  • surveysparrow-helper/trunk/index.php

    r1841697 r1869371  
    66Author URI: http://surveysparrow.com
    77Author: SurveySparrow
    8 Version: 1.01
     8Version: 1.03
    99Tested up to: 4.9.4
    1010*/ 
    1111
    1212    function sparrow_return_script($atts){
    13         if($atts[env]){
     13        if(array_key_exists('env',$atts)){
    1414            $script = sprintf('<script>(function(){var t,e,s,n="ss-widget",r="script",a=document,o=window;o.SS_WIDGET_TOKEN="%s",o.SS_ACCOUNT="%s",o.SS_SURVEY_NAME="%s";a.getElementById(n)||(t=a.getElementsByTagName(r),s=t[t.length-1],e=a.createElement(r),e.type="text/javascript",e.async=!0,e.id=n,e.src=["https://","assets.surveysparrow.com/%s/%s","/widget.js?token=",o.SS_WIDGET_TOKEN].join(""),s.parentNode.insertBefore(e,s))})();</script>',$atts['token'],$atts['account'],$atts['survey'],$atts['env'],$atts['version']);
    1515        }
Note: See TracChangeset for help on using the changeset viewer.