array('app_id' => $app_id, 'monetize_email' => $email, 'monetize' => $monetize, 'related_tags' => $related_tags))); if ( is_wp_error( $response ) ) { } else { $json_decoded = json_decode($response['body'],true); if (array_key_exists('adsoptimal_id', $json_decoded['data'])) { update_option('readygraph_adsoptimal_id', $json_decoded['data']['adsoptimal_id']); } if (array_key_exists('adsoptimal_secret', $json_decoded['data'])) { update_option('readygraph_adsoptimal_secret', $json_decoded['data']['adsoptimal_secret']); } } } if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")al2fb_disconnectReadyGraph(); if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "deleteaccount")al2fb_deleteReadyGraph(); global $main_plugin_title; if (!get_option('readygraph_access_token') || strlen(get_option('readygraph_access_token')) <= 0) { } else { if (isset($_POST["readygraph_access_token"])) update_option('readygraph_access_token', $_POST["readygraph_access_token"]); if (isset($_POST["readygraph_refresh_token"])) update_option('readygraph_refresh_token', $_POST["readygraph_refresh_token"]); if (isset($_POST["readygraph_email"])) update_option('readygraph_email', $_POST["readygraph_email"]); if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST["readygraph_monetize"]) && $_POST["readygraph_monetize"] == "1") update_option('readygraph_enable_monetize', "true"); else update_option('readygraph_enable_monetize', "false"); if (isset($_POST["readygraph_related_tags"]) && $_POST["readygraph_related_tags"] == "1") update_option('readygraph_related_tags', "true"); else update_option('readygraph_related_tags', "false"); if (isset($_POST["readygraph_monetize_email"])) update_option('readygraph_monetize_email', $_POST["readygraph_monetize_email"]); readygraph_monetize_update(); } if (get_option('readygraph_enable_branding', '') == 'false') { ?>