AdsMatcher account."; $steptwo = "Your site is connected to AdsMatcher. See your WordPress API Key"; $stepthree = "Manage your Ad Zone"; $verifiedinput = "display: inline;"; $finalverifiedinput = "display: inline;"; $disableinput = "disabled"; $buttonstatut = "style='display: none;'"; }else if(!empty($adsmatcher_wordpressapi) && $adsmatcher_activation_statut=="2"){ $stepone= "You have an AdsMatcher account."; $steptwo = "Your site is connected to AdsMatcher. See your WordPress API Key"; $stepthree = "Create your first Ad Zone"; $verifiedinput = "display: inline;"; $finalverifiedinput = "display: none;"; $disableinput = "disabled"; $buttonstatut = "style='display: none;'"; }else{ $stepone= "Do you have AdsMatcher account? If not, Create One - it's 100% free."; $steptwo = "Connect your site to AdsMatcher. Find your WordPress API Key"; $stepthree = "Create your first Ad Zone"; $verifiedinput = "display: none;"; $finalverifiedinput = "display: none;"; $disableinput = ""; $buttonstatut = ""; } if(isset($_POST['submitapikey'])){ $setapikey = sanitize_text_field($_POST['adsmatcher_api_key']); $urlmatcher = "https://www.adsmatcher.com/api/verify.php?website=".$websiteurlfilter."&statut=check&apikey=".$setapikey; $urlmatcher_response = wp_remote_get($urlmatcher); $urlmatcher_statut = sanitize_text_field($urlmatcher_response['body']); if($urlmatcher_statut=="incorrect"){ $error_adsmatcher_apikey = "
Your WordPress API Key is incorrect.
"; }else{ $adsmatcheresponse = explode("||", $urlmatcher_statut); if($adsmatcheresponse[0]=="correct"){ $websitepublicid = $adsmatcheresponse[1]; update_option('adsmatcher_website_publicid', $websitepublicid); update_option('adsmatcher_wordpress_key', $setapikey); $stepone= "You have an AdsMatcher account."; $steptwo = "Your site is connected to AdsMatcher. See your WordPress API Key"; $verifiedinput = "display: inline;"; $error_adsmatcher_apikey = "Your website has been successfully verified.
"; $disableinput = "disabled"; $buttonstatut = "style='display: none;'"; } } } wp_enqueue_style('style', plugins_url( 'settings.css', __FILE__ ), false, '1.0', 'all' ); ?>| 1 | |
|---|---|
| 2 | |
| 3 | |