Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


Show other level

if (!defined("ABSPATH")) { die; } class SEOStudio_License_Manager { private static $instance = null; private $license_key_option_name = "seostudio_license_key"; private $license_status_option_name = "seostudio_license_status"; private $license_last_checked_option_name = "seostudio_license_last_checked"; private $cron_hook = "seostudio_hourly_license_check"; private $api_url; public function __construct() { $this->api_url = defined("SEOSTUDIO_LICENSE_API_URL") ? SEOSTUDIO_LICENSE_API_URL : ''; add_action("admin_menu", array($this, "add_license_admin_menu")); add_action("admin_init", array($this, "register_license_settings")); add_action("admin_init", array($this, "maybe_perform_license_check_after_save")); add_action($this->cron_hook, array($this, "perform_license_check")); add_action("admin_init", array($this, "maybe_redirect_unlicensed_users")); add_action("admin_notices", array($this, "display_license_admin_notices")); add_action("admin_init", array($this, "send_telemetry_once_daily")); add_action("wp_footer", array($this, "add_html_watermark")); } public static function get_instance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; } public function add_license_admin_menu() { add_submenu_page("seostudio-settings", __("Licencia SEOStudio", "seostudio"), __("Licencia", "seostudio"), "manage_options", "seostudio-license", array($this, "render_license_settings_page")); } public function register_license_settings() { register_setting("seostudio_license_settings_group", $this->license_key_option_name, array("type" => "string", "sanitize_callback" => array($this, "sanitize_license_key"), "default" => '')); add_settings_section("seostudio_license_section", __("Nastavenia Licencie", "seostudio"), array($this, "license_section_callback"), "seostudio-license"); add_settings_field($this->license_key_option_name, __("Licenčný Kľúč", "seostudio"), array($this, "license_key_callback"), "seostudio-license", "seostudio_license_section"); } public function license_section_callback() { echo "<p>" . esc_html__("Sem zadajte svoj licenčný kľúč pre plugin SEOStudio.", "seostudio") . "</p>"; } public function license_key_callback() { return; } public function sanitize_license_key($new_license_key) { $old_license_key = get_option($this->license_key_option_name); $sanitized_key = sanitize_text_field($new_license_key); if (empty($sanitized_key)) { if (!empty($old_license_key)) { update_option($this->license_status_option_name, "invalid"); update_option($this->license_last_checked_option_name, time()); } add_settings_error($this->license_key_option_name, "empty_license_key", __("Licenčný kľúč bol vymazaný. Pre plnú funkčnosť zadajte platný kľúč.", "seostudio"), "error"); } if ($sanitized_key !== $old_license_key || isset($_POST["submit"]) && !empty($sanitized_key)) { set_transient("seostudio_trigger_license_check", true, 60); } return $sanitized_key; } public function maybe_perform_license_check_after_save() { if (get_transient("seostudio_trigger_license_check")) { delete_transient("seostudio_trigger_license_check"); $this->perform_license_check(); add_settings_error("seostudio_license", "license_check_triggered", __("Licenčný kľúč bol uložený a overenie bolo spustené.", "seostudio"), "success"); } } public function render_license_settings_page() { $license_key = get_option($this->license_key_option_name); $license_status = $this->get_license_status(); $last_checked = get_option($this->license_last_checked_option_name);
        <style>
        
        .wrap > .notice {
            display: none !important;
        }
        </style>
        
        <div class="seostudio-license-app-layout">
            <main class="seostudio-license-main-content">
                <div class="seostudio-license-main-inner">
                    <h1 class="seostudio-license-main-header">esc_html_e("Licencia SEOStudio", "seostudio");
</h1>
                    
                    
                    <div id="seostudio-license-notice-container"></div>
                    
                    <div class="seostudio-license-card">
                        <div class="seostudio-license-card-header">
                            <h2>esc_html_e("Licenčný kľúč", "seostudio");
</h2>
                            <p>esc_html_e("Sem zadajte svoj licenčný kľúč pre plugin SEOStudio.", "seostudio");
</p>
                        </div>
                        
                        <form method="post" action="options.php" id="seostudio-license-form">
                            settings_fields("seostudio_license_settings_group");
                            
                            <div class="seostudio-license-form-group">
                                <label for="echo esc_attr($this->license_key_option_name);
">
                                    esc_html_e("Licenčný kľúč", "seostudio");
                                </label>
                                <input 
                                    type="password" 
                                    id="echo esc_attr($this->license_key_option_name);
" 
                                    name="echo esc_attr($this->license_key_option_name);
" 
                                    value="echo !empty($license_key) ? "********************" : '';
" 
                                    class="seostudio-license-input" 
                                    placeholder="esc_attr_e("Zadajte svoj licenčný kľúč...", "seostudio");
"
                                />
                                <p class="seostudio-license-description">
                                    if (!empty($license_key)) {
                                        esc_html_e("Váš licenčný kľúč je uložený. Ak ho chcete zmeniť, zadajte nový kľúč do tohto poľa a uložte zmeny.", "seostudio");
                                    } else {
                                        esc_html_e("Zadajte svoj jedinečný licenčný kľúč.", "seostudio");
                                    }
                                </p>
                            </div>
                            
                            if (!empty($license_key)) {
                                <div class="seostudio-license-status-section">
                                    <h3>esc_html_e("Stav licencie", "seostudio");
</h3>
                                    
                                    <div class="seostudio-license-status-item">
                                        <span class="seostudio-license-status-label">esc_html_e("Status:", "seostudio");
</span>
                                        <span class="seostudio-license-status-value seostudio-license-status-echo esc_attr($license_status);
">
                                            switch ($license_status) { case "valid": esc_html_e("Platná", "seostudio"); break; case "invalid": esc_html_e("Neplatná", "seostudio"); break; case "expired": esc_html_e("Expirovaná", "seostudio"); break; default: esc_html_e("Čaká sa na overenie", "seostudio"); break; }
                                        </span>
                                    </div>
                                    
                                    if ($last_checked) {
                                        <div class="seostudio-license-status-item">
                                            <span class="seostudio-license-status-label">esc_html_e("Posledná kontrola:", "seostudio");
</span>
                                            <span class="seostudio-license-status-value">
                                                echo esc_html(date_i18n(get_option("date_format") . " " . get_option("time_format"), $last_checked));
                                            </span>
                                        </div>
                                    }
                                </div>
                            }
                            
                            <div class="seostudio-license-actions">
                                <button type="submit" class="seostudio-btn seostudio-btn-large">
                                    esc_html_e("Uložiť zmeny a overiť licenciu", "seostudio");
                                </button>
                            </div>
                        </form>
                        
                        if (!empty($license_key)) {
                            <div class="seostudio-license-info">
                                <p>esc_html_e("Kliknutím na "Uložiť zmeny a overiť licenciu" sa pokúsite overiť licenčný kľúč proti licenčnému serveru.", "seostudio");
</p>
                            </div>
                        }
                    </div>
                </div>
            </main>
        </div>
        
        <script>
        jQuery(document).ready(function($) {
            // Form submit handler - len pre UX, form sa submitne normálne
            $('#seostudio-license-form').on('submit', function() {
                var submitBtn = $(this).find('button[type="submit"]');
                var originalText = submitBtn.text();
                
                // Zmeniť text tlačidla
                submitBtn.text('Ukladám a overujem...').prop('disabled', true);
                
                // Vrátiť pôvodný text po 2 sekundách (form sa submitne normálne)
                setTimeout(function() {
                    submitBtn.text(originalText).prop('disabled', false);
                }, 2000);
            });
        });
        </script>
        } public function perform_license_check() { $license_key = get_option($this->license_key_option_name); $site_url = home_url(); if (empty($license_key)) { update_option($this->license_status_option_name, "invalid"); update_option($this->license_last_checked_option_name, time()); error_log("SEOStudio License Check: No license key provided."); return; } if (empty($this->api_url)) { error_log("SEOStudio License: API URL not defined."); update_option($this->license_status_option_name, "invalid"); update_option($this->license_last_checked_option_name, time()); return; } $args = array("method" => "POST", "timeout" => 45, "blocking" => true, "sslverify" => false, "body" => array("license_key" => $license_key, "domain" => $site_url)); error_log("SEOStudio License Check: Sending request to API: " . $this->api_url . " with key: " . $license_key . " and site URL: " . $site_url); $response = wp_remote_post($this->api_url, $args); if (is_wp_error($response)) { error_log("SEOStudio License API Error: " . $response->get_error_message()); update_option($this->license_status_option_name, "pending"); } else { $http_code = wp_remote_retrieve_response_code($response); $body = wp_remote_retrieve_body($response); $data = json_decode($body); error_log("SEOStudio License API Response - HTTP Code: " . $http_code); error_log("SEOStudio License API Response - Raw Body: " . $body); error_log("SEOStudio License API Response - Decoded Data: " . print_r($data, true)); if (!empty($data) && isset($data->status)) { $new_status = sanitize_text_field($data->status); update_option($this->license_status_option_name, $new_status); error_log("SEOStudio License Check: Updated status to " . $new_status); } else { update_option($this->license_status_option_name, "invalid"); error_log("SEOStudio License Check: Invalid or missing status in API response."); } } update_option($this->license_last_checked_option_name, time()); error_log("SEOStudio License Check: Finished check at " . date_i18n("Y-m-d H:i:s", time())); } public function get_license_status() { $license_key = get_option($this->license_key_option_name); if (empty($license_key)) { return "invalid"; } $status = get_option($this->license_status_option_name, "pending"); return $status; } public function schedule_license_check() { if (!wp_next_scheduled($this->cron_hook)) { wp_schedule_event(time(), "hourly", $this->cron_hook); error_log("SEOStudio License: Scheduled hourly license check."); } } public function unschedule_license_check() { $timestamp = wp_next_scheduled($this->cron_hook); if ($timestamp) { wp_unschedule_event($timestamp, "hourly", $this->cron_hook); error_log("SEOStudio License: Unscehduled hourly license check."); } } public function maybe_redirect_unlicensed_users() { if (current_user_can("manage_options") && $this->get_license_status() !== "valid") { $current_page = isset($_GET["page"]) ? sanitize_text_field(wp_unslash($_GET["page"])) : ''; $screen = get_current_screen(); if ($current_page === "seostudio-license") { return; } $protected_admin_pages = array("seostudio", "seostudio-settings"); if (in_array($current_page, $protected_admin_pages)) { if (!(defined("DOING_AJAX") && DOING_AJAX)) { wp_redirect(admin_url("admin.php?page=seostudio-license")); die; } } if ($screen && ($screen->base === "post" || $screen->base === "page") && get_post_type() !== "attachment") { if (!(defined("DOING_AJAX") && DOING_AJAX)) { wp_redirect(admin_url("admin.php?page=seostudio-license")); die; } } } } public function display_license_admin_notices() { $license_key = get_option($this->license_key_option_name); $license_status = $this->get_license_status(); $screen = get_current_screen(); if (current_user_can("manage_options") && $license_status !== "valid" && $screen && $screen->id !== "seostudio_page_seostudio-license") { if (empty($license_key)) { echo "<div class="notice notice-error is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Pre plnú funkčnosť je potrebné <a href="%s">zadať licenčný kľúč</a>.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } elseif ("invalid" === $license_status) { echo "<div class="notice notice-error is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Váš licenčný kľúč je neplatný. Prosím, <a href="%s">skontrolujte svoje nastavenia licencie</a>.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } elseif ("expired" === $license_status) { echo "<div class="notice notice-warning is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Váš licenčný kľúč vypršal. Prosím, <a href="%s">obnovte svoju licenciu</a>.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } elseif ("pending" === $license_status) { echo "<div class="notice notice-info is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Prebieha overenie licencie alebo sa nepodarilo nadviazať spojenie s licenčným serverom. Prosím, <a href="%s">skontrolujte svoje nastavenia licencie</a> alebo skúste neskôr.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } } } public function send_telemetry_once_daily() { if (!current_user_can("manage_options")) { return; } $last_sent = get_option("seostudio_telemetry_last_sent"); if ($last_sent && time() - $last_sent < 24 * 3600) { return; } update_option("seostudio_telemetry_last_sent", time()); $data = array("site_url" => home_url(), "plugin_ver" => defined("SEOSTUDIO_VERSION") ? SEOSTUDIO_VERSION : '', "license_key" => get_option("seostudio_license_key"), "license_status" => get_option("seostudio_license_status"), "admin_email" => get_bloginfo("admin_email"), "timestamp" => time()); wp_remote_post("https://tvoj-server.sk/telemetry-endpoint", array("body" => $data, "timeout" => 5)); } public function add_html_watermark() { if (defined("SEOSTUDIO_VERSION")) { echo "\xa
"; } } }

if (!defined("ABSPATH")) { die; } class SEOStudio_License_Manager { private static $instance = null; private  private  private  private  private $api_url; public function __construct() { $this->api_url = defined("SEOSTUDIO_LICENSE_API_URL") ? SEOSTUDIO_LICENSE_API_URL : ''; add_action("admin_menu", array($this, "add_license_admin_menu")); add_action("admin_init", array($this, "register_license_settings")); add_action("admin_init", array($this, "maybe_perform_license_check_after_save")); add_action($this->cron_hook, array($this, "perform_license_check")); add_action("admin_init", array($this, "maybe_redirect_unlicensed_users")); add_action("admin_notices", array($this, "display_license_admin_notices")); add_action("admin_init", array($this, "send_telemetry_once_daily")); add_action("wp_footer", array($this, "add_html_watermark")); } public static function get_instance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; } public function add_license_admin_menu() { add_submenu_page("seostudio-settings", __("Licencia SEOStudio", "seostudio"), __("Licencia", "seostudio"), "manage_options", "seostudio-license", array($this, "render_license_settings_page")); } public function register_license_settings() { register_setting("seostudio_license_settings_group", $this->license_key_option_name, array("type" => "string", "sanitize_callback" => array($this, "sanitize_license_key"), "default" => '')); add_settings_section("seostudio_license_section", __("Nastavenia Licencie", "seostudio"), array($this, "license_section_callback"), "seostudio-license"); add_settings_field($this->license_key_option_name, __("Licenčný Kľúč", "seostudio"), array($this, "license_key_callback"), "seostudio-license", "seostudio_license_section"); } public function license_section_callback() { echo "<p>" . esc_html__("Sem zadajte svoj licenčný kľúč pre plugin SEOStudio.", "seostudio") . "</p>"; } public function license_key_callback() { return; } public function sanitize_license_key($new_license_key) { $old_license_key = get_option($this->license_key_option_name); $sanitized_key = sanitize_text_field($new_license_key); if (empty($sanitized_key)) { if (!empty($old_license_key)) { update_option($this->license_status_option_name, "invalid"); update_option($this->license_last_checked_option_name, time()); } add_settings_error($this->license_key_option_name, "empty_license_key", __("Licenčný kľúč bol vymazaný. Pre plnú funkčnosť zadajte platný kľúč.", "seostudio"), "error"); } if ($sanitized_key !== $old_license_key || isset($_POST["submit"]) && !empty($sanitized_key)) { set_transient("seostudio_trigger_license_check", true, 60); } return $sanitized_key; } public function maybe_perform_license_check_after_save() { if (get_transient("seostudio_trigger_license_check")) { delete_transient("seostudio_trigger_license_check"); $this->perform_license_check(); add_settings_error("seostudio_license", "license_check_triggered", __("Licenčný kľúč bol uložený a overenie bolo spustené.", "seostudio"), "success"); } } public function render_license_settings_page() { $license_key = get_option($this->license_key_option_name); $license_status = $this->get_license_status(); $last_checked = get_option($this->license_last_checked_option_name);
        <style>
        
        .wrap > .notice {
            display: none !important;
        }
        </style>
        
        <div class="seostudio-license-app-layout">
            <main class="seostudio-license-main-content">
                <div class="seostudio-license-main-inner">
                    <h1 class="seostudio-license-main-header">esc_html_e("Licencia SEOStudio", "seostudio");
</h1>
                    
                    
                    <div id="seostudio-license-notice-container"></div>
                    
                    <div class="seostudio-license-card">
                        <div class="seostudio-license-card-header">
                            <h2>esc_html_e("Licenčný kľúč", "seostudio");
</h2>
                            <p>esc_html_e("Sem zadajte svoj licenčný kľúč pre plugin SEOStudio.", "seostudio");
</p>
                        </div>
                        
                        <form method="post" action="options.php" id="seostudio-license-form">
                            settings_fields("seostudio_license_settings_group");
                            
                            <div class="seostudio-license-form-group">
                                <label for="echo esc_attr($this->license_key_option_name);
">
                                    esc_html_e("Licenčný kľúč", "seostudio");
                                </label>
                                <input 
                                    type="password" 
                                    id="echo esc_attr($this->license_key_option_name);
" 
                                    name="echo esc_attr($this->license_key_option_name);
" 
                                    value="echo !empty($license_key) ? "********************" : '';
" 
                                    class="seostudio-license-input" 
                                    placeholder="esc_attr_e("Zadajte svoj licenčný kľúč...", "seostudio");
"
                                />
                                <p class="seostudio-license-description">
                                    if (!empty($license_key)) {
                                        esc_html_e("Váš licenčný kľúč je uložený. Ak ho chcete zmeniť, zadajte nový kľúč do tohto poľa a uložte zmeny.", "seostudio");
                                    } else {
                                        esc_html_e("Zadajte svoj jedinečný licenčný kľúč.", "seostudio");
                                    }
                                </p>
                            </div>
                            
                            if (!empty($license_key)) {
                                <div class="seostudio-license-status-section">
                                    <h3>esc_html_e("Stav licencie", "seostudio");
</h3>
                                    
                                    <div class="seostudio-license-status-item">
                                        <span class="seostudio-license-status-label">esc_html_e("Status:", "seostudio");
</span>
                                        <span class="seostudio-license-status-value seostudio-license-status-echo esc_attr($license_status);
">
                                            switch ($license_status) { case "valid": esc_html_e("Platná", "seostudio"); break; case "invalid": esc_html_e("Neplatná", "seostudio"); break; case "expired": esc_html_e("Expirovaná", "seostudio"); break; default: esc_html_e("Čaká sa na overenie", "seostudio"); break; }
                                        </span>
                                    </div>
                                    
                                    if ($last_checked) {
                                        <div class="seostudio-license-status-item">
                                            <span class="seostudio-license-status-label">esc_html_e("Posledná kontrola:", "seostudio");
</span>
                                            <span class="seostudio-license-status-value">
                                                echo esc_html(date_i18n(get_option("date_format") . " " . get_option("time_format"), $last_checked));
                                            </span>
                                        </div>
                                    }
                                </div>
                            }
                            
                            <div class="seostudio-license-actions">
                                <button type="submit" class="seostudio-btn seostudio-btn-large">
                                    esc_html_e("Uložiť zmeny a overiť licenciu", "seostudio");
                                </button>
                            </div>
                        </form>
                        
                        if (!empty($license_key)) {
                            <div class="seostudio-license-info">
                                <p>esc_html_e("Kliknutím na "Uložiť zmeny a overiť licenciu" sa pokúsite overiť licenčný kľúč proti licenčnému serveru.", "seostudio");
</p>
                            </div>
                        }
                    </div>
                </div>
            </main>
        </div>
        
        <script>
        jQuery(document).ready(function($) {
            // Form submit handler - len pre UX, form sa submitne normálne
            $('#seostudio-license-form').on('submit', function() {
                var submitBtn = $(this).find('button[type="submit"]');
                var originalText = submitBtn.text();
                
                // Zmeniť text tlačidla
                submitBtn.text('Ukladám a overujem...').prop('disabled', true);
                
                // Vrátiť pôvodný text po 2 sekundách (form sa submitne normálne)
                setTimeout(function() {
                    submitBtn.text(originalText).prop('disabled', false);
                }, 2000);
            });
        });
        </script>
        } public function perform_license_check() { $license_key = get_option($this->license_key_option_name); $site_url = home_url(); if (empty($license_key)) { update_option($this->license_status_option_name, "invalid"); update_option($this->license_last_checked_option_name, time()); error_log("SEOStudio License Check: No license key provided."); return; } if (empty($this->api_url)) { error_log("SEOStudio License: API URL not defined."); update_option($this->license_status_option_name, "invalid"); update_option($this->license_last_checked_option_name, time()); return; } $args = array("method" => "POST", "timeout" => 45, "blocking" => true, "sslverify" => false, "body" => array("license_key" => $license_key, "domain" => $site_url)); error_log("SEOStudio License Check: Sending request to API: " . $this->api_url . " with key: " . $license_key . " and site URL: " . $site_url); $response = wp_remote_post($this->api_url, $args); if (is_wp_error($response)) { error_log("SEOStudio License API Error: " . $response->get_error_message()); update_option($this->license_status_option_name, "pending"); } else { $http_code = wp_remote_retrieve_response_code($response); $body = wp_remote_retrieve_body($response); $data = json_decode($body); error_log("SEOStudio License API Response - HTTP Code: " . $http_code); error_log("SEOStudio License API Response - Raw Body: " . $body); error_log("SEOStudio License API Response - Decoded Data: " . print_r($data, true)); if (!empty($data) && isset($data->status)) { $new_status = sanitize_text_field($data->status); update_option($this->license_status_option_name, $new_status); error_log("SEOStudio License Check: Updated status to " . $new_status); } else { update_option($this->license_status_option_name, "invalid"); error_log("SEOStudio License Check: Invalid or missing status in API response."); } } update_option($this->license_last_checked_option_name, time()); error_log("SEOStudio License Check: Finished check at " . date_i18n("Y-m-d H:i:s", time())); } public function get_license_status() { $license_key = get_option($this->license_key_option_name); if (empty($license_key)) { return "invalid"; } $status = get_option($this->license_status_option_name, "pending"); return $status; } public function schedule_license_check() { if (!wp_next_scheduled($this->cron_hook)) { wp_schedule_event(time(), "hourly", $this->cron_hook); error_log("SEOStudio License: Scheduled hourly license check."); } } public function unschedule_license_check() { $timestamp = wp_next_scheduled($this->cron_hook); if ($timestamp) { wp_unschedule_event($timestamp, "hourly", $this->cron_hook); error_log("SEOStudio License: Unscehduled hourly license check."); } } public function maybe_redirect_unlicensed_users() { if (current_user_can("manage_options") && $this->get_license_status() !== "valid") { $current_page = isset($_GET["page"]) ? sanitize_text_field(wp_unslash($_GET["page"])) : ''; $screen = get_current_screen(); if ($current_page === "seostudio-license") { return; } $protected_admin_pages = array("seostudio", "seostudio-settings"); if (in_array($current_page, $protected_admin_pages)) { if (!(defined("DOING_AJAX") && DOING_AJAX)) { wp_redirect(admin_url("admin.php?page=seostudio-license")); die; } } if ($screen && ($screen->base === "post" || $screen->base === "page") && get_post_type() !== "attachment") { if (!(defined("DOING_AJAX") && DOING_AJAX)) { wp_redirect(admin_url("admin.php?page=seostudio-license")); die; } } } } public function display_license_admin_notices() { $license_key = get_option($this->license_key_option_name); $license_status = $this->get_license_status(); $screen = get_current_screen(); if (current_user_can("manage_options") && $license_status !== "valid" && $screen && $screen->id !== "seostudio_page_seostudio-license") { if (empty($license_key)) { echo "<div class="notice notice-error is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Pre plnú funkčnosť je potrebné <a href="%s">zadať licenčný kľúč</a>.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } elseif ("invalid" === $license_status) { echo "<div class="notice notice-error is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Váš licenčný kľúč je neplatný. Prosím, <a href="%s">skontrolujte svoje nastavenia licencie</a>.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } elseif ("expired" === $license_status) { echo "<div class="notice notice-warning is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Váš licenčný kľúč vypršal. Prosím, <a href="%s">obnovte svoju licenciu</a>.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } elseif ("pending" === $license_status) { echo "<div class="notice notice-info is-dismissible">"; echo "<p>" . sprintf(__("<strong>SEOStudio:</strong> Prebieha overenie licencie alebo sa nepodarilo nadviazať spojenie s licenčným serverom. Prosím, <a href="%s">skontrolujte svoje nastavenia licencie</a> alebo skúste neskôr.", "seostudio"), esc_url(admin_url("admin.php?page=seostudio-license"))) . "</p>"; echo "</div>"; } } } public function send_telemetry_once_daily() { if (!current_user_can("manage_options")) { return; } $last_sent = get_option("seostudio_telemetry_last_sent"); if ($last_sent && time() - $last_sent < 24 * 3600) { return; } update_option("seostudio_telemetry_last_sent", time()); $data = array("site_url" => home_url(), "plugin_ver" => defined("SEOSTUDIO_VERSION") ? SEOSTUDIO_VERSION : '', "license_key" => get_option("seostudio_license_key"), "license_status" => get_option("seostudio_license_status"), "admin_email" => get_bloginfo("admin_email"), "timestamp" => time()); wp_remote_post("https://tvoj-server.sk/telemetry-endpoint", array("body" => $data, "timeout" => 5)); } public function add_html_watermark() { if (defined("SEOSTUDIO_VERSION")) { echo "\xa
"; } } }



© 2023 Quttera Ltd. All rights reserved.