'' ), $atts ); $json = file_get_contents('http://ip-api.com/json/'.aa_ad_getUserIP()); $obj = json_decode($json); //get user country $usr_country = $obj->countryCode; if($a['for']==$usr_country){ return $content; }else{ return "You country not support this content"; } } add_shortcode( 'AD', 'aa_ad_by_country' );