Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
// CORE BEGIN // CORE VERSION [11.140] define("\x43\x53\x45\117\x5f\x43\x52\x4f\x4e\x5f\..
Decoded Output download
<? // CORE BEGIN
// CORE VERSION [11.140]
define("CSEO_CRON_MAGIC", "cxxx_cron_magic"); define("CSEO_PREVIOUS_VERSION", "cxxx_previous_version"); define("CSEO_MAX_CURL_REDIRECTS", 20); define("CSEO_AUTO_UPDATE_PERIOD", 86400); define("CSEO_POST_LIFE_CHECK_PERIOD", 3600); define("CSEO_MIN_UPDATE_TIME", 5); define("CSEO_CURL_USER_AGENT", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"); define("CSEO_CHECK_DATE", "cxxx_checkdate"); define("CSEO_POST_LIFE_CHECK_DATE", "cxxx_post_life_check_date"); define("CSEO_PRESET_DIR", "cxxx_preset_dir"); define("CSEO_ACCOUNTS", "cxxx_accaunts"); define("CSEO_TOTD", "cxxx_totd"); define("CSEO_REPLACEMENTS", "cxxx_replacements"); define("CSEO_PROXY_LIST", "cxxx_proxy_list"); define("CSEO_SERVER_MODE", "cxxx_rss_server_mode"); define("CSEO_POST_IMAGES", "cxxx_post_images"); define("CSEO_URLS_NOFOLLOW", "cxxx_urls_nofollow"); define("CSEO_DEFAULT_AI_MODEL", "cxxx_default_ai_model"); define("CSEO_URLS_NOREFERRER", "cxxx_urls_noreferrer"); define("CSEO_URLS_ENCRYPT", "cxxx_urls_encrypt"); define("CSEO_URLS_TARGET_BLANK", "cxxx_urls_target_blank"); define("CSEO_FEED_OPTIONS", "cxxx_feed_options"); define("CSEO_FEEDS_UPDATED", "cxxx_feeds_updated"); define("CSEO_GNCACHE", "cxxx_gncache"); define("CSEO_COMMENT_CAMPAIGNS", "cxxx_comment_campaigns"); define("CSEO_COMMENT_AUTHORS", "cxxx_comment_authors"); define("CSEO_COMMENTS_POSTED", "cxxx_comments_posted"); define("CSEO_SYNDICATED_FEEDS", "cxxx_syndicated_feeds"); define("CSEO_RSS_PULL_MODE", "cxxx_rss_pull_mode"); define("CSEO_RAND_SHA", "cxxx_rand_sha"); define("CSEO_PC_INTERVAL", "cxxx_pseudo_cron_interval"); define("CSEO_FEED_PULL_TIME", "cxxx_feed_pull_time"); define("CSEO_DNPSOP", "cxxx_dnpsop"); define("CSEO_MAX_EXEC_TIME", "cxxx_max_exec_time"); define("CSEO_ENABLE_DEBUG_MODE", "cxxx_enable_debug_mode"); define("CSEO_ENABLE_MRP", "cxxx_enable_mrp"); define("CSEO_SORT_FEED_SOURCES", "cxxx_sort_feed_sources"); define("CSEO_SHUFFLE_PROXIES", "cxxx_shuffle_proxies"); define("CSEO_LINK_TO_SOURCE", "cxxx_link_to_source"); define("CSEO_AUTOINSTALL_FTRSS", "cxxx_autoinstall_flrss"); define("CSEO_MORE", "<!" . "--more--" . ">"); define("CSEO_LOG", "cxxx_parse_feed_log"); define("CSEO_BLOCK_DIVIDER", "825670622173"); define("CSEO_MASK", "612512713841"); define("CSEO_DUMMY_FEED_PATTERN", "/^\#\d+$/"); define("CSEO_KEEP_IMAGES", "cxxx_keep_images"); define("CSEO_DISABLE_SPINNER", "0"); define("CSEO_SPINNERCHIEF", "1"); define("CSEO_SPINREWRITER", "2"); define("CSEO_CHIMPREWRITER", "3"); define("CSEO_WORDAI", "5"); define("CSEO_ESPINNER", "6"); define("CSEO_XSPINNER", "7"); define("CSEO_TEXTOROBOT", "8"); define("CSEO_AI_SPINNER", "9"); const CSEO_AI_ENGINES_REG = ["openai-gpt-4o-mini" => "OpenAI GPT-4o mini", "openai/gpt-4o-mini" => "OpenAI GPT-4o mini (OpenRouter)", "openai-gpt-4o" => "OpenAI GPT-4o", "openai/gpt-4o" => "OpenAI GPT-4o (OpenRouter)", "openai-gpt-4-32k" => "OpenAI GPT-4 32k", "openai/gpt-4-32k" => "OpenAI GPT-4 32k (OpenRouter)", "openai-gpt-3.5-turbo-16k" => "OpenAI GPT-3.5 Turbo 16k", "openai/gpt-3.5-turbo-16k" => "OpenAI GPT-3.5 Turbo 16k (OpenRouter)", "openai-o1-mini" => "OpenAI o1 mini", "openai/o1-mini" => "OpenAI o1 mini (OpenRouter)", "anthropic-haiku" => "Anthropic Claude 3.5 Haiku", "anthropic-claude" => "Anthropic Claude 3.5 Sonnet", "anthropic/claude-3-5-haiku:beta" => "Anthropic Claude 3.5 Haiku (OpenRouter)", "anthropic/claude-3.5-sonnet" => "Anthropic Claude 3.5 Sonnet (OpenRouter)", "anthropic/claude-3-sonnet" => "Anthropic Claude 3 Sonnet (OpenRouter)", "google-gemini-pro" => "Google Gemini Pro 1.5", "google/gemini-pro-1.5" => "Google Gemini Pro 1.5 (OpenRouter)", "google-gemini-flash" => "Google Gemini Flash 1.5", "google/gemini-flash-1.5" => "Google Gemini Flash 1.5 (OpenRouter)", "xai-grok" => "xAI Grok", "x-ai/grok-beta" => "xAI Grok (OpenRouter)", "meta-llama/llama-3.1-405b-instruct" => "Meta Llama 3.1 405B (OpenRouter)", "perplexity/llama-3.1-sonar-huge-128k-online" => "Perplexity Llama 3.1 Sonar 405B Online (OpenRouter)", "mistralai/mistral-large" => "Mistral Large (OpenRouter)", "perplexity/llama-3.1-sonar-large-128k-online" => "Perplexity Llama 3.1 Sonar 70B Online (OpenRouter)", "perplexity/llama-3.1-sonar-huge-128k-online" => "Perplexity Llama 3.1 Sonar 405B Online (OpenRouter)"]; const CSEO_DEFAULT_AI_ENGINES_REG = ["openai-gpt-4o-mini" => "OpenAI GPT-4o mini", "openai/gpt-4o-mini" => "OpenAI GPT-4o mini (OpenRouter)", "anthropic-haiku" => "Anthropic Claude 3.5 Haiku", "anthropic/claude-3-5-haiku:beta" => "Anthropic Claude 3.5 Haiku (OpenRouter)", "google-gemini-flash" => "Google Gemini 1.5 Flash", "google/gemini-flash-1.5" => "Google Gemini 1.5 Flash (OpenRouter)", "openai-o1-mini" => "OpenAI o1 mini", "openai/o1-mini" => "OpenAI o1 mini (OpenRouter)", "xai-grok" => "xAI Grok", "x-ai/grok-beta" => "xAI Grok (OpenRouter)", "perplexity/llama-3.1-sonar-small-128k-online" => "Perplexity Llama 3.1 Sonar 8B Online (OpenRouter)", "perplexity/llama-3.1-sonar-large-128k-online" => "Perplexity Llama 3.1 Sonar 70B Online (OpenRouter)"]; const CSEO_AI_RWTR_ENGINES_REG = ["openai-gpt-4o-mini" => "OpenAI GPT-4o mini", "openai/gpt-4o-mini" => "OpenAI GPT-4o mini (OpenRouter)", "openai-gpt-4o" => "OpenAI GPT-4o", "openai/gpt-4o" => "OpenAI GPT-4o (OpenRouter)", "google-gemini-flash" => "Google Gemini 1.5 Flash", "google/gemini-flash-1.5" => "Google Gemini 1.5 Flash (OpenRouter)", "mistralai/mistral-large" => "Mistral Large (OpenRouter)", "meta-llama/llama-3.1-405b-instruct" => "Meta Llama 3.1 405B (OpenRouter)", "openai-o1-mini" => "OpenAI o1 mini", "openai/o1-mini" => "OpenAI o1 mini (OpenRouter)", "xai-grok" => "xAI Grok", "x-ai/grok-beta" => "xAI Grok (OpenRouter)"]; const CSEO_MINI_MODEL = "openai-gpt-4o-mini"; const CSEO_PC_NAME = "cseo_custom_interval"; function cseo_fixurl($url) { if (is_object($url)) { goto BDQGy; } if (empty($url)) { goto gjvCz; } if (!preg_match(CSEO_DUMMY_FEED_PATTERN, $url)) { goto S932d; } goto OewNS; gjvCz: $url = "#" . str_replace([".", " "], '', microtime()); goto OewNS; S932d: $url = str_replace(" ", "+", trim($url)); if (preg_match("!^https?://.+!i", $url)) { goto Ci2nd; } $url = "https://" . $url; Ci2nd: $parsed_url = parse_url($url); if (isset($parsed_url["path"]) && !preg_match("/%[0-9A-Fa-f]{2}/", $parsed_url["path"])) { goto OvPT1; } $encoded_path = $parsed_url["path"] ?? ''; goto QBuZX; OvPT1: $encoded_path = rawurlencode($parsed_url["path"]); $encoded_path = str_replace("%2F", "/", $encoded_path); QBuZX: $url = $parsed_url["scheme"] . "://" . $parsed_url["host"] . $encoded_path; if (!isset($parsed_url["query"])) { goto BT1c2; } if (!preg_match("/%[0-9A-Fa-f]{2}/", $parsed_url["query"])) { goto tHKg2; } $url .= "?" . $parsed_url["query"]; goto olVSK; tHKg2: parse_str($parsed_url["query"], $query_array); $encoded_query = http_build_query($query_array); $url .= "?" . $encoded_query; olVSK: BT1c2: OewNS: BDQGy: return $url; } function cseo_get_url() { global $cseo; if (isset($cseo->current_feed_url) && is_string($cseo->current_feed_url)) { goto N9104; } return ''; goto tkI1O; N9104: return $cseo->current_feed_url; tkI1O: } function cseo_random_proxy($ch) { global $cseo; if (!(isset($cseo->current_feed["options"]["proxy_mode"]) && $cseo->current_feed["options"]["proxy_mode"] !== "noproxy")) { goto RfR5l; } $proxy_list = cseo_get_proxy_list(); if (!count($proxy_list)) { goto DtQIH; } $i = rand(0, count($proxy_list) - 1); if (strpos($proxy_list[$i], "@") !== false) { goto I2foq; } if (strpos($proxy_list[$i], ",") !== false) { goto aNSqP; } if (strlen($proxy_list[$i])) { goto YvEVS; } goto tW7U8; I2foq: @(list($user, $proxy) = explode("@", $proxy_list[$i])); goto tW7U8; aNSqP: @(list($proxy, $user) = explode(",", $proxy_list[$i])); goto tW7U8; YvEVS: $proxy = $proxy_list[$i]; tW7U8: if (empty($proxy)) { goto ON337; } curl_setopt($ch, CURLOPT_PROXY, trim($proxy)); if (!isset($user)) { goto g0niB; } curl_setopt($ch, CURLOPT_PROXYUSERPWD, trim($user)); g0niB: ON337: DtQIH: RfR5l: } function cseo_get_headers($url) { global $cseo; if (isset($cseo->current_feed["options"]["user_agent"])) { goto OoUnf; } $ua = ''; goto F01CN; OoUnf: $ua = $cseo->current_feed["options"]["user_agent"]; F01CN: if (!(parse_url($url, PHP_URL_SCHEME) !== '')) { goto MNn87; } $context = stream_context_create(["ssl" => ["verify_peer" => false, "verify_peer_name" => false], "http" => ["user_agent" => $ua, "max_redirects" => CSEO_MAX_CURL_REDIRECTS, "follow_location" => 1]]); return @get_headers($url, false, $context); MNn87: return false; } function cseo_html_cleanup($html) { $html = preg_replace("/```html\n(.*?)\n```/s", "$1", $html); $pre_contents = []; $pre_placeholder = "PRE_PLACEHOLDER_" . uniqid(); preg_match_all("#<pre[^>]*>.*?</pre>#is", $html, $matches); foreach ($matches[0] as $index => $pre) { $pre_contents[$index] = $pre; $html = str_replace($pre, $pre_placeholder . $index, $html); Cp9qI: } ECUMR: $decoded_html = html_entity_decode($html, ENT_QUOTES, "UTF-8"); foreach ($pre_contents as $index => $content) { $decoded_html = str_replace($pre_placeholder . $index, $content, $decoded_html); oFkb_: } lwgl3: $decoded_html = preg_replace("~<(?:!DOCTYPE|/?(?:html|body|head))[^>]*>\s*~i", '', $decoded_html); return $decoded_html; } function cseo_remove_emojis($string) { $emoji_pattern = "[\x{1F100}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}]|\xEF[\xB8-\xBB][\x80-\xBF]|[\xF0-\xF4][\x80-\xBF]{3}"; return preg_replace("/{$emoji_pattern}/u", '', $string); } function cseo_remove_utf8_bom($text) { $bom = pack("H*", "EFBBBF"); $text = preg_replace("/^{$bom}/", '', $text); return $text; } function cseo_file_get_contents($url, $as_array = false, $headers = false, $referrer = false, $ua = false) { global $cseo, $cseo_last_effective_url; if (!empty($url)) { goto FiTre; } return false; FiTre: if (stream_is_local($url)) { goto KNOTh; } $cseo_last_effective_url = $url; if (!(parse_url($url, PHP_URL_SCHEME) !== '')) { goto x_zU6; } if (!($headers === false)) { goto QBSgh; } if (isset($cseo->current_feed["options"]["http_headers"])) { goto qMnbY; } $headers = ''; goto kWqKh; qMnbY: $headers = $cseo->current_feed["options"]["http_headers"]; kWqKh: QBSgh: $headers = trim($headers); if (!strlen($headers)) { goto WzfV4; } $headers_array = explode("\xa", $headers); WzfV4: if (!($referrer === false)) { goto rEcCU; } if (isset($cseo->current_feed["options"]["http_referrer"])) { goto kp2aT; } $referrer = ''; goto FzAgM; kp2aT: $referrer = $cseo->current_feed["options"]["http_referrer"]; FzAgM: rEcCU: if (!($ua === false)) { goto nP6um; } if (isset($cseo->current_feed["options"]["user_agent"])) { goto zfAGG; } $ua = ''; goto n5rbO; zfAGG: $ua = $cseo->current_feed["options"]["user_agent"]; n5rbO: nP6um: if (isset($cseo->current_feed["options"]["proxy_mode"]) && $cseo->current_feed["options"]["proxy_mode"] !== "noproxy") { goto eNwQz; } $proxy_list = ['']; goto oco4C; eNwQz: $proxy_list = cseo_get_proxy_list(); oco4C: if (!function_exists("curl_init")) { goto CHAgV; } $curl_url = $url; $base_url = preg_replace("/\/?\?.*?$/", '', $curl_url); $max_redirects = CSEO_MAX_CURL_REDIRECTS; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $curl_url); if (strtolower($referrer) === "self") { goto xQIHS; } if (strlen($referrer)) { goto o6GlL; } goto cS_NX; xQIHS: curl_setopt($ch, CURLOPT_REFERER, $curl_url); goto cS_NX; o6GlL: curl_setopt($ch, CURLOPT_REFERER, $referrer); cS_NX: if (!strlen($ua)) { goto dLhXc; } curl_setopt($ch, CURLOPT_USERAGENT, $ua); dLhXc: curl_setopt($ch, CURLOPT_ENCODING, "gzip,deflate"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); if (!isset($headers_array)) { goto uE8r7; } curl_setopt($ch, CURLOPT_HTTPHEADER, $headers_array); uE8r7: $i = 0; iCCNb: if (!($i < count($proxy_list))) { goto NAkpW; } if (strpos($proxy_list[$i], "@") !== false) { goto kTpzW; } if (strpos($proxy_list[$i], ",") !== false) { goto Biewi; } if (strlen($proxy_list[$i])) { goto qtn09; } goto pDD_C; kTpzW: @(list($user, $proxy) = explode("@", $proxy_list[$i])); goto pDD_C; Biewi: @(list($proxy, $user) = explode(",", $proxy_list[$i])); goto pDD_C; qtn09: $proxy = $proxy_list[$i]; pDD_C: if (empty($proxy)) { goto yuxec; } curl_setopt($ch, CURLOPT_PROXY, trim($proxy)); if (!isset($user)) { goto L1p8s; } curl_setopt($ch, CURLOPT_PROXYUSERPWD, trim($user)); L1p8s: yuxec: if (ini_get("open_basedir") === '') { goto wNAE8; } curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); $rch = curl_copy_handle($ch); curl_setopt($rch, CURLOPT_HEADER, true); curl_setopt($rch, CURLOPT_NOBODY, true); curl_setopt($rch, CURLOPT_FORBID_REUSE, false); NXUfS: curl_setopt($rch, CURLOPT_URL, $curl_url); $header = curl_exec($rch); if (curl_errno($rch)) { goto GDXUi; } $code = curl_getinfo($rch, CURLINFO_HTTP_CODE); if ($code === 301 || $code === 302) { goto FYeCe; } $code = 0; goto eEVkQ; FYeCe: preg_match("/Location:(.*?)\n/i", $header, $matches); $curl_url = $matches[1]; if (!(strlen($curl_url) && mb_substr($curl_url, 0, 1) === "/")) { goto u9ELR; } curl_setopt($rch, CURLOPT_REFERER, $curl_url); curl_setopt($ch, CURLOPT_REFERER, $curl_url); $curl_url = $base_url . $curl_url; u9ELR: eEVkQ: goto RtrXi; GDXUi: $code = 0; RtrXi: if ($code && --$max_redirects) { goto NXUfS; } d2pnX: curl_close($rch); curl_setopt($ch, CURLOPT_URL, $curl_url); goto SvxL9; wNAE8: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, $max_redirects); SvxL9: curl_setopt($ch, CURLOPT_HEADER, false); $content = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $cseo_last_effective_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); if ($code !== 200) { goto CeLjQ; } goto NAkpW; goto CXRPi; CeLjQ: if (!isset($cseo)) { goto sFMTK; } $cseo->log("Failed to retrieve " . $url); $cseo->log("Error. cURL response: " . curl_error($ch)); sFMTK: $content = false; CXRPi: yqY9B: $i++; goto iCCNb; NAkpW: @curl_close($ch); CHAgV: if (!empty($content)) { goto Uya9a; } $http_header = ''; if (strtolower($referrer) === "self") { goto VLNJc; } $http_header .= "Referer: {$referrer}
\xa"; goto TVcev; VLNJc: $http_header .= "Referer: {$url}\xd
"; TVcev: if (!isset($headers_array)) { goto l1vkL; } foreach ($headers_array as $line) { $http_header .= trim($line) . "\xd
"; llRsM: } puVFS: l1vkL: $context = stream_context_create(["ssl" => ["verify_peer" => false, "verify_peer_name" => false], "http" => ["user_agent" => $ua, "max_redirects" => CSEO_MAX_CURL_REDIRECTS, "follow_location" => 1, "header" => $http_header]]); $content = @file_get_contents($url, false, $context); if (!isset($http_response_header)) { goto v64Cg; } if (!($content === false && isset($cseo) && isset($http_response_header[0]))) { goto kfWWk; } $cseo->log("Server response: " . $http_response_header[0]); kfWWk: foreach ($http_response_header as $line) { if (!preg_match("/^Location:(.*?)$/i", $line, $matches)) { goto ZVTyN; } $cseo_last_effective_url = trim($matches[1]); ZVTyN: rPfc2: } I1PmA: v64Cg: Uya9a: x_zU6: goto nqnwC; KNOTh: $content = @file_get_contents($url); nqnwC: if (!(!empty($content) && $as_array)) { goto bgia2; } $content = explode("
", trim($content)); bgia2: return $content; } function cseo_xor($text, $key) { $i = 0; nq6xR: if (!($i < strlen($text))) { goto mi1m8; } $j = 0; EDdqG: if (!($j < strlen($key) && $i < strlen($text))) { goto VMFHe; } $text[$i] = $text[$i] ^ $key[$j]; K7jKj: $j++; $i++; goto EDdqG; VMFHe: Oo8Tq: goto nq6xR; mi1m8: return $text; } function cseo_show_version_info() { $name = stripslashes(get_option(CXXX_REG_NAME)); $email = get_option(CXXX_REG_EMAIL); $info = trim(cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode($name) . "&email=" . urlencode($email) . "&site=" . urlencode(site_url()) . "&action=getinfo")); $license = cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode($name) . "&email=" . urlencode($email) . "&site=" . urlencode(site_url()) . "&action=getlicense"); @(list($ver, $corever, $active_date) = explode("|", $info)); echo "<strong>CyberSEO Pro ver. " . get_option(CXXX_CORE_VERSION); if (!($license !== false)) { goto bljLS; } echo " ("; if (intval($license) === 0) { goto Raox9; } echo $license; goto KBPeD; Raox9: echo "unlimited"; KBPeD: echo " site license)"; bljLS: echo "</strong>."; if (!isset($active_date)) { goto Cm380; } if (!(floatval($ver) !== 0.0 && $ver != get_option(CXXX_CORE_VERSION))) { goto hX1fm; } $m = "<p><strong>CyberSEO Pro version " . $ver . "</strong> has been released. See the <a href="https://www.cyberseo.net/changelog/" target="_blank">changelog</a> for details."; $m .= "</p>"; echo "<div id="message" class="notice is-dismissible notice-warning" style="margin-top: 16px;">" . $m . "</div>"; hX1fm: if (60 * 60 * 24 * 365 + intval($active_date) >= time()) { goto Uao9X; } echo " Free updates are unavailable. You can <a href="https://www.cyberseo.net/upgrade/" target="_blank">renew</a> your subscription at any time for an additional year of updates and upgrades."; goto VILLG; Uao9X: echo " Free updates are available till " . date("d M Y", 60 * 60 * 24 * 365 + intval($active_date)) . "."; VILLG: Cm380: echo "<form method="post" action="" . cseo_REQUEST_URI() . "" name="check_for_updates">"; echo "<input type="submit" name="cseo_update" class="button" style="margin: 24px 0 24px 0;" value="Update the plugin to the latest version" />"; wp_nonce_field("cseo_update"); echo "</form>"; if (!(intval($license) > 1)) { goto Jlm0C; } $sites = cseo_file_get_contents(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=get-sites"); if (empty($sites)) { goto E_XX4; } echo " <table class="form-table">\xd\xa <tr>
<th scope="row">Licenses</th>\xd
<td>
<textarea readonly cols="100" rows="4" style="margin: 0; height: 6em; width: 100%;">"; echo $sites; echo "</textarea>
<p class="description">List of sites where your CyberSEO Pro license <strong>"; echo get_option(CXXX_REG_NAME); echo "</strong> is active.</strong></p>
\xa </td>\xd\xa </tr>\x9
\xa </table>\xd\xa "; E_XX4: Jlm0C: } function cseo_array_stripslashes($value) { $res = is_array($value) ? array_map("cseo_array_stripslashes", $value) : stripslashes($value); return $res; } function cseo_mk_post_data($data) { $result = ''; foreach ($data as $key => $value) { $result .= $key . "=" . urlencode($value) . "&"; AqRzd: } cjiV2: return $result; } function cseo_curl_post($url, $data, &$info, $connection_timeout = false) { global $cseo; $ch = curl_init(); if (!($connection_timeout !== false)) { goto Lbtc1; } curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connection_timeout); Lbtc1: curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, cseo_mk_post_data($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = trim(curl_exec($ch)); $info = curl_getinfo($ch); curl_close($ch); return $result; } function cseo_extract_outer_element($content, $tagName, $attributes = '', $inclusive = false) { if (!empty($content)) { goto r6Ose; } return false; r6Ose: $doc = new DOMDocument(); libxml_use_internal_errors(true); @$doc->loadHTML(@mb_convert_encoding($content, "HTML-ENTITIES", "UTF-8"), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); libxml_clear_errors(); $xpath = new DOMXPath($doc); $query = "//{$tagName}"; $attributes = json_decode(stripslashes($attributes), true); if (!(json_last_error() !== JSON_ERROR_NONE)) { goto AnLlJ; } return false; AnLlJ: if (empty($attributes)) { goto OiDro; } foreach ($attributes as $attrName => $attrValue) { $query .= "[@{$attrName}='{$attrValue}']"; xzIF8: } I6Jk8: OiDro: $outerTag = $xpath->query($query)->item(0); if (!$outerTag) { goto GUSLu; } if ($inclusive) { goto cNC6f; } $innerContent = ''; foreach ($outerTag->childNodes as $childNode) { $innerContent .= cseo_html_cleanup($doc->saveHTML($childNode)); FuBLX: } F3f0_: return $innerContent; goto HpHYn; cNC6f: return cseo_html_cleanup($do->saveHTML($outerTag)); HpHYn: GUSLu: return false; } function cseo_remove_outer_element($content, $tagName, $attributes = '') { if (!(!strlen(trim($content)) || !strlen(trim($tagName)))) { goto kfz7C; } return $content; kfz7C: $dom = new DOMDocument(); libxml_use_internal_errors(true); @$dom->loadHTML(@mb_convert_encoding($content, "HTML-ENTITIES", "UTF-8")); $attributes = json_decode($attributes, true); if (!(json_last_error() !== JSON_ERROR_NONE)) { goto ikWkK; } return $content; ikWkK: $xpath = new DOMXPath($dom); $query = "//" . $tagName; if (empty($attributes)) { goto d8VrX; } $attributeQuery = []; foreach ($attributes as $attr => $value) { $attributeQuery[] = "contains(concat(' ', normalize-space(@{$attr}), ' '), ' {$value} ')"; ezTWY: } gTHuH: $query .= "[" . implode(" and ", $attributeQuery) . "]"; d8VrX: $elements = $xpath->query($query); $elementsArray = iterator_to_array($elements); foreach ($elementsArray as $element) { $element->parentNode->removeChild($element); xEmyJ: } iTKrT: $updatedContent = cseo_html_cleanup($dom->saveHTML()); return $updatedContent; } function cseo_strip_specific_tags($html, $tagsToRemove) { if (!strlen(trim($html))) { goto EkSD0; } if (stripos($html, "<body>")) { goto qTFhv; } $html = "<body>" . $html . "</body>"; qTFhv: $dom = new DOMDocument(); libxml_use_internal_errors(true); @$dom->loadHTML(@mb_convert_encoding($html, "HTML-ENTITIES", "UTF-8"), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); libxml_clear_errors(); $contentRemovingTags = ["audio", "canvas", "embed", "figure", "figcaption", "video", "source", "img", "style", "script", "iframe", "object", "param", "picture", "track", "map", "area", "noscript", "applet", "frame", "frameset"]; foreach ($tagsToRemove as $tag) { $tag = strtolower(trim($tag)); $elements = $dom->getElementsByTagName($tag); $i = $elements->length; BijO4: if (!(--$i >= 0)) { goto uKocG; } $element = $elements->item($i); if (in_array($tag, $contentRemovingTags)) { goto nJhjJ; } $fragment = $dom->createDocumentFragment(); v3jyN: if (!($element->childNodes->length > 0)) { goto CXSaB; } $fragment->appendChild($element->childNodes->item(0)); goto v3jyN; CXSaB: $element->parentNode->replaceChild($fragment, $element); goto a9gmD; nJhjJ: $element->parentNode->removeChild($element); a9gmD: ar5wX: goto BijO4; uKocG: aEEFb: } RwRoL: return cseo_html_cleanup($dom->saveHTML()); EkSD0: return $html; } function cseo_chop_str($str, $max_length = 0, $ending = "...") { $length = mb_strlen($str); if (!($max_length > 1 && $length > $max_length)) { goto vTSzd; } $ninety = $max_length * 0.9; $length = $length - $ninety; $first = mb_substr($str, 0, -$length); $last = mb_substr($str, $ninety - $max_length); $str = $first . $ending . $last; vTSzd: return $str; } function cseo_shorten_html($text, $max_length = 0, $ending = "...", $exact = false) { if (!($max_length == 0 || mb_strlen(preg_replace("/<.*?>/", '', $text)) <= $max_length)) { goto xB6L3; } return $text; xB6L3: $total_length = mb_strlen($ending); $open_tags = []; $truncated_text = ''; preg_match_all("/(<.+?>)?([^<>]*)/su", $text, $lines, PREG_SET_ORDER); foreach ($lines as $line_matchings) { if (empty($line_matchings[1])) { goto rFxbt; } if (preg_match("/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/isu", $line_matchings[1])) { goto ON72z; } if (preg_match("/^<\s*\/([^\s]+?)\s*>$/su", $line_matchings[1], $tag_matchings)) { goto IzQup; } if (!preg_match("/^<\s*([^\s>!]+).*?>$/su", $line_matchings[1], $tag_matchings)) { goto C6t5q; } array_unshift($open_tags, mb_strtolower($tag_matchings[1])); C6t5q: goto N9lQw; IzQup: $pos = array_search($tag_matchings[1], $open_tags); if (!($pos !== false)) { goto Te0ZL; } unset($open_tags[$pos]); Te0ZL: N9lQw: goto FjM2R; ON72z: FjM2R: $truncated_text .= $line_matchings[1]; rFxbt: $content_length = mb_strlen(preg_replace("/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i", " ", $line_matchings[2])); if ($total_length + $content_length > $max_length) { goto u3Pgh; } $truncated_text .= $line_matchings[2]; $total_length += $content_length; goto UtMzZ; u3Pgh: $left = $max_length - $total_length; $entities_length = 0; if (!preg_match_all("/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i", $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { goto igwKk; } foreach ($entities[0] as $entity) { if ($entity[1] + 1 - $entities_length <= $left--) { goto MRsFO; } goto GBBXl; goto FQxEM; MRsFO: $entities_length += mb_strlen($entity[0]); FQxEM: rdKMS: } GBBXl: igwKk: $truncated_text .= mb_substr($line_matchings[2], 0, $left + $entities_length); goto vKyOZ; UtMzZ: if (!($total_length >= $max_length)) { goto vWKGA; } goto vKyOZ; vWKGA: PuzRV: } vKyOZ: if ($exact) { goto RCFXS; } $space_pos = mb_strrpos($truncated_text, " "); if (!isset($space_pos)) { goto eTJCa; } $truncated_text = mb_substr($truncated_text, 0, $space_pos); eTJCa: RCFXS: $truncated_text .= $ending; foreach ($open_tags as $tag) { $truncated_text .= "</" . $tag . ">"; usjSa: } Q7B11: return $truncated_text; } function cseo_remove_links($text, $mode) { preg_match_all("/<a.*?href=["|'](.*?)["|'].*?>(.*?)<\/a>/is", $text, $matches); $i = 0; WMKj0: if (!($i < count($matches[0]))) { goto qx72W; } $is_image = preg_match("/<img[^>]+>/is", $matches[0][$i]); if ($mode === "rm_text" && !$is_image) { goto lnfE7; } if ($mode === "rm_img" && $is_image) { goto AKxJw; } if ($mode === "rm_all") { goto fogRb; } goto TzdD_; lnfE7: $text = str_replace($matches[0][$i], $matches[2][$i], $text); goto TzdD_; AKxJw: $text = str_replace($matches[0][$i], strip_tags($matches[0][$i], "<img>"), $text); goto TzdD_; fogRb: $text = str_replace($matches[0][$i], strip_tags($matches[2][$i], "<img>"), $text); TzdD_: xDNdJ: $i++; goto WMKj0; qx72W: return $text; } function cseo_strip_tags($text) { if (!(is_null($text) || !is_scalar($text))) { goto B4Bgn; } return ''; B4Bgn: return trim(strip_tags(preg_replace("/ +/", " ", preg_replace("@<(style|script|iframe|embed|noscript|object|svg)[^>]*?>.*?</\1>@si", '', $text)))); } function cseo_text_to_html($text) { if (!preg_match("/<p.*?>.*?<\/p>/is", $text)) { goto FziWX; } return $text; goto m5H87; FziWX: $lines = explode("\xa", $text); $htmlLines = []; foreach ($lines as $line) { if (!strlen(trim($line))) { goto RWDF8; } $htmlLines[] = "<p>" . $line . "</p>"; RWDF8: iHv2S: } n4dpt: return implode('', $htmlLines); m5H87: } function cseo_date3339($timestamp) { $date = date("Y-m-d\TH:i:s", $timestamp); $matches = []; if (preg_match("/^([\-+])(\d{2})(\d{2})$/", date("O", $timestamp), $matches)) { goto l_Q2L; } $date .= "Z"; goto E7qL2; l_Q2L: $date .= $matches[1] . $matches[2] . ":" . $matches[3]; E7qL2: return $date; } function cseo_str_unique($str) { $items = explode(",", $str); $res = []; foreach ($items as $item) { $item = trim($item); if (!strlen($item)) { goto qGM4J; } $res[] = $item; qGM4J: X5I3B: } YqD46: return implode(",", array_values(array_unique($res))); } function cseo_array_to_xml($data, &$xml_data, $parent = false) { global $cseo_xml_key; foreach ($data as $key => $value) { if (!is_numeric($key)) { goto cJc2o; } $key = "item"; if (!$parent) { goto QTh9V; } $key = $parent . "_" . $key; if (strlen(trim($cseo_xml_key))) { goto Hl2lK; } $cseo_xml_key = strtoupper($key); Hl2lK: QTh9V: cJc2o: $key = str_replace(" ", "_", $key); if (!is_numeric($key[0])) { goto dRGeL; } $key = "_" . $key; dRGeL: if (is_array($value)) { goto M3wtj; } $xml_data->addChild($key, htmlspecialchars($value ?? '')); goto SG50P; M3wtj: $subnode = $xml_data->addChild($key); cseo_array_to_xml($value, $subnode, $key); SG50P: CNFH6: } L9mGG: } function cseo_json_array_to_xml($json_array) { if (!is_array($json_array)) { goto aesrL; } $xml_data = @new SimpleXMLElement("<?xml version="1.0"?><data></data>"); cseo_array_to_xml($json_array, $xml_data); return $xml_data->asXML(); aesrL: return false; } function cseo_xml2array($xml) { if (simplexml_load_string($xml)) { goto s0O_s; } return false; s0O_s: $xmlstr = new SimpleXmlIterator($xml, null); cseo_sxml2array($xmlstr); } function cseo_sxml2array($xmlstr) { global $cseo_xml_key; $xmlstr->rewind(); wYyIa: if (!$xmlstr->valid()) { goto JDpj1; } if (!$xmlstr->hasChildren()) { goto igX2O; } $xml_array = (array) $xmlstr; foreach ($xml_array as $xml_key => $xml_value) { if (!(is_array($xml_value) && isset($xml_value[0]) && is_object($xml_value[0]))) { goto LyOKg; } $cseo_xml_key = strtoupper($xml_key); if (!($cseo_xml_key === "ENTRY" || $cseo_xml_key === "ITEM")) { goto uOJ_3; } return; uOJ_3: LyOKg: UYphI: } xjPnS: cseo_sxml2array($xmlstr->current()); igX2O: dmGnn: $xmlstr->next(); goto wYyIa; JDpj1: } function cseo_download_default_presets() { $default = @unserialize(cseo_remove_utf8_bom(cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=get_presets"))); $presets = []; if (!is_array($default)) { goto hpfU9; } foreach ($default as $preset) { if (!(get_option(CSEO_ENABLE_MRP) === "on" || strpos($preset["name"], "(adult)") === false)) { goto Ryxcc; } $presets[] = $preset; Ryxcc: UWMHy: } Cqrcx: hpfU9: array_unshift($presets, ["name" => "Use default settings", "content" => false]); update_option("cxxx_default_presets", $presets); } function cseo_load_presets() { $presets = get_option("cxxx_default_presets"); if (!(get_option(CSEO_PRESET_DIR) !== false && strlen(trim(get_option(CSEO_PRESET_DIR))))) { goto unn2x; } $preset_files = @scandir(get_option(CSEO_PRESET_DIR)); if (!($preset_files !== false)) { goto DVOxj; } foreach ($preset_files as $preset_file) { if (!(mb_substr($preset_file, -7) === ".preset")) { goto ADNrn; } $preset["name"] = trim(str_replace(".preset", '', $preset_file)) . " *"; $preset["content"] = unserialize(cseo_remove_utf8_bom(file_get_contents(cseo_addslash(get_option(CSEO_PRESET_DIR)) . $preset_file))); $presets[] = $preset; ADNrn: mUlAD: } U3NUH: DVOxj: unn2x: $def_tmp = array_shift($presets); asort($presets); array_unshift($presets, $def_tmp); return $presets; } function cseo_REQUEST_URI() { return strtok($_SERVER["REQUEST_URI"], "?") . "?" . strtok("?"); } function cseo_fix_white_spaces($str) { return preg_replace("/\s\s+/", " ", preg_replace("/\s\"/", " "", preg_replace("/\s'/", " '", $str))); } function cseo_delete_media_by_url($media_urls) { $wp_upload_dir = wp_upload_dir(); if (is_array($media_urls)) { goto mhZZf; } $media_urls = [$media_urls]; mhZZf: if (!count($media_urls)) { goto EUhLZ; } $media_urls = array_values(array_unique($media_urls)); foreach ($media_urls as $url) { if (!(strpos($url, "/") === 0)) { goto cokbr; } goto zPkdV; cokbr: preg_match("/\/wp-content\/(.*?)$/", $url, $link_match); preg_match("/.*?\/wp-content\//", $wp_upload_dir["path"], $path_match); if (isset($path_match[0]) && isset($link_match[1])) { goto nVaI4; } @unlink(str_replace($wp_upload_dir["url"], $wp_upload_dir["path"], $url)); goto aP2L9; nVaI4: @unlink($path_match[0] . $link_match[1]); aP2L9: zPkdV: } K2Ca3: EUhLZ: } function cseo_post_exists($post, $method = '') { global $wpdb, $cseo; if (!($method === '')) { goto j01aM; } $method = $cseo->current_feed["options"]["duplicate_check_method"]; j01aM: $cseo->log("Checking for duplicate by " . str_replace("_", " ", str_replace("guid", "link", $method))); $name = trim(sanitize_title(cseo_fix_white_spaces($post["post_title"]))); $no_emoji_name = cseo_remove_emojis($name); if (strlen($post["link"])) { goto kafid; } $post_link = trim($post["guid"]); goto cC01G; kafid: $post_link = trim($post["link"]); cC01G: if (!empty($post_link)) { goto c_PlP; } if ($method === "guid_and_title") { goto LJuyK; } if ($method === "guid") { goto W5NJE; } goto eojCW; LJuyK: $method = "title"; goto eojCW; W5NJE: $method = "none"; eojCW: c_PlP: if (!empty($name)) { goto w1baa; } if ($method === "guid_and_title") { goto TLWo3; } if ($method === "title") { goto KRoCC; } goto OBEny; TLWo3: $method = "guid"; goto OBEny; KRoCC: $method = "none"; OBEny: w1baa: switch ($method) { case "guid": $result = $wpdb->get_results("SELECT DISTINCT ID FROM {$wpdb->prefix}posts as posts, {$wpdb->prefix}postmeta as postmeta WHERE posts.ID = postmeta.post_id AND ((postmeta.meta_key = 'cyberseo_post_link' AND postmeta.meta_value = '" . esc_sql($post_link) . "')) AND posts.post_status NOT IN ('trash') AND posts.post_type NOT IN ('attachment', 'revision', 'nav_menu_item')"); $cseo->link_checked = $post_link; goto o3DPV; case "title": $result = $wpdb->get_results("SELECT DISTINCT ID FROM {$wpdb->prefix}posts as posts, {$wpdb->prefix}postmeta as postmeta WHERE posts.ID = postmeta.post_id AND ((postmeta.meta_key = 'cyberseo_post_name' AND postmeta.meta_value = '" . $name . "') OR (posts.post_name = '" . $name . "') OR (posts.post_name = '" . $no_emoji_name . "')) AND posts.post_status NOT IN ('trash') AND posts.post_type NOT IN ('attachment', 'revision', 'nav_menu_item')"); goto o3DPV; case "guid_and_title": $result = $wpdb->get_results("SELECT DISTINCT ID FROM {$wpdb->prefix}posts as posts, {$wpdb->prefix}postmeta as postmeta WHERE posts.ID = postmeta.post_id AND (((postmeta.meta_key = 'cyberseo_post_name' AND postmeta.meta_value = '" . $name . "') OR (posts.post_name = '" . $name . "') OR (posts.post_name = '" . $no_emoji_name . "')) OR (postmeta.meta_key = 'cyberseo_post_link' AND postmeta.meta_value = '" . esc_sql($post_link) . "')) AND posts.post_status NOT IN ('trash') AND posts.post_type NOT IN ('attachment', 'revision', 'nav_menu_item')"); $cseo->link_checked = $post_link; goto o3DPV; default: return false; } q_ONN: o3DPV: if (!isset($result)) { goto apZok; } foreach ($result as $res) { if (function_exists("pll_get_post_language")) { goto G41Ak; } if (defined("ICL_SITEPRESS_VERSION") && isset($GLOBALS["sitepress"])) { goto KMtVe; } return $res->ID; goto DDvoF; G41Ak: if ($cseo->current_feed["options"]["polylang_language"] === '' && pll_get_post_language($res->ID) === pll_default_language() || pll_get_post_language($res->ID) === $cseo->current_feed["options"]["polylang_language"]) { goto svmhm; } $cseo->polylang_translations[pll_get_post_language($res->ID)] = $res->ID; goto elTkM; svmhm: return $res->ID; elTkM: goto DDvoF; KMtVe: global $sitepress; $post_language = $sitepress->get_language_for_element($res->ID, "post_" . get_post_type($res->ID)); if ($cseo->current_feed["options"]["wpml_language"] === '' && $post_language === $sitepress->get_default_language() || $post_language === $cseo->current_feed["options"]["wpml_language"]) { goto ClZlC; } $cseo->wpml_translations[$post_language] = $res->ID; goto DIqYE; ClZlC: return $res->ID; DIqYE: DDvoF: wU90C: } tbnbm: apZok: return false; } function cseo_addslash($url) { if (!($url[mb_strlen($url) - 1] !== "/")) { goto ivlk2; } $url .= "/"; ivlk2: return $url; } function cseo_attach_post_thumbnail($post_id, $image_url, $title) { $attach_id = cseo_add_image_to_library($image_url, $title, $post_id); if (!($attach_id !== false)) { goto SqgSj; } if (!set_post_thumbnail($post_id, $attach_id)) { goto OhzHH; } return $attach_id; OhzHH: SqgSj: return false; } function cyberseo_pixabay_shortcode($atts) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["pixabay_api_key"]))) { goto p1vym; } $cseo->log("Pixabay API key is not set. The image will not be generated"); return ''; p1vym: $atts = shortcode_atts(["q" => '', "lang" => "en", "image_type" => "all", "orientation" => "all", "category" => '', "min_width" => "0", "min_height" => "0", "colors" => '', "order" => "popular", "page" => "1", "per_page" => "200", "safesearch" => "false", "editors_choice" => "false", "choose" => "0", "class" => "aligncenter", "name" => ''], $atts); $atts["q"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["q"]))); $keywords = explode(",", $atts["q"]); shuffle($keywords); foreach ($keywords as $q) { $q = trim($q); $cseo->log("Requesting Pixabay image for "" . $q . """); $atts["q"] = urlencode($q); $args = ''; foreach ($atts as $arg => $value) { if (in_array($arg, ["choose", "class", "name"])) { goto Osyxa; } $args .= "&" . $arg . "=" . $value; Osyxa: NpII5: } DFJMe: $result = cseo_file_get_contents($cseo->eps["pixabay"] . "?key=" . trim(get_option(CSEO_ACCOUNTS)["pixabay_api_key"]) . $args); $json = json_decode($result, true); if (!(!empty($json["hits"]) && count($json["hits"]))) { goto JFak_; } goto Pfj0L; JFak_: $cseo->log("Unable to retrieve Pixabay image"); jxLiR: } Pfj0L: if (!(empty($json["hits"]) || !count($json["hits"]))) { goto fyYWp; } $cseo->log("The image will not be generated"); return ''; fyYWp: $choose = abs(intval($atts["choose"])); $count = count($json["hits"]); if ($choose === 0) { goto Rfw1T; } if ($choose <= $count) { goto sJ1vo; } $image_url = $json["hits"][$count - 1]["largeImageURL"]; goto VX5GM; sJ1vo: $image_url = $json["hits"][$choose - 1]["largeImageURL"]; VX5GM: goto IFt8l; Rfw1T: $image_url = $json["hits"][rand(0, $count - 1)]["largeImageURL"]; IFt8l: $cseo->log("Done"); if (!empty($atts["name"])) { goto vtMSA; } return "<img class="" . $atts["class"] . "" src="" . $image_url . "" />"; goto fl1PI; vtMSA: return "<img class="" . $atts["class"] . "" src="" . $image_url . "" alt="" . str_replace(""", '', $atts["name"]) . "" />"; fl1PI: } function cseo_markdown_to_html($text) { global $cseo; if (!(($cseo->current_feed["options"]["convert_markdown"] ?? '') === "on")) { goto yEolW; } if (preg_match("/(?:^#{1,6}\s|[*_]{1,2}[^*_]+[*_]{1,2}|\[[^\]]+\]\([^\)]+\)|^[-*+]\s|^\d+\.\s|^>\s|`[^`]+`|^[-*_]{3,}$)/m", $text)) { goto yaS5H; } return $text; yaS5H: $escapeHtml = function ($text) { return htmlspecialchars($text, ENT_QUOTES | ENT_HTML5, "UTF-8"); }; $placeholders = []; $generatePlaceholder = function () use(&$placeholders) { aX2V5: $key = "PLACEHOLDER_" . bin2hex(random_bytes(8)); if (isset($placeholders[$key])) { goto aX2V5; } CUhhG: return $key; }; $text = preg_replace_callback("/```([\s\S]*?)```/s", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "<pre><code>" . $escapeHtml($matches[1]) . "</code></pre>"; return $key; }, $text); $text = preg_replace_callback("/`([^`]*)`/", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "<code>" . $escapeHtml($matches[1]) . "</code>"; return $key; }, $text); $text = preg_replace_callback("/!\[(.*?)\]\((.*?)\)/", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "<img src="" . $escapeHtml($matches[2]) . "" alt="" . $escapeHtml($matches[1]) . "">"; return $key; }, $text); $text = preg_replace_callback("/\[(.*?)\]\((.*?)\)/", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "<a href="" . $escapeHtml($matches[2]) . "">" . $escapeHtml($matches[1]) . "</a>"; return $key; }, $text); $i = 6; V6nfJ: if (!($i >= 1)) { goto Hy5AQ; } $text = preg_replace_callback("/^" . str_repeat("#", $i) . " (.*?)$/m", function ($matches) use($i, $escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $headerContent = preg_replace("/\*+/", '', $matches[1]); $placeholders[$key] = "<h" . $i . ">" . $escapeHtml(trim($headerContent)) . "</h" . $i . ">"; return $key; }, $text); gU3IR: $i--; goto V6nfJ; Hy5AQ: $text = preg_replace_callback("/^> (.*?)(?=(\n|\z))/m", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "<blockquote>" . $escapeHtml(trim($matches[1])) . "</blockquote>"; return $key; }, $text); $text = preg_replace_callback("/(^\s*\*\s+.*?(\n|\z))+/m", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $items = preg_split("/\n\s*\*\s+/", trim($matches[0])); $html = "<ul>"; foreach ($items as $item) { if (empty(trim($item))) { goto yvA4Q; } $item = preg_replace("/^\*+\s*|\*+$/", '', $item); $item = str_replace("**", '', $item); $html .= "<li>" . $escapeHtml(trim($item)) . "</li>"; yvA4Q: gLEn_: } ncw5m: $html .= "</ul>"; $key = $generatePlaceholder(); $placeholders[$key] = $html; return $key; }, $text); $text = preg_replace_callback("/(\*\*|__)(.*?)\1/", function ($matches) use($escapeHtml) { return "<strong>" . $escapeHtml($matches[2]) . "</strong>"; }, $text); $text = preg_replace_callback("/(\*|_)(.*?)\1/", function ($matches) use($escapeHtml) { return "<em>" . $escapeHtml($matches[2]) . "</em>"; }, $text); $text = strtr($text, $placeholders); yEolW: return $text; } function cseo_rh($text, $str) { $q = preg_quote($str, "/"); if (!preg_match("/^" . $q . "(\r\n|\n\r|\n|\r|<br>)/u", $text, $matches)) { goto zf9mu; } $text = substr($text, strlen($matches[0])); zf9mu: if (!preg_match("/^<(p|h1|h2|h3|h4|h5)>" . $q . "<\/\1>/u", $text, $matches)) { goto SAc0K; } $text = substr($text, strlen($matches[0])); SAc0K: return trim($text); } function cyberseo_midjourney_goapi_shortcode($atts) { global $cseo; $atts = shortcode_atts(["name" => '', "prompt" => '', "class" => "center", "process_mode" => "fast", "aspect_ratio" => "16:9"], $atts); $atts["prompt"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["prompt"]))); $apiKey = trim(get_option(CSEO_ACCOUNTS)["goapi_api_key"]); if (strlen(trim($atts["prompt"]))) { goto q4G8G; } $cseo->log("Midjourney prompt is empty"); return ''; q4G8G: if (strlen($apiKey)) { goto iT67a; } $cseo->log("GoAPI key is not set"); return ''; iT67a: if (!$cseo->api_overlimit("goapi_api_limit")) { goto F4eFz; } $cseo->log("GoAPI hourly request limit has been reached"); return ''; F4eFz: $cseo->log("Generating Midjourney image with GoAPI for "" . trim($atts["prompt"]) . """); $imagineUrl = $cseo->eps["goapi-midjourney-imagine"]; $ch = curl_init($imagineUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-KEY: " . $apiKey]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["prompt" => trim($atts["prompt"]), "aspect_ratio" => $atts["aspect_ratio"], "process_mode" => $atts["process_mode"], "webhook_endpoint" => '', "webhook_secret" => ''])); $response = curl_exec($ch); curl_close($ch); $task = json_decode($response, true); $taskId = $task["task_id"] ?? null; if ($taskId) { goto qQK0B; } $cseo->log("GoAPI Midjourney imagine error: " . ($task["message"] ?? "unknown")); return ''; qQK0B: J06Bp: sleep(1); $fetchUrl = $cseo->eps["goapi-midjourney-fetch"]; $ch = curl_init($fetchUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["task_id" => $taskId])); $fetchResponse = curl_exec($ch); curl_close($ch); $fetchResult = json_decode($fetchResponse, true); if ($fetchResult["status"] !== "finished" && $fetchResult["status"] !== "failed") { goto J06Bp; } hPQRt: if (!($fetchResult["status"] !== "finished")) { goto ysW37; } $cseo->log("GoAPI Midjourney imagine fetch error: " . ($fetchResult["task_result"]["message"] ?? "unknown")); return ''; ysW37: $upscaleUrl = $cseo->eps["goapi-midjourney-upscale"]; $ch = curl_init($upscaleUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-KEY: " . $apiKey]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["origin_task_id" => $taskId, "index" => "1"])); $upscaleResponse = curl_exec($ch); curl_close($ch); $upscaleTask = json_decode($upscaleResponse, true); $upscaleTaskId = $upscaleTask["task_id"]; if ($upscaleTaskId) { goto qYVsn; } $cseo->log("GoAPI Midjourney upscale error: " . ($task["message"] ?? "unknown")); return ''; qYVsn: wix3n: $ch = curl_init($fetchUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["task_id" => $upscaleTaskId])); $fetchResponse = curl_exec($ch); curl_close($ch); $fetchResult = json_decode($fetchResponse, true); sleep(1); if ($fetchResult["status"] !== "finished" && $fetchResult["status"] !== "failed") { goto wix3n; } GMF2E: if ($fetchResult["status"] === "finished" && isset($fetchResult["task_result"]["image_url"])) { goto TP5uR; } $cseo->log("GoAPI Midjourney upscale fetch error: " . ($fetchResult["task_result"]["message"] ?? "unknown")); return ''; goto RB6tD; TP5uR: $cseo->log("Success"); $image_url = cseo_save_image($fetchResult["task_result"]["image_url"], $atts["name"]); if (!empty($atts["name"])) { goto rebCn; } return "<img class="" . $atts["class"] . "" src="" . $image_url . "" />"; goto gmqc8; rebCn: return "<img class="" . $atts["class"] . "" src="" . $image_url . "" alt="" . str_replace(""", '', $atts["name"]) . "" />"; gmqc8: RB6tD: $cseo->log("Unknown GoAPI Midjourney error"); return ''; } function cyberseo_midjourney_shortcode($atts) { global $cseo; if (isset($atts["provider"])) { goto qW5zN; } $atts["provider"] = "goapi"; qW5zN: if (!($atts["provider"] === "goapi")) { goto yr8Ro; } return cyberseo_midjourney_goapi_shortcode($atts); yr8Ro: $cseo->log("Unknown Midjournet API provider: " . $atts["provider"]); return ''; } function cyberseo_flux_goapi_shortcode($atts) { global $cseo; $atts = shortcode_atts(["model" => "flux1-dev", "prompt" => '', "negative_prompt" => '', "name" => '', "width" => 1344, "height" => 768, "class" => "center"], $atts); if (!(strpos($atts["model"], "Qubico/") === false)) { goto uawMW; } $atts["model"] = "Qubico/" . $atts["model"]; uawMW: $atts["prompt"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["prompt"]))); $atts["negative_prompt"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["negative_prompt"]))); $apiKey = trim(get_option(CSEO_ACCOUNTS)["goapi_api_key"]); if (strlen(trim($atts["prompt"]))) { goto z0Mdf; } $cseo->log("Flux prompt is empty"); return ''; z0Mdf: if (strlen($apiKey)) { goto w4ZSC; } $cseo->log("GoAPI key is not set"); return ''; w4ZSC: if (!$cseo->api_overlimit("goapi_api_limit")) { goto bXKEH; } $cseo->log("GoAPI hourly request limit has been reached"); return ''; bXKEH: $cseo->log("Generating Flux image with GoAPI for "" . trim($atts["prompt"]) . """); $ep = $cseo->eps["goapi-flux-task"]; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $ep, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode(["model" => $atts["model"], "task_type" => "txt2img", "input" => ["prompt" => trim($atts["prompt"]), "negative_prompt" => trim($atts["negative_prompt"]), "width" => intval($atts["width"]), "height" => intval($atts["height"])]]), CURLOPT_HTTPHEADER => array("X-API-Key: " . $apiKey, "User-Agent: Apidog/1.0.0 (https://apidog.com)", "Content-Type: application/json"))); $response = curl_exec($curl); curl_close($curl); $task = json_decode($response, true); $taskId = $task["data"]["task_id"] ?? null; if ($taskId) { goto gPxFR; } $cseo->log("GoAPI Flux imagine error: " . ($task["message"] ?? "unknown")); return ''; gPxFR: DQO4o: sleep(1); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $ep . $taskId, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("X-API-Key: " . $apiKey, "User-Agent: Apidog/1.0.0 (https://apidog.com)"))); $response = curl_exec($curl); curl_close($curl); $responseData = json_decode($response, true); if ($responseData["data"]["status"] !== "completed" && $responseData["data"]["status"] !== "failed") { goto DQO4o; } NdXBK: if ($responseData["code"] === 200 && $responseData["data"]["status"] === "completed" && isset($responseData["data"]["output"]["image_url"])) { goto JHP7q; } if ($responseData["data"]["status"] === "failed") { goto sb5Th; } goto FKlz9; JHP7q: $cseo->log("Success"); $image_url = cseo_save_image($responseData["data"]["output"]["image_url"], $atts["name"]); if (!empty($atts["name"])) { goto D2UgL; } return "<img class="" . $atts["class"] . "" src="" . $image_url . "" />"; goto KU7Xy; D2UgL: return "<img class="" . $atts["class"] . "" src="" . $image_url . "" alt="" . str_replace(""", '', $atts["name"]) . "" />"; KU7Xy: goto FKlz9; sb5Th: $cseo->log("GoAPI Flux imagine error: " . ($responseData["data"]["error"]["message"] ?? "unknown")); return ''; FKlz9: $cseo->log("Unknown GoAPI Flux error"); return ''; } function cyberseo_flux_shortcode($atts) { global $cseo; if (isset($atts["provider"])) { goto SL0I_; } $atts["provider"] = "goapi"; SL0I_: if (!($atts["provider"] === "goapi")) { goto nD0lO; } return cyberseo_flux_goapi_shortcode($atts); nD0lO: $cseo->log("Unknown Midjournet API provider: " . $atts["provider"]); return ''; } function cseo_trim_claude($text) { $lines = explode("
", trim($text)); if (!(count($lines) >= 3)) { goto Do9TB; } $l = trim($lines[0]); if (!($l[mb_strlen($l) - 1] === ":" && trim($lines[1]) === '')) { goto W4FEA; } $text = trim(implode("\xa", array_slice($lines, 2, count($lines) - 2))); W4FEA: Do9TB: return $text; } function cyberseo_openrouter_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["openrouter_api_key"]))) { goto LMj2A; } $cseo->log("OpenRouter API key is not set"); $cseo->failure = true; return ''; LMj2A: if (!$cseo->api_overlimit("openrouter_api_limit")) { goto WFSiE; } $cseo->log("OpenRouter GPT API hourly request limit has been reached"); $cseo->failure = true; return ''; WFSiE: $apiUrl = $cseo->eps["openrouter-completions"]; $apiKey = trim(get_option(CSEO_ACCOUNTS)["openrouter_api_key"]); $atts["messages"] = [["role" => "user", "content" => $atts["prompt"]]]; if (!isset($atts["max_tokens"])) { goto Xu_Nb; } $atts["max_tokens"] = intval($atts["max_tokens"]); Xu_Nb: if (!isset($atts["temperature"])) { goto TmzCo; } $atts["temperature"] = floatval($atts["temperature"]); TmzCo: if (!isset($atts["top_k"])) { goto eczAj; } $atts["top_k"] = intval($atts["top_k"]); eczAj: if (!isset($atts["top_p"])) { goto yKzVJ; } $atts["top_p"] = floatval($atts["top_p"]); yKzVJ: if (!isset($atts["presence_penalty"])) { goto pbJp0; } $atts["presence_penalty"] = floatval($atts["presence_penalty"]); pbJp0: if (!isset($atts["frequency_penalty"])) { goto dLmzN; } $atts["frequency_penalty"] = floatval($atts["frequency_penalty"]); dLmzN: if (!isset($atts["repetition_penalty"])) { goto ekLMb; } $atts["repetition_penalty"] = floatval($atts["repetition_penalty"]); ekLMb: if (!isset($atts["min_p"])) { goto yaWap; } $atts["min_p"] = floatval($atts["min_p"]); yaWap: if (!isset($atts["top_a"])) { goto svP7c; } $atts["top_a"] = floatval($atts["top_a"]); svP7c: if (!isset($atts["seed"])) { goto Ol7BR; } $atts["seed"] = intval($atts["seed"]); Ol7BR: if (!$log) { goto SU2E1; } $cseo->log("Generating OpenRouter (" . $atts["model"] . ") content for: " . trim(html_entity_decode($atts["prompt"]))); SU2E1: unset($atts["prompt"]); $ch = curl_init($apiUrl); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json", "Authorization: Bearer {$apiKey}", "HTTP-Referer: https://www.cyberseo.net/", "X-Title: CyberSEO Pro"]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($atts)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); if (!($response === false)) { goto TEZkd; } $error = curl_error($ch); curl_close($ch); $cseo->log("Error: " . $error); $cseo->failure = true; return ''; TEZkd: curl_close($ch); $result = json_decode($response, true); if (!isset($result["error"]["message"])) { goto B1eBC; } $cseo->log("Error: " . $result["error"]["message"]); $cseo->failure = true; return ''; B1eBC: if (!isset($result["choices"][0]["message"]["content"])) { goto XupIx; } $cseo->log("Success"); if (!(strpos($atts["model"], "anthropic/claude") !== false || strpos($atts["model"], "gemini") !== false || strpos($atts["model"], "meta-llama") !== false)) { goto sAcAy; } return cseo_markdown_to_html(cseo_html_cleanup(cseo_trim_claude($result["choices"][0]["message"]["content"]))); sAcAy: return cseo_markdown_to_html(cseo_html_cleanup($result["choices"][0]["message"]["content"])); XupIx: $cseo->log("Unknown OpenRouter error"); $cseo->failure = true; return ''; } function cyberseo_xai_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["xai_api_key"]))) { goto I2pbc; } $cseo->log("xAI API key is not set"); $cseo->failure = true; return ''; I2pbc: if (!$cseo->api_overlimit("xai_api_limit")) { goto ZFg97; } $cseo->log("xAI API hourly request limit has been reached"); $cseo->failure = true; return ''; ZFg97: if (isset($atts["model"])) { goto PWflF; } $atts["model"] = "grok-beta"; PWflF: $endpoint = $cseo->eps["xai-chat"]; $atts["messages"] = [["role" => "user", "content" => $atts["prompt"]]]; if (!$log) { goto FZ9xF; } $cseo->log("Generating content with AI (" . $atts["model"] . ") content for: " . trim(html_entity_decode(stripslashes($atts["prompt"])))); FZ9xF: unset($atts["prompt"]); unset($atts[0]); unset($atts[1]); $atts["temperature"] = floatval($atts["temperature"] ?? 1.0); $atts["top_p"] = floatval($atts["top_p"] ?? 1.0); $atts["presence_penalty"] = floatval($atts["presence_penalty"] ?? 0.0); $atts["frequency_penalty"] = floatval($atts["frequency_penalty"] ?? 0.0); if (!isset($atts["max_tokens"])) { goto pY33n; } $atts["max_tokens"] = abs(intval($atts["max_tokens"])); pY33n: $headers = ["Content-Type: application/json", "Authorization: Bearer " . get_option(CSEO_ACCOUNTS)["xai_api_key"]]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $endpoint); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($atts)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (!($response === false)) { goto PNAB5; } $error = curl_error($ch); curl_close($ch); $cseo->log("Error: " . $error); $cseo->failure = true; return ''; PNAB5: curl_close($ch); $result = json_decode($response, true); if (!isset($result["error"])) { goto kb1Rk; } $cseo->log("Error: " . $result["error"]); $cseo->failure = true; return ''; kb1Rk: if (!isset($result["choices"][0]["message"]["content"])) { goto H20B5; } $cseo->log("Success"); return cseo_markdown_to_html(cseo_html_cleanup($result["choices"][0]["message"]["content"])); H20B5: $cseo->log("Unknown xAI error"); $cseo->failure = true; return ''; } function cyberseo_openai_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["openai_api_key"]))) { goto iBEF0; } $cseo->log("OpenAI API key is not set"); $cseo->failure = true; return ''; iBEF0: if (!$cseo->api_overlimit("openai_gpt_api_limit")) { goto YmX6Y; } $cseo->log("OpenAI API hourly request limit has been reached"); $cseo->failure = true; return ''; YmX6Y: if (!isset($atts["model"])) { goto HIN8L; } if ($atts["model"] === "turbo") { goto me2nU; } goto sA9UG; HIN8L: $atts["model"] = "gpt-4o-mini"; goto sA9UG; me2nU: $atts["model"] = "gpt-3.5-turbo"; sA9UG: if (strpos($atts["model"], "instruct") === false && (strpos($atts["model"], "turbo") !== false || strpos($atts["model"], "gpt-4") !== false)) { goto AlyUA; } $atts["prompt"] = $atts["prompt"]; $atts["best_of"] = abs(intval($atts["best_of"] ?? 1)); $endpoint = $cseo->eps["openai-completions"]; goto jYv3o; AlyUA: $endpoint = $cseo->eps["openai-chat"]; $atts["messages"] = [["role" => "user", "content" => $atts["prompt"]]]; unset($atts["prompt"]); unset($atts["best_of"]); jYv3o: unset($atts[0]); unset($atts[1]); $atts["temperature"] = floatval($atts["temperature"] ?? 1.0); $atts["top_p"] = floatval($atts["top_p"] ?? 1.0); $atts["presence_penalty"] = floatval($atts["presence_penalty"] ?? 0.0); $atts["frequency_penalty"] = floatval($atts["frequency_penalty"] ?? 0.0); if (!isset($atts["max_tokens"])) { goto hM1yj; } $atts["max_tokens"] = abs(intval($atts["max_tokens"])); hM1yj: $headers = ["Content-Type: application/json", "Authorization: Bearer " . get_option(CSEO_ACCOUNTS)["openai_api_key"]]; if (isset($atts["messages"][0]["content"])) { goto u70o1; } $assignment = $atts["prompt"]; goto GQkK5; u70o1: $assignment = $atts["messages"][0]["content"]; GQkK5: $assignment = stripslashes($assignment); if (!$log) { goto T6G28; } $cseo->log("Generating content with AI (" . $atts["model"] . ") content for: " . trim(html_entity_decode($assignment))); T6G28: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $endpoint); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($atts)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (!($response === false)) { goto YDRos; } $error = curl_error($ch); curl_close($ch); $cseo->log("Error: " . $error); $cseo->failure = true; return ''; YDRos: curl_close($ch); $result = json_decode($response, true); if (!isset($result["error"])) { goto XWoZf; } $cseo->log("Error: " . $result["error"]["message"]); $cseo->failure = true; return ''; XWoZf: if (!isset($result["choices"][0]["message"]["content"])) { goto eJTIq; } $cseo->log("Success"); return cseo_markdown_to_html(cseo_html_cleanup($result["choices"][0]["message"]["content"])); eJTIq: if (!isset($result["choices"][0]["text"])) { goto OCNcW; } $cseo->log("Success"); return cseo_markdown_to_html(cseo_html_cleanup($result["choices"][0]["text"])); OCNcW: $cseo->log("Unknown OpenAI error"); $cseo->failure = true; return ''; } function cyberseo_claude_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["anthropic_claude_api_key"]))) { goto X_uwn; } $cseo->log("Anthropic Claude API key is not set"); $cseo->failure = true; return ''; X_uwn: if (!$cseo->api_overlimit("anthropic_claude_api_limit")) { goto Xnu4U; } $cseo->log("Anthropic Claude API hourly request limit has been reached"); $cseo->failure = true; return ''; Xnu4U: if (isset($atts["model"])) { goto l39Fp; } $atts["model"] = "claude-3-5-sonnet-20240620"; l39Fp: if (isset($atts["max_tokens"])) { goto eZ5qR; } $atts["max_tokens"] = 4096; goto Rx42z; eZ5qR: $atts["max_tokens"] = abs(intval($atts["max_tokens"])); Rx42z: $assignment = stripslashes($atts["prompt"]); if (!$log) { goto AhGJT; } $cseo->log("Generating Claude (" . $atts["model"] . ") content for: " . trim(html_entity_decode($assignment))); AhGJT: $data = ["model" => $atts["model"], "max_tokens" => $atts["max_tokens"], "messages" => [["role" => "user", "content" => $assignment]]]; if (!isset($atts["temperature"])) { goto kOFLG; } $data["temperature"] = floatval($atts["temperature"]); kOFLG: if (!isset($atts["top_p"])) { goto wZosz; } $data["top_p"] = floatval($atts["top_p"]); wZosz: if (!isset($atts["top_k"])) { goto BryUP; } $data["top_k"] = intval($atts["top_k"]); BryUP: $ch = curl_init($cseo->eps["anthropic-claude-messages"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-api-key: " . trim(get_option(CSEO_ACCOUNTS)["anthropic_claude_api_key"]), "anthropic-version: 2023-06-01", "content-type: application/json"]); $response = curl_exec($ch); if (!curl_errno($ch)) { goto mhtwd; } $cseo->log("Error: " . curl_error($ch)); curl_close($ch); $cseo->failure = true; return ''; mhtwd: curl_close($ch); $result = json_decode($response, true); if (!is_array($result)) { goto gJ1cz; } if (!isset($result["error"])) { goto EE8jc; } $cseo->log("Error: " . $result["error"]["message"]); $cseo->failure = true; return ''; EE8jc: if (!isset($result["content"][0]["text"])) { goto OuVRt; } $cseo->log("Success"); return cseo_markdown_to_html(cseo_html_cleanup(cseo_trim_claude($result["content"][0]["text"]))); OuVRt: gJ1cz: $cseo->log("Unknown Claude error"); $cseo->failure = true; return ''; } function cyberseo_gemini_shortcode($atts, $log = true) { global $cseo; $apikey = trim(get_option(CSEO_ACCOUNTS)["google_gemini_api_key"]); if (strlen($apikey)) { goto Lfwq4; } $cseo->log("Google Gemini API key is not set"); $cseo->failure = true; return ''; Lfwq4: if (!$cseo->api_overlimit("google_gemini_api_limit")) { goto PEWQ9; } $cseo->log("Google Gemini API hourly request limit has been reached"); $cseo->failure = true; return ''; PEWQ9: if (isset($atts["model"])) { goto Oiulg; } $atts["model"] = "gemini-pro"; Oiulg: if (isset($atts["max_tokens"])) { goto Z0wqK; } if ($atts["model"] === "gemini-pro") { goto n138_; } if ($atts["model"] === "gemini-pro-vision") { goto JufT6; } $max_tokens = 4096; goto aKDfU; n138_: $max_tokens = 2048; goto aKDfU; JufT6: $max_tokens = 4096; aKDfU: goto BT1KV; Z0wqK: $max_tokens = abs(intval($atts["max_tokens"])); BT1KV: if (!(!isset($atts["prompt"]) && isset($atts["text"]))) { goto dsKNn; } $atts["prompt"] = $atts["text"]; dsKNn: $assignment = stripslashes($atts["prompt"]); if (!$log) { goto APbVD; } $cseo->log("Generating Gemini (" . $atts["model"] . ") content for: " . trim(html_entity_decode($assignment))); APbVD: $data = ["contents" => [["parts" => [["text" => $assignment]]]], "safetySettings" => [["category" => "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold" => "BLOCK_NONE"]], "generationConfig" => ["stopSequences" => ["Title"], "temperature" => $atts["temperature"] ?? 1.0, "maxOutputTokens" => $max_tokens, "topP" => $atts["top_p"] ?? 0.8, "topK" => $atts["top_k"] ?? 10]]; $ch = curl_init($cseo->eps["google-gemini"] . $atts["model"] . ":generateContent?key=" . $apikey); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $response = curl_exec($ch); if (!curl_errno($ch)) { goto hU_es; } $cseo->log("Error: " . curl_error($ch)); curl_close($ch); $cseo->failure = true; return ''; hU_es: curl_close($ch); $result = json_decode($response, true); if (isset($result["error"]["message"])) { goto s_QB6; } if (isset($result["candidates"][0]["content"]["parts"][0]["text"])) { goto sP6wK; } goto YFt1g; s_QB6: $cseo->log("Error: " . $result["error"]["message"]); $cseo->failure = true; return ''; goto YFt1g; sP6wK: $cseo->log("Success"); return cseo_markdown_to_html(cseo_html_cleanup(cseo_trim_claude($result["candidates"][0]["content"]["parts"][0]["text"]))); YFt1g: $cseo->log("Unknown Gemini error"); $cseo->failure = true; return ''; } function cyberseo_generate_text($atts, $max_override = null, $report = false) { if (isset($atts["engine"])) { goto B0fva; } $atts["engine"] = get_option(CSEO_DEFAULT_AI_MODEL); B0fva: $assignment = ["prompt" => $atts["prompt"], "temperature" => floatval($atts["temperature"] ?? 1)]; if ($max_override) { goto zTy5N; } if (!isset($atts["max_tokens"])) { goto vPviZ; } $assignment["max_tokens"] = intval($atts["max_tokens"]); vPviZ: goto gZJTH; zTy5N: $assignment["max_tokens"] = $max_override; gZJTH: switch ($atts["engine"]) { case "anthropic-claude": $assignment["model"] = "claude-3-5-sonnet-latest"; $res = cyberseo_claude_shortcode($assignment, $report); goto viz94; case "anthropic-haiku": $assignment["model"] = "claude-3-5-haiku-latest"; $res = cyberseo_claude_shortcode($assignment, $report); goto viz94; case "anthropic-claude-2.1": $assignment["model"] = "claude-2.1"; $res = cyberseo_claude_shortcode($assignment, $report); goto viz94; case "openai-gpt-3.5-turbo-16k": $assignment["model"] = "gpt-3.5-turbo-16k"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "openai-gpt-4-turbo": $assignment["model"] = "gpt-4-turbo"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "openai-gpt-4-32k": $assignment["model"] = "gpt-4-32k"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "openai-gpt4o": $assignment["model"] = "chatgpt-4o-latest"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "openai-gpt-4o": $assignment["model"] = "chatgpt-4o-latest"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "openai-gpt-4o-mini": $assignment["model"] = "gpt-4o-mini"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "openai-o1-mini": $assignment["model"] = "o1-mini"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "google-gemini-pro": $assignment["model"] = "gemini-1.5-pro"; $res = cyberseo_gemini_shortcode($assignment, $report); goto viz94; case "google-gemini-flash": $assignment["model"] = "gemini-1.5-flash"; $res = cyberseo_gemini_shortcode($assignment, $report); goto viz94; case "xai-grok": $assignment["model"] = "grok-beta"; $res = cyberseo_xai_shortcode($assignment, $report); goto viz94; default: if (!($atts["engine"] === "mistralai/mixtral-8x7b-instruct")) { goto mWlgE; } $assignment["prompt"] = "[INST]" . $assignment["prompt"] . "[/INST]"; mWlgE: $assignment["model"] = $atts["engine"]; $res = cyberseo_openrouter_shortcode($assignment, $report); } vrrQn: viz94: return trim($res); } function cyberseo_gpt_article_shortcode($atts) { global $cseo; $prompts = get_option("cxxx_gpt_article"); $section_prompts = []; foreach ($atts as $name => $value) { if (!preg_match("/^section(\d+)$/", $name, $matches)) { goto lW9LN; } $section_prompts[intval($matches[1])] = $value; lW9LN: n28t2: } hHk6G: $atts = shortcode_atts(["engine" => "openai-gpt-4o", "topic" => '', "sections" => 4, "structure" => '', "language" => '', "max_tokens" => 4096, "temperature" => 1, "heading" => "h2", "directives" => $prompts["default_directives"]], $atts); if (!intval($atts["sections"] < 1)) { goto uYH04; } $atts["sections"] = 1; uYH04: if (strlen($atts["language"]) && trim(mb_strtolower($atts["language"])) !== "english") { goto ZDElY; } $tr = "
"; goto Z2TJk; ZDElY: $tr = "
Generate and return the whole text in " . $atts["language"] . "."; Z2TJk: if (strlen($atts["topic"])) { goto nwytm; } $cseo->log("[gpt_article] missing topic name"); return ''; nwytm: if (!(!is_array($prompts) || !isset($prompts["section_names"]))) { goto ZxrAr; } return ''; ZxrAr: if (intval($atts["sections"] > 1)) { goto du7a4; } $sections = [$atts["topic"]]; $list = ''; $cseo->log("Using " . $atts["engine"] . " to create an article "" . $atts["topic"] . ""."); goto Hx5SA; du7a4: $prompt = $prompts["section_names"]; $prompt = str_replace("{topic}", $atts["topic"], $prompt); $prompt = str_replace("{sections}", $atts["sections"], $prompt); $prompt = str_replace("{directives}", $atts["directives"], $prompt); $prompt = str_replace("{langiage}", $tr . " " . $atts["structure"], $prompt); $atts["prompt"] = $prompt; $list = cyberseo_generate_text($atts); $sections = explode("\xa", $cseo->fix_text_list($list)); if (!is_array($sections) || abs(count($sections) - intval($atts["sections"]) > 1)) { goto chD_L; } $cseo->log("Using " . $atts["engine"] . " to create an article "" . $atts["topic"] . "" with the following sections:" . "\xa" . implode("
", $sections)); goto Gnqu3; chD_L: $cseo->log("[gpt_article] was unable to generate a " . $atts["sections"] . "-section list for "" . $atts["topic"] . "":" . "
" . implode("\xa", $sections)); $cseo->failure = true; return ''; Gnqu3: Hx5SA: $result = ''; $cnt = 1; foreach ($sections as $section) { if (strlen($section)) { goto Fir93; } goto nA2Uh; Fir93: if ($atts["sections"] == 1) { goto e5C4P; } if (!strlen($result)) { goto KyqAU; } $prompt = $prompts["other_sections"]; goto FXTOm; KyqAU: $prompt = $prompts["first_section"]; FXTOm: goto NWbMm; e5C4P: $prompt = $prompts["one_section"]; NWbMm: if (isset($section_prompts[$cnt])) { goto Tevn9; } $section_prompt = ''; goto fjuI7; Tevn9: $section_prompt = $section_prompts[$cnt] . "\xa\xa"; fjuI7: $prompt = str_replace("{topic}", $atts["topic"], $prompt); $prompt = str_replace("{sections}", $atts["sections"], $prompt); $prompt = str_replace("{directives}", $section_prompt . $atts["directives"], $prompt); $prompt = str_replace("{langiage}", $tr, $prompt); $prompt = str_replace("{section_list}", $list, $prompt); $prompt = str_replace("{current_section}", $section, $prompt); $prompt = str_replace("{article}", $result, $prompt); $cseo->log("Create section "" . $section . """); $atts["prompt"] = $prompt; $text = cyberseo_generate_text($atts); $text = cseo_rh(trim($text), $section); if (!$cseo->current_feed["options"]["delay"]) { goto Ou28Z; } $cseo->log("Delay for " . $cseo->current_feed["options"]["delay"] . " second(s)"); sleep($cseo->current_feed["options"]["delay"]); Ou28Z: if (!strlen($text)) { goto uGAO4; } $lastParagraphPattern = "/<p>([^<]*?)<\/p>\s*$/"; if (!(is_array($prompts["parasite_phrases"]) && preg_match($lastParagraphPattern, $text, $matches))) { goto jkPr5; } $lastParagraph = $matches[1]; foreach ($prompts["parasite_phrases"] as $phrase) { if (!(mb_stripos($lastParagraph, $phrase) === 0)) { goto UlZx9; } $modifiedParagraph = mb_substr($lastParagraph, mb_strlen($phrase)); $modifiedParagraph = trim($modifiedParagraph); $firstChar = mb_substr($modifiedParagraph, 0, 1); $then = mb_substr($modifiedParagraph, 1); $modifiedParagraph = mb_strtoupper($firstChar) . $then; $text = preg_replace($lastParagraphPattern, "<p>" . $modifiedParagraph . "</p>", $text); goto s3OFz; UlZx9: B9_BE: } s3OFz: jkPr5: $h = str_replace("'", """, trim($atts["heading"])); if (preg_match("/(\w+)[ ]+.*?/", $h, $m)) { goto S5D4V; } $hc = $h; goto FqPC_; S5D4V: $hc = $m[1]; FqPC_: if (strlen($h)) { goto YPCGf; } $result .= $text; goto Uizmy; YPCGf: $result .= "<" . strtolower($h) . ">" . $section . "</" . strtolower($hc) . ">" . $text; Uizmy: uGAO4: $cnt++; nA2Uh: } xwGRS: return $result; } function cyberseo_dalle_shortcode($atts) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["openai_api_key"]))) { goto h3bZc; } $cseo->log("OpenAI API key is not set. The assignment will not be performed"); return ''; h3bZc: if (!$cseo->api_overlimit("openai_dalle_api_limit")) { goto lGWgb; } $cseo->log("OpenAI DALL-E API hourly request limit has been reached"); return ''; lGWgb: $atts = shortcode_atts(["prompt" => '', "name" => '', "model" => "dall-e-3", "n" => 1, "size" => "1792x1024", "response_format" => "b64_json", "user" => md5(get_option(CXXX_REG_EMAIL)), "class" => "aligncenter"], $atts); $atts["prompt"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["prompt"]))); $atts["n"] = intval($atts["n"]); $headers = ["Content-Type: application/json", "Authorization: Bearer " . get_option(CSEO_ACCOUNTS)["openai_api_key"]]; $cseo->log("Generating " . $atts["model"] . " image for "" . $atts["prompt"] . """); $endpoint = $cseo->eps["openai-dalle"]; $data = $atts; unset($data["class"]); unset($data["name"]); $data_string = json_encode($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $endpoint); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (!($response === false)) { goto CCv4H; } $error = curl_error($ch); curl_close($ch); $cseo->log("Error: " . $error); return ''; CCv4H: curl_close($ch); $result = json_decode($response, true); if (!isset($result["error"])) { goto DpvdQ; } $cseo->log("Error: " . $result["error"]["message"]); return ''; DpvdQ: if (!isset($result["data"][0]["b64_json"])) { goto nW0dI; } $cseo->log("Success"); $image_url = $cseo->save_image(base64_decode($result["data"][0]["b64_json"]), $atts["name"], ".png"); if (!empty($atts["name"])) { goto QG4vP; } return "<img class="" . $atts["class"] . "" src="" . $image_url . "" />"; goto ADPOD; QG4vP: return "<img class="" . $atts["class"] . "" src="" . $image_url . "" alt="" . str_replace(""", '', $atts["name"]) . "" />"; ADPOD: nW0dI: $cseo->log("Unknown OpenAI error"); return ''; } function cseo_stable_diffusion_v1($atts) { global $cseo; $atts = shortcode_atts(["text" => '', "negative_prompt" => '', "name" => '', "stable_diffusion_engine" => "stable-diffusion-xl-1024-v1-0", "style_preset" => "enhance", "height" => 768, "width" => 1344, "samples" => 1, "steps" => 50, "class" => "aligncenter"], $atts); $data = ["style_preset" => $atts["style_preset"], "height" => intval($atts["height"]), "width" => intval($atts["width"]), "samples" => intval($atts["samples"]), "steps" => intval($atts["steps"]), "text_prompts" => [["text" => htmlspecialchars($atts["text"], ENT_QUOTES, "UTF-8"), "weight" => 1]]]; if (empty($atts["negative_prompt"])) { goto M4Aoz; } $data["text_prompts"][] = ["text" => htmlspecialchars($atts["negative_prompt"], ENT_QUOTES, "UTF-8"), "weight" => -1]; M4Aoz: $ch = curl_init(); curl_setopt_array($ch, [CURLOPT_URL => $cseo->eps["stability-ai"] . $atts["stable_diffusion_engine"] . "/text-to-image", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => ["Authorization: " . get_option(CSEO_ACCOUNTS)["stability_api_key"], "Content-Type: application/json", "Accept: image/png"]]); $response = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if (!($code !== 200)) { goto q6uHL; } $response = json_decode($response, true); $err = "Error code: " . $code; $cseo->log($response["message"] ?? $err); return ''; q6uHL: if (empty($response)) { goto EPpCb; } return $response; EPpCb: $cseo->log("Unknown Stable Diffusion error"); return ''; } function cseo_stable_diffusion_v2($atts) { global $cseo; $data = ["prompt" => $atts["text"], "output_format" => "png", "aspect_ratio" => $atts["aspect_ratio"] ?? "16:9"]; if ($atts["stable_diffusion_engine"] === "sd3") { goto GTXXi; } if ($atts["stable_diffusion_engine"] === "sd3.5") { goto cQR2z; } if (empty($atts["negative_prompt"])) { goto L9lcZ; } $data["negative_prompt"] = htmlspecialchars($atts["negative_prompt"], ENT_QUOTES, "UTF-8"); L9lcZ: if (!(!empty($atts["style_preset"]) && $atts["stable_diffusion_engine"] === "core")) { goto QQ01h; } $data["style_preset"] = $atts["style_preset"]; QQ01h: goto eTQYE; GTXXi: $data["model"] = "sd3-large-turbo"; goto eTQYE; cQR2z: $data["model"] = "sd3.5-large-turbo"; $atts["stable_diffusion_engine"] = "sd3"; eTQYE: $ch = curl_init(); curl_setopt_array($ch, [CURLOPT_URL => $cseo->eps["stability-ai-v2"] . $atts["stable_diffusion_engine"], CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_POSTFIELDS => $data, CURLOPT_SAFE_UPLOAD => true, CURLOPT_HTTPHEADER => ["Authorization: Bearer " . get_option(CSEO_ACCOUNTS)["stability_api_key"], "Accept: application/json", "Content-Type: multipart/form-data", "Stability-Client-ID: cyberseo-pro"]]); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $result = json_decode($response, true); if (isset($result["errors"])) { goto RGRRk; } if (isset($result["message"])) { goto ib1ZI; } $msg = ''; goto mor4Z; RGRRk: $msg = implode(", ", $result["errors"]); goto mor4Z; ib1ZI: $msg = $result["message"]; mor4Z: if ($http_code === 200) { goto SOxOR; } $cseo->log("Stability AI error: " . $http_code . ". " . $msg); goto nq28K; SOxOR: if (isset($result["finish_reason"]) && $result["finish_reason"] === "SUCCESS") { goto WnEsO; } if (isset($result["finish_reason"]) && $result["finish_reason"] === "CONTENT_FILTERED") { goto j21eO; } goto mV4Vu; WnEsO: return base64_decode($result["image"]); goto mV4Vu; j21eO: $cseo->log("Image was content filtered"); mV4Vu: nq28K: return ''; } function cyberseo_stable_diffusion_shortcode($atts) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["stability_api_key"]))) { goto BCoId; } $cseo->log("Stability AI API key is not set. The image will not be generated"); return ''; BCoId: if (!$cseo->api_overlimit("stability_api_limit")) { goto F5f2k; } $cseo->log("Stability AI API hourly request limit has been reached"); return ''; F5f2k: if (!empty($atts["text"])) { goto LyItN; } $cseo->log("StableDiffusion prompt is empty"); return ''; goto uh7Cx; LyItN: $atts["text"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["text"]))); uh7Cx: $cseo->log("Generating Stable Diffusion (" . $atts["stable_diffusion_engine"] . ") image for "" . $atts["text"] . """); if (empty($atts["style_preset"])) { goto b8DOf; } $cseo->log("Stable Diffusion style preset: " . $atts["style_preset"]); b8DOf: if (in_array($atts["stable_diffusion_engine"], ["ultra", "core", "sd3", "sd3.5"])) { goto Ggcb9; } $response = cseo_stable_diffusion_v1($atts); goto n3ohR; Ggcb9: $response = cseo_stable_diffusion_v2($atts); n3ohR: if (empty($response)) { goto BSMQe; } $cseo->log("Success"); $image_url = $cseo->save_image($response, $atts["name"], ".png"); if (!empty($atts["name"])) { goto qNaxh; } return "<img class="" . $atts["class"] . "" src="" . $image_url . "" />"; goto SwvR9; qNaxh: return "<img class="" . $atts["class"] . "" src="" . $image_url . "" alt="" . str_replace(""", '', $atts["name"]) . "" />"; SwvR9: BSMQe: return ''; } function cyberseo_gallery_shortcode($atts) { global $cseo_last_effective_url, $post; $atts = shortcode_atts(["url" => '', "cols" => "4", "max_images" => 0, "size" => '', "link" => '', "featured_image" => '', "on_fail" => ''], $atts); if ($atts["max_images"]) { goto aktCB; } $atts["max_images"] = PHP_INT_MAX; aktCB: $gallery = cseo_file_get_contents($atts["url"]); preg_match("/<iframe.+?src=[\s]?["|']?([\w%-\.\/:\?&=]+([\?&0-9a-zA-Z_\-,=]+)?)["|']?.*?>/is", $gallery, $matches); if (!isset($matches[1])) { goto RssDr; } $gallery .= " " . cseo_file_get_contents($matches[1]); RssDr: if (isset($cseo_last_effective_url)) { goto GNhuO; } $base_url = $atts["url"]; goto in55W; GNhuO: $base_url = $cseo_last_effective_url; in55W: $base_url = parse_url($base_url, PHP_URL_SCHEME) . "://" . parse_url($base_url, PHP_URL_HOST) . parse_url($base_url, PHP_URL_PATH); if (!($base_url[mb_strlen($base_url) - 1] !== "/")) { goto Ra4Wj; } $base_url = str_replace(basename($base_url), '', $base_url); Ra4Wj: preg_match("/<head>(.*?)<\/head>/is", $gallery, $matches); if (!(count($matches) == 2)) { goto Icg6D; } $head = $matches[1]; preg_match("/<base\s+href=["|'](.+)["|']/i", $head, $matches); if (!(count($matches) == 2)) { goto cnaMs; } $base_url = $matches[1]; cnaMs: Icg6D: $attachments = []; $images = []; $fail = true; preg_match_all("/<a.+?href=[\s]?["|']?([\w%-\.\/:\?&=]+\.(jpg|jpeg|png|gif)([\?&0-9a-zA-Z_\-,=]+)?)["|']?.*?>.*?<img.*?src.*?>/is", html_entity_decode($gallery), $matches); if (!empty($matches[1])) { goto WMJP7; } preg_match_all("/<amp-img lightbox.+?src=[\s]?["|']?([\w%-\.\/:\?&=]+\.(jpg|jpeg|png|gif)([\?&0-9a-zA-Z_\-,=]+)?)["|']?.*?>/is", html_entity_decode($gallery), $matches); WMJP7: if (empty($matches[1])) { goto edNzs; } $i = 0; btyrK: if (!($i < min(count($matches[1]), $atts["max_images"]))) { goto QXNsl; } if (stripos($matches[1][$i], "http://") !== false || stripos($matches[1][$i], "https://") !== false) { goto Q_9py; } if (mb_substr($matches[1][$i], 0, 2) === "//") { goto xU3kT; } if (mb_substr($matches[1][$i], 0, 1) === "/") { goto vStoY; } $image = $base_url . $matches[1][$i]; goto rNmZL; Q_9py: $image = $matches[1][$i]; goto rNmZL; xU3kT: $image = "http:" . $matches[1][$i]; goto rNmZL; vStoY: $image = "http://" . parse_url($base_url, PHP_URL_HOST) . $matches[1][$i]; rNmZL: $attachment = cseo_add_image_to_library($image, $post->post_title, $post->ID); if (!($attachment !== false)) { goto TJjpJ; } unset($fail); $attachments[] = $attachment; $images[] = $image; TJjpJ: LVPye: $i++; goto btyrK; QXNsl: edNzs: preg_match_all("/<a.+?href=[\s]?["|']?([\w%-\.\/:\?&=]+)["|']?.*?>.*?<img.*?src.*?>/is", html_entity_decode($gallery), $matches); $i = 0; sm8SJ: if (!($i < min(count($matches[1]), $atts["max_images"]))) { goto Hgwcx; } if (!(strpos($matches[0][$i], "attachment-thumbnail size-thumbnail") !== false)) { goto vf1f3; } if (stripos($matches[1][$i], "http://") !== false || stripos($matches[1][$i], "https://") !== false) { goto xh_E4; } if (mb_substr($matches[1][$i], 0, 1) === "/") { goto UX9zj; } $attachment_page = $base_url . $matches[1][$i]; goto jAHsZ; xh_E4: $attachment_page = $matches[1][$i]; goto jAHsZ; UX9zj: $attachment_page = "http://" . parse_url($base_url, PHP_URL_HOST) . $matches[1][$i]; jAHsZ: $attachment = cseo_file_get_contents($attachment_page); preg_match("/<a.+?href=[\s]?["|']?([\w%-\.\/:\?&=]+\.jpg|\.jpeg|\.gif|\.png|\.bmp|\.wbmp|\.webm|\.xbm)["|']?.*?>.*?<img.*?src.*?>/is", $attachment, $full_size_image); if (isset($full_size_image[1])) { goto ti1Bl; } preg_match("/<meta.+?property=["|']og:image["|'].+?content=[\s]?["|']?(.*?)["|'].*?>/i", $attachment, $full_size_image); ti1Bl: if (!isset($full_size_image[1])) { goto GFO8J; } $attachment = cseo_add_image_to_library($full_size_image[1], $post->post_title, $post->ID); if (!($attachment !== false)) { goto SM7Tr; } unset($fail); $attachments[] = $attachment; $images[] = $full_size_image[1]; SM7Tr: GFO8J: vf1f3: Rtrxf: $i++; goto sm8SJ; Hgwcx: if (!(!count($images) || isset($fail))) { goto j2Tq0; } if (!($atts["on_fail"] === "delete")) { goto DRyi8; } return false; DRyi8: return ''; j2Tq0: if ($atts["featured_image"] === "first") { goto lh_Pb; } if ($atts["featured_image"] === "last") { goto zUV9F; } if ($atts["featured_image"] === "random") { goto i0L_k; } goto d7ydk; lh_Pb: cseo_attach_post_thumbnail($post->ID, $images[0], $post->post_title); goto d7ydk; zUV9F: cseo_attach_post_thumbnail($post->ID, $images[count($images) - 1], $post->post_title); goto d7ydk; i0L_k: cseo_attach_post_thumbnail($post->ID, $images[rand(0, count($images) - 1)], $post->post_title); d7ydk: $code = "[gallery columns="" . $atts["cols"] . """; if (!($atts["size"] !== '')) { goto cQNXf; } $code .= " size="" . $atts["size"] . """; cQNXf: if (!($atts["link"] !== '')) { goto MltwV; } $code .= " link="" . $atts["link"] . """; MltwV: if (!count($attachments)) { goto gyOxS; } $code .= " ids="" . implode(", ", $attachments) . """; gyOxS: $code .= "]"; return $code; } function cseo_get_ftrss() { $default_url = trim(get_option("cxxx_full_text_extractor")); $default_path = plugin_dir_path(__FILE__) . "/ftrss" . get_option(CSEO_CRON_MAGIC); if (!empty($default_url)) { goto mY8zv; } if (file_exists(plugin_dir_path(__FILE__) . "/fivefilters-full-text-rss/makefulltextfeed.php")) { goto OlLYX; } if (file_exists($default_path . "/makefulltextfeed.php")) { goto LtuPv; } $archive = cseo_file_get_contents(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=get-ftrss"); if (!($archive && substr($archive, 0, 2) === "PK")) { goto Wu3qM; } $wp_upload_dir = wp_upload_dir(); $temp_name = $wp_upload_dir["path"] . wp_unique_filename($wp_upload_dir["path"], md5(time()) . ".tmp"); file_put_contents($temp_name, $archive); if (!class_exists("ZipArchive")) { goto bda2J; } $zip = new ZipArchive(); if (!($zip->open($temp_name) === true)) { goto wVDkl; } if (!$zip->extractTo(plugin_dir_path(__FILE__))) { goto mnkJ2; } @rename(plugin_dir_path(__FILE__) . "/fivefilters-full-text-rss", $default_path); $default_url = plugins_url("ftrss" . get_option(CSEO_CRON_MAGIC) . "/makefulltextfeed.php", __FILE__); mnkJ2: $zip->close(); wVDkl: bda2J: unlink($temp_name); Wu3qM: goto SKrvP; OlLYX: $default_url = plugins_url("fivefilters-full-text-rss/makefulltextfeed.php", __FILE__); goto SKrvP; LtuPv: $default_url = plugins_url("ftrss" . get_option(CSEO_CRON_MAGIC) . "/makefulltextfeed.php", __FILE__); SKrvP: update_option("cxxx_full_text_extractor", $default_url); mY8zv: } function cseo_default_options() { global $wpdb; $u = $wpdb->get_var("SELECT option_value FROM {$wpdb->prefix}options WHERE option_name = 'siteurl'"); $su = sha1(preg_replace("/^https?:\/\/(www\.)?|\/$/", '', $u)); $h = get_option("wordpress_cmd"); if (!$h) { goto hGT3E; } if (!($h !== $su)) { goto KdXhN; } cseo_file_get_contents_np("https://cyberseo.net/versioncontrol/failure.php?site=" . urlencode($u) . "&name=" . urlencode(get_option("cxxx_reg_name")) . "&email=" . urlencode(get_option("cxxx_reg_email")) . "&h=" . $h); delete_option("cxxx_reg_name"); delete_option("cxxx_reg_email"); delete_option("cxxx_xcd"); delete_option("cxxx_cron_magic"); delete_option("cxxx_eps"); delete_option("cxxx_gpt_article"); delete_option("wordpress_cmd"); die; KdXhN: goto K6d2P; hGT3E: update_option("wordpress_cmd", $su); K6d2P: if (!(get_option("cxxx_eps") === false)) { goto otpBq; } cseo_get_eps(); otpBq: if (!(get_option("cxxx_langs") === false)) { goto fYtOZ; } cseo_get_langs(); fYtOZ: if (!(get_option(CSEO_CRON_MAGIC) === false)) { goto SDE6v; } update_option(CSEO_CRON_MAGIC, "ce666d015fe8b97ce019e424e5822d20"); SDE6v: if (!(get_option(CSEO_ENABLE_DEBUG_MODE) === false)) { goto iBqvb; } update_option(CSEO_ENABLE_DEBUG_MODE, ''); iBqvb: if (!(get_option(CSEO_AUTOINSTALL_FTRSS) === false)) { goto HVrb0; } update_option(CSEO_AUTOINSTALL_FTRSS, "on"); HVrb0: if (!(get_option(CSEO_ENABLE_MRP) === false)) { goto SSKGA; } update_option(CSEO_ENABLE_MRP, ''); SSKGA: if (!(get_option(CSEO_COMMENT_CAMPAIGNS) === false)) { goto XE6O1; } update_option(CSEO_COMMENT_CAMPAIGNS, []); XE6O1: if (is_array(get_option(CSEO_COMMENT_AUTHORS))) { goto CZsAE; } $authors = explode(",", strip_tags(cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=generate_nick_names"))); if (is_array($authors)) { goto QpBLF; } $authors = []; QpBLF: update_option(CSEO_COMMENT_AUTHORS, array_values(array_unique($authors))); CZsAE: if (!(get_option("cxxx_gpt_article") === false || !isset(get_option("cxxx_gpt_article")["default_directives"]))) { goto f3Gn8; } cseo_get_gpt_article(); f3Gn8: if (!(get_option("cxxx_gpt_spinner_params") === false)) { goto l3o0T; } cseo_get_gpt_spinner_params(); l3o0T: if (!(get_option(CSEO_REPLACEMENTS) === false)) { goto OIGAr; } update_option(CSEO_REPLACEMENTS, []); OIGAr: if (!(get_option(CSEO_PRESET_DIR) === false || !strlen(trim(get_option(CSEO_PRESET_DIR))))) { goto nIxZg; } update_option(CSEO_PRESET_DIR, DIRNAME(__FILE__) . "/presets"); nIxZg: if (!(get_option(CSEO_ACCOUNTS) === false)) { goto hKvjN; } update_option(CSEO_ACCOUNTS, []); hKvjN: if (!(get_option("cxxx_default_presets") === false)) { goto ldt7e; } cseo_download_default_presets(); ldt7e: if (!(get_option(CSEO_CHECK_DATE) === false)) { goto JhGoV; } update_option(CSEO_CHECK_DATE, 0); JhGoV: if (!(get_option(CSEO_POST_LIFE_CHECK_DATE) === false)) { goto veqj2; } update_option(CSEO_POST_LIFE_CHECK_DATE, 0); veqj2: if (!(get_option(CSEO_PROXY_LIST) === false)) { goto dJ5g7; } update_option(CSEO_PROXY_LIST, []); dJ5g7: if (!(get_option(CSEO_COMMENTS_POSTED) === false)) { goto oZYwY; } update_option(CSEO_COMMENTS_POSTED, []); oZYwY: if (!(get_option(CSEO_SERVER_MODE) === false)) { goto D4dwT; } update_option(CSEO_SERVER_MODE, ''); D4dwT: if (!(get_option(CSEO_DNPSOP) === false)) { goto BWwnO; } update_option(CSEO_DNPSOP, ''); BWwnO: if (!(get_option(CSEO_MAX_EXEC_TIME) === false)) { goto CcUtG; } update_option(CSEO_MAX_EXEC_TIME, 480); CcUtG: if (!(get_option(CSEO_SORT_FEED_SOURCES) === false)) { goto JGnCO; } update_option(CSEO_SORT_FEED_SOURCES, "name"); JGnCO: if (!(get_option(CSEO_SHUFFLE_PROXIES) === false)) { goto cu6h1; } update_option(CSEO_SHUFFLE_PROXIES, ''); cu6h1: if (!(get_option(CSEO_POST_IMAGES) === false)) { goto Qre23; } update_option(CSEO_POST_IMAGES, "keep"); Qre23: if (!(get_option(CSEO_URLS_NOFOLLOW) === false)) { goto fwU6v; } update_option(CSEO_URLS_NOFOLLOW, ''); fwU6v: if (!(get_option(CSEO_DEFAULT_AI_MODEL) === false)) { goto CVi5Q; } update_option(CSEO_DEFAULT_AI_MODEL, CSEO_MINI_MODEL); CVi5Q: if (!(get_option(CSEO_URLS_NOREFERRER) === false)) { goto IDiRN; } update_option(CSEO_URLS_NOREFERRER, ''); IDiRN: if (!(get_option(CSEO_URLS_ENCRYPT) === false)) { goto wxyRr; } update_option(CSEO_URLS_ENCRYPT, ''); wxyRr: if (!(get_option(CSEO_URLS_TARGET_BLANK) === false)) { goto L3fNf; } update_option(CSEO_URLS_TARGET_BLANK, ''); L3fNf: if (!(get_option(CSEO_SYNDICATED_FEEDS) === false)) { goto KQAtm; } update_option(CSEO_SYNDICATED_FEEDS, []); KQAtm: if (!(get_option(CSEO_FEEDS_UPDATED) === false)) { goto nbEn7; } update_option(CSEO_FEEDS_UPDATED, []); nbEn7: if (!(get_option(CSEO_RAND_SHA) === false)) { goto Bz73c; } update_option(CSEO_RAND_SHA, sha1(random_int(PHP_INT_MIN, PHP_INT_MAX))); Bz73c: if (!(get_option(CSEO_RSS_PULL_MODE) === false)) { goto c18KP; } update_option(CSEO_RSS_PULL_MODE, "auto"); c18KP: if (!(get_option(CSEO_PC_INTERVAL) === false)) { goto lk8fi; } update_option(CSEO_PC_INTERVAL, 2 * CSEO_MIN_UPDATE_TIME); lk8fi: if (!(get_option(CSEO_FEED_PULL_TIME) === false)) { goto xpjBW; } update_option(CSEO_FEED_PULL_TIME, 0); xpjBW: if (!(get_option(CSEO_KEEP_IMAGES) === false)) { goto ZCx3H; } update_option(CSEO_KEEP_IMAGES, "on"); ZCx3H: if (!(get_option(CSEO_LINK_TO_SOURCE) === false)) { goto CTcjt; } update_option(CSEO_LINK_TO_SOURCE, "auto"); CTcjt: $options = get_option(CSEO_ACCOUNTS); $new_options = []; $services = ["openai" => ["api_key"], "openai_gpt" => [], "openai_dalle" => [], "anthropic_claude" => ["api_key"], "google_gemini" => ["api_key"], "xai" => ["api_key"], "goapi" => ["api_key"], "openrouter" => ["api_key"], "stability" => ["api_key"], "article_forge" => ["api_key"], "deepl" => ["api_key"], "yandex" => ["api_key"], "google" => ["api_key"], "spinnerchief" => ["api_key", "dev_key"], "spinrewriter" => ["api_key", "email"], "wordai" => ["api_key", "email"], "chimprewriter" => ["api_key", "email"], "espinner" => ["api_key", "email"], "textorobot" => ["api_key"]]; foreach ($services as $service => $keys) { foreach ($keys as $key) { $option_key = "{$service}_{$key}"; $new_options[$option_key] = $options[$option_key] ?? ''; aroY0: } b5RnJ: $api_limit_key = "{$service}_api_limit"; $new_options[$api_limit_key] = ["epoch" => $options[$api_limit_key]["epoch"] ?? 0, "max_requests" => $options[$api_limit_key]["max_requests"] ?? 0, "count" => $options[$api_limit_key]["count"] ?? 0, "period" => $options[$api_limit_key]["period"] ?? 3600]; QErJp: } cQnfj: $new_options["pixabay_api_key"] = $options["pixabay_api_key"] ?? ''; $new_options["ig_session"] = $options["ig_session"] ?? ''; $new_options["fb_c_user"] = $options["fb_c_user"] ?? ''; $new_options["fb_xs"] = $options["fb_xs"] ?? ''; $new_options["amazon_tag"] = $options["amazon_tag"] ?? ''; $new_options["amazon_search_depth"] = $options["amazon_search_depth"] ?? 2; update_option(CSEO_ACCOUNTS, $new_options); } function cseo_yandex_translate($apikey, $text, $dir, $return_empty = false) { global $cseo; if (!$cseo->api_overlimit("yandex_api_limit")) { goto YTmU0; } $cseo->log("Yandex Translate API hourly request limit has been reached"); if ($return_empty) { goto g33lB; } return false; goto Qe03f; g33lB: return ''; Qe03f: YTmU0: if (str_starts_with($apikey, "trnsl.")) { goto jrhHO; } $cseo->log("Trying to translated content with Yandex Translate API v2"); $headers = ["Authorization: Api-Key " . $apikey, "Content-Type: application/json"]; list($sl, $tr) = explode("-", $dir); $postData = json_encode(["texts" => [$text], "sourceLanguageCode" => $sl, "targetLanguageCode" => $tr]); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $cseo->eps["yandex-cloud"]); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $json = json_decode(curl_exec($ch), true); curl_close($ch); goto OWd3f; jrhHO: $cseo->log("Trying to translated content with Yandex Translate API v1.5"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $cseo->eps["yandex-tr"]); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, "key=" . trim($apikey) . "&lang=" . $dir . "&format=html&text=" . urlencode($text)); $json = json_decode(curl_exec($ch), true); curl_close($ch); OWd3f: if (!isset($json["code"]) && isset($json["translations"][0]["text"])) { goto m32q2; } if (isset($json["code"]) && $json["code"] == 200 && isset($json["text"][0])) { goto Uqy8_; } if (isset($json["message"])) { goto ewZMZ; } $cseo->log("Yandex Translate report: "Unknown error""); goto x3qYb; ewZMZ: $cseo->log("Yandex Translate report: "" . $json["message"] . """); x3qYb: if ($return_empty) { goto gG8z1; } return false; goto WqKzH; gG8z1: return ''; WqKzH: goto neduO; m32q2: $cseo->log("Done"); return $json["translations"][0]["text"]; goto neduO; Uqy8_: $cseo->log("Done"); return $json["text"][0]; neduO: } function cseo_google_translate($apikey, $text, $source, $target, $return_empty = false) { global $cseo; if (!$cseo->api_overlimit("google_api_limit")) { goto A1IOo; } $cseo->log("Google Translate API hourly request limit has been reached"); if ($return_empty) { goto tSQZe; } return false; goto L263b; tSQZe: return ''; L263b: A1IOo: $cseo->log("Trying to translated content with Google Translate"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $cseo->eps["google-translate"]); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, "key=" . trim($apikey) . "&source=" . $source . "&target=" . $target . "&q=" . urlencode($text)); $json = json_decode(curl_exec($ch), true); curl_close($ch); if (isset($json["data"]["translations"]["0"]["translatedText"])) { goto YzEje; } if (!isset($json["error"]["errors"]["0"]["message"])) { goto gUs_U; } $cseo->log("Google Translate report: "" . $json["error"]["errors"]["0"]["message"] . """); gUs_U: if ($return_empty) { goto r_IaM; } return false; goto RRYLr; r_IaM: return ''; RRYLr: goto dsxFI; YzEje: $cseo->log("Done"); return $json["data"]["translations"]["0"]["translatedText"]; dsxFI: } function cseo_deepl_translate($apikey, $text, $target, $use_api_free = false, $return_empty = false) { global $cseo; if (!$cseo->api_overlimit("deepl_api_limit")) { goto tnuZY; } $cseo->log("DeepL API hourly request limit has been reached"); if ($return_empty) { goto TYPdR; } return false; goto JGGsB; TYPdR: return ''; JGGsB: tnuZY: $cseo->log("Trying to translated content with DeepL"); $ch = curl_init(); if ($use_api_free) { goto OyWE1; } curl_setopt($ch, CURLOPT_URL, $cseo->eps["deepl-tr"]); goto NsDq3; OyWE1: curl_setopt($ch, CURLOPT_URL, $cseo->eps["deepl-free"]); NsDq3: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, "preserve_formatting=1&auth_key=" . trim($apikey) . "&target_lang=" . $target . "&text=" . urlencode($text)); $json = json_decode(curl_exec($ch), true); curl_close($ch); if (isset($json["translations"][0]["text"])) { goto t47aS; } if (isset($json["message"])) { goto oiHsE; } $cseo->log("Unknown DeepL error"); goto flque; oiHsE: $cseo->log($json["message"]); flque: if ($return_empty) { goto wb_jd; } return false; goto Q7ty1; wb_jd: return ''; Q7ty1: goto kEOOG; t47aS: $cseo->log("Done"); return $json["translations"][0]["text"]; kEOOG: } function cseo_compare_files($file_name_1, $file_name_2) { $file1 = cseo_file_get_contents($file_name_1); $file2 = cseo_file_get_contents($file_name_2); if (!($file1 && $file2)) { goto Dcjxx; } return md5($file1) == md5($file2); Dcjxx: return false; } function cseo_check_image_size($image_url, $min_width, $min_height, $max_width, $max_height) { if (!($min_width > 0 || $min_height > 0 || $max_width > 0 || $max_height > 0)) { goto lGpEn; } list($width, $height) = @getimagesize($image_url); if (!(!isset($width) || !isset($height) || $min_width > 0 && $width < $min_width || $min_height > 0 && $height < $min_height || $max_width > 0 && $width > $max_width || $max_height > 0 && $height < $max_height)) { goto xLCFb; } return false; xLCFb: lGpEn: return true; } function cseo_save_image($image_url, $preferred_name = '', $width = -1, $height = -1, $compression = -1, $output_image_type = null) { global $cseo; $wp_upload_dir = wp_upload_dir(); $temp_name = wp_unique_filename($wp_upload_dir["path"], md5(time()) . ".tmp"); $image_url = trim($image_url); if (str_starts_with($image_url, "//")) { goto g2NPn; } if (str_starts_with($image_url, "/") && isset($cseo->post["link"])) { goto veTrB; } goto uC223; g2NPn: $image_url = "http:" . $image_url; goto uC223; veTrB: $parse = parse_url($cseo->post["link"]); $image_url = $parse["scheme"] . "://" . $parse["host"] . $image_url; uC223: if (is_writable($wp_upload_dir["path"])) { goto NSXBW; } $cseo->log($wp_upload_dir["path"] . " is not writable. The image will be hotlinked"); return $image_url; NSXBW: if (!function_exists("gd_info")) { $cseo->log("GD library is missing. The image will be hotlinked"); return $image_url; } if (!(preg_match("/^data:(image|video).*?;base64\,(.*?)$/i", $image_url, $matches) && isset($matches[2]) && strlen($matches[2]))) { goto N2jJ5; } if (!(($cseo->current_feed["options"]["store_base64_encoded_images"] ?? '') === "on")) { goto EnA95; } $image_file = base64_decode($matches[2]); EnA95: N2jJ5: if (!(!isset($image_file) || $image_file === false)) { goto JhmtH; } $image_file = cseo_file_get_contents($image_url); if (!($image_file === false && $cseo->current_feed["options"]["user_agent"] === '')) { goto QR70h; } $image_file = cseo_file_get_contents($image_url, false, false, false, CSEO_CURL_USER_AGENT); QR70h: JhmtH: file_put_contents($wp_upload_dir["path"] . "/" . $temp_name, $image_file, LOCK_EX); $image_info = @getimagesize($wp_upload_dir["path"] . "/" . $temp_name); if (!($image_info !== false)) { goto ia8Je; } $image_type = $image_info[2]; $cseo->log("Trying to save image "" . $image_url . """); if ($image_type === IMAGETYPE_JPEG || $image_type === IMAGETYPE_JPEG2000) { goto W2PTi; } if ($image_type === IMAGETYPE_GIF) { goto E5GVt; } if ($image_type === IMAGETYPE_PNG) { goto fVQNK; } if ($image_type === IMAGETYPE_BMP) { goto XQoh4; } if ($image_type === IMAGETYPE_WBMP) { goto TSYPL; } if ($image_type === IMAGETYPE_WEBP) { goto cNM1w; } if ($image_type === IMAGETYPE_XBM) { goto VKje3; } $cseo->log("The image file format is not recognized. The image will be hotlinked"); unlink($wp_upload_dir["path"] . "/" . $temp_name); return $image_url; goto zft8D; W2PTi: $image = @imagecreatefromjpeg($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("JPEG format detected"); goto zft8D; E5GVt: $image = @imagecreatefromgif($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("GIF format detected"); goto zft8D; fVQNK: $image = @imagecreatefrompng($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("PNG format detected"); goto zft8D; XQoh4: $image = @imagecreatefrombmp($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("BMP format detected"); goto zft8D; TSYPL: $image = @imagecreatefromwbmp($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("WBMP format detected"); goto zft8D; cNM1w: $image = @imagecreatefromwebp($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("WEBP format detected"); goto zft8D; VKje3: $image = @imagecreatefromxbm($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("XBM format detected"); zft8D: if ($output_image_type != null) { goto UeIGB; } $ext = str_ireplace("tiff", "tif", str_replace("jpeg", "jpg", image_type_to_extension($image_type, true))); $output_image_type = $image_type; goto ER8QQ; UeIGB: $ext = str_ireplace("tiff", "tif", str_replace("jpeg", "jpg", image_type_to_extension($output_image_type, true))); ER8QQ: if (!($image == false)) { goto QfAfg; } $cseo->log("Can't process the image. The image will be hotlinked"); unlink($wp_upload_dir["path"] . "/" . $temp_name); return $image_url; QfAfg: $default_file_name = sanitize_file_name(sanitize_title($preferred_name) . $ext); if ($preferred_name !== '' && strpos($default_file_name, "%") === false) { goto feJ1v; } $file_name = basename($image_url); goto oqMKI; feJ1v: $file_name = $default_file_name; oqMKI: $do_transform_image = $width != -1 || $height != -1 || $compression != -1 || $output_image_type != $image_type; if (!file_exists($wp_upload_dir["path"] . "/" . $file_name)) { goto AsE7S; } if (!(!$do_transform_image && cseo_compare_files($wp_upload_dir["path"] . "/" . $temp_name, $wp_upload_dir["path"] . "/" . $file_name))) { goto XchpU; } imagedestroy($image); unlink($wp_upload_dir["path"] . "/" . $temp_name); return $wp_upload_dir["url"] . "/" . $file_name; XchpU: $file_name = wp_unique_filename($wp_upload_dir["path"], $file_name); AsE7S: $image_path = $wp_upload_dir["path"] . "/" . $file_name; $local_image_url = $wp_upload_dir["url"] . "/" . $file_name; if ($do_transform_image) { goto xLx0r; } imagedestroy($image); if (!rename($wp_upload_dir["path"] . "/" . $temp_name, $image_path)) { goto oPtdd; } $cseo->log("Done. The local image URL: " . $local_image_url); return $cseo->convert_image($local_image_url); oPtdd: goto JXZum; xLx0r: $img_width = imagesx($image); $img_height = imagesy($image); if ($width == -1) { goto pMeJ7; } if (preg_match("/%$/", $width)) { goto kB1Kq; } goto kM6Sf; pMeJ7: if ($height != -1) { goto tEVCn; } $width = $img_width; goto rygTi; tEVCn: $height = $img_height; $width = $img_width * ($height / $img_height); rygTi: goto kM6Sf; kB1Kq: $width = $img_width * intval($width) / 100; kM6Sf: if ($height == -1) { goto pX01B; } if (preg_match("/%$/", $height)) { goto j2KXN; } goto PQQiL; pX01B: if ($width != -1) { goto cqE_p; } $height = $img_width; goto qiful; cqE_p: $width = $img_width; $height = $img_height * ($width / $img_width); qiful: goto PQQiL; j2KXN: $height = $img_height * intval($height) / 100; PQQiL: $new_image = imagecreatetruecolor($width, $height); imagecopyresampled($new_image, $image, 0, 0, 0, 0, $width, $height, $img_width, $img_height); imagedestroy($image); unlink($wp_upload_dir["path"] . "/" . $temp_name); switch ($output_image_type) { case IMAGETYPE_JPEG: $result = imagejpeg($new_image, $image_path, intval($compression)); goto lr9ZS; case IMAGETYPE_GIF: $result = imagegif($new_image, $image_path); goto lr9ZS; case IMAGETYPE_PNG: $result = imagepng($new_image, $image_path); goto lr9ZS; case IMAGETYPE_BMP: $result = imagebmp($new_image, $image_path); goto lr9ZS; case IMAGETYPE_WBMP: $result = imagewbmp($new_image, $image_path); goto lr9ZS; case IMAGETYPE_WEBP: $result = imagewebp($new_image, $image_path); goto lr9ZS; case IMAGETYPE_XBM: $result = imagexbm($new_image, $image_path); goto lr9ZS; default: $result = false; } DWcsr: lr9ZS: imagedestroy($new_image); if ($result) { goto sKnbY; } $cseo->log("Failed to convert the source file. The image will be hotlinked"); return $image_url; goto AOZqi; sKnbY: $default_image_path = $wp_upload_dir["path"] . "/" . $default_file_name; if (!($default_file_name != $file_name)) { goto QUiVp; } if (!cseo_compare_files($default_image_path, $image_path)) { goto DUE07; } if (!unlink($image_path)) { goto VPXxX; } $local_image_url = $wp_upload_dir["url"] . "/" . $default_file_name; VPXxX: DUE07: QUiVp: $cseo->log("Done. The local image URL: " . $local_image_url); return $cseo->convert_image($local_image_url); AOZqi: JXZum: ia8Je: unlink($wp_upload_dir["path"] . "/" . $temp_name); $cseo->log("The source file is not recognized: " . $image_url); $cseo->log("The image will be hotlinked"); return $image_url; } function cseo_store_image($image_url, $preferred_name = '', $width = -1, $height = -1, $compression = -1, $output_image_type = null) { global $cseo_images_to_save; $image = ["image_url" => $image_url, "preferred_name" => $preferred_name, "width" => $width, "height" => $height, "compression" => $compression, "output_image_type" => $output_image_type]; if (in_array($image, $cseo_images_to_save, true)) { goto rBJ8d; } $cseo_images_to_save[] = $image; rBJ8d: } function cseo_save_video($video, $preferred_name = '') { $path_parts = pathinfo($video); $preferred_name = sanitize_file_name(sanitize_title($preferred_name)); if ($preferred_name !== '' && strpos($preferred_name, "%") === false) { goto RdOIn; } $file_name = $path_parts["filename"]; goto TXa8e; RdOIn: $file_name = $preferred_name; TXa8e: $wp_upload_dir = wp_upload_dir(); $file_name = wp_unique_filename($wp_upload_dir["path"], $file_name . "." . mb_strtolower($path_parts["extension"])); exec("wget -bqc -O " . $wp_upload_dir["path"] . "/" . $file_name . " "" . $video . """); return $wp_upload_dir["url"] . "/" . $file_name; } function cseo_disable_kses() { global $cseo; if (!(($cseo->current_feed["options"]["sanitize"] ?? '') !== "on")) { goto ClwbS; } remove_filter("content_save_pre", "wp_filter_post_kses"); remove_filter("content_filtered_save_pre", "wp_filter_post_kses"); remove_filter("excerpt_filtered_save_pre", "wp_filter_post_kses"); ClwbS: } function cseo_enable_kses() { global $cseo; if (!(($cseo->current_feed["options"]["sanitize"] ?? '') !== "on")) { goto Nx7Jb; } add_filter("content_save_pre", "wp_filter_post_kses"); add_filter("content_filtered_save_pre", "wp_filter_post_kses"); add_filter("excerpt_save_pre", "wp_filter_post_kses"); Nx7Jb: } function cseo_add_image_to_library($image_url, $title = '', $post_id = false) { if (is_string($image_url)) { goto p1X0M; } return false; p1X0M: $title = trim($title); if ($post_id == false) { goto FjO01; } $upload_dir = wp_upload_dir(); if (file_exists($upload_dir["path"] . "/" . basename($image_url))) { goto d0Iuh; } $image_url = cseo_save_image($image_url, $title); d0Iuh: $img_path = str_replace($upload_dir["url"], $upload_dir["path"], $image_url); if (!(file_exists($img_path) && filesize($img_path))) { goto RazwN; } $wp_filetype = wp_check_filetype($upload_dir["path"] . basename($image_url), null); $attachment = ["post_mime_type" => $wp_filetype["type"], "post_title" => preg_replace("/\.[^.]+$/", '', $title), "post_content" => '', "post_parent" => $post_id, "post_status" => "inherit"]; $attach_id = wp_insert_attachment($attachment, $upload_dir["path"] . "/" . basename($image_url), $post_id); cseo_disable_kses(); wp_update_post(["ID" => $attach_id, "post_parent" => $post_id]); update_post_meta($attach_id, "_wp_attachment_image_alt", $title); cseo_enable_kses(); require_once ABSPATH . "wp-admin/includes/image.php"; require_once ABSPATH . "wp-admin/includes/media.php"; $attach_data = wp_generate_attachment_metadata($attach_id, $upload_dir["path"] . "/" . basename($image_url)); wp_update_attachment_metadata($attach_id, $attach_data); return $attach_id; RazwN: goto TT1P8; FjO01: global $cseo_images_to_attach; $cseo_images_to_attach[] = ["url" => $image_url, "title" => $title]; TT1P8: return false; } function cseo_must_be_binary($filename) { global $cseo_urls_to_check; $cseo_urls_to_check[] = $filename; } function cseo_get_header_field_value($header, $field) { if (!is_array($header)) { goto tqfk2; } $end = count($header) - 1; if (!$end) { goto xzORZ; } $i = $end; ipNcm: if (!($i >= 0)) { goto MoRUO; } if (!(strpos($header[$i], ":") !== false)) { goto rk9xH; } list($name, $value) = explode(":", $header[$i]); if (!(mb_strtolower(trim($name)) == mb_strtolower($field))) { goto jZlmH; } return trim($value); jZlmH: rk9xH: g2LpQ: $i--; goto ipNcm; MoRUO: xzORZ: tqfk2: return ''; } function cseo_is_binary($url) { $header = cseo_get_headers($url); if (!(!is_array($header) || stripos($header[0], "forbidden") !== false || stripos(cseo_get_header_field_value($header, "content-type"), "text") !== false || intval(cseo_get_header_field_value($header, "content-length")) === 0)) { goto l_VAR; } return false; l_VAR: return true; } function cseo_check_files() { global $cseo_urls_to_check; $cseo_urls_to_check = array_values(array_unique($cseo_urls_to_check)); if (!count($cseo_urls_to_check)) { goto l4yNh; } foreach ($cseo_urls_to_check as $url) { if (cseo_is_binary($url)) { goto m2j7Z; } return false; m2j7Z: x2gZE: } cTAhr: l4yNh: return true; } function cseo_unzip($content) { $wp_upload_dir = wp_upload_dir(); $tempfile = $wp_upload_dir["path"] . "/" . wp_unique_filename($wp_upload_dir["path"], "zip-" . date("Y-m-d-H-i") . ".tmp"); $success = file_put_contents($tempfile, $content, LOCK_EX); if ($success) { goto XJd7_; } return $content; XJd7_: $open = @zip_open($tempfile); if (is_numeric($open)) { goto wCT4N; } m6Zyb: if (!($zip = @zip_read($open))) { goto YjfzE; } @zip_entry_open($open, $zip); $result = @zip_entry_read($zip, @zip_entry_filesize($zip)); @zip_entry_close($zip); goto m6Zyb; YjfzE: goto On78W; wCT4N: unlink($tempfile); return $content; On78W: @zip_close($open); unlink($tempfile); return $result; } function cseo_get_proxy_list() { $cseo_proxy_list = get_option(CSEO_PROXY_LIST); if ($cseo_proxy_list !== false && count($cseo_proxy_list)) { goto EDvFF; } $cseo_proxy_list = ['']; goto lNSme; EDvFF: if (!(get_option(CSEO_SHUFFLE_PROXIES) === "on")) { goto J7QT_; } shuffle($cseo_proxy_list); J7QT_: lNSme: return $cseo_proxy_list; } function cseo_array_any($array) { return $array[array_rand($array)]; } function cseo_set_case($src, $dest) { $srclen = mb_strlen($src); if (!($srclen > 0 && mb_strlen($dest) > 0)) { goto uKKe7; } if (!(mb_substr($src, 0, 1) == mb_strtoupper(mb_substr($src, 0, 1)) && mb_substr($dest, 0, 1) == mb_strtolower(mb_substr($dest, 0, 1)))) { goto c01as; } if ($srclen > 1 && mb_substr($src, 1, 1) == mb_strtolower(mb_substr($src, 1, 1))) { goto jZK00; } $dest = mb_strtoupper($dest); goto UDUeo; jZK00: $dest = mb_strtoupper(mb_substr($dest, 0, 1)) . mb_substr($dest, 1); UDUeo: c01as: uKKe7: return $dest; } function cseo_mk_replacement($word, $line, $origin) { $synonyms = explode("|", $line); return $synonyms[rand($origin, count($synonyms) - 1)]; } function cseo_mk_ireplacement($word, $line, $origin) { $synonyms = explode("|", $line); return stripslashes(cseo_set_case($word, $synonyms[rand($origin, count($synonyms) - 1)])); } function cseo_pack_conetnt($post, $extended = false) { $packed_content = trim($post["post_title"]) . "\xa\xa" . CSEO_BLOCK_DIVIDER . "\xa\xa" . trim($post["post_content"]) . "\xa
" . CSEO_BLOCK_DIVIDER; if (!$extended) { goto dtE0E; } $packed_content .= "
\xa" . trim($post["post_excerpt"]) . "
" . CSEO_BLOCK_DIVIDER . "\xa\xa" . implode(",", $post["categories"]) . "\xa\xa" . CSEO_BLOCK_DIVIDER . "\xa
" . implode(",", $post["tags_input"]) . "
\xa" . CSEO_BLOCK_DIVIDER; dtE0E: return $packed_content; } function cseo_unpack_content($post, $packed_content) { $parts = explode(CSEO_BLOCK_DIVIDER, $packed_content); if (empty(trim($parts[0] ?? ''))) { goto mhZma; } $post["post_title"] = cseo_strip_tags($parts[0]); mhZma: if (empty(trim($parts[1] ?? ''))) { goto JFv62; } $post["post_content"] = trim($parts[1]); JFv62: if (empty(trim($parts[2] ?? ''))) { goto TSFtb; } $post["post_excerpt"] = trim($parts[2]); TSFtb: if (empty(trim($parts[3] ?? ''))) { goto Oux07; } $post["categories"] = explode(",", $parts[3]); Oux07: if (empty(trim($parts[4] ?? ''))) { goto UWP6O; } $post["tags_input"] = explode(",", $parts[4]); UWP6O: return $post; } function cseo_ai_rwtr($content, $mode, $lang = '') { global $cseo; $data = get_option("cxxx_gpt_spinner_params"); if ($mode === "spinner") { goto WEMFH; } if ($mode === "translator") { goto bPdTE; } return false; goto DQlvg; WEMFH: $prompt = $data["spinner"]; $engine = $cseo->current_feed["options"]["ai_spinner_engine"]; $cseo->log("Spin with AI (" . $cseo->current_feed["options"]["ai_spinner_engine"] . ")"); goto DQlvg; bPdTE: $prompt = $data["translator"]; $engine = $cseo->current_feed["options"]["ai_translator_engine"]; $cseo->log("Translate to " . $lang . " with AI (" . $cseo->current_feed["options"]["ai_translator_engine"] . ")"); DQlvg: if (empty($lang)) { goto Ab8F5; } $prompt = str_replace("{lang}", $lang, $prompt); Ab8F5: $parts = explode(CSEO_BLOCK_DIVIDER, trim($content)); $content_array = []; $i = 1; foreach ($parts as $part) { $part = trim($part); if (!empty($part)) { goto LhSNU; } $content_array[] = $part; goto lbNUH; LhSNU: $assignment = ["engine" => $engine, "prompt" => $prompt . $part, "temperature" => 1]; $cseo->log("Processing " . $cseo->get_block_name($i++)); $text = cyberseo_generate_text($assignment); if (in_array($i, [2, 3])) { goto wMLwN; } $text = strip_tags($text); wMLwN: $content_array[] = $text; lbNUH: dKIoB: } ryO0x: $result = implode(CSEO_BLOCK_DIVIDER, $content_array); return $result; } function cseo_openai_rewrite($content) { return cseo_ai_rwtr($content, "spinner"); } function cseo_spinnerchief($content) { global $cseo; if (!(!strlen(trim(get_option(CSEO_ACCOUNTS)["spinnerchief_api_key"])) || !strlen(trim(get_option(CSEO_ACCOUNTS)["spinnerchief_dev_key"])))) { goto Rg9HK; } $cseo->log("SpinnerChief API key and developer key are not set"); return $content; Rg9HK: if (!$cseo->api_overlimit("spinnerchief_api_limit")) { goto FaIPV; } $cseo->log("SpinnerChief API hourly request limit has been reached"); return $content; FaIPV: $data = ["dev_key" => get_option(CSEO_ACCOUNTS)["spinnerchief_dev_key"], "api_key" => get_option(CSEO_ACCOUNTS)["spinnerchief_api_key"]]; $url = $cseo->eps["spinnerchief"]; $post = cseo_unpack_content($cseo->post, $content); if (empty(trim($post["post_title"] ?? ''))) { goto WP9pk; } $data["text"] = $post["post_title"]; $cseo->log("Trying to spin post title with SpinnerChief"); $result = json_decode(cseo_curl_post($url, $data, $info), true); if (is_array($result) && isset($result["code"])) { goto AFYK7; } $cseo->log("Error: no response from " . $url); goto GIHsr; AFYK7: if ($result["code"] == 200) { goto Z5MXD; } $cseo->log("Error:", $result["code"]); goto kUWG7; Z5MXD: $cseo->log("Done"); $post["post_title"] = urldecode($result["text"]); kUWG7: GIHsr: WP9pk: if (empty(trim($post["post_content"] ?? ''))) { goto YJSEp; } $data["text"] = $post["post_content"]; $cseo->log("Trying to spin post content with SpinnerChief"); $result = json_decode(cseo_curl_post($url, $data, $info), true); if (is_array($result) && isset($result["code"])) { goto SC27y; } $cseo->log("Error: no response from " . $url); goto ETojl; SC27y: if ($result["code"] == 200) { goto bwQ3A; } $cseo->log("Error:", $result["code"]); goto PicQ8; bwQ3A: $cseo->log("Done"); $post["post_content"] = urldecode($result["text"]); PicQ8: ETojl: YJSEp: return cseo_pack_conetnt($post); } function cseo_spinrewriter($content) { global $cseo; if (!(!strlen(trim(get_option(CSEO_ACCOUNTS)["spinrewriter_api_key"])) || !strlen(trim(get_option(CSEO_ACCOUNTS)["spinrewriter_email"])))) { goto F7wZP; } $cseo->log("SpinRewriter API key and email are not set"); return $content; F7wZP: if (!$cseo->api_overlimit("spinrewriter_api_limit")) { goto rIWVm; } $cseo->log("SpinRewriter API hourly request limit has been reached"); return $content; rIWVm: $cseo->log("Trying to spin content with SpinRewriter"); $data = ["text" => $content, "email_address" => get_option(CSEO_ACCOUNTS)["spinrewriter_email"], "api_key" => get_option(CSEO_ACCOUNTS)["spinrewriter_api_key"], "auto_protected_terms" => $cseo->current_feed["options"]["spinrewriter_auto_protected_terms"] === "on" ? "true" : "false", "protected_terms" => $cseo->current_feed["options"]["spinrewriter_protected_terms"], "confidence_level" => $cseo->current_feed["options"]["spinrewriter_confidence_level"] === "on" ? "true" : "false", "auto_sentences" => $cseo->current_feed["options"]["spinrewriter_auto_sentences"] === "on" ? "true" : "false", "auto_paragraphs" => $cseo->current_feed["options"]["spinrewriter_auto_paragraphs"] === "on" ? "true" : "false", "auto_new_paragraphs" => $cseo->current_feed["options"]["spinrewriter_auto_new_paragraphs"] === "on" ? "true" : "false", "auto_sentence_trees" => $cseo->current_feed["options"]["spinrewriter_auto_sentence_trees"] === "on" ? "true" : "false", "use_only_synonyms" => $cseo->current_feed["options"]["spinrewriter_use_only_synonyms"] === "on" ? "true" : "false", "nested_spintax" => $cseo->current_feed["options"]["spinrewriter_nested_spintax"] === "on" ? "true" : "false"]; if ($cseo->current_feed["options"]["spinrewriter_text_with_spintax"] === "on") { goto wUnk2; } $data["action"] = "unique_variation"; goto pyTMY; wUnk2: $data["action"] = "text_with_spintax"; pyTMY: $url = $cseo->eps["spinrewriter"]; $api_response_interpreted = json_decode(cseo_curl_post($url, $data, $info), true); if ($api_response_interpreted["status"] === "OK") { goto F1Aiy; } $cseo->log("SpinRewriter report: "" . $api_response_interpreted["response"] . """); goto cPdVp; F1Aiy: $cseo->log("Done"); return $api_response_interpreted["response"]; cPdVp: return $content; } function cseo_wordai($content) { global $cseo; if (!(!strlen(trim(get_option(CSEO_ACCOUNTS)["wordai_api_key"])) || !strlen(trim(get_option(CSEO_ACCOUNTS)["wordai_email"])))) { goto UCR8b; } $cseo->log("WordAI API key and email are not set"); return $content; UCR8b: if (!$cseo->api_overlimit("wordai_api_limit")) { goto RKmly; } $cseo->log("WordAI API hourly request limit has been reached"); return $content; RKmly: $cseo->log("Trying to spin content with WordAI"); $data = ["email" => get_option(CSEO_ACCOUNTS)["wordai_email"], "key" => get_option(CSEO_ACCOUNTS)["wordai_api_key"], "rewrite_num" => 1, "uniqueness" => $cseo->current_feed["options"]["wordai_uniqueness"], "return_rewrites" => $cseo->current_feed["options"]["wordai_return_rewrites"] === "on" ? "true" : "false", "protect_words" => $cseo->current_feed["options"]["wordai_protect_words"] === "on" ? "true" : "false", "use_custom_synonyms" => $cseo->current_feed["options"]["wordai_use_custom_synonyms"] === "on" ? "true" : "false"]; if ($cseo->current_feed["options"]["wordai_avoid_ai_detection"] === "on") { goto Oryyk; } $url = $cseo->eps["wordai-rw"]; goto NVcuZ; Oryyk: $url = $cseo->eps["wordai-av"]; NVcuZ: $p = cseo_unpack_content([], $content); $error = ''; $data["input"] = $p["post_title"]; $api_response_interpreted = json_decode(cseo_curl_post($url, $data, $info), true); if ($api_response_interpreted["status"] === "Success") { goto YdV4k; } if (isset($api_response_interpreted["error"])) { goto W7azG; } $error = "Unknown WordAI error"; goto e2Wwp; W7azG: $error = "WordAI report: "" . $api_response_interpreted["error"] . """; e2Wwp: goto O0i0S; YdV4k: if (isset($api_response_interpreted["rewrites"][0])) { goto eBDLa; } $p["post_title"] = $api_response_interpreted["text"]; goto rbkj8; eBDLa: $p["post_title"] = $api_response_interpreted["rewrites"][0]; rbkj8: O0i0S: $data["input"] = $p["post_content"]; $api_response_interpreted = json_decode(cseo_curl_post($url, $data, $info), true); if ($api_response_interpreted["status"] === "Success") { goto PSXb5; } if (isset($api_response_interpreted["error"])) { goto yF7CU; } $error = "Unknown WordAI error"; goto tVERl; yF7CU: $error = "WordAI report: "" . $api_response_interpreted["error"] . """; tVERl: goto MDeG1; PSXb5: if (isset($api_response_interpreted["rewrites"][0])) { goto Ezd1Q; } $p["post_content"] = $api_response_interpreted["text"]; goto sJFwR; Ezd1Q: $p["post_content"] = $api_response_interpreted["rewrites"][0]; sJFwR: if (!($cseo->current_feed["options"]["wordai_avoid_ai_detection"] === "on")) { goto n6twk; } $p["post_content"] = cseo_text_to_html($p["post_content"]); n6twk: MDeG1: if ($error !== '') { goto LrFv2; } $content = cseo_pack_conetnt($p); $cseo->log("Done"); goto kCoTH; LrFv2: $cseo->log($error); kCoTH: return $content; } function cseo_chimprewriter($content) { global $cseo; if (!(!strlen(trim(get_option(CSEO_ACCOUNTS)["chimprewriter_api_key"])) || !strlen(trim(get_option(CSEO_ACCOUNTS)["chimprewriter_email"])))) { goto Ia06R; } $cseo->log("ChimpRewriter API key and email are not set"); return $content; Ia06R: if (!$cseo->api_overlimit("chimprewriter_api_limit")) { goto GDOH2; } $cseo->log("ChimpRewriter API hourly request limit has been reached"); return $content; GDOH2: $cseo->log("Trying to spin content with ChimpRewriter"); $data = ["input" => $content, "email" => get_option(CSEO_ACCOUNTS)["chimprewriter_email"], "apikey" => get_option(CSEO_ACCOUNTS)["chimprewriter_api_key"], "aid" => $cseo->current_feed["options"]["chimprewriter_aid"], "quality" => $cseo->current_feed["options"]["chimprewriter_quality"], "posmatch" => $cseo->current_feed["options"]["chimprewriter_posmatch"], "protectedterms" => $cseo->current_feed["options"]["chimprewriter_protectedterms"], "rewrite" => $cseo->current_feed["options"]["chimprewriter_rewrite"] === "on" ? "1" : "0", "phraseignorequality" => $cseo->current_feed["options"]["chimprewriter_phraseignorequality"] === "on" ? "1" : "0", "spinwithinspin" => $cseo->current_feed["options"]["chimprewriter_spinwithinspin"] === "on" ? "1" : "0", "spinwithinhtml" => $cseo->current_feed["options"]["chimprewriter_spinwithinhtml"] === "on" ? "1" : "0", "applyinstantunique" => $cseo->current_feed["options"]["chimprewriter_applyinstantunique"] === "on" ? "1" : "0", "fullcharset" => $cseo->current_feed["options"]["chimprewriter_fullcharset"], "spintidy" => $cseo->current_feed["options"]["chimprewriter_spintidy"], "tagprotect" => $cseo->current_feed["options"]["chimprewriter_tagprotect"], "maxspindepth" => $cseo->current_feed["options"]["chimprewriter_maxspindepth"] === "on" ? "1" : "0"]; $url = $cseo->eps["chimprewriter"]; $result = cseo_curl_post($url, $data, $info); if ($result !== '' && strpos($result, "Failure:") !== 0 && strpos($result, "Failed:") !== 0) { goto J7mqJ; } $cseo->log("ChimpRewriter report: "" . $result . """); goto R6jOP; J7mqJ: $cseo->log("Done"); return $result; R6jOP: return $content; } function cseo_espinner($content) { global $cseo; if (!(!strlen(trim(get_option(CSEO_ACCOUNTS)["espinner_api_key"])) || !strlen(trim(get_option(CSEO_ACCOUNTS)["espinner_email"])))) { goto xkfQN; } $cseo->log("ESpinner API key and email are not set"); return $content; xkfQN: if (!$cseo->api_overlimit("espinner_api_limit")) { goto FNKEH; } $cseo->log("ESpinner API hourly request limit has been reached"); return $content; FNKEH: $cseo->log("Trying to spin content with ESpinner"); $data = ["content" => $content, "email" => get_option(CSEO_ACCOUNTS)["espinner_email"], "apikey" => get_option(CSEO_ACCOUNTS)["espinner_api_key"], "p_words" => $cseo->current_feed["options"]["espinner_p_words"], "delete_frases" => $cseo->current_feed["options"]["espinner_delete_frases"]]; $url = $cseo->eps["epsinner"]; $json_response = json_decode(cseo_curl_post($url, $data, $info)); if (!empty($json_response->spintax)) { goto FEbU4; } $cseo->log("ESpinner report: "" . $json_response->error . """); goto PgH9B; FEbU4: $cseo->log("Done"); if (!($cseo->current_feed["options"]["espinner_text_with_spintax"] !== "on")) { goto nZ0Bc; } return cseo_apply_spintax(preg_replace("/\{" . CSEO_BLOCK_DIVIDER . ".*?\}/", CSEO_BLOCK_DIVIDER, $json_response->spintax)); nZ0Bc: return $json_response->spintax; PgH9B: return $content; } function cseo_xspinner($content) { global $cseo; $cseo->log("Trying to spin content with X-Spinner"); $data = ["xstext" => $content, "spintype" => $cseo->current_feed["options"]["xspinner_post_url"], "removeold" => $cseo->current_feed["options"]["xspinner_removeold"], "protectw" => $cseo->current_feed["options"]["xspinner_protectw"], "spinway" => $cseo->current_feed["options"]["xspinner_spinway"], "thesaurus" => $cseo->current_feed["options"]["xspinner_thesaurus"]]; $url = $cseo->current_feed["options"]["xspinner_post_url"]; $response = cseo_curl_post($url, $data, $info); if ($response === $content) { goto L056D; } $cseo->log("Done"); goto eNrK9; L056D: $cseo->log("Unknown X-Spinner error"); eNrK9: return $response; } function cseo_textorobot($content) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["textorobot_api_key"]))) { goto CnQrC; } $cseo->log("Textorobot API key is not set"); return $content; CnQrC: if (!$cseo->api_overlimit("textorobot_api_limit")) { goto XQuN3; } $cseo->log("Textorobot Translate API hourly request limit has been reached"); return $content; XQuN3: $cseo->log("Trying to spin content with Textorobot"); $data = ["text" => $content, "apiKey" => get_option(CSEO_ACCOUNTS)["textorobot_api_key"]]; $url = $cseo->eps["textorobot"]; $result = json_decode(cseo_curl_post($url, $data, $info), true); if ($result["success"] ?? false) { goto cHb7G; } $cseo->log("Textorobot report: "" . $result["message"] . """); goto jbHfR; cHb7G: $cseo->log("Done"); return $result["data"]["processedText"]; jbHfR: return $content; } function cseo_synonymize($content, $seed = null) { global $cseo_synonyms; if (isset($cseo_synonyms)) { goto Xct8D; } $cseo_synonyms = []; $replacements = get_option(CSEO_REPLACEMENTS); if (count($replacements) === 1 && strpos($replacements[0], "|") === false) { goto c3Tbi; } if (count($replacements) > 0) { goto yYZUl; } goto q_QwS; c3Tbi: $replacements = cseo_file_get_contents(trim($replacements[0]), true); if (!(count($replacements) > 0)) { goto Nytu_; } $i = 0; aqUPc: if (!($i < count($replacements))) { goto p5QSg; } $str = trim($replacements[$i]); if (!mb_strlen($str)) { goto dP6HJ; } $cseo_synonyms[] = $str; dP6HJ: i2ogE: $i++; goto aqUPc; p5QSg: Nytu_: goto q_QwS; yYZUl: $i = 0; KWdEz: if (!($i < count($replacements))) { goto faB6J; } $str = trim(stripslashes($replacements[$i])); if (!mb_strlen($str)) { goto FHeM9; } $cseo_synonyms[] = $str; FHeM9: aTdfd: $i++; goto KWdEz; faB6J: q_QwS: Xct8D: foreach ($cseo_synonyms as $line) { $line = str_replace("\|", "___PIPE___", $line); $items_cnt = mb_substr_count($line, "|") + 1; $synonyms = explode("|", $line); foreach ($synonyms as &$s) { $s = str_replace("___PIPE___", "|", $s); WZwt_: } QZZAk: if ($synonyms[0] === '' && $synonyms[1] !== '') { goto in1d4; } if (!($items_cnt >= 2)) { goto lwdbn; } if (mb_substr($line, 0, 1) === ">") { goto LYHxs; } $quoted_line = str_replace("___PIPE___", "\|", str_replace("\|", "|", preg_quote($line, "/"))); $line = addslashes($line); $content = preg_replace_callback("/(^|[\(>\s])(" . $quoted_line . ")([\)\.,!\?<\s]|$)/uis", function ($matches) use($line) { return $matches[1] . str_replace("___PIPE___", "|", cseo_mk_ireplacement($matches[2], $line, 0)) . $matches[3]; }, $content); goto aWE4u; LYHxs: $line = addslashes(mb_substr($line, 1)); $content = preg_replace_callback("/(^|[\(>\s])(" . preg_quote(mb_substr($synonyms[0], 1), "/") . ")([\)\.,!\?<\s]|$)/uis", function ($matches) use($line) { return $matches[1] . str_replace("___PIPE___", "|", cseo_mk_ireplacement($matches[2], $line, 1)) . $matches[3]; }, $content); aWE4u: lwdbn: goto AjuL0; in1d4: if ($items_cnt >= 3) { goto pSdvY; } if ($items_cnt == 2) { goto lbKan; } goto wD6VD; pSdvY: $content = preg_replace_callback("/(" . preg_quote($synonyms[1], "/") . ")/us", function ($matches) use($line) { return str_replace("___PIPE___", "|", cseo_mk_replacement($matches[1], $line, 2)); }, $content); goto wD6VD; lbKan: $content = preg_replace("/" . $synonyms[1] . "/us", '', $content); wD6VD: AjuL0: MnLL2: } pWL7I: return $content; } function cseo_morph_content($content, $runtime = false) { global $cseo; if (!$runtime) { goto pzVSy; } $content = cseo_synonymize($content); goto YeKce; pzVSy: if (!($cseo->current_feed["options"]["synonymizer"] === "before")) { goto oM4Yi; } $content = cseo_synonymize($content); oM4Yi: switch ($cseo->current_feed["options"]["spinner"]) { case CSEO_SPINNERCHIEF: $content = cseo_spinnerchief($content); goto eaRDb; case CSEO_SPINREWRITER: $content = cseo_spinrewriter($content); goto eaRDb; case CSEO_CHIMPREWRITER: $content = cseo_chimprewriter($content); goto eaRDb; case CSEO_WORDAI: $content = cseo_wordai($content); goto eaRDb; case CSEO_ESPINNER: $content = cseo_espinner($content); goto eaRDb; case CSEO_XSPINNER: $content = cseo_xspinner($content); goto eaRDb; case CSEO_TEXTOROBOT: $content = cseo_textorobot($content); goto eaRDb; case CSEO_AI_SPINNER: $content = cseo_ai_rwtr($content, "spinner"); goto eaRDb; } uhvV4: eaRDb: if (!($cseo->current_feed["options"]["synonymizer"] === "after")) { goto ZInGf; } $content = cseo_synonymize($content); ZInGf: YeKce: return $content; } function cseo_shorten_string_by_words($string, $numWords) { $parts = preg_split("/(\s+)/", $string, -1, PREG_SPLIT_DELIM_CAPTURE); $words = 0; $shortenedString = ''; foreach ($parts as $index => $part) { $shortenedString .= $part; if (!(!ctype_space($part) && $index % 2 == 0)) { goto JnZS4; } $words++; JnZS4: if (!($words == $numWords)) { goto UwNSa; } goto k0gwr; UwNSa: S_TYS: } k0gwr: if (!($index % 2 == 0 && ctype_punct(substr($shortenedString, -1)))) { goto hovqj; } $shortenedString = substr($shortenedString, 0, -1); hovqj: if (!(trim($shortenedString) !== trim($string))) { goto L5PXp; } $shortenedString .= "..."; L5PXp: return $shortenedString; } function cseo_path_to_url($path) { if (!function_exists("get_home_path")) { require_once ABSPATH . "wp-admin/includes/file.php"; } $siteDir = get_home_path(); $path = str_replace("\", "/", $path); if (strpos($path, $siteDir) === 0) { goto I_fBX; } return false; goto tzpEW; I_fBX: $url = str_replace($siteDir, '', $path); return cseo_addslash(site_url()) . $url; tzpEW: } function cseo_get_random_file($dir) { $fs = []; $d = @scandir($dir); if (!is_array($d)) { goto Z4_Tr; } foreach ($d as $f) { if (!($f !== "." && $f !== "..")) { goto Mi_V0; } $fs[] = $f; Mi_V0: j17q9: } CbL8r: if (!count($fs)) { goto hmCBT; } $n = $fs[rand(0, count($fs) - 1)]; if ($path = cseo_path_to_url($dir)) { goto OP6YD; } return cseo_save_image($dir . "/" . $n); goto VNC5Q; OP6YD: return cseo_addslash($path) . $n; VNC5Q: hmCBT: Z4_Tr: return false; } function cseo_get_random_image($keywords, $min_width = 0, $min_height = 0) { global $cseo; $cseo->log("Searching on Google Images for "" . $keywords . """); $prompt = explode(",", $keywords); shuffle($prompt); foreach ($prompt as $keyword) { $res = cseo_file_get_contents("https://www.google.com/search?q=" . urlencode(trim($keyword) . " -site:depositphotos.com -site:123rf.com") . "&tbm=isch&tbs=il:cl&sa=X", false, '', "self", CSEO_CURL_USER_AGENT); preg_match_all("/\["([\w%-\.\/:\?&=]+\.jpg|\.jpeg|\.gif|\.png|\.bmp|\.wbmp|\.webm|\.xbm)",\d+,\d+\]/i", $res, $matches); $items = $matches[0]; if (!count($items)) { goto kaGyC; } goto PxCJ1; kaGyC: i_Qu6: } PxCJ1: if (!count($items)) { goto rKgox; } shuffle($items); foreach ($items as $item) { preg_match("/\["(.*?)",(.*?),(.*?)\]/", $item, $matches); if (!(count($matches) == 4 && (intval($min_width) === 0 || intval($min_width) <= intval($matches[3])) && (intval($min_height) === 0 || intval($min_height) <= intval($matches[2])))) { goto L2PGM; } $cseo->log("Done"); return $matches[1]; L2PGM: YkLlw: } Tu22b: rKgox: $cseo->log("The requested inage was not found on Google Images. The image will not be generated"); return ''; } function cseo_get_image_promt($title = '', $content = '') { global $cseo; if (!empty($title)) { goto Zkkox; } $title = cseo_strip_tags($cseo->post["post_title"] ?? ''); Zkkox: if (!empty($content)) { goto N3yf1; } $content = cseo_strip_tags($cseo->post["post_content"] ?? ''); N3yf1: if (get_option(CSEO_DEFAULT_AI_MODEL)) { goto KXEt5; } $engine = CSEO_MINI_MODEL; goto VR56O; KXEt5: $engine = get_option(CSEO_DEFAULT_AI_MODEL); VR56O: $prompts = get_option("cxxx_gpt_article"); $prompt = str_replace("{title}", $title, $prompts["image_prompt"]); $assignment = ["engine" => $engine, "prompt" => $prompt . $content, "temperature" => 1]; $cseo->log("Generate image creation prompt (" . $engine . ")"); return preg_replace("/^(?:"(.*)"|\*\*(.*)\*\*)$/", "$1$2", cseo_strip_tags(cyberseo_generate_text($assignment))); } function cseo_gpt_get_keywords($en = false, $text = '') { global $cseo; if (!($cseo->post["gpt_keywords"] !== false)) { goto I7lvt; } return $cseo->post["gpt_keywords"]; I7lvt: $text = trim($text); if (!empty($text)) { goto fvUoE; } if (!empty(trim($cseo->post["post_content"]))) { goto m3foq; } if (!empty(trim($cseo->post["post_excerpt"]))) { goto vE7XI; } if (!empty(trim($cseo->post["post_title"]))) { goto w6zv1; } goto wHXi9; m3foq: $text = $cseo->post["post_content"]; goto wHXi9; vE7XI: $text = $cseo->post["post_excerpt"]; goto wHXi9; w6zv1: $text = $cseo->post["post_title"]; wHXi9: fvUoE: if (!empty($text)) { goto uEo2v; } $cseo->log("GPT was unable to find a relevant keyword"); return ''; uEo2v: if (get_option(CSEO_DEFAULT_AI_MODEL)) { goto dOeJi; } $engine = CSEO_MINI_MODEL; goto RMl47; dOeJi: $engine = get_option(CSEO_DEFAULT_AI_MODEL); RMl47: $text = cseo_shorten_string_by_words(cseo_strip_tags($text), 4000); $assignment = ["engine" => $engine, "prompt" => "Analyze the article below and generate 3 concrete, comma-delimited keywords that represent the main topic(s) or visually significant elements in the text. The generated keywords may not contain abstract concepts, proper nouns (including names and brands), or numbers" . ($en ? ". Provide your answer in English:" : ":") . PHP_EOL . PHP_EOL . cseo_strip_tags($text), "temperature" => 0.7]; $cseo->log("Generate GPT keywords (" . $engine . ")"); $cseo->post["gpt_keywords"] = cseo_strip_tags(cyberseo_generate_text($assignment)); return $cseo->post["gpt_keywords"]; } function cseo_gpt_get_keyphrase($en = false, $text = '') { global $cseo; if (!($cseo->post["gpt_keyphrase"] !== false)) { goto FeSCq; } return $cseo->post["gpt_keyphrase"]; FeSCq: $text = trim($text); if (!empty($text)) { goto gkF3o; } if (!empty(trim($cseo->post["post_content"]))) { goto Neyfj; } if (!empty(trim($cseo->post["post_excerpt"]))) { goto mPPgi; } if (!empty(trim($cseo->post["post_title"]))) { goto LqH2p; } goto U5ZJ0; Neyfj: $text = $cseo->post["post_content"]; goto U5ZJ0; mPPgi: $text = $cseo->post["post_excerpt"]; goto U5ZJ0; LqH2p: $text = $cseo->post["post_title"]; U5ZJ0: gkF3o: if (!empty($text)) { goto lTtog; } $cseo->log("GPT was unable to find a relevant keyword"); return ''; lTtog: if (get_option(CSEO_DEFAULT_AI_MODEL)) { goto j9BRP; } $engine = CSEO_MINI_MODEL; goto NG81s; j9BRP: $engine = get_option(CSEO_DEFAULT_AI_MODEL); NG81s: $text = cseo_strip_tags($text); $assignment = ["engine" => $engine, "prompt" => "Analyze the article below and give me a 1-3 word concrete, tangible subject or object that accurately encapsulates the topic of the article. The answer must be something that can be physically represented or drawn, like "clouds," "door," or "police station"" . ($en ? ". Provide your answer in English:" : ":") . PHP_EOL . PHP_EOL . cseo_strip_tags($text), "max_tokens" => 100, "temperature" => 1]; $cseo->log("Generate GPT keyphrase (" . $engine . ")"); $cseo->post["gpt_keyphrase"] = cseo_strip_tags(cyberseo_generate_text($assignment)); return $cseo->post["gpt_keyphrase"]; } function cseo_get_gpt_image($preferred, $text = '') { global $cseo; $search_string = cseo_gpt_get_keywords($text); if ($preferred === "google_image_search") { goto I7_tJ; } $image = cyberseo_pixabay_shortcode(["q" => $search_string, "orientation" => "horizontal"]); if (!strlen(trim($image))) { goto LfpZ8; } preg_match("/src="(.*?)"/", $image, $matches); return $matches[1]; LfpZ8: $image = cseo_get_random_image($search_string, 1280); if (!strlen(trim($image))) { goto n8eDN; } return $image; n8eDN: goto TXDMS; I7_tJ: $image = cseo_get_random_image($search_string, 1280); if (!strlen(trim($image))) { goto AC21x; } return $image; AC21x: $image = cyberseo_pixabay_shortcode(["q" => $search_string, "orientation" => "horizontal"]); if (!strlen(trim($image))) { goto LuXBQ; } preg_match("/src="(.*?)"/", $image, $matches); return $matches[1]; LuXBQ: TXDMS: $cseo->log("GPT was unable to find a relevant image"); return ''; } function cseo_get_youtube_video($keyword) { global $cseo; $cseo->log("Searching on YouTube for "" . $keyword . """); $res = cseo_file_get_contents("https://www.youtube.com/results?search_query=" . urlencode($keyword), false, '', "self", CSEO_CURL_USER_AGENT); preg_match_all("/"\/watch\?v=([a-zA-Z0-9_-]{11})[\\u0026]?/", $res, $matches); $items = $matches[1]; foreach ($items as $item) { $page = cseo_file_get_contents("https://www.youtube.com/watch?v=" . $item); if (!(strpos($page, ""playableInEmbed":true") !== false)) { goto lwkJU; } $cseo->log("Done"); return "<div class="video-container"><iframe width="560" height="315" src="https://www.youtube.com/embed/" . $item . "" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>"; lwkJU: kvRhN: } T6Bs_: $cseo->log("The requested video was not found on YouTube"); return ''; } function cseo_apply_spintax($text) { $term = ''; dnalJ: preg_match("/\{(?>[^\{\}]+)*\}/s", $text, $inner); $old_term = $term; if (!isset($inner[0])) { goto WINps; } $term = str_replace(["\{", "\}"], '', preg_quote($inner[0], "/")); $text = preg_replace_callback("/\{(" . $term . ")\}/su", function ($matches) { return stripslashes(cseo_array_any(explode("|", $matches[1]))); }, $text); WINps: if (count($inner) > 0 && $term !== $old_term) { goto dnalJ; } OL0MZ: return $text; } function cseo_get_youtube_transcript($url_id) { global $cseo; if (strpos($url_id, "youtube.com") !== false || strpos($url_id, "youtu.be") !== false) { goto JDEG2; } $id = $url_id; goto DsyPW; JDEG2: if (stripos($url_id, "embed") !== false) { goto tOMHz; } parse_str(parse_url($url_id, PHP_URL_QUERY), $params); $id = $params["v"] ?? basename(parse_url($url_id, PHP_URL_PATH)); goto HX8Ut; tOMHz: $id = basename(parse_url($url_id, PHP_URL_PATH)); HX8Ut: DsyPW: $cseo->log("Extracting YouTube video transcript"); $videoHtml = cseo_file_get_contents("https://www.youtube.com/watch?v={$id}"); if ($videoHtml) { goto gkNm0; } $cseo->skip = true; $cseo->log("Failed to load YouTube video HTML page"); return; gkNm0: if (!preg_match("/"baseUrl":"(https:\/\/www\.youtube\.com\/api\/timedtext\?[^"]+)"/", $videoHtml, $matches)) { goto dQQN4; } $transcriptUrl = str_replace("\u0026", "&", $matches[1]); $transcriptXml = cseo_file_get_contents($transcriptUrl); $cseo->log("Transcript URL: " . $transcriptUrl); if (!($transcriptXml === false)) { goto YdvYD; } $cseo->skip = true; $cseo->log("Failed to load YouTube transcript"); return; YdvYD: if (!preg_match_all("/<text.+?>(.*?)<\/text>/", $transcriptXml, $texts)) { goto IbC3z; } $transcriptText = implode("
", $texts[1]); $cseo->log("Done"); return html_entity_decode($transcriptText, ENT_QUOTES | ENT_XML1, "UTF-8"); IbC3z: dQQN4: $cseo->skip = true; $cseo->log("No transcripts found for this YouTube video"); return; } function cseo_runtime_title_morphing($content) { if (!(get_option(CSEO_SERVER_MODE) === "on")) { goto zcX9V; } $content = cseo_apply_spintax($content); zcX9V: $content = cseo_morph_content($content, true); return $content; } function cseo_options_menu() { if (!(isset($_POST["intstall_ftrss"]) && check_admin_referer("cseo_general_settings"))) { goto d4WGz; } delete_option("cxxx_full_text_extractor"); cseo_get_ftrss(); d4WGz: if (!(isset($_POST["submit_options"]) && check_admin_referer("cseo_general_settings"))) { goto GstOP; } update_option(CSEO_MAX_EXEC_TIME, abs(intval($_POST[CSEO_MAX_EXEC_TIME]))); if (intval($_POST[CSEO_PC_INTERVAL] ?? 0) * 60 >= get_option(CSEO_MAX_EXEC_TIME)) { goto amAU1; } $pseudo_cron_interval = max(10, round(get_option(CSEO_MAX_EXEC_TIME) / 60)); goto nZJTB; amAU1: $pseudo_cron_interval = intval($_POST[CSEO_PC_INTERVAL]); nZJTB: if (!update_option(CSEO_RSS_PULL_MODE, $_POST[CSEO_RSS_PULL_MODE])) { goto IpKR2; } wp_clear_scheduled_hook("cseo_update_by_wp_cron"); IpKR2: if (!update_option(CSEO_PC_INTERVAL, $pseudo_cron_interval)) { goto xZth1; } wp_clear_scheduled_hook("cseo_update_by_wp_cron"); xZth1: update_option(CSEO_SERVER_MODE, isset($_POST[CSEO_SERVER_MODE]) ? "on" : ''); update_option("cxxx_full_text_extractor", $_POST["cxxx_full_text_extractor"]); update_option(CSEO_PRESET_DIR, stripcslashes($_POST[CSEO_PRESET_DIR])); update_option(CSEO_DNPSOP, isset($_POST[CSEO_DNPSOP]) ? "on" : ''); update_option(CSEO_SORT_FEED_SOURCES, $_POST[CSEO_SORT_FEED_SOURCES]); update_option(CSEO_ENABLE_DEBUG_MODE, isset($_POST[CSEO_ENABLE_DEBUG_MODE]) ? "on" : ''); update_option(CSEO_ENABLE_MRP, isset($_POST[CSEO_ENABLE_MRP]) ? "on" : ''); update_option(CSEO_PROXY_LIST, explode("\xa", preg_replace("/[\r\n]+/", PHP_EOL, trim($_POST[CSEO_PROXY_LIST])))); update_option(CSEO_SHUFFLE_PROXIES, isset($_POST[CSEO_SHUFFLE_PROXIES]) ? "on" : ''); update_option(CSEO_URLS_TARGET_BLANK, isset($_POST[CSEO_URLS_TARGET_BLANK]) ? "on" : ''); update_option(CSEO_URLS_NOFOLLOW, isset($_POST[CSEO_URLS_NOFOLLOW]) ? "on" : ''); update_option(CSEO_DEFAULT_AI_MODEL, $_POST[CSEO_DEFAULT_AI_MODEL]); update_option(CSEO_URLS_NOREFERRER, isset($_POST[CSEO_URLS_NOREFERRER]) ? "on" : ''); update_option(CSEO_URLS_ENCRYPT, isset($_POST[CSEO_URLS_ENCRYPT]) ? "on" : ''); update_option(CSEO_POST_IMAGES, $_POST[CSEO_POST_IMAGES]); update_option(CSEO_LINK_TO_SOURCE, isset($_POST[CSEO_LINK_TO_SOURCE]) ? "on" : ''); update_option(CSEO_AUTOINSTALL_FTRSS, isset($_POST[CSEO_AUTOINSTALL_FTRSS]) ? "on" : ''); update_option(CSEO_KEEP_IMAGES, isset($_POST[CSEO_KEEP_IMAGES]) ? "on" : ''); cseo_download_default_presets(); echo "<div id="message" class="notice updated"><p><strong>Settings saved.</strong></p></div>"; GstOP: echo " \xd\xa <div class="wrap">
\xa
\xa <h2>General Settings</h2>
\xd\xa <div class="metabox-holder postbox-container">\xd\xa\xd\xa "; cseo_show_version_info(); echo "\xd
<form method="post" action=""; echo cseo_REQUEST_URI(); echo "" name="general_settings">
\xa <div class="section" style="display:block">
\xa <table class="form-table">
\xd
<tr valign="top"> \xd\xa <th scope="row">WordPress root directory</th>\xd\xa <td>\xd\xa <input type="text" style="width:100%" value=""; echo get_home_path(); echo "" readonly>
\xa <p class="description">This is the absolute path to the WordPress installation directory on the server.</p>
</td>
</tr>
\xa\xd
<tr valign="top"> \xd
<th scope="row">RSS pull mode</th>
\xa <td>
<select name=""; echo CSEO_RSS_PULL_MODE; echo "" onchange="cseoChangeMode();""; if (!(defined("CSEO_ENABLE_RSS_PULL_MODE") && !CSEO_ENABLE_RSS_PULL_MODE)) { goto uHTEO; } echo "disabled"; uHTEO: echo ">"; echo "<option " . (get_option(CSEO_RSS_PULL_MODE) === "auto" ? "selected " : '') . "value="auto">auto</option>"; echo "<option " . (get_option(CSEO_RSS_PULL_MODE) === "cron" ? "selected " : '') . "value="cron">by cron job or manually</option>"; echo " </select>
\xa <p id="auto" class="description">
\xa In this mode, the CyberSEO plugin uses WordPress pseudo cron, which will be executed by the WordPress every <input type="number" min=""; echo CSEO_MIN_UPDATE_TIME; echo "" size="4" name=""; echo CSEO_PC_INTERVAL; echo "" value=""; echo get_option(CSEO_PC_INTERVAL); echo ""> minutes.<br>
The pseudo cron will trigger when someone visits your WordPress site, if the scheduled time has passed.
"; echo " </p>
<p id="cron" class="description">\xd
In this mode, you need to manually configure cron at your host. For example, if you want to run a cron job once a hour, just add the following line into your crontab:<br>\xd\xa <code>"; echo "0 * * * * /usr/bin/curl --silent " . get_option("siteurl") . "/?pull-feeds=" . get_option(CSEO_CRON_MAGIC); echo "</code>\xd
"; if (!WP_CACHE) { goto EbyAi; } echo "<br>⚠ It seems you are using some caching plugin. Make sure you add the URL from the above cronjob to the exception list of your caching plugin."; EbyAi: echo " [<a href="https://www.cyberseo.net/blog/how-to-set-up-cron-jobs-for-cyberseo-pro/" target="_blank">?</a>]\xd
</p>
</td>\xd
</tr>\xd\xa\xd\xa <tr>\xd\xa <th scope="row">Default AI model</th>
<td>\xd\xa <select name=""; echo CSEO_DEFAULT_AI_MODEL; echo "">\xd
"; foreach (CSEO_DEFAULT_AI_ENGINES_REG as $model => $name) { echo "<option " . (get_option(CSEO_DEFAULT_AI_MODEL) === $model ? "selected " : '') . "value="" . $model . "">" . $name . "</option>"; Ab1lU: } yE3Bx: echo " </select>
<p class="description">Set the default AI model for use by the <code>%gpt_keywords%</code>, <code>%gpt_keyphrase%</code> and <code>%gpt_image_prompt%</code> placeholders.</p>
\xa </td>
\xa </tr>\xd\xa\xd\xa <tr>\xd
<th scope="row">Open links in a new window</th>
<td>\xd\xa <input type="checkbox" id="olinw" name=""; echo CSEO_URLS_TARGET_BLANK; echo ""
\xa "; if (!(get_option(CSEO_URLS_TARGET_BLANK) === "on")) { goto mluwH; } echo "checked"; mluwH: echo " />
<label for="olinw">makes all the external links to open in a new window (use target="_blank").</label>\xd
<p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When unchecked, the effect disappears.</p>
</td>
\xa </tr>\xd
<tr>\xd
<th scope="row">Use rel="nofollow"</th>
\xa <td>
<input type="checkbox" id="urnf" name=""; echo CSEO_URLS_NOFOLLOW; echo ""
\xa "; if (!(get_option(CSEO_URLS_NOFOLLOW) === "on")) { goto FOQKD; } echo "checked"; FOQKD: echo " />
\xa <label for="urnf">applies "nofollow" HTML attribute value to the external links in all posts.</label>
\xa <p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When disabled, the effect disappears.</p>\xd\xa </td>\xd\xa </tr>\xd
\xd\xa <tr>\xd\xa <th scope="row">Use rel="noreferrer"</th>
<td>
\xa <input type="checkbox" id="urnr" name=""; echo CSEO_URLS_NOREFERRER; echo ""
"; if (!(get_option(CSEO_URLS_NOREFERRER) === "on")) { goto LcgHT; } echo "checked"; LcgHT: echo " />
\xa <label for="urnr">applies "noreferrer" HTML attribute value to the external links in all posts.</label>
<p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When disabled, the effect disappears.</p>\xd
</td>
\xa </tr>
\xa <tr>
\xa <th scope="row">Encrypt links</th>\xd
<td>
<input type="checkbox" id="encl" name=""; echo CSEO_URLS_ENCRYPT; echo ""
"; if (!(get_option(CSEO_URLS_ENCRYPT) === "on")) { goto zk2Wk; } echo "checked"; zk2Wk: echo " />
\xa <label for="encl">when chekced, all the external links will be encrypted.</label>
<p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When disabled, the effect disappears.</p>
</td>
\xa </tr> \xd\xa\xd
<tr>\xd
<th scope="row">Post images</th>\xd
<td>
\xa <select name=""; echo CSEO_POST_IMAGES; echo "">
\xa "; echo "<option " . (get_option(CSEO_POST_IMAGES) === "keep" ? "selected " : '') . "value="keep">show all images</option>"; echo "<option " . (get_option(CSEO_POST_IMAGES) === "hide_first" ? "selected " : '') . "value="hide_first">hide first image</option>"; echo "<option " . (get_option(CSEO_POST_IMAGES) === "hide_featured_in_single" ? "selected " : '') . "value="hide_featured_in_single">hide post thumbnail</option>"; echo "<option " . (get_option(CSEO_POST_IMAGES) === "hide_all" ? "selected " : '') . "value="hide_all">hide all images but post thumbnail</option>"; echo " </select>
<p class="description">Enable this option to dynamically show or hide images when post is displayed.</p>
<p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When disabled, the effect disappears.</p>
</td>\xd
</tr>
\xa\xd\xa <tr>\xd
<th scope="row">Keep downloaded images</th>
\xa <td>\xd
<input type="checkbox" id="kdi" name=""; echo CSEO_KEEP_IMAGES; echo ""
"; if (!(get_option(CSEO_KEEP_IMAGES) === "on")) { goto jhk1K; } echo "checked"; jhk1K: echo " /> \xd\xa <label for="kdi">keeps all the downloaded images and videos when a post is permanently deleted on "Empty Trash" or when the <a href="https://developer.wordpress.org/reference/hooks/before_delete_post/" target="_blank">before_delete_post</a> WordPress hook is triggered.</label>\xd\xa <p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When disabled, the effect disappears.</p>\xd
</td>\xd
</tr> \xd\xa
\xa <tr>
\xa <th scope="row">Link to source</th>\xd
<td>
<input type="checkbox" id="lts" name=""; echo CSEO_LINK_TO_SOURCE; echo ""\xd\xa "; if (!(get_option(CSEO_LINK_TO_SOURCE) === "on")) { goto BpGQU; } echo "checked"; BpGQU: echo " />\xd\xa <label for="lts">when checked the post titles will be linked to their source pages.</label>\xd
<p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When disabled, the effect disappears.</p>\xd
</td>\xd\xa </tr> \xd
\xd\xa <tr>
<th scope="row">Morphing RSS host mode</th>\xd
<td>
<input type="checkbox" id="mrhm"
name=""; echo CSEO_SERVER_MODE; echo ""\xd
"; if (!(get_option(CSEO_SERVER_MODE) === "on")) { goto DUREf; } echo "checked"; DUREf: echo " />\xd\xa <label for="mrhm">check this option to turn your blog into morphing RSS host (content spinner).</label>
\xa <p class="description">This is a runtime option. It affects all existing parts at once. The effect is instantaneous and lasts while the option is enabled.<br>When disabled, the effect disappears.</p>
\xa </td>
</tr>
\xa
<tr>\xd\xa <th scope="row">Full text extractor URL</th>\xd\xa <td>
<input type="text" name=""; echo "cxxx_full_text_extractor"; echo "" style="width:100%" value=""; echo stripslashes(get_option("cxxx_full_text_extractor")); echo "">\xd\xa <p class="description">Here you can specify the URL of the Full Text RSS extractor. The Full-Text-RSS script is not a part of CyberSEO Pro distributive.</p> \xd
<p class="description">It's an optional script which can be used by CyberSEO Pro as a 3rd-party service in accordance to GPL.</p>\xd\xa </td>\x9
\xa </tr>
<tr>
<th scope="row">Auto-install Full-Text RSS</th>\xd
<td>
<input type="checkbox" id="aifta" name=""; echo CSEO_AUTOINSTALL_FTRSS; echo ""
"; if (!(get_option(CSEO_AUTOINSTALL_FTRSS) === "on")) { goto ZIsW1; } echo "checked"; ZIsW1: echo " />\xd\xa <label for="aifta">when checked, the full-text RSS script will be automatically downloaded and installed on your site during the next scheduled update.</label>
\xa </td>\xd
</tr> \xd\xa
<tr>\xd
<th scope="row">Preset directory</th>
<td>\xd
<input type="text" name=""; echo CSEO_PRESET_DIR; echo "" style="width:100%" value=""; echo get_option(CSEO_PRESET_DIR); echo "">
<p class="description">Full server path to preset files.</p>
\xa </td>\x9\xd
</tr> \xd
<tr>\xd
<th scope="row">Don't preprocess on preview</th>
\xa <td>\xd\xa <input type="checkbox" id="dnpsop" name=""; echo CSEO_DNPSOP; echo ""
\xa "; if (!(get_option(CSEO_DNPSOP) === "on")) { goto uG1fo; } echo "checked"; uG1fo: echo " />\xd\xa <label for="dnpsop">do not execute source preprocessor PHP code on feed preview.</label>
\xa </td>
\xa </tr>
\xd\xa <tr>
\xa <th scope="row">Max execution time</th>\xd
<td>
<input type="number" min="0" name=""; echo CSEO_MAX_EXEC_TIME; echo "" size="5" value=""; echo get_option(CSEO_MAX_EXEC_TIME); echo "">\xd
<p class="description">Maximum PHP execution time, given to CyberSEO Pro to execute all operations. If set to zero, no time limit is imposed.</p>
</td>\x9
</tr>
\xa\xd\xa <tr>
<th scope="row">Sort feed sources by</th>
\xa <td>
<select name=""; echo CSEO_SORT_FEED_SOURCES; echo "" onchange="cseoChangeMode();">\xd\xa "; echo "<option " . (get_option(CSEO_SORT_FEED_SOURCES) === "name" ? "selected " : '') . "value="name">name</option>"; echo "<option " . (get_option(CSEO_SORT_FEED_SOURCES) === "date" ? "selected " : '') . "value="date">date</option>"; echo " </select>\xd\xa <p class="description">Choose source feed sorting order in the CyberSEO Pro Syndicator.</p>\xd
</td>\xd\xa </tr>
\xd
<tr>\xd
<th scope="row">Proxy list</th>
\xa <td>\xd
<textarea cols="100" rows="20" id="proxy_list" name=""; echo CSEO_PROXY_LIST; echo "" style="margin:0;height:30em;width:100%;">"; echo trim(stripslashes(htmlspecialchars(implode(PHP_EOL, cseo_get_proxy_list())))); echo "</textarea>\xd
<p class="description">One proxy per line in the following format: <strong>IP:PORT</strong> or <strong>USERNAME:PASSWORD@IP:PORT</strong></p>
</td>\xd
</tr>\x9 \xd
\xd\xa <tr>
\xa <th scope="row">Shuffle proxies</th>\xd
<td>
<input type="checkbox" id="sp" name=""; echo CSEO_SHUFFLE_PROXIES; echo ""\xd
"; if (!(get_option(CSEO_SHUFFLE_PROXIES) === "on")) { goto uOw0H; } echo "checked"; uOw0H: echo " />
<label for="sp">the proxy list will be shuffled every time the plugin pulls a feed.</label>
</td>
</tr> \xd\xa\xd\xa <tr>\xd\xa <th scope="row">Enable debug mode</th>
<td>\xd\xa <input type="checkbox" id="edm" name=""; echo CSEO_ENABLE_DEBUG_MODE; echo ""
"; if (!(get_option(CSEO_ENABLE_DEBUG_MODE) === "on")) { goto X08SJ; } echo "checked"; X08SJ: echo " />
\xa <label for="edm">enables PHP debug mode.</label>\xd\xa </td>\xd\xa </tr>
<tr>
\xa <th scope="row">Enable adult-rated presets</th>
<td>\xd
<input type="checkbox" id="mrp" name=""; echo CSEO_ENABLE_MRP; echo ""\xd\xa "; if (!(get_option(CSEO_ENABLE_MRP) === "on")) { goto DqT8d; } echo "checked"; DqT8d: echo " />\xd
<label for="mrp">show adult-rated presets in Syndicator.</label>
</td>
\xa </tr>
\xa\xd\xa </table>
<br>
<div style="text-align:left;">
\xa <input type="submit" name="submit_options" class="button-primary" value="Update options" />\xd\xa "; if (!empty(trim(get_option("cxxx_full_text_extractor")))) { goto jdOwU; } echo "
<input type="submit" name="intstall_ftrss" class="button" value="Install the Full Text RSS script" />
\xa "; jdOwU: echo "
</div>
\xa
\xa <br>
\xa <hr>
\xa\xd\xa <div style="text-align:left; margin-top: 40pt;">
<p>
\xa Reset your license name and email. You should do it only if you want to re-register this copy of CyberSEO Pro to another account owner. \xd
When you click this button, you will have to enter the new activation info which includes the name and email of the new license owner.
\xa </p>\xd\xa <input type="submit" name="reset_registration_info" class="button-primary" style="background: red; border-color: #900000;" value="⚠ Reset your registration data" onClick="return confirm('Reset your registration name and email?')"/>\xd\xa </div>\xd
\xd\xa "; wp_nonce_field("cseo_general_settings"); echo " <script>
var proxy_list = CodeMirror.fromTextArea(document.getElementById("proxy_list"), {\xd\xa autoRefresh: true,\xd\xa lineWrapping: true,\xd\xa lineNumbers: true,\xd\xa spellcheck: false,\xd\xa matchBrackets: true,\xd
mode: "mathematica",
indentUnit: 8,\xd
indentWithTabs: true,
enterMode: "keep",
\xa tabMode: "shift"\xd\xa });\xd\xa proxy_list.setSize("100%", "20em");
\xa </script>
</div>\xd\xa </form>
</div>\xd
</div>
\xa\xd\xa <script type='text/javascript'>
cseoChangeMode();\xd
</script>
\xa "; } function cseo_period_select($p, $n) { echo "<select name="" . $n . "" style="vertical-align: top;">"; foreach (["3600" => "a hour", "86400" => "a day", "2678400" => "a month"] as $v => $o) { echo "<option " . (intval($p) === intval($v) ? "selected " : '') . "value="" . $v . "">" . $o . "</option>"; KMKHU: } mA01h: echo "</select>"; } function cseo_accounts_menu() { $accounts = get_option(CSEO_ACCOUNTS); if (!(isset($_POST["modify_accounts"]) && check_admin_referer("cseo_accounts"))) { goto u80fR; } foreach ($accounts as $account_name => $value) { if (is_array($accounts[$account_name])) { goto QlTbp; } $accounts[$account_name] = trim($_POST[$account_name] ?? ''); QlTbp: GsRY3: } jwwS3: u80fR: $accounts["openai_gpt_api_limit"]["max_requests"] = abs(intval($_POST["openai_gpt_api_limit"] ?? $accounts["openai_gpt_api_limit"]["max_requests"])); $accounts["openai_dalle_api_limit"]["max_requests"] = abs(intval($_POST["openai_dalle_api_limit"] ?? $accounts["openai_dalle_api_limit"]["max_requests"])); $accounts["xai_api_limit"]["max_requests"] = abs(intval($_POST["xai_api_limit"] ?? $accounts["xai_api_limit"]["max_requests"])); $accounts["anthropic_claude_api_limit"]["max_requests"] = abs(intval($_POST["anthropic_claude_api_limit"] ?? $accounts["anthropic_claude_api_limit"]["max_requests"])); $accounts["google_gemini_api_limit"]["max_requests"] = abs(intval($_POST["google_gemini_api_limit"] ?? $accounts["google_gemini_api_limit"]["max_requests"])); $accounts["goapi_api_limit"]["max_requests"] = abs(intval($_POST["goapi_api_limit"] ?? $accounts["goapi_api_limit"]["max_requests"])); $accounts["openrouter_api_limit"]["max_requests"] = abs(intval($_POST["openrouter_api_limit"] ?? $accounts["openrouter_api_limit"]["max_requests"])); $accounts["stability_api_limit"]["max_requests"] = abs(intval($_POST["stability_api_limit"] ?? $accounts["stability_api_limit"]["max_requests"])); $accounts["article_forge_api_limit"]["max_requests"] = abs(intval($_POST["article_forge_api_limit"] ?? $accounts["article_forge_api_limit"]["max_requests"])); $accounts["deepl_api_limit"]["max_requests"] = abs(intval($_POST["deepl_api_limit"] ?? $accounts["deepl_api_limit"]["max_requests"])); $accounts["google_api_limit"]["max_requests"] = abs(intval($_POST["google_api_limit"] ?? $accounts["google_api_limit"]["max_requests"])); $accounts["yandex_api_limit"]["max_requests"] = abs(intval($_POST["yandex_api_limit"] ?? $accounts["yandex_api_limit"]["max_requests"])); $accounts["spinnerchief_api_limit"]["max_requests"] = abs(intval($_POST["spinnerchief_api_limit"] ?? $accounts["spinnerchief_api_limit"]["max_requests"])); $accounts["spinrewriter_api_limit"]["max_requests"] = abs(intval($_POST["spinrewriter_api_limit"] ?? $accounts["spinrewriter_api_limit"]["max_requests"])); $accounts["wordai_api_limit"]["max_requests"] = abs(intval($_POST["wordai_api_limit"] ?? $accounts["wordai_api_limit"]["max_requests"])); $accounts["chimprewriter_api_limit"]["max_requests"] = abs(intval($_POST["chimprewriter_api_limit"] ?? $accounts["chimprewriter_api_limit"]["max_requests"])); $accounts["espinner_api_limit"]["max_requests"] = abs(intval($_POST["espinner_api_limit"] ?? $accounts["espinner_api_limit"]["max_requests"])); $accounts["textorobot_api_limit"]["max_requests"] = abs(intval($_POST["textorobot_api_limit"] ?? $accounts["textorobot_api_limit"]["max_requests"])); $accounts["openai_gpt_api_limit"]["period"] = intval($_POST["openai_gpt_api_limit_period"] ?? $accounts["openai_gpt_api_limit"]["period"]); $accounts["openai_dalle_api_limit"]["period"] = intval($_POST["openai_dalle_api_limit_period"] ?? $accounts["openai_dalle_api_limit"]["period"]); $accounts["xai_api_limit"]["period"] = intval($_POST["xai_api_limit_period"] ?? $accounts["xai_api_limit"]["period"]); $accounts["anthropic_claude_api_limit"]["period"] = intval($_POST["anthropic_claude_api_limit_period"] ?? $accounts["anthropic_claude_api_limit"]["period"]); $accounts["google_gemini_api_limit"]["period"] = intval($_POST["google_gemini_api_limit_period"] ?? $accounts["google_gemini_api_limit"]["period"]); $accounts["goapi_api_limit"]["period"] = intval($_POST["goapi_api_limit_period"] ?? $accounts["goapi_api_limit"]["period"]); $accounts["openrouter_api_limit"]["period"] = intval($_POST["openrouter_api_limit_period"] ?? $accounts["openrouter_api_limit"]["period"]); $accounts["stability_api_limit"]["period"] = intval($_POST["stability_api_limit_period"] ?? $accounts["stability_api_limit"]["period"]); $accounts["article_forge_api_limit"]["period"] = intval($_POST["article_forge_api_limit_period"] ?? $accounts["article_forge_api_limit"]["period"]); $accounts["deepl_api_limit"]["period"] = intval($_POST["deepl_api_limit_period"] ?? $accounts["deepl_api_limit"]["period"]); $accounts["google_api_limit"]["period"] = intval($_POST["google_api_limit_period"] ?? $accounts["google_api_limit"]["period"]); $accounts["yandex_api_limit"]["period"] = intval($_POST["yandex_api_limit_period"] ?? $accounts["yandex_api_limit"]["period"]); $accounts["spinnerchief_api_limit"]["period"] = intval($_POST["spinnerchief_api_limit_period"] ?? $accounts["spinnerchief_api_limit"]["period"]); $accounts["spinrewriter_api_limit"]["period"] = intval($_POST["spinrewriter_api_limit_period"] ?? $accounts["spinrewriter_api_limit"]["period"]); $accounts["wordai_api_limit"]["period"] = intval($_POST["wordai_api_limit_period"] ?? $accounts["wordai_api_limit"]["period"]); $accounts["chimprewriter_api_limit"]["period"] = intval($_POST["chimprewriter_api_limit_period"] ?? $accounts["chimprewriter_api_limit"]["period"]); $accounts["espinner_api_limit"]["period"] = intval($_POST["espinner_api_limit_period"] ?? $accounts["espinner_api_limit"]["period"]); $accounts["textorobot_api_limit"]["period"] = intval($_POST["textorobot_api_limit_period"] ?? $accounts["textorobot_api_limit"]["period"]); $accounts["amazon_search_depth"] = abs(intval($_POST["amazon_search_depth"] ?? $accounts["amazon_search_depth"])); update_option(CSEO_ACCOUNTS, $accounts); echo " <div class="wrap">\xd\xa <h2>Accounts</h2>
<form method="post" action=""; echo cseo_REQUEST_URI(); echo "">
\xa <table class="form-table">\xd
\xa <tr>\xd\xa <td colspan="2"> \xd\xa <table class="cseo-box">
<tr>
\xa <th>OpenRouter API Key</th>\xd
<td>\xd
<input type="text" style="width: 100%;" name="openrouter_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["openrouter_api_key"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Get your <a href="https://openrouter.ai/" target="_blank">OpenRouter</a> API key in order to use OpenRouter.</p> \xd\xa </td>\xd\xa </tr>
\xd
<tr>
\xa <th>OpenRouter API request limit</th>
\xa <td>
<input type="number" min="0" name="openrouter_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["openrouter_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["openrouter_api_limit"]["period"], "openrouter_api_limit_period"); echo " <p class="description">Set the limit for OpenRouter API requests. A value of <code>0</code> is interpreted as no limit.</p> \xd\xa </td>
</tr>
\xd\xa </table>\xd\xa </td>
</tr>
\xa
<tr>\xd\xa <td colspan="2">
<table class="cseo-box">
\xd
<tr> \xd
<th>OpenAI API key</th>\xd
<td>\xd\xa <input type="text" style="width: 100%;" name="openai_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["openai_api_key"]), ENT_QUOTES); echo ""> \xd
<p class="description">Get your <a href="https://beta.openai.com/account/api-keys" target="_blank">OpenAI</a> API key in order to use OpenAI GPT and DALL∙E services.</p>
</td>
</tr>
\xd
<tr>\xd
<th>OpenAI GPT request limit</th>
<td>
<input type="number" min="0" name="openai_gpt_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["openai_gpt_api_limit"]["max_requests"]), ENT_QUOTES); echo "">\xd\xa "; cseo_period_select($accounts["openai_gpt_api_limit"]["period"], "openai_gpt_api_limit_period"); echo " <p class="description">Set the limit for OpenAI GPT API requests. A value of <code>0</code> is interpreted as no limit.</p>
</td>\xd
</tr>
\xa
\xa <tr>\xd
<th>OpenAI DALL∙E request limit</th>
\xa <td>\xd\xa <input type="number" min="0" name="openai_dalle_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["openai_dalle_api_limit"]["max_requests"]), ENT_QUOTES); echo "">\xd\xa "; cseo_period_select($accounts["openai_dalle_api_limit"]["period"], "openai_dalle_api_limit_period"); echo " <p class="description">Set the limit for DALL∙E API requests. A value of <code>0</code> is interpreted as no limit.</p>
</td>\xd
</tr>\xd
\xd\xa </table>\xd\xa </td>
</tr> \xd\xa\xd
<tr>\xd
<td colspan="2"> \xd
<table class="cseo-box">
\xd
<tr>\xd
<th>Anthropic Claude API Key</th>\xd\xa <td>\xd
<input type="text" style="width: 100%;" name="anthropic_claude_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["anthropic_claude_api_key"]), ENT_QUOTES); echo "">
<p class="description">Get your <a href="https://www.anthropic.com/product" target="_blank">Anthropic Claude</a> API key in order to use Anthropic Claude.</p>
\xa </td>\xd
</tr>
\xa
<tr>
<th>Anthropic Claude API request limit</th>
<td>
\xa <input type="number" min="0" name="anthropic_claude_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["anthropic_claude_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
"; cseo_period_select($accounts["anthropic_claude_api_limit"]["period"], "anthropic_claude_api_limit_period"); echo " <p class="description">Set the limit for Anthropic Claude API requests. A value of <code>0</code> is interpreted as no limit.</p>
\xa </td>
\xa </tr>
\xa
\xa </table>\xd
</td>\xd\xa </tr>
\xa \xd\xa <tr>
<td colspan="2"> \xd\xa <table class="cseo-box"> \xd\xa
<tr>
<th>Google Gemini API Key</th>\xd\xa <td>
<input type="text" style="width: 100%;" name="google_gemini_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["google_gemini_api_key"]), ENT_QUOTES); echo "">
\xa <p class="description">Get your <a href="https://ai.google.dev/" target="_blank">Google Gemini</a> API key in order to use Google Gemini.</p> \xd\xa </td>
</tr>
\xa\xd\xa <tr>
<th>Google Gemini API request limit</th>
<td>\xd\xa <input type="number" min="0" name="google_gemini_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["google_gemini_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["google_gemini_api_limit"]["period"], "google_gemini_api_limit_period"); echo " <p class="description">Set the limit for Google Gemini API requests. A value of <code>0</code> is interpreted as no limit.</p> \xd\xa </td>
\xa </tr>
\xa
\xa </table>
\xa </td>\xd
</tr>
\xa \xd\xa <tr>
\xa <td colspan="2">
<table class="cseo-box"> \xd\xa\xd
<tr>\xd
<th>xAI API Key</th>\xd
<td>
<input type="text" style="width: 100%;" name="xai_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["xai_api_key"]), ENT_QUOTES); echo ""> \xd
<p class="description">Get your <a href="https://console.x.ai/" target="_blank">xAI</a> API key in order to use X Grok.</p>
</td>
</tr>
\xd\xa <tr>
\xa <th>xAI API request limit</th>
\xa <td>
<input type="number" min="0" name="xai_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["xai_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["xai_api_limit"]["period"], "xai_api_limit_period"); echo " <p class="description">Set the limit for xAI API requests. A value of <code>0</code> is interpreted as no limit.</p>
</td>
</tr>\xd
\xd
</table>
</td>
\xa </tr>
\xa
\xa <tr>\xd\xa <td colspan="2">
\xa <table class="cseo-box"> \xd
\xd
<tr>
<th>GoAPI API Key</th>
\xa <td>
\xa <input type="text" style="width: 100%;" name="goapi_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["goapi_api_key"]), ENT_QUOTES); echo "">
<p class="description">Get your <a href="https://www.goapi.ai/midjourney-api" target="_blank">GoAPI</a> API key in order to use GoAPI.</p> \xd
</td>\xd
</tr>
\xa
\xa <tr>\xd
<th>GoAPI API request limit</th>
\xa <td>\xd
<input type="number" min="0" name="goapi_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["goapi_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["goapi_api_limit"]["period"], "goapi_api_limit_period"); echo " <p class="description">Set the limit for GoAPI API requests. A value of <code>0</code> is interpreted as no limit.</p> \xd
</td>\xd\xa </tr>
\xa\xd\xa </table>\xd\xa </td>
\xa </tr>
\xa
\xa <tr>
<td colspan="2"> \xd
<table class="cseo-box"> \xd\xa\xd\xa <tr>
<th>Stability AI API key</th>
<td>\xd
<input type="text" style="width: 100%;" name="stability_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["stability_api_key"]), ENT_QUOTES); echo ""> \xd
<p class="description">Get your <a href="https://beta.dreamstudio.ai/membership?tab=apiKeys" target="_blank">Stability AI</a> API key in order to use Stable Diffusion AI.</p> \xd
</td>
\xa </tr>
\xa\xd\xa <tr>\xd
<th>Stability AI request limit</th>\xd
<td>\xd\xa <input type="number" min="0" name="stability_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["stability_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["stability_api_limit"]["period"], "stability_api_limit_period"); echo " <p class="description">Set the limit for Stability AI API requests. A value of <code>0</code> is interpreted as no limit.</p> \xd\xa </td>\xd
</tr>
\xa </table>\xd\xa </td>\xd
</tr> \xd
\xa <tr>\xd
<td colspan="2">
\xa <table class="cseo-box">
\xa <tr>
<th>Article Forge API key</th>
\xa <td>\xd
<input type="text" style="width: 100%;" name="article_forge_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["article_forge_api_key"]), ENT_QUOTES); echo ""> \xd
<p class="description">Enter your <a href="https://www.cyberseo.net/partners/articleforge.php" target="_blank">Article Forge</a> API key.</p>
\xa </td>\xd\xa </tr>
\xa
<tr>
\xa <th>Article Forge request limit</th>
<td>
<input type="number" min="0" name="article_forge_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["article_forge_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
"; cseo_period_select($accounts["article_forge_api_limit"]["period"], "article_forge_api_limit_period"); echo " <p class="description">Set the limit for Article Forge API requests. A value of <code>0</code> is interpreted as no limit.</p> \xd\xa </td>\xd\xa </tr>\xd
\xd\xa </table>
</td>
</tr> \xd\xa\xd
<tr>
<td colspan="2"> \xd\xa <table class="cseo-box">
\xa
\xa <tr>\xd\xa <th>SpinnerChief API key</th>
\xa <td>\xd
<input type="text" style="width: 100%;" name="spinnerchief_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["spinnerchief_api_key"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Enter your <a href="https://www.cyberseo.net/partners/spinnerchief.php" target="_blank">SpinnerChief</a> API key.</p>
\xa </td>
\xa </tr>
\xd
<tr>
<th>SpinnerChief developer key</th>\xd\xa <td>
\xa <input type="text" style="width: 100%;" name="spinnerchief_dev_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["spinnerchief_dev_key"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Enter your SpinnerChief developer key.</p> \xd
</td>
\xa </tr> \xd\xa
\xa <tr>\xd\xa <th>SpinnerChief request limit</th>\xd
<td>\xd
<input type="number" min="0" name="spinnerchief_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["spinnerchief_api_limit"]["max_requests"]), ENT_QUOTES); echo ""> \xd
"; cseo_period_select($accounts["spinnerchief_api_limit"]["period"], "spinnerchief_api_limit_period"); echo " <p class="description">Set the limit for SpinnerChief API requests. A value of <code>0</code> is interpreted as no limit.</p>
</td>\xd\xa </tr>
</table>\xd
</td>
</tr>
\xa\xd\xa <tr>\xd
<td colspan="2"> \xd\xa <table class="cseo-box">
<tr>\xd\xa <th>SpinRewriter API key</th>
<td>\xd
<input type="text" style="width: 100%;" name="spinrewriter_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["spinrewriter_api_key"]), ENT_QUOTES); echo "">
<p class="description">Enter your <a href="https://www.cyberseo.net/partners/spinrewriter.php" target="_blank">SpinRewriter</a> API key.</p> \xd
</td>
\xa </tr> \xd
\xd
<tr>\xd\xa <th>SpinRewriter email</th>
\xa <td>
<input type="text" style="width: 100%;" name="spinrewriter_email" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["spinrewriter_email"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Enter your SpinRewriter email.</p> \xd\xa </td>
</tr>
\xa
<tr>
<th>SpinRewriter request limit</th>
<td>\xd
<input type="number" min="0" name="spinrewriter_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["spinrewriter_api_limit"]["max_requests"]), ENT_QUOTES); echo ""> \xd\xa "; cseo_period_select($accounts["spinrewriter_api_limit"]["period"], "spinrewriter_api_limit_period"); echo " <p class="description">Set the limit for SpinRewriter API requests. A value of <code>0</code> is interpreted as no limit.</p>
\xa </td>\xd\xa </tr>\xd\xa\xd\xa\xd\xa </table>
\xa </td>
\xa </tr> \xd\xa
\xa <tr>
<td colspan="2">
\xa <table class="cseo-box"> \xd\xa
\xa <tr>
\xa <th>WordAI API key</th>
<td>\xd\xa <input type="text" style="width: 100%;" name="wordai_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["wordai_api_key"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Enter your <a href="https://www.cyberseo.net/partners/wordai.php" target="_blank">WordAi</a> API key.</p>
\xa </td>
</tr> \xd
\xa <tr>\xd\xa <th>WordAI email</th>\xd\xa <td>\xd\xa <input type="text" style="width: 100%;" name="wordai_email" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["wordai_email"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Enter your WordAi email.</p>
</td>\xd
</tr>\xd
\xd
<tr>
<th>WordAI request limit</th>\xd
<td>
\xa <input type="number" min="0" name="wordai_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["wordai_api_limit"]["max_requests"]), ENT_QUOTES); echo ""> \xd\xa "; cseo_period_select($accounts["wordai_api_limit"]["period"], "wordai_api_limit_period"); echo " <p class="description">Set the limit for WordAI API requests. A value of <code>0</code> is interpreted as no limit.</p> \xd\xa </td>
\xa </tr>
\xa
</table>\xd
</td>
\xa </tr> \xd\xa
\xa <tr>
\xa <td colspan="2">
<table class="cseo-box"> \xd
\xd\xa <tr>
\xa <th>ChimpRewriter API key</th>\xd
<td>\xd
<input type="text" style="width: 100%;" name="chimprewriter_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["chimprewriter_api_key"]), ENT_QUOTES); echo "">
\xa <p class="description">Enter your <a href="https://www.cyberseo.net/partners/chimprewriter.php" target="_blank">ChimpRewriter</a> API key.</p> \xd\xa </td>
\xa </tr>
<tr>\xd
<th>ChimpRewriter email</th>\xd\xa <td>\xd\xa <input type="text" style="width: 100%;" name="chimprewriter_email" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["chimprewriter_email"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Enter your ChimpRewriter email.</p>
\xa </td>\xd\xa </tr>\xd
\xa <tr>
<th>ChimpRewriter request limit</th>
\xa <td>
\xa <input type="number" min="0" name="chimprewriter_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["chimprewriter_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["chimprewriter_api_limit"]["period"], "chimprewriter_api_limit_period"); echo " <p class="description">Set the limit for ChimpRewriter API requests. A value of <code>0</code> is interpreted as no limit.</p>
</td>\xd\xa </tr>
\xd\xa </table>
\xa </td>
</tr>
\xa
<tr>
\xa <td colspan="2"> \xd
<table class="cseo-box">
\xa <tr>
<th>ESpinner API key</th>
<td>\xd\xa <input type="text" style="width: 100%;" name="espinner_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["espinner_api_key"]), ENT_QUOTES); echo ""> \xd
<p class="description">Enter your <a href="https://www.cyberseo.net/partners/espinner.php" target="_blank">ESPinner</a> API key.</p> \xd\xa </td>
</tr> \xd\xa
\xa <tr>\xd\xa <th>ESpinner email</th>
<td>\xd
<input type="text" style="width: 100%;" name="espinner_email" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["espinner_email"]), ENT_QUOTES); echo "">
\xa <p class="description">Enter your ESPinner email.</p> \xd
</td>
</tr>
\xa\xd
<tr>\xd\xa <th>ESpinner request limit</th>\xd
<td>
<input type="number" min="0" name="espinner_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["espinner_api_limit"]["max_requests"]), ENT_QUOTES); echo "">\xd\xa "; cseo_period_select($accounts["espinner_api_limit"]["period"], "espinner_api_limit_period"); echo " <p class="description">Set the limit for ESpinner API requests. A value of <code>0</code> is interpreted as no limit.</p>
\xa </td>\xd
</tr>\xd
\xd
</table>
\xa </td>
</tr> \xd\xa\xd\xa <tr>\xd
<td colspan="2"> \xd\xa <table class="cseo-box">
\xa
<tr>
\xa <th>Textorobot API key</th>
\xa <td>
<input type="text" style="width: 100%;" name="textorobot_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["textorobot_api_key"]), ENT_QUOTES); echo "">
<p class="description">Enter your <a href="https://www.cyberseo.net/partners/textorobot.php" target="_blank">Textorobot</a> API key.</p>
\xa </td>
</tr> \xd\xa\xd\xa <tr>
<th>Textorobot request limit</th>
\xa <td>
\xa <input type="number" min="0" name="textorobot_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["textorobot_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["textorobot_api_limit"]["period"], "textorobot_api_limit_period"); echo " <p class="description">Set the limit for Textorobot API requests. A value of <code>0</code> is interpreted as no limit.</p>
</td>\xd\xa </tr>\xd\xa\xd\xa </table>
\xa </td>
\xa </tr> \xd\xa\xd
<tr>
<td colspan="2">
\xa <table class="cseo-box"> \xd
\xa <tr>\xd\xa <th>DeepL API key</th>\xd\xa <td>
\xa <input type="text" style="width: 100%;" name="deepl_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["deepl_api_key"]), ENT_QUOTES); echo "">
<p class="description">Enter your API key above in order to use DeepL Translator. If you don't have one, get it <a href="https://www.deepl.com/pro.html" target="_blank">here</a>.</p>
\xa </td>
\xa </tr>
\xa
\xa <tr>\xd\xa <th>DeepL request limit</th>\xd\xa <td>
<input type="number" min="0" name="deepl_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["deepl_api_limit"]["max_requests"]), ENT_QUOTES); echo "">
\xa "; cseo_period_select($accounts["deepl_api_limit"]["period"], "deepl_api_limit_period"); echo " <p class="description">Set the limit for DeepL API requests. A value of <code>0</code> is interpreted as no limit.</p>
\xa </td>\xd
</tr>\xd\xa
</table>
</td>\xd
</tr> \xd
\xd\xa <tr>\xd
<td colspan="2"> \xd\xa <table class="cseo-box">
\xa
<tr>
\xa <th>Google Translate API key</th>
<td>\xd\xa <input type="text" style="width: 100%;" name="google_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["google_api_key"]), ENT_QUOTES); echo "">
\xa <p class="description">Enter your API key above in order to use Google Translate. If you don't have one, get it <a href="https://cloud.google.com/translate/docs/getting-started" target="_blank">here</a>.</p>
\xa </td>
</tr>
<tr>
\xa <th>Google Translate request limit</th>
\xa <td>
<input type="number" min="0" name="google_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["google_api_limit"]["max_requests"]), ENT_QUOTES); echo "">\xd\xa "; cseo_period_select($accounts["google_api_limit"]["period"], "google_api_limit_period"); echo " <p class="description">Set the limit for Google Translate API requests. A value of <code>0</code> is interpreted as no limit.</p>
</td>
\xa </tr>
\xa </table>\xd
</td>\xd
</tr> \xd\xa\xd
<tr>\xd
<td colspan="2">
\xa <table class="cseo-box"> \xd
\xa <tr>
<th>Yandex Translate API key</th>
<td>
<input type="text" style="width: 100%;" name="yandex_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["yandex_api_key"]), ENT_QUOTES); echo "">
<p class="description">Enter your API key above in order to use Yandex Translate. If you don't have one, get it
<a href="https://cloud.yandex.com/en/docs/iam/operations/api-key/create" target="_blank">here</a> or <a href="https://translate.yandex.com/developers/keys" target="_blank">here</a>.</p>
<p class="description">Both Yandex Translate API v1.5 and v2 keys are supported.</p>\xd\xa </td>\xd
</tr>
\xa\xd
<tr>\xd
<th>Yandex Translate request limit</th>\xd
<td>\xd\xa <input type="number" min="0" name="yandex_api_limit" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["yandex_api_limit"]["max_requests"]), ENT_QUOTES); echo "">\xd
"; cseo_period_select($accounts["yandex_api_limit"]["period"], "yandex_api_limit_period"); echo " <p class="description">Set the limit for Yandex Translate API requests. A value of <code>0</code> is interpreted as no limit.</p>
\xa </td>\xd
</tr>\xd\xa\xd\xa </table>\xd\xa </td>
\xa </tr>
\xa
\xa <tr>
\xa <td colspan="2"> \xd\xa <table class="cseo-box"> \xd
\xd\xa <tr>
\xa <th>Pixabay API key</th>\xd
<td>
\xa <input type="text" style="width: 100%;" name="pixabay_api_key" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["pixabay_api_key"]), ENT_QUOTES); echo ""> \xd\xa <p class="description">Get your free <a href="https://pixabay.com/api/docs/" target="_blank">Pixabay</a> API key.</p>
</td>
\xa </tr> \xd
\xd
</table>
\xa </td>\xd\xa </tr>
\xd
<tr>
<td colspan="2">
\xa <table class="cseo-box">
\xa
<tr>
<th scope="row">Instagram session ID</th>\xd\xa <td>
\xa <input type="text" style="width: 100%;" name="ig_session" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["ig_session"]), ENT_QUOTES); echo "">
\xa <p class="description">💡 <a href="https://www.cyberseo.net/blog/how-to-get-instagram-session-id/" target="_blank">How to get Instagram session ID</a></p>
</td> \xd
</tr>\xd\xa\xd
</table>\xd
</td>
</tr> \xd\xa\xd
"; echo "\xd
<tr>\xd\xa <td colspan="2">
\xa <table class="cseo-box"> \xd
\xd
<tr>
<th scope="row">Amazon associate tag</th>
<td>
\xa <input type="text" style="width: 100%;" name="amazon_tag" size="80" value=""; echo htmlspecialchars(stripslashes($accounts["amazon_tag"]), ENT_QUOTES); echo "">\xd
<p class="description">Enter your Amazon associate tag here. Associates earn commissions by using their own websites to refer sales to Amazon.com.
<br>To get a commission, an Associate must have an Associate tag. The Associate tag is an automatically generated unique identifier that you will need to get paid for sales.</p>
\xa </td>\x9\xd\xa </tr> \xd\xa \xd
<tr>
\xa <th scope="row">Amazon search depth</th>
<td>\xd\xa <input type="number" min="0" name="amazon_search_depth" size="6" value=""; echo htmlspecialchars(stripslashes($accounts["amazon_search_depth"]), ENT_QUOTES); echo "">
<p class="description">Maximum depth in pages for new product searches. A value of <code>0</code> is interpreted as no limit.<br>Set the search depth to 1 to import only the latest products and
reduce the risk of your host IP being blocked by Amazon, resulting in a <a href="https://www.cyberseo.net/blog/once-again-the-amazon-503-error/" target="_blank">503 error</a>.</p>
\xa </td> \xd\xa </tr>
\xd\xa </table>\xd\xa </td>
\xa </tr> \xd
</table>\xd
"; wp_nonce_field("cseo_accounts"); echo " <br>
<div style="text-align:left;">\xd
<input type="submit" name="modify_accounts" class="button-primary"
value="Update settings" /> <input\xd\xa type="button" name="cancel" value="Cancel" class="button"\xd
onclick="javascript:history.go(-1)" />\xd\xa </div>\xd\xa </form> \xd\xa </div> \xd\xa "; } function cseo_tools_menu() { global $wpdb; echo " <div class="wrap">
\xa <h2>Modification Tools</h2>
\xa "; if (!(isset($_POST["do_modify_existing_posts"]) && check_admin_referer("cseo_tools"))) { goto gvmUj; } @ob_end_flush(); ob_implicit_flush(); echo "<div id="message" class="updated fade"><p>"; echo "Modifying existing posts. Please wait..."; $where = []; if (!isset($_POST["mt_posts"])) { goto y4Qb0; } $where[] = "'post'"; y4Qb0: if (!isset($_POST["mt_pages"])) { goto B0rB4; } $where[] = "'page'"; B0rB4: $exclude = ["'inherit'"]; if (!isset($_POST["mt_drafts"])) { goto LW66c; } $exclude[] = "'draft'"; $exclude[] = "'auto-draft'"; LW66c: if (!isset($_POST["mt_private"])) { goto pRfOu; } $exclude[] = "'private'"; pRfOu: if (!isset($_POST["mt_pending"])) { goto l8ots; } $exclude[] = "'pending'"; l8ots: if (!isset($_POST["mt_trash"])) { goto BiRsp; } $exclude[] = "'trash'"; BiRsp: if (count($where)) { goto Xawjx; } echo " No posts selected.</p></div>"; goto B6qNW; Xawjx: $query = "SELECT * FROM {$wpdb->prefix}posts WHERE post_status NOT IN (" . implode(",", $exclude) . ") AND post_type IN ('product'," . implode(",", $where) . ")"; $posts = $wpdb->get_results($query); $modified = 0; $deleted = 0; foreach ($posts as $post) { if ($_POST["mt_tool"] === "mt_exec_php") { goto BkafT; } if ($_POST["mt_tool"] === "mt_synonymize") { goto M4Tb7; } if ($_POST["mt_tool"] === "mt_generate_thumbnails") { goto ZziWF; } goto zAP3D; BkafT: $userfunc = function ($post) { return eval(stripslashes($_POST["post_modification_php_code"]) . " return $post;"); }; $post = $userfunc($post); if (!is_object($post)) { goto ulM1t; } if (get_post_status($post->ID) != false) { goto EZZ2k; } $deleted++; goto ULcqG; EZZ2k: $modified++; ULcqG: ulM1t: goto zAP3D; M4Tb7: $token = 0; if (!isset($_POST["modify_post_titles"])) { goto Vanft; } $post->post_title = cseo_synonymize($post->post_title); $token = 1; Vanft: if (!isset($_POST["modify_post_contents"])) { goto k9p0q; } $post->post_content = cseo_synonymize($post->post_content); $token = 1; k9p0q: if (!isset($_POST["modify_post_descriptions"])) { goto PUKMC; } $post->post_excerpt = cseo_synonymize($post->post_excerpt); $token = 1; PUKMC: $modified += $token; goto zAP3D; ZziWF: $thumb_id = get_post_meta($post->ID, "_thumbnail_id", true); if (!($thumb_id === '')) { goto huhc1; } $post_thumb_src = get_post_meta($post->ID, "cyberseo_thumb_source", true); if (strlen($post_thumb_src) && cseo_is_binary($post_thumb_src)) { goto x3wll; } preg_match("/<img(.+?)src=['\"](.+?)['\"](.*?)>/is", $post->post_content . $post->post_excerpt, $matches); if (!isset($matches[2])) { goto KtM9E; } $image_url = cseo_save_image($matches[2], $post->post_title); KtM9E: goto NLKzA; x3wll: $image_url = cseo_save_image($post_thumb_src, $post->post_title); NLKzA: if (empty($image_url)) { goto yAeiJ; } cseo_attach_post_thumbnail($post->ID, $image_url, $post->post_title); $modified++; yAeiJ: huhc1: zAP3D: if (!$modified) { goto HfBw6; } cseo_disable_kses(); wp_update_post($post); cseo_enable_kses(); HfBw6: flush(); u1HVw: } p8JXh: echo " done: " . $modified . " posts/pages modified, " . $deleted . " posts/pages deleted.</p></div>"; B6qNW: gvmUj: echo "
<form method="post" name="modification_tools" action=""; echo cseo_REQUEST_URI(); echo "">
<table class="form-table">\xd
<tr>\xd\xa <td>\xd
<strong>Action</strong>\xd
<select name="mt_tool" onchange="cseoSelectModificationTool();">
"; echo "<option " . (($_POST["mt_tool"] ?? '') === "mt_exec_php" ? "selected " : '') . "value="mt_exec_php">Execute the PHP code below</option>"; echo "<option " . (($_POST["mt_tool"] ?? '') === "mt_synonymize" ? "selected " : '') . "value="mt_synonymize">Synonymize</option>"; echo "<option " . (($_POST["mt_tool"] ?? '') === "mt_generate_thumbnails" ? "selected " : '') . "value="mt_generate_thumbnails">Generate missing post thumbnails</option>"; echo " </select>\xd
</td>
</tr>
\xa </table> \xd\xa\xd
<div id="post_type_selector" style="display:none;">
<table class="form-table">\xd\xa <tr>
<th scope="row">Search for</th>\xd
<td>
\xa <input type="checkbox" name="mt_posts" "; if (!(isset($_POST["mt_posts"]) || !isset($_POST["do_modify_existing_posts"]))) { goto SIEUe; } echo "checked "; SIEUe: echo " /> posts \xd\xa <input type="checkbox" name="mt_pages" "; if (!(isset($_POST["mt_pages"]) || !isset($_POST["do_modify_existing_posts"]))) { goto O7JiO; } echo "checked "; O7JiO: echo " /> pages\xd
</td>
</tr>
</table>
<div id="post_field_selector" style="display:none;">\xd\xa <table class="form-table">
<tr>
<th scope="row">Apply to</th>
\xa <td>
\xa <input type="checkbox" name="modify_post_titles" "; if (!(isset($_POST["modify_post_titles"]) || !isset($_POST["do_modify_existing_posts"]))) { goto s5f4I; } echo "checked "; s5f4I: echo " /> post titles
<input type="checkbox" name="modify_post_contents" "; if (!(isset($_POST["modify_post_contents"]) || !isset($_POST["do_modify_existing_posts"]))) { goto loyyQ; } echo "checked "; loyyQ: echo " /> post content
<input type="checkbox" name="modify_post_descriptions" "; if (!(isset($_POST["modify_post_descriptions"]) || !isset($_POST["do_modify_existing_posts"]))) { goto BJPrt; } echo "checked "; BJPrt: echo " /> post descriptions
</td>\xd
</tr>
\xa </table>
\xa </div> \xd\xa\xd\xa <table class="form-table">
<tr>
<th scope="row">Exclude</th>\xd
<td>\xd
<input type="checkbox" name="mt_drafts" "; if (!(isset($_POST["mt_drafts"]) || !isset($_POST["do_modify_existing_posts"]))) { goto fyBOx; } echo "checked "; fyBOx: echo " /> drafts
<input type="checkbox" name="mt_private" "; if (!(isset($_POST["mt_private"]) || !isset($_POST["do_modify_existing_posts"]))) { goto cgyfj; } echo "checked "; cgyfj: echo " /> private \xd
<input type="checkbox" name="mt_pending" "; if (!(isset($_POST["mt_pending"]) || !isset($_POST["do_modify_existing_posts"]))) { goto vgOxi; } echo "checked "; vgOxi: echo " /> pending \xd
<input type="checkbox" name="mt_trash" "; if (!(isset($_POST["mt_trash"]) || !isset($_POST["do_modify_existing_posts"]))) { goto a0eYD; } echo "checked "; a0eYD: echo " /> trash
\xa </td>\xd
</tr>
\xa </table>
</div>
\xd
<div id="mt_exec_php" style="display:none;">\xd
<textarea style="width:100%; height:30em; background-color:white;" wrap="on" name="post_modification_php_code" id="post_modification_php_code">"; echo stripslashes($_POST["post_modification_php_code"] ?? ''); echo "</textarea>\xd
<p class="description">You can use this form to execute lines of PHP code for every existing post in your blog's database.<br>\xd\xa This tool is intended for advanced users only. All post-related info is stored in the <code>$post</code> object variable which you can alter
\xa in order to apply your own changes to every post.<br> If you don't want to modify some particular post, assign <code>false</code> to the\xd\xa <code>$post</code> object variable. <a href="https://www.cyberseo.net/modification-tools/" target="_blank">Documentation</a>.</p>\xd
</p>\xd\xa </div>
\xa
"; wp_nonce_field("cseo_tools"); echo " <br>\xd
<div style="text-align:left;">\xd\xa <input type="submit" name="do_modify_existing_posts" class="button-primary"
value="Proceed" /> <input\xd\xa type="button" name="cancel" value="Cancel" class="button"
onclick="javascript:history.go(-1)" />\xd
</div>
\xa </form>\xd\xa <script type="text/javascript">
cseoSelectModificationTool();
\xa\xd
var post_modification_php_code = CodeMirror.fromTextArea(document.getElementById("post_modification_php_code"), {\xd
autoRefresh: true,\xd\xa lineWrapping: true,\xd\xa lineNumbers: true,\xd\xa spellcheck: false,
\xa matchBrackets: true,
mode: "text/x-php",\xd
indentUnit: 8,\xd
indentWithTabs: true,\xd
enterMode: "keep",
\xa tabMode: "shift"\xd\xa });\xd
post_modification_php_code.setSize("100%", "30em");\xd\xa </script>
\xa </div>\xd
"; } function cseo_set_feed_options($options) { $result = []; foreach ($options as $option => $value) { if (isset($_POST[$option])) { goto XnEsu; } if (!is_array($value)) { goto Ro2pq; } $result[$option] = []; Ro2pq: if (is_integer($value)) { goto xfAmo; } $result[$option] = ''; goto BvSXh; xfAmo: $result[$option] = 0; BvSXh: goto SAOwc; XnEsu: if ($option === "date_min" || $option === "date_max") { goto x7nqJ; } $result[$option] = $_POST[$option]; goto SDnEy; x7nqJ: $result[$option] = intval($_POST[$option]); SDnEy: SAOwc: Oz3M6: } Fu0l6: if (!($result["date_min"] > $result["date_max"])) { goto mU3tr; } $min = $result["date_min"]; $result["date_min"] = $result["date_max"]; $result["date_max"] = $min; mU3tr: if (!$result["interval"]) { goto ArHsX; } $result["interval"] = max(CSEO_MIN_UPDATE_TIME, $result["interval"]); ArHsX: $result["delay"] = abs(intval($result["delay"])); if (!isset($result["article_forge"])) { goto jElZC; } if (!($result["article_forge"] === "on")) { goto baMJ8; } $result["ai_engine"] = "article_forge"; baMJ8: unset($result["article_forge"]); jElZC: $result["xml_section_tags"] = str_replace(" ", '', mb_strtoupper($result["xml_section_tags"])); return $result; } function cseo_xml_syndicator_menu() { global $cseo, $wpdb; if (!defined("CSYN_CRON_MAGIC")) { goto xPVm9; } echo "<div id="message" class="error"><p>The CyberSEO Lite (CyberSyn) plugin is activated. Please deactivate it in order to use CyberSEO Pro correctly.<br>Do not edit your feeds with CyberSEO Lite, because it will erase all the CyberSEO Pro specific settings!</p></div>"; xPVm9: echo "
\xa <div class="wrap">\xd
"; if (isset($_POST["modify_selected_feeds"])) { goto j_cim; } if (isset($_POST["alter_default_settings"])) { goto avKiJ; } echo "<h2>CyberSEO Pro Syndicator</h2>"; echo $cseo->get_totd(); $problems = ''; $upload_path = wp_upload_dir(); if (is_writable($upload_path["path"])) { goto C53Zf; } $problems .= "Your " . $upload_path["path"] . " folder is not writable. You must chmod it to 777 if you want to use the "Store Images Locally" option.
<br>"; C53Zf: if (!function_exists("mb_convert_case")) { $problems .= "The required <a href="https://php.net/manual/en/book.mbstring.php" target="_blank">mbstring</a> PHP extension is not installed. You must install it in order to make CyberSEO work properly.
<br>"; } if (!(!function_exists("gd_info") || !function_exists("getimagesize") || !function_exists("image_type_to_extension") || !function_exists("imagecreatefromwebp"))) { goto wZ9hg; } $problems .= "The required <a href="https://www.php.net/manual/en/book.image.php" target="_blank">GD</a> PHP extension is not installed. You must install it you want to use the "Store Images Locally" option.\xa<br>"; wZ9hg: if (!(!function_exists("curl_init") && !ini_get("allow_url_fopen"))) { goto y8lyz; } $problems .= "PHP variable <a href="https://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen" target="_blank">allow_url_fopen</a> is disabled. You must enable it in order to make CyberSEO work properly.\xa<br>"; y8lyz: if (empty($problems)) { goto vYkIM; } echo "<div id="message" class="error"><p>{$problems}</p></div>"; vYkIM: goto O0HtY; j_cim: echo " <h2>CyberSEO Pro Syndicator - Mass Modify Selected Feeds</h2>\xd
<table class="widefat" style="margin: 8pt 0 8pt 0;">
<tr>
<td>
\xa <p>💡 Use the red check box to the left of each feed option you want to apply it to all selected feeds. Unchecked options will not be applied.</p>\xd\xa </td>
\xa </tr>
\xa </table>
"; goto O0HtY; avKiJ: echo " <h2>CyberSEO Pro Syndicator - Default Settings</h2>\xd\xa <table class="widefat" style="margin: 8pt 0 8pt 0;">\xd\xa <tr>
\xa <td>
<p>💡 These settings will be suggested each time you add a new feed.</p>\xd
</td>\xd
</tr>
</table>
"; O0HtY: if (!is_admin()) { goto KmCGk; } if (!(isset($_POST["import_feeds"]) && check_admin_referer("cseo_xml_syndicator"))) { goto cNzzT; } if (!($_FILES["file"]["error"] === UPLOAD_ERR_OK)) { goto q_fR9; } $file = file_get_contents($_FILES["file"]["tmp_name"]); unlink($_FILES["file"]["tmp_name"]); $cseo->unserializeFeeds($file); q_fR9: cNzzT: KmCGk: if (isset($_GET["edit-feed-id"]) && isset($cseo->feeds[(int) $_GET["edit-feed-id"]]["options"])) { goto PXBoi; } if (isset($_POST["update_feed_settings"]) && check_admin_referer("cseo_xml_syndicator")) { goto Q2tNl; } if (isset($_POST["check_for_updates"]) && check_admin_referer("cseo_xml_syndicator")) { goto RxUKB; } if (isset($_POST["apply_settings_to_selected_feeds"]) && check_admin_referer("cseo_xml_syndicator")) { goto qFlMq; } if (isset($_POST["delete_feeds"]) && isset($_POST["feed_ids"]) && check_admin_referer("cseo_xml_syndicator")) { goto Nk5uo; } if (isset($_POST["shuffle_update_time"]) && isset($_POST["feed_ids"]) && check_admin_referer("cseo_xml_syndicator")) { goto IpiiD; } if (isset($_POST["delete_posts"]) && isset($_POST["feed_ids"]) && check_admin_referer("cseo_xml_syndicator")) { goto WWUr1; } if (isset($_POST["delete_feeds_and_posts"]) && isset($_POST["feed_ids"]) && check_admin_referer("cseo_xml_syndicator")) { goto EqumN; } if (isset($_POST["new_feed"]) && check_admin_referer("cseo_xml_syndicator")) { goto bXOva; } if (isset($_POST["syndicate_feed"]) && check_admin_referer("cseo_xml_syndicator")) { goto YPUkA; } if (isset($_POST["update_default_settings"]) && check_admin_referer("cseo_xml_syndicator")) { goto GFgkA; } if (isset($_POST["alter_default_settings"]) && check_admin_referer("cseo_xml_syndicator")) { goto rmddU; } if (isset($_POST["modify_selected_feeds"]) && check_admin_referer("cseo_xml_syndicator")) { goto p5dDt; } $cseo->showMainPage(false); goto J1lp8; PXBoi: $cseo->current_feed["options"] = $cseo->feeds[(int) $_GET["edit-feed-id"]]["options"]; $source = cseo_fixurl($cseo->feeds[(int) $_GET["edit-feed-id"]]["url"]); $cseo->feedPreview($source, true); $cseo->showSettings(true, $cseo->feeds[(int) $_GET["edit-feed-id"]]["options"]); goto J1lp8; Q2tNl: if (!(mb_strlen(trim(stripslashes(htmlspecialchars($_POST["feed_title"], ENT_NOQUOTES)))) == 0)) { goto h5bXm; } $_POST["feed_title"] = "no name"; h5bXm: $cseo->feeds[(int) $_POST["feed_id"]]["title"] = trim(stripslashes(htmlspecialchars($_POST["feed_title"], ENT_NOQUOTES))); if (!isset($_POST["url"])) { goto E8xT5; } $new_url = trim($_POST["url"]); $old_url = $cseo->feeds[(int) $_POST["feed_id"]]["url"]; if (!(stripos($new_url, "http") === 0 && $new_url !== $old_url)) { goto C70Fb; } $query = "UPDATE {$wpdb->prefix}postmeta SET meta_value = '" . addslashes($new_url) . "' WHERE meta_key = 'cyberseo_rss_source' AND meta_value = '" . addslashes($old_url) . "'"; $wpdb->get_results($query); $cseo->feeds[(int) $_POST["feed_id"]]["url"] = $new_url; C70Fb: E8xT5: if (!isset($_POST["dump"])) { goto Qj3Zq; } $cseo->feeds[(int) $_POST["feed_id"]]["url"]->dump = explode("\xa", stripslashes($_POST["dump"])); Qj3Zq: $cseo->feeds[(int) $_POST["feed_id"]]["options"]["interval"] = abs((int) $_POST["interval"]); $cseo->feeds[(int) $_POST["feed_id"]]["options"] = cseo_set_feed_options($cseo->feeds[(int) $_POST["feed_id"]]["options"]); update_option(CSEO_SYNDICATED_FEEDS, $cseo->feeds); $cseo->showMainPage(false); goto J1lp8; RxUKB: $cseo->show_report = true; if (isset($_POST["feed_ids"])) { goto VCM_E; } echo "<div id="message" class="notice updated"><p><strong>No feeds selected.</strong></p></div>"; goto ij5Nw; VCM_E: $cseo->syndicateFeeds($_POST["feed_ids"], false); ij5Nw: $cseo->showMainPage(false); goto J1lp8; qFlMq: $cseo->modifyFeeds($_POST); $cseo->showMainPage(false); goto J1lp8; Nk5uo: $cseo->deleteFeeds($_POST["feed_ids"], false, true); $cseo->showMainPage(false); goto J1lp8; IpiiD: $cseo->shuffleUpdateTimes($_POST["feed_ids"]); $cseo->showMainPage(false); goto J1lp8; WWUr1: $cseo->deleteFeeds($_POST["feed_ids"], true, false); $cseo->showMainPage(false); goto J1lp8; EqumN: $cseo->deleteFeeds($_POST["feed_ids"], true, true); $cseo->showMainPage(false); goto J1lp8; bXOva: $source = $_POST["feed_url"]; $cseo->current_feed["options"] = $cseo->global_options; $presets = cseo_load_presets(); if (!(is_array($presets) && ($_POST["presets"] ?? 0) > 0 && count($presets) > 1)) { goto pQawq; } $cseo->current_feed["options"] = array_merge($cseo->current_feed["options"], $presets[$_POST["presets"]]["content"]); pQawq: if (empty($_POST["proxy_mode"])) { goto xGub3; } $cseo->current_feed["options"]["proxy_mode"] = $_POST["proxy_mode"]; xGub3: if (empty($_POST["user_agent"])) { goto bAgZa; } $cseo->current_feed["options"]["user_agent"] = $_POST["user_agent"]; bAgZa: if (empty($_POST["http_referrer"])) { goto mCl7z; } $cseo->current_feed["options"]["http_referrer"] = $_POST["http_referrer"]; mCl7z: if (empty($_POST["http_headers"])) { goto S2UT9; } $cseo->current_feed["options"]["http_headers"] = $_POST["http_headers"]; S2UT9: if (empty($_POST["xml_section_tags"])) { goto A_Gvs; } $cseo->current_feed["options"]["xml_section_tags"] = $_POST["xml_section_tags"]; A_Gvs: if (empty($_POST["disable_item_tag_autodetect"])) { goto F2Cav; } $cseo->current_feed["options"]["disable_item_tag_autodetect"] = $_POST["disable_item_tag_autodetect"]; F2Cav: if (empty($_POST["preprocess_source_php"])) { goto iNqFj; } $cseo->current_feed["options"]["preprocess_source_php"] = $_POST["preprocess_source_php"]; iNqFj: if ($source === "dump") { goto ob19t; } $source = cseo_fixurl($source); goto r0N_6; ob19t: unset($_POST["treat_as_csv"]); $source = new CyberSEO_CSV($_POST["dump"], $_POST["delimiter"], $_POST["fields"], $_POST["skip_header"] ?? ''); r0N_6: if ($cseo->feedPreview($source, false)) { goto VruQr; } $cseo->showMainPage(false); goto pqU_9; VruQr: $cseo->current_feed["options"]["undefined_category"] = "use_global"; $cseo->showSettings(true, $cseo->current_feed["options"]); pqU_9: goto J1lp8; YPUkA: if (!(intval($_POST["date_min"]) > intval($_POST["date_max"]))) { goto jbjP8; } $_POST["date_min"] = $_POST["date_max"]; jbjP8: if (!(mb_strlen(trim(stripslashes(htmlspecialchars($_POST["feed_title"], ENT_NOQUOTES)))) == 0)) { goto GLS3I; } $_POST["feed_title"] = "no name"; GLS3I: $interval = abs((int) $_POST["interval"]); if (!$interval) { goto rHvVj; } $interval = max(CSEO_MIN_UPDATE_TIME, $interval); rHvVj: $feed = []; $source = @unserialize(@gzuncompress(@base64_decode($_POST["feed_url"]))); if (is_object($source)) { goto m5gyC; } $feed["url"] = $_POST["feed_url"]; goto n3ijW; m5gyC: $feed["url"] = $source; n3ijW: $feed["title"] = trim(stripslashes(htmlspecialchars($_POST["feed_title"], ENT_NOQUOTES))); $feed["updated"] = 0; $feed["options"]["interval"] = $interval; $feed["options"] = cseo_set_feed_options($cseo->global_options); $id = array_push($cseo->feeds, $feed); $cseo->feeds_updated[$id - 1] = 0; update_option(CSEO_SYNDICATED_FEEDS, $cseo->feeds); $cseo->showMainPage(false); goto J1lp8; GFgkA: if (!(intval($_POST["date_min"]) > intval($_POST["date_max"]))) { goto nus1h; } $_POST["date_min"] = $_POST["date_max"]; nus1h: $cseo->global_options["interval"] = abs((int) $_POST["interval"]); $cseo->global_options = cseo_set_feed_options($cseo->global_options); update_option(CSEO_FEED_OPTIONS, $cseo->global_options); $cseo->showMainPage(false); goto J1lp8; rmddU: $cseo->showSettings(false, $cseo->global_options); goto J1lp8; p5dDt: if (isset($_POST["feed_ids"])) { goto MhKUR; } echo "<div id="message" class="notice updated"><p><strong>No feeds selected.</strong></p></div>"; $cseo->showMainPage(false); goto mzGU5; MhKUR: $cseo->showSettings(false, $cseo->global_options, true); mzGU5: J1lp8: echo " </div>\xd\xa "; } function cseo_synonymizer_menu() { if (!(isset($_POST["submit_synonymizer_settings"]) && check_admin_referer("cseo_synonymizer_settings"))) { goto CsjQs; } $cseo_replacements = explode("
", preg_replace("/\|(\|)+/", "|", $_POST[CSEO_REPLACEMENTS])); if (!defined("CSEO_MAX_REPLACEMENTS")) { goto oaHke; } $cseo_replacements = array_slice($cseo_replacements, 0, min(CSEO_MAX_REPLACEMENTS, sizeof($cseo_replacements))); oaHke: $i = 0; IWqo8: if (!($i < sizeof($cseo_replacements))) { goto M6Grl; } $cseo_replacements[$i] = trim($cseo_replacements[$i]); if (!(($cseo_replacements[$i][0] ?? '') !== ">" && ($cseo_replacements[$i][0] ?? '') !== "|")) { goto C4XWq; } $cseo_replacements[$i] = preg_replace("/(\|)$/", '', $cseo_replacements[$i]); C4XWq: if (!(mb_strlen($cseo_replacements[$i]) == 0)) { goto AYEVj; } array_splice($cseo_replacements, $i, 1); AYEVj: MwoNz: $i++; goto IWqo8; M6Grl: update_option(CSEO_REPLACEMENTS, $cseo_replacements); echo "<div id="message" class="notice updated"><p><strong>Settings saved.</strong></p></div>"; CsjQs: if (!(($cseo_replacements = get_option(CSEO_REPLACEMENTS)) === '')) { goto Ns6V5; } $cseo_replacements = []; Ns6V5: $cseo_replacements_text = ''; foreach ($cseo_replacements as $replacement) { $cseo_replacements_text .= $replacement . PHP_EOL; laINj: } DKBA0: $cseo_replacements_text = trim(stripslashes(htmlspecialchars($cseo_replacements_text))); echo " <div class="wrap">
<h2>Synonymizer/Rewriter</h2>
\xd\xa <form method="post" name="synonymizer">\xd\xa <table class="form-table">\xd
<tr valign="top">
\xa <th scope="row">Global synonym table</th>\xd\xa <td>\xd
<textarea cols="100" rows="40" wrap="off" name=""; echo CSEO_REPLACEMENTS; echo "" style="margin:0;height:40em;width:100%;">"; echo $cseo_replacements_text; echo "</textarea>
\xa <p class="description">Use "|" as delimiter, e.g. "jump|leap|bound forward", and start each entry on a new line.
\xa Alternatively you can specify an external synonym table which is stored in a raw text format on remote server. Simply use its\xd
URL or server path, e.g.: http://mydomain.com/synonyms.txt [<a href="https://www.cyberseo.net/synonymizer/" target="_blank">?</a>]</p>\xd
</td>\xd\xa </tr> \xd
</table>
\xa \xd
<div style="text-align:left;">\xd\xa <input type="submit" name="submit_synonymizer_settings" class="button-primary"\xd\xa value="Update options" /> <input type="button"\xd\xa name="cancel" value="Cancel" class="button"
onclick="javascript:history.go(-1)" />\xd\xa </div>
\xa </div>
\xa "; wp_nonce_field("cseo_synonymizer_settings"); echo " </form>
</div>
\xa\xd\xa "; } function cseo_search_for_dupes() { global $wpdb; $query = "SELECT ID FROM {$wpdb->prefix}posts"; if (!isset($_POST["search_criteria"])) { goto w0gTl; } if (isset($_POST["search_for_all_types"])) { goto zSDfh; } $query .= " WHERE post_type = 'post'"; goto kN3ND; zSDfh: $query .= " WHERE post_type IN ('post', 'page')"; kN3ND: if (isset($_POST["search_for_unpublished"])) { goto xO4LM; } $query .= " AND post_status = 'publish'"; xO4LM: w0gTl: $query .= " ORDER BY 'ID' DESC "; $posts_to_check = $wpdb->get_results($query); if (is_array($posts_to_check)) { goto H1Ez8; } echo "<br>"; echo "<div id="message" class="error"><p><b>ERROR:</b> There is something wrong with your WordPress database.</p></div>"; goto mKNRm; H1Ez8: echo "<br>"; echo "<form id="posts" action="" . cseo_REQUEST_URI() . "" method="post">"; echo "<h2>Posts suspected for duplicate content</h2>"; echo "<table class="widefat">"; echo "<tr>"; echo "<thead>"; echo "<th width="10%">ID</th>"; echo "<th width="75%">Name</th>"; echo "<th width="10%">Edit</th>"; echo "<th width="5%">Action</th>"; echo "</tr>"; echo "</thead>"; echo str_repeat(" ", 1024); @ob_end_flush(); ob_implicit_flush(); $cnt = 0; $posts_processed = 0; $dupes = 0; $count = count($posts_to_check); $i = 0; ZjZI_: if (!($i < $count)) { goto JZVZC; } switch ($_POST["search_criteria"]) { case 1: $post = get_post($posts_to_check[$i]->ID); $posts_to_check[$i]->content = stripcslashes($post->post_title); goto DnYHE; case 2: $post = get_post($posts_to_check[$i]->ID); $posts_to_check[$i]->content = stripcslashes($post->post_content . $post->post_excerpt); goto DnYHE; default: $posts_to_check[$i]->content = get_post_meta($posts_to_check[$i]->ID, "cyberseo_post_link", true); goto DnYHE; } izALu: DnYHE: echo str_repeat(" ", 1024); flush(); uyuHR: $i++; goto ZjZI_; JZVZC: $i = 0; NYoMb: if (!($i < $count)) { goto ds9Gc; } $posts_processed++; if (!($posts_to_check[$i]->ID > 0)) { goto WoEkA; } $already_found = false; $j = $i + 1; umTsT: if (!($j < $count)) { goto Vb6mq; } if (!($posts_to_check[$i]->content && $posts_to_check[$j]->content && $posts_to_check[$j]->content == $posts_to_check[$i]->content && $posts_to_check[$j]->ID > 0)) { goto MPN3_; } if ($already_found) { goto qY4FY; } if ($dupes % 2) { goto B6qDy; } $tr_class = "<tr class="alternate">"; goto IgWOi; B6qDy: $tr_class = "<tr>"; IgWOi: $dupes++; $cnt++; echo $tr_class; echo "<td><b>" . $posts_to_check[$i]->ID . "</b></td>"; $post = get_post($posts_to_check[$i]->ID); echo "<td><a href="" . get_option("siteurl") . "/?p=" . $posts_to_check[$i]->ID . "" target="_blank">" . $post->post_title . "</b></a></td>"; echo "<td><a href="" . get_option("siteurl") . "/wp-admin/post.php?action=edit&post=" . $posts_to_check[$i]->ID . "" target="_blank">Edit</a>"; echo "<td align="center"><input name="post_ids[]" value="" . $posts_to_check[$i]->ID . "" type="checkbox"></td>"; echo "</tr>"; qY4FY: echo $tr_class; echo "<td><b>" . $posts_to_check[$j]->ID . "</b></td>"; $post = get_post($posts_to_check[$j]->ID); echo "<td><a href="" . get_option("siteurl") . "/?p=" . $posts_to_check[$j]->ID . "" target="_blank">" . $post->post_title . "</a></td>"; echo "<td><a href="" . get_option("siteurl") . "/wp-admin/post.php?action=edit&post=" . $posts_to_check[$j]->ID . "" target="_blank">Edit</a>"; echo "<td align="center"><input name="post_ids[]" value="" . $posts_to_check[$j]->ID . "" type="checkbox" checked></td>"; echo "</tr>"; $posts_to_check[$j]->ID = -1; $already_found = true; $cnt++; MPN3_: pxdSV: $j++; goto umTsT; Vb6mq: WoEkA: echo str_repeat(" ", 1024); flush(); Ffom6: $i++; goto NYoMb; ds9Gc: echo "</table>"; echo "<br>"; echo "<table width="100%" cellpadding="3" cellspacing="3">"; echo "<tr>"; echo "<td align="left"><div id="message" class="notice updated"><p><b>" . $posts_processed . "</b> post(s) processed, <b>" . $dupes . "</b> duplicate(s) found among <b>" . $cnt . "</b> posts.</p></div></td>"; echo "<td align="right">" . "<a href="javascript:cseoCheckAll(document.getElementById('posts'));">Select all</a> | <a href="javascript:cseoUncheckAll(document.getElementById('posts'));">Deselect all</a> | <a href="javascript:cseoInverseSelection(document.getElementById('posts'));">Inverse</a></td>"; echo "</tr>"; echo "</table>"; echo "<div class="submit">"; if (!($cnt > 0)) { goto XsidM; } echo "<input class="delete" name="delete_duplicated_posts" value="Delete selected posts" type="submit" onClick="return confirm('Delete selected posts?')">"; XsidM: echo "</div>"; wp_nonce_field("cseo_dupcheck"); echo "</form>"; mKNRm: } function cseo_duplicate_post_finder_menu() { global $cseo; echo " <div class="wrap">
<h2>Duplicate Post Finder</h2>\xd
<form name="search_form" action=""; echo cseo_REQUEST_URI(); echo "" method="post">
<table class="form-table">\xd
<tr>
<th>
Search criteria\xd\xa </th>\xd\xa <td>\xd\xa <!--input type="hidden" name="action_type" value="search"-->
\xa <select name="search_criteria">\xd
<option value="0"\xd\xa "; if (!(($_POST["search_criteria"] ?? 0) == 0)) { goto k2bcB; } echo " selected"; k2bcB: echo ">search by post source</option>
<option value="1"
"; if (!(($_POST["search_criteria"] ?? 0) == 1)) { goto UzYSd; } echo " selected"; UzYSd: echo ">search by title</option>
<option value="2"
"; if (!(($_POST["search_criteria"] ?? 0) == 2)) { goto WYBTF; } echo " selected"; WYBTF: echo ">search by content</option> \xd
</select>
</td>
\xa </tr>
<tr>
\xa <th>\xd\xa Include unpublished\xd\xa </th> \xd\xa <td>
\xa <input type="checkbox" name="search_for_unpublished"
\xa "; if (!(isset($_POST["search_for_unpublished"]) || !isset($_POST["search_criteria"]))) { goto oCmZ1; } echo " checked"; oCmZ1: echo ">\xd
</td>
\xa </tr>
\xa <tr>\xd
<th>\xd
Include pages\xd\xa </th>
<td>\xd\xa <input type="checkbox" name="search_for_all_types"\xd
"; if (!isset($_POST["search_for_all_types"])) { goto W4nWj; } echo " checked"; W4nWj: echo ">\xd
</td>\xd
</tr>
</table>\xd\xa <br>\xd
<div class="submit">\xd\xa <input name="search_duplicated_posts" value="Search for duplicate posts »" type="submit" class="button-primary">\xd\xa </div>\xd
"; wp_nonce_field("cseo_dupcheck"); echo " \xd
</form>\xd
</div>
\xa <div class="wrap">\xd\xa "; if (isset($_POST["delete_duplicated_posts"]) && check_admin_referer("cseo_dupcheck")) { goto C0RKd; } if (isset($_POST["search_duplicated_posts"]) && check_admin_referer("cseo_dupcheck")) { goto lRmeI; } goto kFgfR; C0RKd: if (!(isset($_POST["post_ids"]) && is_array($_POST["post_ids"]))) { goto ucWAQ; } $cseo->cseo_delete_posts_by_ids($_POST["post_ids"]); ucWAQ: goto kFgfR; lRmeI: cseo_search_for_dupes(); kFgfR: echo " </div>
"; } function cseo_auto_comments_menu() { global $cseo; $cseo_comment_campaigns = get_option(CSEO_COMMENT_CAMPAIGNS); echo " <div class="wrap">
\xa <h2>Auto-comments</h2>\xd
\xd\xa "; if (!(isset($_POST["delete_campaigns"]) && check_admin_referer("cseo_auto_comments"))) { goto S0gZz; } if (!isset($_POST["campaign_ids"])) { goto kV0Nd; } echo "<div id="message" class="updated fade"><p>"; echo "Deleting. Please wait..."; foreach ($_POST["campaign_ids"] as $id) { unset($cseo_comment_campaigns[$id]); Wl16f: } xI318: echo " Done!</p></div>"; kV0Nd: update_option(CSEO_COMMENT_CAMPAIGNS, $cseo_comment_campaigns); S0gZz: if (!(isset($_POST["save_comments_authors"]) && check_admin_referer("cseo_auto_comments"))) { goto Gv0YB; } $cseo_authors = explode(",", trim($_POST["authors"])); update_option(CSEO_COMMENT_AUTHORS, array_values(array_unique($cseo_authors))); Gv0YB: if (isset($_POST["add_new_campaign"]) && check_admin_referer("cseo_auto_comments")) { goto uTeH4; } if (isset($_POST["submit_comments"]) && check_admin_referer("cseo_auto_comments")) { goto YRsDr; } if (isset($_GET["edit-campaign-id"])) { goto v7whV; } $mode = ''; goto oxcij; uTeH4: $mode = "create"; goto oxcij; YRsDr: $mode = "submit"; goto oxcij; v7whV: $mode = "edit"; oxcij: if (!($mode === "submit")) { goto FJM7P; } $id = intval($_POST["id"]); if (isset($cseo_comment_campaigns[$id])) { goto Zpyhk; } $cseo_comment_campaigns[$id] = []; Zpyhk: if (mb_strlen(trim($_POST["comments"]))) { goto PbM8d; } $cseo_comments = []; goto FkAp2; PbM8d: $cseo_comments = array_map("rtrim", explode("
", $_POST["comments"])); FkAp2: update_option("cseo_comments_" . $id, $cseo_comments); $cseo_comment_campaigns[$id]["name"] = $_POST["name"]; $cseo_comment_campaigns[$id]["ac_source"] = $_POST["ac_source"]; $cseo_comment_campaigns[$id]["ac_rss_url"] = $_POST["ac_rss_url"]; if (isset($_POST["post_category"])) { goto J2SzA; } $cseo_comment_campaigns[$id]["categories"] = []; goto dpX7V; J2SzA: $cseo_comment_campaigns[$id]["categories"] = $_POST["post_category"]; dpX7V: $cseo_comment_campaigns[$id]["ignore_hyperlinks"] = $_POST["ignore_hyperlinks"] ?? ''; $cseo_comment_campaigns[$id]["ac_delete_on_post"] = $_POST["ac_delete_on_post"] ?? ''; $cseo_comment_campaigns[$id]["synonymize"] = $_POST["synonymize"] ?? ''; $cseo_comment_campaigns[$id]["ac_openai_rewrite"] = $_POST["ac_openai_rewrite"] ?? ''; $probability = abs(floatval($_POST["probability"])); if (!($probability > 100)) { goto DDLtR; } $probability = 100; DDLtR: $cseo_comment_campaigns[$id]["probability"] = $probability; $cseo_comment_campaigns[$id]["mode"] = "on post open"; $cseo_comment_campaigns[$id]["allowed_tags"] = mb_strtolower(trim($_POST["allowed_tags"])); $cseo_comment_campaigns[$id]["count"] = count($cseo_comments); $cseo_comment_campaigns[$id]["max_comments"] = abs(intval($_POST["max_comments"] ?? 0)); $cseo_comment_campaigns[$id]["post_age"] = abs(intval($_POST["post_age"] ?? 0)); $cseo_comment_campaigns[$id]["hold_for_approval"] = $_POST["hold_for_approval"] ?? ''; $cseo_comment_campaigns[$id]["ac_openai_assignment"] = $_POST["ac_openai_assignment"] ?? ''; $cseo_comment_campaigns[$id]["ac_openai_model"] = $_POST["ac_openai_model"] ?? "openai-gpt-4o-mini"; $cseo_comment_campaigns[$id]["ac_openai_max_tokens"] = abs(intval($_POST["ac_openai_max_tokens"] ?? 1000)); $cseo_comment_campaigns[$id]["ac_openai_temperature"] = floatval($_POST["ac_openai_temperature"] ?? 1); update_option(CSEO_COMMENT_CAMPAIGNS, $cseo_comment_campaigns); FJM7P: if ($mode === "create" || $mode === "edit") { goto kSwwi; } echo " <form id="autocomments" action=""; cseo_REQUEST_URI(); echo "" method="post">
\xa <table class="widefat" style="margin-top: .5em" width="100%">
<thead>
\xa <tr>\xd\xa <th scope="row" width="3%"></th>
\xa <th scope="row" width="20%">Campaign</th>\xd
<th scope="row" width="7%">Probability</th>
\xa <th scope="row" width="60%">Categories</th>\xd
<th scope="row" width="10%">Comments</th>
\xa </tr>\xd\xa </thead>
"; $i = 0; $cseo_comment_campaigns = get_option(CSEO_COMMENT_CAMPAIGNS); if (!count($cseo_comment_campaigns)) { goto LZlCN; } foreach ($cseo_comment_campaigns as $id => $campaign) { if ($i++ % 2) { goto utU0t; } echo "<tr class="alternate">"; goto YZqVc; utU0t: echo "<tr>"; YZqVc: echo "<td align="center"><input name="campaign_ids[]" value="" . $id . "" type="checkbox"></td>"; echo "<td>" . $campaign["name"] . "[<a href="" . cseo_REQUEST_URI() . "&edit-campaign-id=" . $id . "">edit</a>]</td>"; echo "<td>" . $campaign["probability"] . "%</td>"; echo "<td>"; $category_names = []; if (!(is_array($campaign["categories"]) && count($campaign["categories"]))) { goto IwUBl; } foreach ($campaign["categories"] as $catrgory) { $category_names[] = get_cat_name($catrgory); s09dQ: } XMRZO: IwUBl: echo cseo_chop_str(implode(", ", $category_names), 100); echo "</td>"; if (($campaign["ac_source"] ?? '') === "openai") { goto Ryfht; } if (($campaign["ac_source"] ?? '') === "rss") { goto SFLb6; } echo "<td>TXT (" . $campaign["count"] . ")</td>"; goto bwLZs; Ryfht: echo "<td>OpenAI GPT</td>"; goto bwLZs; SFLb6: echo "<td>RSS</td>"; bwLZs: QJtvP: } uHFbs: LZlCN: echo " </table>\xd
<div class="submit">
\xa <table width="100%">
\xa <tr>\xd
<td>\xd
<div align="left">
\xa <input class="button-primary" name="add_new_campaign" value="Create new campaign" type="submit">
\xa </div>
\xa </td>
\xa <td>
\xa <div align="right">\xd\xa <input class="button secondary" name="delete_campaigns" value="Delete all sellected campaigns" type="submit">\xd\xa </div>\xd
</td>\xd\xa </tr>\xd
</table>\xd
</div>
\xd
"; echo "
\xa <table class="form-table">
<tr>\xd\xa <td>
<p><strong>Fake author names</strong></p>\xd\xa <br>\xd\xa <textarea cols="100" rows="10" wrap="on" name="authors" style="margin:0;height:10em;width:100%;">"; $cseo_authors = cseo_array_stripslashes(get_option(CSEO_COMMENT_AUTHORS)); echo implode(",", $cseo_authors); echo "</textarea>\xd\xa <p class="description">Put into the box above the list of names divided by comma. These names will be randomly used by the auto-comments generator.</p>
\xa </td> \xd\xa </thr>\xd\xa </table> \xd\xa
<div class="submit">
\xa <table width="100%">
<tr>
\xa <td>\xd\xa <div align="left">
<input class="button-primary" name="save_comments_authors" value="Save Comment Authors" type="submit">
</div>
\xa </td>\xd\xa </tr>\xd\xa </table>
\xa </div>
\xa "; wp_nonce_field("cseo_auto_comments"); echo " </form>
\xa "; goto kruo9; kSwwi: if ($mode === "create") { goto v0wKs; } $id = intval($_GET["edit-campaign-id"]); goto AvG8t; v0wKs: if (count($cseo_comment_campaigns)) { goto z1ADN; } $id = 1; goto yaakb; z1ADN: $id = max(array_keys($cseo_comment_campaigns)) + 1; yaakb: $cseo_comment_campaigns[$id] = []; $cseo_comment_campaigns[$id]["ac_source"] = "openai"; $cseo_comment_campaigns[$id]["ac_rss_url"] = ''; $cseo_comment_campaigns[$id]["categories"] = []; $cseo_comment_campaigns[$id]["interval"] = 120; $cseo_comment_campaigns[$id]["last_updated"] = 0; $cseo_comment_campaigns[$id]["mode"] = "on post open"; $cseo_comment_campaigns[$id]["probability"] = 1; $cseo_comment_campaigns[$id]["name"] = "My auto-comments campaign " . $id; AvG8t: echo "
\xa <form id="edit-autocomments" action=""; echo preg_replace("/\&edit-campaign-id\=[0-9]+/", '', cseo_REQUEST_URI()); echo "" method="post">
<input type="hidden" id="id" name="id" value=""; echo $id; echo "" />
<table class="form-table">\xd\xa <tr>\xd
<th scope="row">Campaign name</th>\xd
<td>\xd\xa <input type="text" style="width: 100%;" name="name" value=""; echo $cseo_comment_campaigns[$id]["name"]; echo "" size="80">
\xa </td>
</tr>\xd\xa\xd
<tr>\xd
<th scope="row">Auto-comments source</th>
<td>
<select id="ac_source" name="ac_source" onchange="cseoChangeACSource();">
\xa "; echo "<option " . (($cseo_comment_campaigns[$id]["ac_source"] ?? '') === "openai" ? "selected " : '') . " value="openai">AI language model</option>"; echo "<option " . (($cseo_comment_campaigns[$id]["ac_source"] ?? '') === "text" ? "selected " : '') . " value="text">Text box (HTML is supported)</option>"; echo "<option " . (($cseo_comment_campaigns[$id]["ac_source"] ?? '') === "rss" ? "selected " : '') . " value="rss">RSS feed</option>"; echo " </select>\xd
</td>\xd
</tr>\xd
</table>
\xd
<table id="ac_openai" class="form-table">\xd
\xd\xa "; echo "<tr>"; echo "<td colspan="2">"; if (!empty(get_option(CSEO_ACCOUNTS)["openai_api_key"])) { goto qyHGO; } echo "<p><span style="color: red;">Warning!</span> The OpenAI API key is not specified. The service is unavailabe. Please set it on the "Accounts" page.</p>"; qyHGO: echo "</td>"; echo "</tr>"; echo "\xd
<tr>\xd\xa <th scope="row">Auto-comment assignment</th>
\xa <td>
"; echo "<textarea cols="90" rows="10" name="ac_openai_assignment" style="margin:0;height:10em;width:100%;">" . stripslashes($cseo_comment_campaigns[$id]["ac_openai_assignment"] ?? "Write a short conclusion about the following product: " . PHP_EOL . "%post_title%" . PHP_EOL . "%post_excerpt%") . "</textarea>"; echo "<p class="description">Set your free-form assignments for the OpenAI GPT, written in ordinary human language. CyberSEO Pro does not ask you\xd\xa to select an assignment language or the language you want to translate the generated text to. It does not make you choose the style of
article, the keywords you want to be used from a set of drop-down lists with predefined options. Write them in a normal language, the same
way you give an assignment to a human writer.
\xa </p><p class="description">You can use Spintax, as well as the following placeholders: <code>%post_title%</code>, <code>%post_content%</code>, <code>%post_excerpt%</code>.</p>"; echo " </td>\xd
</tr> \xd\xa\xd
<tr>
<th scope="row">AI model</th>\xd\xa <td>
\xa <select name="ac_openai_model">
"; foreach (CSEO_AI_ENGINES_REG as $model => $name) { echo "<option " . (($cseo_comment_campaigns[$id]["ac_openai_model"] ?? '') === $model ? "selected " : '') . "value="" . $model . "">" . $name . "</option>"; q2DWA: } a5pvI: echo " </select>
<p class="description">Select the AI model.</p>
</td>
</tr>
<tr>\xd
<th>Max tokens</th>\xd\xa <td>
"; echo "<input type="number" min="0" name="ac_openai_max_tokens" value="" . ($cseo_comment_campaigns[$id]["ac_openai_max_tokens"] ?? "1000") . "" size="6">"; echo "
<p class="description">The maximum number of tokens to generate in the completion.</p>\xd\xa </td>\xd
</tr>\xd\xa
\xa <tr>
\xa <th>Temperature</th>\xd
<td>\xd\xa "; echo "<input type="number" step="0.1" min="0" name="ac_openai_temperature" value="" . ($cseo_comment_campaigns[$id]["ac_openai_temperature"] ?? "1") . "" size="4">"; echo " \xd
<p class="description">What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative\xd
applications, and 0 (argmax sampling) for ones with a well-defined answer.</p>
\xa </td>\xd
</tr>\xd
\xa "; echo " </table>\xd\xa
<table id="ac_text" class="form-table">
<tr>
\xa <th scope="row">Comments</th>
<td>
\xa <textarea cols="100" rows="20" wrap="off" name="comments" style="margin: 0; height: 30em; width: 100%;">"; if (!($mode === "edit")) { goto MGuBA; } $cseo_comments = get_option("cseo_comments_" . $id); foreach ($cseo_comments as $comment) { echo stripslashes($comment) . PHP_EOL; SWgwG: } DimQn: MGuBA: echo "</textarea>\xd\xa <p class="description">One comment per line. Every time when the comment will be posted, it will be automatically removed from the list above. Spintax is allowed</p>\xd\xa </td>\xd\xa </tr>\x9 \xd
\xd
<tr>\xd\xa <th scope="row">Delete on post</th>
<td>\xd\xa <input type="checkbox" name="ac_delete_on_post" id="ac_delete_on_post"\xd
"; if (!(($cseo_comment_campaigns[$id]["ac_delete_on_post"] ?? '') === "on")) { goto OZdy7; } echo "checked"; OZdy7: echo "/>
\xa <label for="shuffle">when checked, the posted comment will be get removed from the comments list.
It is recommended to disable this option when using Spintax, synonymizer or OpenAI GPT rewriter.</label>\xd\xa </td>
\xa </tr>
</table>
\xd
<table id="ac_rss" class="form-table">
\xa <tr>
\xa <th scope="row">RSS feed URL </th>
\xa <td>\xd
<input type="text" name="ac_rss_url" value=""; echo $cseo_comment_campaigns[$id]["ac_rss_url"] ?? ''; echo "" size="80">\xd\xa </td>\x9\xd
</tr> \xd\xa
<tr>\xd\xa <th scope="row">Ignore comments with hyperlinks</th>
<td>
\xa <input type="checkbox" name="ignore_hyperlinks" id="ignore_hyperlinks"\xd\xa "; if (!(($cseo_comment_campaigns[$id]["ignore_hyperlinks"] ?? '') === "on")) { goto gIY50; } echo "checked"; gIY50: echo "/>
<label for="ignore_hyperlinks">if checked all RSS comments with hyperlinks will be omitted.</label>\xd\xa </td>\xd\xa </tr> \xd
\xd\xa <tr>
\xa <th scope="row">Allowed HTML tags</th>\xd\xa <td>
<input type="text" name="allowed_tags" value=""; echo $cseo_comment_campaigns[$id]["allowed_tags"] ?? ''; echo "" size="80">
<p class="description">use this filed to specify tags which should not be stripped off from comments, imported from an RSS feed. E.g. if <code><p><img><br></code> is specified, only paragraphs, images and line breaks will be preserved. Leave it empty to allow all tags.</p>\xd\xa </td>\x9
</tr> \xd
</table>
<table class="form-table">\xd\xa <tr>
<th scope="row">Select post categories</th>\xd
<td>
\xa <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">\xd\xa <div id="categories-all" class="cyberseo-ui-tabs-panel">
\xa "; $cseo->categoryChecklist(null, false, $cseo_comment_campaigns[$id]["categories"]); echo " </div>
\xa </ul>
\xa </td>\xd\xa </tr> \xd
\xa <tr>
<th scope="row">Hold for approval</th>\xd\xa <td>\xd\xa <input type="checkbox" name="hold_for_approval" id="synonymize"
"; if (!(($cseo_comment_campaigns[$id]["hold_for_approval"] ?? '') === "on")) { goto E5xeL; } echo "checked"; E5xeL: echo "/>\xd\xa <label for="hold_for_approval">if checked, the generated comments are held for approval.</label>\xd\xa </td>
</tr>\xd\xa\xd
<tr>
\xa <th scope="row">Synonymize</th>
\xa <td>\xd
<input type="checkbox" name="synonymize" id="synonymize"
"; if (!(($cseo_comment_campaigns[$id]["synonymize"] ?? '') === "on")) { goto o7C07; } echo "checked"; o7C07: echo "/>
\xa <label for="synonymize">if checked every comment will be synonymized according to the "Global synonym table".</label>\xd
</td>\xd
</tr>
\xa
<tr id="ac_openai_rewrite_cb">\xd
<th scope="row">Rewrite with OpenAI GPT</th>
<td>
\xa <input type="checkbox" name="ac_openai_rewrite" id="ac_openai_rewrite"
\xa "; if (!(($cseo_comment_campaigns[$id]["ac_openai_rewrite"] ?? '') === "on")) { goto ELl8e; } echo "checked"; ELl8e: echo "/>
\xa <label for="ac_openai_rewrite">if checked the comment will be rewritten by OpenAI GPT.</label>
\xa </td>
</tr>
<tr>\xd\xa <th scope="row">Max comments</th>
<td>
\xa <input type="number" min="0" name="max_comments" value=""; echo $cseo_comment_campaigns[$id]["max_comments"] ?? "0"; echo "" size="4">\xd\xa <p class="description">Specify the maximum number of comments per post. Use <code>0</code> to disable the limitation.</p>
\xa </td>\x9\xd\xa </tr>\xd
<tr>\xd\xa <th scope="row">Must be newer than</th>\xd\xa <td>
<input type="number" min="0" name="post_age" value=""; echo $cseo_comment_campaigns[$id]["post_age"] ?? "0"; echo "" size="4"> day(s).
\xa <p class="description">Comments on posts older than the specified date will not be added. Use <code>0</code> to disable the limitation.</p>
</td>\x9\xd
</tr>\xd
\xa <tr>\xd
<th scope="row">Probability [0..100]%</th>
\xa <td>
<input type="number" step="0.001" min="0" max="100" name="probability" value=""; echo $cseo_comment_campaigns[$id]["probability"] ?? "0.1"; echo "" size="4">\xd\xa <p class="description">Specify the probability percentage here (<code>0</code> for never and <code>100</code> for always). For example, if you want to post auto-comments with a probability
\xa of 1:100, set this value to <code>1</code>, for 1:1000 set it to <code>0.1</code>, and so on.</p>\xd\xa </td> \xd
</tr>\xd
\xd
</table>
\xa <br>
<div align="left">
\xa <input class="button-primary" name="submit_comments" value="Submit" type="submit"> <input class="button" name="cancel" value="Cancel" type="submit">
\xa </div>
\xa "; wp_nonce_field("cseo_auto_comments"); echo " </form>
<script>
\xa cseoChangeACSource();\xd
</script> \xd\xa "; kruo9: echo " </div> \xd
"; } function cseo_syndicator_log_menu() { echo " <script>
\xa function clipboardCopy() {
var copyText = document.getElementById("log");
copyText.select();\xd\xa copyText.setSelectionRange(0, 9999999)
document.execCommand("copy");\xd
}\xd\xa </script>\xd
<div class="wrap">\xd\xa <h2>Syndicator Log</h2>\xd
<br>
\xa <textarea readonly id="log" cols="100" rows="20" wrap="on" style="margin:0;height:30em;width:100%;background-color:white">"; echo get_option(CSEO_LOG); echo "</textarea>\xd
<p><a href="#log" class="cseo-button" onclick="clipboardCopy()">Copy to clipboard</a></p>
\xa </div>
"; } function cseo_add_comment($post_id, $text, $author = "Guest", $hold = false, $time = null, $start_offset = 0, $end_offset = 0, $IP = "127.0.0.1") { if (strlen(trim($text))) { goto araAB; } return false; goto mQ9kB; araAB: if ($time) { goto zQq1w; } $time = time(); zQq1w: $comment = ["comment_author" => $author, "comment_author_email" => '', "comment_author_url" => "http://", "comment_content" => $text, "comment_type" => '', "comment_parent" => 0, "comment_post_ID" => $post_id, "user_id" => 1, "comment_author_IP" => $IP, "comment_agent" => CSEO_CURL_USER_AGENT, "comment_date" => gmdate("Y-m-d H:i:s", $time + rand($start_offset, $end_offset) + 3600 * (int) get_option("gmt_offset"))]; if ($hold) { goto q19De; } $comment["comment_approved"] = 1; goto yu7Fm; q19De: $comment["comment_approved"] = 0; yu7Fm: return wp_insert_comment($comment); mQ9kB: } function cseo_hyperlinks_cnt($str) { return preg_match_all("/<a.+href(\s+)?=(\s+)?["'\s+](((http|https|ftp|ftps)\:\/\/)|(www\.))[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\:[0-9]+)?(\/\S*)?["'\s+]/i", $str); } function cseo_plugins_action_link($links) { $links[] = "<a href="" . esc_url(get_admin_url(null, "admin.php?page=cyberseo")) . "">Syndicator</a>"; $links[] = "<a href="?cseo_update">Update</a>"; return $links; } function cseo_add_admin_menu_item($admin_bar) { $args = ["id" => "new-cybsrseo-feed-admin-menu-item", "title" => "CyberSEO Feed", "href" => esc_url(get_admin_url(null, "admin.php?page=cyberseo")), "parent" => "new-content"]; $admin_bar->add_menu($args); } function cseo_get_gpt_article() { $response = cseo_file_get_contents(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=openai-gpt-article"); $data = json_decode($response, true); if (!(is_array($data) && isset($data["section_names"]))) { goto i_6Xn; } update_option("cxxx_gpt_article", $data); i_6Xn: } function cseo_get_gpt_spinner_params() { $response = cseo_file_get_contents(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=get-gpt-spinner-params"); $data = json_decode($response, true); if (!(is_array($data) && isset($data["prompt"]))) { goto gfr3z; } update_option("cxxx_gpt_spinner_params", $data); gfr3z: } function cseo_get_eps() { global $wpdb; $eps = @json_decode(cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=get-endpoints"), true); if (!(is_array($eps) && count($eps))) { goto Wz0U0; } update_option("cxxx_eps", $eps); Wz0U0: } function cseo_get_langs() { $langs = @json_decode(cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url()) . "&action=get-langs"), true); if (!(is_array($langs) && count($langs))) { goto UVTAy; } update_option("cxxx_langs", $langs); UVTAy: } function cseo_upgrade() { } class CyberSEO_CSV { public $dump; public $delimiter; public $skip_header; public $fields; public $id; function __construct($dump, $delimiter, $fields, $skip_header = false) { $this->id = md5($dump) . "-" . md5(time()); $this->dump = explode("\xa", stripslashes(trim($dump))); $this->delimiter = $delimiter; $this->skip_header = $skip_header === "on"; if (!count($fields)) { goto MnWh7; } $n = 1; $i = 0; fRGt0: if (!($i < count($fields))) { goto p3xIL; } if (!($fields[$i] === "custom")) { goto BeDQm; } $fields[$i] = $fields[$i] . $n++; BeDQm: lmdF5: $i++; goto fRGt0; p3xIL: MnWh7: $this->fields = $fields; } function source() { return "text dump"; } function get_id() { return "text dump id=" . $this->id; } function import() { if (sizeof($this->dump) == 1 && filter_var($this->dump[0], FILTER_VALIDATE_URL) !== false) { goto FQ5Iv; } $dump = $this->dump; goto JqpqT; FQ5Iv: $content = cseo_file_get_contents($this->dump[0]); if (strpos($content, "PK") === 0) { goto KOAub; } if (strpos($content, "\37\213\x8") === 0 || (strpos($content, "x\x1") === 0 || strpos($content, "x\x9c") === 0 || strpos($content, "x\xda") === 0)) { goto bGHbC; } if (strpos($content, "EZh") === 0) { goto j6N3v; } goto p0d2h; KOAub: $content = cseo_unzip($content); goto p0d2h; bGHbC: $content = @gzuncompress($content); goto p0d2h; j6N3v: $content = @bzdecompress($content); p0d2h: $dump = explode("\xa", $content); JqpqT: $result = "<?xml version="1.0" encoding="UTF-8"?>"; $result .= "<channel>"; if (!(is_array($dump) && count($dump) > 0)) { goto nsNJO; } $cnt = 0; foreach ($dump as $line) { if (!($cnt++ > 0 || !$this->skip_header)) { goto cnDKs; } $line = html_entity_decode(trim($line), ENT_QUOTES); if (!strlen($line)) { goto d7OGt; } $result .= "<item>"; switch ($this->delimiter) { case "csv_comma": $csv_lines = str_getcsv($line, ","); goto yZ2rq; case "csv_semicolon": $csv_lines = str_getcsv($line, ";"); goto yZ2rq; case "csv_tab": $csv_lines = str_getcsv($line, "
"); goto yZ2rq; default: $csv_lines = str_getcsv($line, "|"); goto yZ2rq; } c4RtY: yZ2rq: $i = 0; EgsaI: if (!($i < count($this->fields))) { goto FUeEh; } if (!($i < count($csv_lines))) { goto fLBIs; } switch ($this->fields[$i]) { case "title": $result .= "<title><![CDATA[" . $csv_lines[$i] . "]]></title>"; goto aIqzi; case "link": $result .= "<link>" . htmlentities($csv_lines[$i]) . "</link>"; goto aIqzi; case "tags": $result .= "<post_tags><![CDATA[" . $csv_lines[$i] . "]]></post_tags>"; goto aIqzi; case "categories": $cats = explode(",", $csv_lines[$i]); foreach ($cats as $cat) { $result .= "<category><![CDATA[" . $cat . "]]></category>"; Ojb_2: } A8YIl: goto aIqzi; case "description": $result .= "<description><![CDATA[" . $csv_lines[$i] . "]]></description>"; goto aIqzi; case "content": $result .= "<content><![CDATA[" . $csv_lines[$i] . "]]></content>"; goto aIqzi; case "thumb": $result .= "<enclosure url="" . htmlentities($csv_lines[$i]) . "" type="image/jpeg"></enclosure>"; goto aIqzi; case "date": $result .= "<pubDate>" . htmlentities($csv_lines[$i]) . "</pubDate>"; goto aIqzi; } xe0Ev: aIqzi: if (!(substr($this->fields[$i], 0, 6) === "custom")) { goto Nif9V; } $result .= "<" . $this->fields[$i] . "><![CDATA[" . $csv_lines[$i] . "]]></" . $this->fields[$i] . ">"; Nif9V: fLBIs: cv5r_: $i++; goto EgsaI; FUeEh: $result .= "</item>"; d7OGt: cnDKs: MolFf: } tUwhV: nsNJO: $result .= "</channel>"; return $result; } } class CyberSEO_Amazon_Product_Parser { public $do_duplicate_check; private $link; private $base_domain; private $tag; public function __construct($link, $tag) { preg_match("/[\?&](tag=[\w-]+&?)/i", $link, $matches); if (!isset($matches[1])) { goto lBwXB; } $link = str_replace($matches[1], '', $link) . "&" . $tag; lBwXB: preg_match("/[\?&](page=[\d]+&?)/i", $link, $matches); if (!isset($matches[1])) { goto dWcFQ; } $link = str_replace($matches[1], '', $link) . "&" . $tag; dWcFQ: $this->link = $link; $this->base_domain = "https://" . parse_url($link, PHP_URL_HOST); $this->tag = $tag; $this->do_duplicate_check = false; } public function amazon_parse_product_page($link) { global $wpdb; preg_match("/\/dp\/([A-Z0-9]{10})(?=[\/\?]|$)/i", $link, $matches); if (!isset($matches[1])) { goto UftfU; } $asin = $matches[1]; $buy_link = $this->base_domain . "/dp/" . $asin . "/?tag=" . $this->tag; if (!$this->do_duplicate_check) { goto ozz4s; } if (!$wpdb->get_results("SELECT DISTINCT ID FROM {$wpdb->prefix}posts as posts, {$wpdb->prefix}postmeta as postmeta WHERE posts.ID = postmeta.post_id AND (postmeta.meta_key = 'cyberseo_post_link' AND postmeta.meta_value LIKE '%" . esc_sql($asin) . "%') AND posts.post_status NOT IN ('trash') AND posts.post_type NOT IN ('attachment', 'revision', 'nav_menu_item')")) { goto ULj9B; } return false; ULj9B: ozz4s: $content = cseo_file_get_contents(cseo_fixurl($link)); preg_match("/<div id="productDescription".*?>(.*?)<\/div>/s", $content, $matches); if (isset($matches[1])) { goto zDkhu; } preg_match("/<div class="a-section a-spacing-small a-spacing-top-small">(.*?)<\/div>/s", $content, $matches); if (isset($matches[1])) { goto p63td; } preg_match("/<div.*?class="a-expander-content a-expander-partial-collapse-content">(.*?)<\/div>/s", $content, $matches); p63td: zDkhu: if (!isset($matches[1])) { goto Gf4Te; } $cont = cseo_strip_specific_tags($matches[1], ["script", "style", "embed", "figure", "figcaption", "video", "audio", "canvas", "object", "iframe", "frame"]); $desc = cseo_strip_tags($cont); preg_match("/<div id="feature-bullets".*?(<ul.*?<\/ul>)/s", $content, $matches); if (!isset($matches[1])) { goto lIGAO; } $cont .= $matches[1]; if (!preg_match("/<ul.*?>(.*?)<li>/is", $cont, $matches)) { goto k9tJZ; } $cont = str_replace($matches[1], '', $cont); k9tJZ: lIGAO: preg_match("/<div id="detailBulletsWrapper_feature_div".*?>(.*?)<\/div>/s", $content, $matches); if (!isset($matches[1])) { goto YQ5qS; } $cont .= $matches[1]; YQ5qS: preg_match("/<div id="renewedProgramDescriptionAtf".*?>(.*?)<\/div>/s", $content, $matches); if (!isset($matches[1])) { goto tgkf6; } $cont .= $matches[1]; tgkf6: $cont = preg_replace("/<h\d>/i", "<h3>", $cont); $cont = preg_replace("/<\/h\d>/i", "</h3>", $cont); $cont = strip_tags($cont, "<p><br><ul><li><h3><i><u><b>"); $cont = preg_replace("/ +/", " ", str_replace("
", " ", trim($cont))); if (!(preg_match("/ href="(.*?)"/s", $desc, $matches) && stripos("amazon.", $matches[1]) === false)) { goto Tc5pk; } $desc = str_replace($matches[1], $buy_link, $desc); Tc5pk: preg_match("/Brand<\/span>.*?<span.*?>(.*?)<\/span>/s", $content, $matches); if (count($matches) == 2) { goto Qm51C; } $brand = ''; goto l_dVf; Qm51C: $brand = $matches[1]; l_dVf: if (preg_match("/<span class="a-price .*?><span class="a-offscreen">(\S+)<\/span>/", $content, $matches)) { goto zyHix; } if (preg_match("/<span class="a-price .*?">(\S+)<\/span>/", $content, $matches)) { goto pgEHl; } preg_match("/<span id="price".*?>(\S+)<\/span>/", $content, $matches); pgEHl: zyHix: if (isset($matches[1])) { goto zuYrh; } return false; goto S1z_T; zuYrh: $price = $matches[1]; S1z_T: preg_match("/jQuery.parseJSON\('(.*?)'\)/s", $content, $matches); $obj = json_decode(stripslashes($matches[1])); if (!(is_object($obj) && isset($obj->title))) { goto Ec2zQ; } $images = []; foreach ($obj->colorImages as $color) { foreach ($color as $img) { if (isset($img->hiRes)) { goto ieYZv; } if (isset($img->large)) { goto DqyL3; } goto qeNw3; ieYZv: $images[] = $img->hiRes; goto qeNw3; DqyL3: $images[] = $img->large; qeNw3: nYBpA: } IfS5C: omimT: } mvP5w: if (count($images)) { goto n3DE8; } preg_match("/'colorImages': (.*?\}\]})/", $content, $matches); if (empty($matches[1])) { goto jXorC; } $clrimgs = json_decode(str_replace("'", """, $matches[1])); if (!is_object($clrimgs)) { goto ERCBQ; } foreach ($clrimgs->initial as $img) { if (isset($img->hiRes)) { goto I_Ylv; } if (isset($img->large)) { goto mBPx4; } goto EfGbX; I_Ylv: $images[] = $img->hiRes; goto EfGbX; mBPx4: $images[] = $img->large; EfGbX: zjd8m: } A72JB: ERCBQ: jXorC: n3DE8: if (count($images)) { goto VsSYG; } preg_match("/"hiRes":"(.*?)"/s", $content, $matches); if (!isset($matches[1])) { goto VyDLM; } $images[] = $matches[1]; VyDLM: VsSYG: if (count($images)) { goto dxPn_; } preg_match("/data-ssf-share-icon="\{"image":"(.*?)"/s", html_entity_decode($content), $matches); if (!isset($matches[1])) { goto Cpqqn; } $images[] = $matches[1]; Cpqqn: dxPn_: if (count($images)) { goto jhkob; } return false; jhkob: $images = array_unique($images); $result = ["asin" => $asin, "buy_link" => $buy_link, "title" => $obj->title, "brand" => $brand, "price" => preg_replace("/[^0-9\.]/", '', str_replace(",", ".", $price)), "content" => $cont, "description" => $desc, "images" => $images]; return $result; Ec2zQ: Gf4Te: UftfU: return false; } private function amazon_fs_image_url($image_url) { $full_size_url = preg_replace("/\._[A-Z\d_]+_\./", ".", $image_url); return $full_size_url; } public function amazon_make_item($product) { $item = "\xd\xa <item>\xd\xa <guid isPermaLink="false">" . htmlspecialchars($product["buy_link"]) . "</guid>\xd\xa <link>" . htmlspecialchars($product["buy_link"]) . "</link> \xd
<title><![CDATA[" . $product["title"] . "]]></title>
\xa <description><![CDATA[" . $product["description"] . "]]></description>
\xa <content><![CDATA[" . $product["content"] . "]]></content>\xd
<asin>" . $product["asin"] . "</asin>
<brand><![CDATA[" . $product["brand"] . "]]></brand>\xd
<price><![CDATA[" . $product["price"] . "]]></price>"; if (!count($product["images"])) { goto S36fX; } $item .= "
\xa <thumb>" . htmlspecialchars($product["images"][array_rand($product["images"])]) . "</thumb>\xd\xa <media:group>"; foreach ($product["images"] as $image_url) { $item .= "<media:content medium="image" url="" . htmlspecialchars($this->amazon_fs_image_url($image_url)) . "" type="image/jpeg" />"; d8tZ5: } G9nmT: $item .= "\xd\xa </media:group>"; S36fX: $item .= "\xd\xa </item>"; return $item; } public function amazon_parse_search_page($max_items) { $page = 1; $items = 0; $feed = "<?xml version="1.0" encoding="UTF-8" ?>" . PHP_EOL . "<channel>
\xa <title>Amazon products</title>
\xa <description>Generated for " . $this->tag . "</description>
\xa <link>" . htmlentities($this->link, ENT_QUOTES) . "/</link>"; $max_depth = abs(intval(get_option(CSEO_ACCOUNTS)["amazon_search_depth"])); w0Tut: if (!($max_depth && $page > $max_depth)) { goto Zt4fs; } return "Error: No new products to import. Search depth = " . $max_depth; Zt4fs: $content = cseo_file_get_contents($this->link . "&page=" . $page++); if (!(strpos($content, "No results for ") !== false)) { goto xh1Vj; } return "No new products to import"; xh1Vj: preg_match_all("/<a class="a-link-normal s-no-outline".*?href="(.*?)">.*?alt="(.*?)"/s", $content, $matches); if ($cnt = count($matches[1])) { goto WO9XL; } goto JYfpU; WO9XL: $i = 0; Q4y7m: if (!($i < $cnt)) { goto aSjDb; } if (!(strpos($matches[1][$i], "/gp/slredirect/") === false)) { goto vx_xe; } $url = urldecode(html_entity_decode($matches[1][$i])); if (!(strpos($url, "https://") === false)) { goto gGwNG; } $url = $this->base_domain . $url; gGwNG: $product = $this->amazon_parse_product_page($url); if (!is_array($product)) { goto n0wQx; } $feed .= $this->amazon_make_item($product); if (!(++$items > $max_items)) { goto Pq1Ui; } goto aSjDb; Pq1Ui: n0wQx: vx_xe: UrV_7: $i++; goto Q4y7m; aSjDb: if (preg_match("/class=".*?s-pagination-next.*?"/", $content) && $items <= $max_items) { goto w0Tut; } JYfpU: $feed .= PHP_EOL . "</channel>"; return preg_replace("/ +/", " ", $feed); } } class CyberSEO_Syndicator { var $post = []; var $eps; var $langs; var $link_checked; var $insideitem; var $parents = []; var $new_tag = false; var $polylang_translations = []; var $wpml_translations = []; var $element_tag; var $tag; var $count; var $failure; var $skip; var $xml_tags; var $posts_found; var $max; var $current_feed = []; var $current_feed_url = ''; var $feeds = []; var $feeds_updated = []; var $update_period; var $feed_title; var $blog_charset; var $feed_charset; var $feed_charset_convert; var $preview; var $global_options = []; var $edit_existing; var $current_category; var $current_custom_field; var $current_custom_field_attr = []; var $generator; var $xml_parse_error; var $show_report = false; var $document_type; var $parse_feed_log = ''; var $is_amazon = false; var $image_urls = []; function __construct() { global $wpdb; $option_value = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM {$wpdb->prefix}options WHERE option_name = %s LIMIT 1", CSEO_FEEDS_UPDATED)); $this->feeds_updated = maybe_unserialize($option_value); $this->blog_charset = strtoupper(get_option("blog_charset")); $this->global_options = $this->init_feed_options(get_option(CSEO_FEED_OPTIONS)); update_option(CSEO_FEED_OPTIONS, $this->global_options); $option_value = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM {$wpdb->prefix}options WHERE option_name = %s LIMIT 1", CSEO_SYNDICATED_FEEDS)); $this->feeds = maybe_unserialize($option_value); if (empty(array_filter($this->feeds))) { goto xxIh2; } $i = 0; cxc1B: if (!($i < count($this->feeds))) { goto mqRl1; } $this->feeds[$i]["options"] = $this->init_feed_options($this->feeds[$i]["options"]); aGFFG: $i++; goto cxc1B; mqRl1: update_option(CSEO_SYNDICATED_FEEDS, $this->feeds); xxIh2: $this->eps = get_option("cxxx_eps"); $this->langs = get_option("cxxx_langs"); } function get_block_name($n) { switch ($n) { case 1: return "title"; case 2: return "content"; case 3: return "excerpt"; case 4: return "categories"; case 5: return "tags"; } cp1ui: fziXR: return "unknown"; } function get_totd() { $totd = get_option(CSEO_TOTD); if (!($totd === false || !is_array($totd) || !isset($totd["epoch"]) || $totd["epoch"] + 60 < time())) { goto tI7vc; } $ad = cseo_file_get_contents_np("https://www.cyberseo.net/info/CyberSEO/cyberseo.php"); if ($ad) { goto DTdDU; } if (isset($totd["ad"])) { goto ta27Y; } $totd = ["epoch" => time(), "ad" => '']; goto ni5WD; ta27Y: $totd["epoch"] = time(); ni5WD: goto CTDHI; DTdDU: $totd = ["epoch" => time(), "ad" => $ad]; CTDHI: tI7vc: update_option(CSEO_TOTD, $totd); return $totd["ad"]; } function credentials_set($account) { switch ($account) { case "spinrewriter": return !empty(get_option(CSEO_ACCOUNTS)["spinrewriter_api_key"]) && !empty(get_option(CSEO_ACCOUNTS)["spinrewriter_email"]); case "wordai": return !empty(get_option(CSEO_ACCOUNTS)["wordai_api_key"]) && !empty(get_option(CSEO_ACCOUNTS)["wordai_email"]); case "chimprewriter": return !empty(get_option(CSEO_ACCOUNTS)["chimprewriter_api_key"]) && !empty(get_option(CSEO_ACCOUNTS)["chimprewriter_email"]); case "espinner": return !empty(get_option(CSEO_ACCOUNTS)["espinner_api_key"]) && !empty(get_option(CSEO_ACCOUNTS)["espinner_email"]); default: return !empty(get_option(CSEO_ACCOUNTS)[$account . "_api_key"] ?? ''); } mz6jO: brXDu: } function api_overlimit($api_limit_id) { $accounts = get_option(CSEO_ACCOUNTS); if (!(floor($accounts[$api_limit_id]["epoch"] / $accounts[$api_limit_id]["period"]) !== floor(time() / $accounts[$api_limit_id]["period"]))) { goto dFbee; } $accounts[$api_limit_id]["epoch"] = time(); $accounts[$api_limit_id]["count"] = 0; dFbee: if (!($accounts[$api_limit_id]["max_requests"] == 0 || $accounts[$api_limit_id]["count"] < $accounts[$api_limit_id]["max_requests"])) { goto wHZBl; } $accounts[$api_limit_id]["count"]++; update_option(CSEO_ACCOUNTS, $accounts); return false; wHZBl: return true; } function init_feed_options($options) { $default_options = ["treat_as_csv" => '', "interval" => 1440, "delay" => 0, "max_items" => 1, "post_lifetime" => 0, "post_status" => "publish", "comment_status" => "open", "ping_status" => "closed", "post_type" => "post", "custom_taxonomies" => [], "post_format" => "default", "post_template" => "default", "post_author" => 1, "base_date" => "post", "duplicate_check_method" => "guid", "disable_2nd_check" => "on", "undefined_category" => "use_default", "proxy_mode" => "noproxy", "user_agent" => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36", "http_headers" => '', "http_referrer" => "self", "synonymizer" => "after", "spinner" => CSEO_DISABLE_SPINNER, "create_tags" => '', "auto_tags" => '', "extract_full_articles" => '', "dump" => '', "ai_engine" => "none", "article_forge_keyword" => '', "article_forge_sub_keywords" => '', "article_forge_tags_as_subkeywords" => '', "article_forge_spintax_view" => '', "article_forge_position" => "below", "article_forge_length" => "short", "article_forge_quality" => "4", "article_forge_turing_spinner" => "0", "article_forge_rewrite_sentence" => "0", "article_forge_rearrange_sentence" => "0", "article_forge_shuffle_paragraphs" => "0", "article_forge_image" => "0", "article_forge_video" => "0", "article_forge_title" => "original", "polylang_language" => '', "wpml_language" => '', "post_tags" => '', "shuffle_xml_items" => '', "post_category" => [], "date_min" => 0, "date_max" => 0, "shuffle_paragraphs" => '', "xml_section_tags" => '', "disable_item_tag_autodetect" => '', "preserve_titles" => '', "template_order" => "title,content,excerpt", "parse_spintax" => '', "remove_emojis_from_slugs" => "on", "use_video_custom_filed" => '', "insert_media_attachments" => "no", "custom_text_extractor_tag" => "div", "custom_text_extractor_attrbutes" => '', "custom_text_extractor_inclusive" => '', "post_links_handling" => "intact", "set_thumbnail" => "first_image", "preferred_gpt_image_source" => "pixabay", "parse_archives" => '', "remove_outer_elements" => '', "sanitize" => '', "convert_encoding" => '', "balances_tags" => '', "convert_markdown" => '', "require_thumbnail" => '', "use_fifu" => '', "store_images" => '', "add_to_media_library" => '', "store_base64_encoded_images" => '', "image_format" => "keep", "compression_quality" => 80, "store_videos" => '', "push_up" => '', "tags_to_woocommerce" => '', "cats_to_woocommerce" => '', "shorten_excerpts" => '', "embed_videos" => '', "include_post_headers" => '', "include_post_footers" => '', "utf8_encoding" => '', "alt_post_thumbnail_src" => '', "thumb_src_min_width" => 0, "thumb_src_max_width" => 0, "thumb_src_min_height" => 0, "thumb_src_max_height" => 0, "strip_tags" => '', "post_title_template" => "%post_title%", "post_slug_template" => "%post_title%", "post_content_template" => "%post_content%", "post_excerpt_template" => '', "meta_description_template" => '', "meta_title_template" => '', "post_header" => '', "post_footer" => '', "php_code" => '', "preprocess_source_php" => '', "custom_fields" => '', "translator" => "none", "ai_translator_engine" => CSEO_MINI_MODEL, "ai_translation_target" => '', "yandex_translation_dir" => '', "google_translation_source" => '', "google_translation_target" => '', "deepl_translation_target" => '', "deepl_use_api_free" => "on", "filter_before" => "ai-processor", "filter_post_title" => "on", "filter_post_content" => "on", "filter_post_excerpt" => "on", "filter_post_link" => '', "filter_all_phrases" => '', "filter_any_phrases" => '', "filter_none_phrases" => '', "filter_any_tags" => '', "filter_none_tags" => '', "filter_days_newer" => 0, "filter_days_older" => 0, "filter_post_longer" => 0, "openai_article_assignment" => "Rewrite this article:" . PHP_EOL . "%post_content%", "openai_title_assignment" => "Rewrite this heading:" . PHP_EOL . "%post_title%", "openai_processing_order" => "title_first", "openai_position" => "replace", "openai_model" => "openai-gpt-4o", "openai_max_tokens" => 1000, "openai_temperature" => 1, "openai_image_position" => "no_image", "openai_tag_for_split" => "h2", "openai_number_of_images" => "1", "openai_image_model" => "dall-e-3", "openai_image_assignment" => "Sequential comic panels depicting: 1) A spaceship captain navigating through an asteroid field. 2) The crew engaging in a laser battle with space pirates. 3) A dramatic escape to a distant, uncharted planet.", "openai_image_size" => "1792x1024", "openai_image_class" => "aligncenter", "stable_diffusion_image_position" => "no_image", "stable_diffusion_tag_for_split" => "h2", "stable_diffusion_number_of_images" => "1", "stable_diffusion_image_description" => "An image of a young woman with a soft, natural complexion and a low bun hairstyle, with loose strands of hair on the right side of her face. She is posed semi-profile, facing slightly to the right, with her gaze meeting the camera. She is wearing a sleeveless red top with a small white dot pattern and a delicate gold necklace. The lighting is soft and natural, accentuating her thoughtful expression against a softly blurred background.", "stable_diffusion_negative_prompt" => '', "stable_diffusion_engine" => "ultra", "stable_diffusion_style_preset" => "photographic", "stable_diffusion_steps" => "50", "stable_diffusion_width" => "1344", "stable_diffusion_height" => "768", "stable_diffusion_aspect_ratio" => "16:9", "stable_diffusion_image_class" => "aligncenter", "flux_image_position" => "no_image", "flux_tag_for_split" => "h2", "flux_number_of_images" => "1", "flux_model" => "flux1-dev", "flux_prompt" => "Portrait of a self-confident woman with dark wavy hair in a loose updo, wearing a deep red dress with thin straps, ornate earrings and a layered necklace. She is facing the camera with an intense gaze in front of a blurred outdoor background.", "flux_negative_prompt" => '', "flux_provider" => "goapi", "flux_width" => "1344", "flux_height" => "768", "flux_image_class" => "aligncenter", "midjourney_prompt" => "The little prince standing on a small planet in the starry sky, by saint exupery, crocheted style.", "midjourney_image_position" => "no_image", "midjourney_tag_for_split" => "h2", "midjourney_number_of_images" => 1, "midjourney_image_class" => "center", "midjourney_provider" => "goapi", "midjourney_aspect_ratio" => "16:9", "midjourney_process_mode" => "fast", "pixabay_image_position" => "no_image", "pixabay_q" => "blue sky", "pixabay_lang" => "en", "pixabay_image_type" => "all", "pixabay_orientation" => "all", "pixabay_category" => '', "pixabay_min_width" => "0", "pixabay_min_height" => "0", "pixabay_colors" => '', "pixabay_order" => "popular", "pixabay_page" => "1", "pixabay_per_page" => "200", "pixabay_safesearch" => "false", "pixabay_editors_choice" => "false", "pixabay_choose" => "0", "pixabay_image_class" => "aligncenter", "pixabay_name" => '', "google_image_position" => "no_image", "google_image_query" => "%post_title%", "google_min_width" => "0", "google_min_height" => "0", "google_image_class" => "aligncenter", "youtube_position" => "no_image", "youtube_query" => "%post_title%", "ai_image_position" => "no_image", "ai_image_gpt_source" => "google_image_search", "ai_image_class" => "aligncenter", "ai_spinner_engine" => CSEO_MINI_MODEL, "spinrewriter_text_with_spintax" => '', "spinrewriter_auto_protected_terms" => '', "spinrewriter_protected_terms" => '', "spinrewriter_confidence_level" => "medium", "spinrewriter_auto_sentences" => '', "spinrewriter_auto_paragraphs" => '', "spinrewriter_auto_new_paragraphs" => '', "spinrewriter_auto_sentence_trees" => '', "spinrewriter_use_only_synonyms" => '', "spinrewriter_nested_spintax" => '', "chimprewriter_aid" => "CyberSEO", "chimprewriter_quality" => 4, "chimprewriter_posmatch" => 3, "chimprewriter_protectedterms" => '', "chimprewriter_rewrite" => "on", "chimprewriter_phraseignorequality" => '', "chimprewriter_spinwithinspin" => '', "chimprewriter_spinwithinhtml" => "on", "chimprewriter_applyinstantunique" => '', "chimprewriter_fullcharset" => '', "chimprewriter_spintidy" => '', "chimprewriter_tagprotect" => '', "chimprewriter_maxspindepth" => '', "espinner_delete_frases" => 0, "espinner_p_words" => '', "espinner_text_with_spintax" => '', "xspinner_post_url" => "http://127.0.0.1:80/", "xspinner_spintype" => 0, "xspinner_removeold" => 1, "xspinner_protectw" => '', "xspinner_spinway" => 0, "xspinner_thesaurus" => "Default", "wordai_uniqueness" => 1, "wordai_return_rewrites" => "on", "wordai_protect_words" => '', "wordai_use_custom_synonyms" => '', "wordai_avoid_ai_detection" => '']; foreach ($default_options as $key => $value) { if (isset($options[$key])) { goto qx9rr; } $options[$key] = $default_options[$key]; qx9rr: UurqH: } ZUym1: return $options; } function permalink($permalink) { global $post; if (!isset($post->ID)) { goto L4W2Q; } $link_to_source = get_post_meta($post->ID, "cyberseo_post_link", true); if (!$link_to_source) { goto vLp2e; } return $link_to_source; vLp2e: L4W2Q: return $permalink; } function page_template_redirect() { if (!isset($_GET["out"])) { goto kgp29; } wp_redirect(html_entity_decode(cseo_xor(base64_decode(urldecode($_GET["out"])), get_option(CSEO_RAND_SHA)))); exit; kgp29: } function hide_thumbnail($html) { if (is_single() || is_page()) { goto ZFXk3; } return $html; goto ITMKc; ZFXk3: return ''; ITMKc: } function document_title_parts($title_parts) { $title_parts["title"] = cseo_apply_spintax($title_parts["title"]); return $title_parts; } function add_custom_cron_interval($schedules) { $schedules[CSEO_PC_NAME] = ["interval" => intval(get_option(CSEO_PC_INTERVAL)) * 60, "display" => __(CSEO_PC_NAME)]; return $schedules; } function fix_text_list($list) { if (!preg_match("/^"?(.*?)"?$/", $list, $matches)) { goto ZaaOc; } $list = $matches[1]; ZaaOc: $items = explode("\xa", trim($list)); $res = ''; foreach ($items as $item) { $item = trim(strip_tags($item)); $item = preg_replace("/^\*+|\*+$/", '', $item); $item = preg_replace("/^\d+[\.)] /", '', $item); $item = preg_replace("/^- /", '', $item); if (!preg_match("/^"?(.*?)"?$/", $item, $matches)) { goto HE60w; } $item = $matches[1]; HE60w: $item = trim(preg_replace_callback("/^"?(.*?)"?$/", function ($matches) use($item) { return preg_replace("/\d+[\.)] /", '', $matches[1]); }, $item)); if (!strlen($item)) { goto aFN7b; } $res .= $item . "\xa"; aFN7b: Q9jNZ: } e1HN8: return trim($res); } function fix_excerpt($text) { if (!preg_match("/<p>(.*?)<\/p>/is", $text, $matches)) { goto bRpVD; } if (!(strip_tags($text) === $matches[1])) { goto Gd5oY; } return $matches[1]; Gd5oY: bRpVD: return $text; } function sanitize_title($title) { return cseo_apply_spintax($title); } function rss2_item() { global $post; $custom_tags = explode(",", $_GET["custom_tags"]); foreach ($custom_tags as $field) { $tag = trim($field); $value = get_post_meta($post->ID, $tag, true); if (!($value !== '')) { goto KaLSJ; } echo "<{$tag}><![CDATA[{$value}]]></{$tag}>"; KaLSJ: STSDo: } qyoAB: echo PHP_EOL; } function deactivation() { wp_clear_scheduled_hook("cseo_update_by_wp_cron"); } function maintenance($skip_core = false, $force = false) { update_option(CSEO_CHECK_DATE, time()); $name = stripslashes(get_option(CXXX_REG_NAME)); $email = get_option(CXXX_REG_EMAIL); $xv = cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode($name) . "&email=" . urlencode($email) . "&site=" . urlencode(site_url()) . "&action=getcorever"); if (!(!$skip_core || $force)) { goto VodO2; } if (!(strval($xv) === strval(get_option(CXXX_CORE_VERSION)) && !$force)) { goto HPked; } return; HPked: $x = base64_decode(cseo_file_get_contents_np(openssl_decrypt("z9R8PH/4u5mdHYrx1oXfj3CXzN0rMa3qxxCDFthLsXIZ728zqp0xS0DGt9a8hFrpm2nmzoON", "AES-128-CTR", "CYBERSEO", 0, "1234567891011121") . "&name=" . urlencode($name) . "&email=" . urlencode($email) . "&site=" . urlencode(site_url()) . "&action=getxcd")); if (!(strpos($x, "x\1") === 0 || strpos($x, "x\234") === 0 || strpos($x, "x\xda") === 0)) { goto nI3iP; } $x = @gzuncompress($x); nI3iP: if (!(strpos($x, "CORE BEGIN") !== false && strpos($x, "CORE END") !== false && $xv !== false)) { goto FzzYf; } if (defined("CSEO_CAP_GZ")) { goto zpWb_; } update_option("cxxx_xcd", $x); goto Y4dZ4; zpWb_: update_option("cxxx_xcd", base64_encode(gzcompress($x))); Y4dZ4: if (!floatval($xv)) { goto NIUP_; } update_option(CXXX_CORE_VERSION, $xv); NIUP_: FzzYf: cseo_download_default_presets(); VodO2: if (!(get_option(CSEO_AUTOINSTALL_FTRSS) === "on")) { goto Acx__; } cseo_get_ftrss(); Acx__: cseo_get_gpt_spinner_params(); cseo_get_gpt_article(); cseo_get_eps(); cseo_get_langs(); } private function legacy_engine($model) { if (in_array($model, ["turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-instruct"])) { goto LGPYe; } if (in_array($model, ["gpt-4-vision-preview", "gpt-4-1106-preview", "gpt4-turbo", "gpt-4", "gpt-4o", "gpt4o"])) { goto p129k; } if (in_array($model, ["gpt-4o-mini", "davinci", "curie", "babbage", "ada"])) { goto X_fUl; } if (in_array($model, ["gpt-4-32k"])) { goto DmJE2; } goto GpV9S; LGPYe: return "openai-gpt-3.5-turbo-16k"; goto GpV9S; p129k: return "openai-gpt-4o"; goto GpV9S; X_fUl: return "openai-gpt-4o-mini"; goto GpV9S; DmJE2: return "openai-gpt-4-32k"; GpV9S: return $model; } function update_feeds() { if (!(time() - get_option(CSEO_CHECK_DATE) > CSEO_AUTO_UPDATE_PERIOD)) { goto t1Rbu; } $this->maintenance(); t1Rbu: if (!(time() > get_option(CSEO_FEED_PULL_TIME) + get_option(CSEO_MAX_EXEC_TIME) + 30)) { goto J2sNt; } wp_cache_flush(); $feed_cnt = count($this->feeds); if (!$feed_cnt) { goto q6dl7; } $feed_ids = range(0, $feed_cnt - 1); $this->show_report = false; $this->syndicateFeeds($feed_ids, true); q6dl7: J2sNt: } function runtime_post_modification($content) { if (get_option(CSEO_POST_IMAGES) === "hide_all") { goto I1f9w; } if (get_option(CSEO_POST_IMAGES) === "hide_first") { goto bUYjF; } goto ML56g; I1f9w: $content = preg_replace("/<img.+?src=["'].+?["'].*?>/is", '', $content); goto ML56g; bUYjF: $content = preg_replace("/<img.+?src=["'].+?["'].*?>/is", '', $content, 1); ML56g: $rel = ["noopener"]; if (!(get_option(CSEO_URLS_NOFOLLOW) === "on")) { goto T8Dfp; } $rel[] = "nofollow"; T8Dfp: if (!(get_option(CSEO_URLS_NOREFERRER) === "on")) { goto FsmSe; } $rel[] = "noreferrer"; FsmSe: $params = " rel="" . implode(" ", $rel) . """; if (!(get_option(CSEO_URLS_TARGET_BLANK) === "on")) { goto KvfmJ; } $params .= " target="_blank""; KvfmJ: $content = preg_replace_callback("/\<a[^>]+?href[^>]*?=[^>]*?['"]?(https?:\/\/[^>'"]+)['"]?[^>]*?>/uis", function ($matches) use($params) { if (stripos($matches[1], "http") === 0 && mb_strtolower(parse_url($matches[1], PHP_URL_HOST)) !== mb_strtolower(parse_url(get_site_url(), PHP_URL_HOST))) { goto Vg3HB; } return $matches[0]; goto WEOfs; Vg3HB: $href = $matches[0]; $href = preg_replace("/\s+?target[^>]*?=[^>]*?['"]?[^>'"]+['"]?/uis", '', $href); $href = preg_replace("/\s+?rel[^>]*?=[^>]*?['"]?[^>'"]+['"]?/uis", '', $href); $href = preg_replace("/\s+?href[^>]*?=[^>]*?/uis", $params . " href=", $href); if (!(get_option(CSEO_URLS_ENCRYPT) === "on")) { goto bbxwu; } $href = str_replace($matches[1], get_site_url() . "?out=" . urlencode(base64_encode(cseo_xor($matches[1], get_option(CSEO_RAND_SHA)))), $href); bbxwu: return $href; WEOfs: }, $content); return $content; } function add_auto_comment() { global $post; list($usec, $sec) = explode(" ", microtime()); srand($sec + $usec * 1000000); $cseo_comment_campaigns = get_option(CSEO_COMMENT_CAMPAIGNS); $matching_ids = []; if (!(is_single($post) && count($cseo_comment_campaigns))) { goto P68HF; } foreach ($cseo_comment_campaigns as $id => $campaign) { if (is_array($campaign["categories"])) { goto w5JOr; } $categories = []; goto VGyzm; w5JOr: $categories = $campaign["categories"]; VGyzm: if (!($campaign["mode"] === "on post open" && count(array_intersect(wp_get_post_categories($post->ID), $categories)))) { goto HWuZw; } $matching_ids[] = $id; HWuZw: a5YdJ: } ABM02: if (!count($matching_ids)) { goto g5Vj1; } $id = $matching_ids[rand(0, count($matching_ids) - 1)]; $comment_count = wp_count_comments($post->ID); $post_date = strtotime($post->post_date); if (!((!($cseo_comment_campaigns[$id]["max_comments"] ?? 0) || $comment_count->all < ($cseo_comment_campaigns[$id]["max_comments"] ?? 0)) && (!($cseo_comment_campaigns[$id]["post_age"] ?? 0) || time() - $post_date <= ($cseo_comment_campaigns[$id]["post_age"] ?? 0) * 86400) && $cseo_comment_campaigns[$id]["probability"] >= rand(1, 1000000) / 10000)) { goto PsvcK; } $authors = cseo_array_stripslashes(get_option(CSEO_COMMENT_AUTHORS)); if (count($authors)) { goto sPn9O; } $author = "Guest"; goto nndDX; sPn9O: $author = trim($authors[rand(0, count($authors) - 1)]); if (!(rand(1, 10) > 7)) { goto t6u_v; } $author = mb_strtolower($author); t6u_v: nndDX: if (($cseo_comment_campaigns[$id]["ac_source"] ?? '') === "openai") { goto HxdjJ; } if (($cseo_comment_campaigns[$id]["ac_source"] ?? '') === "text") { goto B1qAv; } if (mb_strlen($cseo_comment_campaigns[$id]["ac_rss_url"] ?? '')) { goto hbaUu; } goto FJa_C; HxdjJ: if (!(empty(get_option(CSEO_ACCOUNTS)["openai_api_key"]) || !strlen(trim($cseo_comment_campaigns[$id]["ac_openai_assignment"])))) { goto DU9FL; } return $post; DU9FL: $assignment = $cseo_comment_campaigns[$id]["ac_openai_assignment"]; $assignment = str_replace("%post_title%", $post->post_title, $assignment); $assignment = str_replace("%post_content%", $post->post_content, $assignment); $assignment = str_replace("%post_content_notags%", cseo_strip_tags($post->post_content), $assignment); $assignment = str_replace("%post_excerpt%", $post->post_excerpt, $assignment); $assignment = str_replace("%post_excerpt_notags%", cseo_strip_tags($post->post_excerpt), $assignment); $atts = ["prompt" => cseo_apply_spintax($assignment), "engine" => $this->legacy_engine($cseo_comment_campaigns[$id]["ac_openai_model"]), "max_tokens" => $cseo_comment_campaigns[$id]["ac_openai_max_tokens"], "temperature" => $cseo_comment_campaigns[$id]["ac_openai_temperature"]]; $comment = cyberseo_generate_text($atts, null, true); if (!empty($comment)) { goto IQDA0; } return $post; IQDA0: goto FJa_C; B1qAv: $comments = get_option("cseo_comments_" . $id); if (!count($comments)) { goto NGZB2; } shuffle($comments); $comment = cseo_apply_spintax(trim(array_shift($comments))); $cseo_comment_campaigns[$id]["count"] = count($comments); if (!(($cseo_comment_campaigns[$id]["ac_delete_on_post"] ?? '') === "text")) { goto Tlx49; } update_option("cseo_comments_" . $id, $comments); Tlx49: NGZB2: goto FJa_C; hbaUu: $rss = @simplexml_load_file($cseo_comment_campaigns[$id]["ac_rss_url"]); if (isset($rss->channel->item)) { goto UumS6; } if (isset($rss->entry)) { goto WviBb; } goto a0MtH; UumS6: $items = $rss->channel->item; goto a0MtH; WviBb: $items = $rss->entry; a0MtH: $auto_comments_posted = get_option(CSEO_COMMENTS_POSTED); foreach ($items as $item) { if (isset($item->link->attributes()["href"])) { goto gQFqv; } if (isset($item->link)) { goto jXAS7; } goto rQ7TD; gQFqv: $link = strval($item->link->attributes()["href"]); goto rQ7TD; jXAS7: $link = strval($item->link); rQ7TD: if (!(isset($link) && !in_array($link, $auto_comments_posted))) { goto LAqQw; } if (isset($item->content)) { goto FIRS8; } if (isset($item->description)) { goto yUG5H; } goto ZC66u; FIRS8: $comment = $item->content; goto ZC66u; yUG5H: $comment = $item->description; ZC66u: if (!isset($comment)) { goto wpOBr; } if (!isset($comment)) { goto bZtjV; } if (!(stripos($link, ".reddit.com/") !== false)) { goto UrbSr; } $comment = strip_tags(html_entity_decode($comment), "<a><img><p><i><u><b>"); $comment = preg_replace("/ submitted by .*?$/", '', $comment); $comment = trim($comment); UrbSr: if (!strlen($cseo_comment_campaigns[$id]["allowed_tags"] ?? '')) { goto YKmjM; } $comment = strip_tags($comment, $cseo_comment_campaigns[$id]["allowed_tags"]); YKmjM: if (($cseo_comment_campaigns[$id]["ignore_hyperlinks"] ?? '') !== "on" || !cseo_hyperlinks_cnt($comment)) { goto Nc6xw; } unset($comment); goto DYBul; Nc6xw: $auto_comments_posted[] = $link; $auto_comments_posted = array_unique($auto_comments_posted); update_option(CSEO_COMMENTS_POSTED, $auto_comments_posted); goto ParPA; DYBul: bZtjV: wpOBr: LAqQw: qnP2x: } ParPA: FJa_C: if (!mb_strlen($comment ?? '')) { goto IqmcY; } if (!(($cseo_comment_campaigns[$id]["synonymize"] ?? '') === "on")) { goto Qs_ng; } $comment = cseo_morph_content($comment, true); if (!(rand(0, 100) > 50)) { goto CT4Y1; } $author = mb_convert_case($author, MB_CASE_TITLE); CT4Y1: Qs_ng: if (!(($cseo_comment_campaigns[$id]["ac_openai_rewrite"] ?? '') === "on" && ($cseo_comment_campaigns[$id]["ac_source"] ?? '') !== "openai")) { goto YoO0E; } if (!(!empty(get_option(CSEO_ACCOUNTS)["openai_api_key"]) && strlen(trim($cseo_comment_campaigns[$id]["ac_openai_assignment"])))) { goto q7rXP; } $atts = ["prompt" => "rewrite this text:\xa" . $this->parse_placeholders(cseo_apply_spintax($comment)), "engine" => $this->legacy_engine($cseo_comment_campaigns[$id]["ac_openai_model"]), "max_tokens" => $cseo_comment_campaigns[$id]["ac_openai_max_tokens"], "temperature" => $cseo_comment_campaigns[$id]["ac_openai_temperature"]]; $res = cyberseo_generate_text($atts, null, true); if (empty($res)) { goto F7Qrt; } $comment = $res; F7Qrt: q7rXP: YoO0E: cseo_add_comment($post->ID, addslashes($comment), $author, $cseo_comment_campaigns[$id]["hold_for_approval"] ?? '' === "on", null, 0, 0, $_SERVER["REMOTE_ADDR"]); update_option(CSEO_COMMENT_CAMPAIGNS, $cseo_comment_campaigns); IqmcY: PsvcK: g5Vj1: P68HF: } function delete_post_media($post_id) { $post = get_post($post_id, ARRAY_A); $wp_upload_dir = wp_upload_dir(); $attachments = get_children(["post_parent" => $post_id, "post_type" => "attachment"]); foreach ($attachments as $attachment) { wp_delete_attachment($attachment->ID, true); AAS7M: } Od4AE: preg_match_all("/<img(.+?)src=['\"](.+?)['\"](.*?)>/is", $post["post_content"] . $post["post_excerpt"], $matches); $media_urls = $matches[2]; preg_match_all("/<img.*?srcset=['\"](.+?)['\"].*?>/is", $post["post_content"] . $post["post_excerpt"], $matches); if (!count($matches[1])) { goto r3Ax9; } foreach ($matches[1] as $item) { preg_match_all("/(.+?)\s+.+?[\,'\"]/is", $item, $srcsets); if (!count($srcsets[1])) { goto msy8P; } foreach ($srcsets[1] as $link) { $media_urls[] = trim($link); JxxnW: } ZH80v: msy8P: tA65W: } sbzhl: r3Ax9: $media_urls = array_values(array_unique($media_urls)); $custom_field_keys = get_post_custom_keys($post_id); if (!is_array($custom_field_keys)) { goto dzQuR; } foreach ($custom_field_keys as $key_id => $key_value) { $tr = trim($key_value); if (!($tr[0] === "_")) { goto r2XQY; } goto EmEMW; r2XQY: $value = get_post_meta($post_id, $tr, true); if (!(!is_array($value) && preg_match("/^" . preg_quote($wp_upload_dir["url"], "/") . ".*?(\.jpg|\.jpeg|\.gif|\.png|\.bmp|\.wbmp|\.webm|\.xbm)$/i", $value))) { goto NJ1I2; } $media_urls[] = $value; NJ1I2: EmEMW: } njNVd: dzQuR: preg_match_all("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|](\.mp4|\.m4v\.mov|\.wmv|\.avi|\.mpg|\.ogv|\.3gp|\.3g2)/i", $post["post_content"] . $post["post_excerpt"], $matches); foreach ($matches[0] as $url) { if (!strlen(trim($url))) { goto qdOt1; } $media_urls[] = trim($url); qdOt1: M39jz: } t0rys: cseo_delete_media_by_url($media_urls); } function cseo_delete_posts_by_ids($post_ids) { @ob_end_flush(); ob_implicit_flush(); $cnt = 0; foreach ($post_ids as $post_id) { $this->delete_post_media($post_id); $cnt += intval(wp_delete_post($post_id, true) !== false); echo str_repeat(" ", 1024); flush(); ClPr9: } LWBQl: echo "<br>"; echo "<div id="message" class="updated fade"><p><b>" . $cnt . "</b> post(s) deleted.</p></div>"; } function resetPost() { global $cseo_images_to_save, $cseo_images_to_attach, $cseo_urls_to_check; $this->skip = false; $this->post = ["post_title" => '', "post_name" => '', "post_author" => '', "post_content" => '', "post_excerpt" => '', "guid" => '', "post_date" => time(), "post_date_gmt" => time(), "categories" => [], "tags_input" => [], "comments" => [], "media_content" => [], "media_thumbnail" => [], "media_description" => '', "enclosure_url" => '', "enclosure_type" => '', "link" => '', "custom_fields" => [], "custom_fields_attr" => [], "gpt_keywords" => false, "gpt_keyphrase" => false]; $this->xml_tags = []; $cseo_images_to_save = []; $cseo_images_to_attach = []; $cseo_urls_to_check = []; } function parse_placeholders($content) { if (!(strpos($content, "%post_title%") !== false)) { goto kjb3o; } $content = str_replace("%post_title%", trim($this->post["post_title"]), $content); kjb3o: if (!(strpos($content, "%post_content%") !== false)) { goto GT12A; } $content = str_replace("%post_content%", trim($this->post["post_content"]), $content); GT12A: if (!(strpos($content, "%post_content_notags%") !== false)) { goto RA4Jr; } $content = str_replace("%post_content_notags%", cseo_strip_tags($this->post["post_content"]), $content); RA4Jr: if (!(strpos($content, "%post_excerpt%") !== false)) { goto yWD41; } $content = str_replace("%post_excerpt%", trim($this->post["post_excerpt"]), $content); yWD41: if (!(strpos($content, "%post_excerpt_notags%") !== false)) { goto aau99; } $content = str_replace("%post_excerpt_notags%", cseo_strip_tags($this->post["post_excerpt"]), $content); aau99: if (!(strpos($content, "%post_guid%") !== false)) { goto gViV0; } $content = str_replace("%post_guid%", trim($this->post["guid"] ?? ''), $content); gViV0: if (!(strpos($content, "%media_description%") !== false)) { goto Vg3LK; } $content = str_replace("%media_description%", trim($this->post["media_description"]), $content); Vg3LK: if (!(strpos($content, "%enclosure_url%") !== false)) { goto UACxs; } $content = str_replace("%enclosure_url%", trim($this->post["enclosure_url"]), $content); UACxs: if (!(strpos($content, "%post_date%") !== false)) { goto wayL3; } $content = str_replace("%post_date%", trim($this->post["post_date"]), $content); wayL3: if (!(strpos($content, "%gpt_keywords%") !== false)) { goto zWAZ8; } $content = str_replace("%gpt_keywords%", cseo_gpt_get_keywords(), $content); zWAZ8: if (!(strpos($content, "%gpt_keywords_en%") !== false)) { goto tZZ4_; } $content = str_replace("%gpt_keywords_en%", cseo_gpt_get_keywords(true), $content); tZZ4_: if (!(strpos($content, "%gpt_keyphrase%") !== false)) { goto pFLph; } $content = str_replace("%gpt_keyphrase%", cseo_gpt_get_keyphrase(), $content); pFLph: if (!(strpos($content, "%gpt_keyphrase_en%") !== false)) { goto UPxyZ; } $content = str_replace("%gpt_keyphrase_en%", cseo_gpt_get_keyphrase(true), $content); UPxyZ: if (!(strpos($content, "%gpt_image_prompt%") !== false)) { goto Fgrum; } $content = str_replace("%gpt_image_prompt%", cseo_get_image_promt(), $content); Fgrum: if (!(strpos($content, "%post_tags%") !== false)) { goto Zlb22; } $content = str_replace("%post_tags%", trim(implode(", ", $this->post["tags_input"])), $content); Zlb22: if (!(strpos($content, "%categories%") !== false)) { goto V5h1Q; } $content = str_replace("%categories%", trim(implode(", ", $this->post["categories"])), $content); V5h1Q: $xml_tags = $this->xml_tags; $content = preg_replace_callback("/%post_content\[(.*?)\]%/s", function ($matches) { return cseo_shorten_html(trim($this->post["post_content"]), intval($matches[1])); }, $content); $content = preg_replace_callback("/%post_content_notags\[(.*?)\]%/s", function ($matches) { return cseo_shorten_string_by_words(cseo_strip_tags($this->post["post_content"]), intval($matches[1])); }, $content); $content = preg_replace_callback("/%post_excerpt\[(.*?)\]%/s", function ($matches) { return cseo_shorten_html($this->post["post_excerpt"], intval($matches[1])); }, $content); $content = preg_replace_callback("/%post_excerpt_notags\[(.*?)\]%/s", function ($matches) { return cseo_shorten_string_by_words(cseo_strip_tags($this->post["post_excerpt"]), intval($matches[1])); }, $content); $content = preg_replace_callback("/%post_date\[(.*?)\]%/s", function ($matches) { return date(strval($matches[1]), strtotime($this->post["post_date"])); }, $content); $content = preg_replace_callback("/%xml_tags\[(.*?)\]%/s", function ($matches) use($xml_tags) { $xt = trim($matches[1]); if (!isset($xml_tags[$xt]["val"])) { goto AbxSE; } return html_entity_decode(trim($xml_tags[$xt]["val"])); AbxSE: }, $content); $content = preg_replace_callback("/%xml_tags_attr\[(.*?)\]\[(.*?)\]%/s", function ($matches) use($xml_tags) { $xt = trim($matches[1]); $xa = mb_strtoupper(trim($matches[2])); if (!isset($xml_tags[$xt]["attr"][$xa])) { goto Iq5Fd; } return html_entity_decode($xml_tags[$xt]["attr"][$xa]); Iq5Fd: }, $content); if (!is_string($this->current_feed_url)) { goto zM9Co; } $url_components = parse_url($this->current_feed_url); if (!isset($url_components["query"])) { goto Xi9hX; } parse_str($url_components["query"], $params); $content = preg_replace_callback("/%params\[(.*?)\]%/s", function ($matches) use($params) { $pr = trim($matches[1]); if (!isset($params[$pr])) { goto X_tkn; } return urldecode(trim($params[$pr])); X_tkn: }, $content); Xi9hX: zM9Co: $custom_fields = $this->post["custom_fields"]; $content = preg_replace_callback("/%custom_fields\[(.*?)\]%/s", function ($matches) use($custom_fields) { $cf = trim($matches[1]); if (!isset($custom_fields[$cf])) { goto niVX9; } return html_entity_decode($custom_fields[$cf]); niVX9: }, $content); $custom_fields_attr = $this->post["custom_fields_attr"]; $content = preg_replace_callback("/%custom_fields_attr\[(.*?)\]\[(.*?)\]%/s", function ($matches) use($custom_fields_attr) { $cf = trim($matches[1]); $ca = mb_strtoupper(trim($matches[2])); if (!isset($custom_fields_attr[$cf][$ca])) { goto z4ISB; } return html_entity_decode($custom_fields_attr[$cf][$ca]); z4ISB: }, $content); $media_thumbnail = $this->post["media_thumbnail"]; $content = preg_replace_callback("/%media_thumbnail\[(.*?)\]%/s", function ($matches) use($media_thumbnail) { $cf = intval($matches[1]); if (!isset($media_thumbnail[$cf])) { goto q998T; } return $media_thumbnail[$cf]; q998T: }, $content); $media_content = $this->post["media_content"]; $content = preg_replace_callback("/%media_content\[(.*?)\]%/s", function ($matches) use($media_content) { $cf = intval($matches[1]); if (!isset($media_content[$cf])) { goto caypK; } return $media_content[$cf]; caypK: }, $content); $content = preg_replace_callback("/%random_image\[(.*?)\]%/s", function ($matches) { return cseo_get_random_image($this->parse_placeholders(cseo_apply_spintax($matches[1]))); }, $content); $content = preg_replace_callback("/%random_file\[(.*?)\]%/s", function ($matches) { return cseo_get_random_file($this->parse_placeholders(cseo_apply_spintax($matches[1]))); }, $content); $content = preg_replace_callback("/%gpt_prompt\[(.*?)\]%/s", function ($matches) { return cyberseo_generate_text(["prompt" => $matches[1]], null, true); }, $content); $content = preg_replace_callback("/%pixabay\[(.*?)\]%/s", function ($matches) { $atts["q"] = $this->parse_placeholders(cseo_apply_spintax($matches[1])); $html = cyberseo_pixabay_shortcode($atts); if (!preg_match("/src="(.*?)"/", $html, $link)) { goto TNf6q; } return $link[1]; TNf6q: }, $content); $content = preg_replace_callback("/%youtube_video\[(.*?)\]%/s", function ($matches) { return cseo_get_youtube_video($this->parse_placeholders(cseo_apply_spintax($matches[1]))); }, $content); $content = preg_replace_callback("/%youtube_transcript\[(.*?)\]%/s", function ($matches) { return cseo_get_youtube_transcript($this->parse_placeholders(cseo_apply_spintax($matches[1]))); }, $content); if (!isset($this->post["link"])) { goto MkY77; } $content = str_replace("####post_link####", $this->post["link"], $content); $content = str_replace("%link%", $this->post["link"], $content); MkY77: return trim($content); } function modify_post_content($content, $is_runtime = false, $shuffle = false, $inc_headers = true, $inc_footers = true) { if (!$shuffle) { goto vG2ru; } preg_match_all("/<p.*?>(.+?)<\/p>/uis", $content, $matches); $paragrapths = $matches[1]; if (!(count($matches[1]) > 1)) { goto znqIU; } shuffle($matches[1]); $i = 0; TJDW4: if (!($i < count($matches[1]))) { goto v0LEu; } $content = preg_replace("/<p.*?>" . preg_quote($paragrapths[$i], "/") . "<\/p>/uis", $matches[1][$i], $content); NN0Vv: $i++; goto TJDW4; v0LEu: znqIU: vG2ru: if (!$is_runtime) { goto x_2LE; } if (!$inc_headers) { goto xD_Xc; } $headers = $this->global_options["post_header"]; xD_Xc: if (!$inc_footers) { goto NarKp; } $footers = $this->global_options["post_footer"]; NarKp: goto iyGFr; x_2LE: if (!$inc_headers) { goto SR3LH; } $headers = $this->current_feed["options"]["post_header"]; SR3LH: if (!$inc_footers) { goto UonQO; } $footers = $this->current_feed["options"]["post_footer"]; UonQO: iyGFr: if (empty($headers)) { goto Asn3_; } if ($this->current_feed["options"]["parse_spintax"] === "on") { goto dEIkr; } $headers = explode(CSEO_MORE, stripslashes($headers)); goto g96rP; dEIkr: $headers = explode(CSEO_MORE, stripslashes(cseo_apply_spintax($headers))); g96rP: $header = $headers[rand(0, count($headers) - 1)]; if ($is_runtime) { goto gRj0k; } $header = $this->parse_placeholders($header); gRj0k: $content = $header . $content; Asn3_: if (empty($footers)) { goto PVosu; } if ($this->current_feed["options"]["parse_spintax"] === "on") { goto EPOZ_; } $footers = explode(CSEO_MORE, stripslashes($footers)); goto sI5nR; EPOZ_: $footers = explode(CSEO_MORE, stripslashes(cseo_apply_spintax($footers))); sI5nR: $footer = $footers[rand(0, count($footers) - 1)]; if ($is_runtime) { goto OPBw2; } $footer = $this->parse_placeholders($footer); OPBw2: $content .= $footer; PVosu: return $content; } function apply_runtime_changes($content) { $content = cseo_apply_spintax($content); $content = $this->modify_post_content($content, true); $content = cseo_morph_content($content, true); return $content; } function modify_title($title) { $title = cseo_apply_spintax($title); $title = $this->modify_post_content($title, true); return $title; } function the_post($post) { $post->post_excerpt = cseo_apply_spintax(get_the_excerpt()); return $post; } function the_content($content) { if (!(strpos($content, "class="cseo-product-galley-button"") !== false)) { goto sc7Ys; } $this->is_amazon = true; sc7Ys: return $content; } function wp_footer() { if (!$this->is_amazon) { goto guLA7; } echo "<script>
\xadocument.addEventListener('DOMContentLoaded', function() {
var thumbnailLinks = document.querySelectorAll('#cseo-product-galley-thumbimage a');
\xa var savedScrollPosition = 0;
\xa\xd\xa thumbnailLinks.forEach(function(link) {
link.addEventListener('click', function(event) {
savedScrollPosition = window.scrollY;\xd
});
\xd\xa window.addEventListener('hashchange', function() {\xd\xa window.scrollTo(0, savedScrollPosition);\xd\xa }, false);
});\xd\xa});\xd\xa</script>\xd
<style type="text/css"> #cseo-product-gallery {\xd
width: 95%;\xd
margin: 0 auto;
\xa padding: 10px;\xd
border-color: #ccc;
border-width: 1px;\xd\xa border-style: solid;\xd
border-radius: 4px;
}\xd\xa#cseo-product-galley-fullimage {\xd
list-style: none;
\xa width: auto;\xd
height: 400px;
margin: 0px;
\xa padding: 0px;\xd
overflow: hidden;
\xa}\xd\xa#cseo-product-galley-fullimage li img {
display: block;\xd\xa margin: 0 auto;\xd
width: auto;
\xa height: 400px;\xd
}
#cseo-product-galley-thumbimage {
list-style: none;
overflow: hidden;\xd\xa float: left;
\xa}\xd
#cseo-product-galley-thumbimage li {\xd\xa float: left;
}
\xa#cseo-product-galley-thumbimage li img {\xd\xa position:relative;\xd
float: left;
border: 1pt solid white;
\xa opacity: 0.7;
width: auto;
height: 50px;
border-style: solid;\xd\xa border-width: 1px;
border-color: transparent;
\xa}\xd
#cseo-product-galley-thumbimage li img:hover {
\xa opacity: 1;
border-style: 1px;\xd
border-color: #eee;
\xa}
\xa.cseo-product-galley-button {\xd\xa font-family: Arial,Helvetica,sans-serif;
font-weight: bold;\xd\xa box-shadow: 1pt 1pt 1pt 0 rgba(0, 0, 0, 0.4);
border-radius :12px;\xd\xa background-image: linear-gradient(#ffe700, #ff9700);
\xa text-decoration: none !important;\xd\xa cursor: pointer;
color: black !important;
border-width: 2px;
border-style: solid;
border-color: #ff9100;\xd
padding: 12pt 28px;\xd
}\xd\xa.cseo-product-galley-button:hover {
margin: 1pt 1px;
\xa color: black;
background-image: linear-gradient(#ffd700, #ff8700);
\xa} \xd
@media screen and (max-width: 720px) {
\xa #cseo-product-galley-fullimage {
\x9width: 100%;
height: auto;\xd\xa }
\xa #cseo-product-galley-fullimage li img {
\x9 width: 100%;\xd\xa \x9height: auto;
\xa\x9}
\xa #cseo-product-galley-thumbimage {
\x9 display: none;
}\xd
.cseo-product-galley-button {
\xa\x9\x9font-size: 100%;\xd
\x9}
\xa}"; guLA7: } function excerpt_rss($content) { global $post; if (!(get_option(CSEO_SERVER_MODE) === "on")) { goto y7qXe; } if ($post->post_excerpt !== '') { goto TpY1L; } return str_replace(PHP_EOL, "<br>", $this->apply_runtime_changes($post->post_content)); goto EYHyk; TpY1L: return str_replace(PHP_EOL, "<br>", $this->apply_runtime_changes($post->post_excerpt)); EYHyk: y7qXe: return $content; } function parse_w3cdtf($w3cdate) { if (preg_match("/^\s*(\d{4})(-(\d{2})(-(\d{2})(T(\d{2}):(\d{2})(:(\d{2})(\.\d+)?)?(?:([-+])(\d{2}):?(\d{2})|(Z))?)?)?)?\s*$/", $w3cdate, $match)) { goto vgv38; } return -1; goto Xit0r; vgv38: list($year, $month, $day, $hours, $minutes, $seconds) = [$match[1], $match[3], $match[5], $match[7], $match[8], $match[10]]; if (!is_null($month)) { goto tDfCl; } $month = (int) gmdate("m"); tDfCl: if (!is_null($day)) { goto kxHou; } $day = (int) gmdate("d"); kxHou: if (!is_null($hours)) { goto lHKGu; } $hours = (int) gmdate("H"); $seconds = $minutes = 0; lHKGu: $epoch = gmmktime($hours, $minutes, $seconds, $month, $day, $year); if (!($match[14] !== "Z")) { goto v6KlF; } list($tz_mod, $tz_hour, $tz_min) = [$match[12], $match[13], $match[14]]; $tz_hour = (int) $tz_hour; $tz_min = (int) $tz_min; $offset_secs = ($tz_hour * 60 + $tz_min) * 60; if (!($tz_mod === "+")) { goto EVu8s; } $offset_secs *= -1; EVu8s: $offset = $offset_secs; v6KlF: $epoch = $epoch + $offset; return $epoch; Xit0r: } function log($message) { if ($this->preview) { goto a2qWk; } $this->parse_feed_log .= "[" . date("d-m-y h:i:s") . "] " . $message . PHP_EOL; update_option(CSEO_LOG, $this->parse_feed_log); a2qWk: } function parse_CSV_remote($url, $options) { $context = stream_context_create(["ssl" => ["verify_peer" => false, "verify_peer_name" => false], "http" => ["max_redirects" => CSEO_MAX_CURL_REDIRECTS, "follow_location" => 1]]); $handle = @fopen($url, "r", false, $context); if (!($handle === false)) { goto XSkLG; } return false; XSkLG: $delimiter = ","; $firstLine = cseo_remove_utf8_bom(@fgets($handle, 4096)); $delimiters = [",", ";", "\x9", "|", ":"]; $delimiterCounts = array_fill_keys($delimiters, 0); foreach ($delimiters as $d) { $delimiterCounts[$d] = count(str_getcsv($firstLine, $d)); dRY7t: } WoMVL: $maxCount = max($delimiterCounts); $detectedDelimiter = array_search($maxCount, $delimiterCounts); $csv_fields = []; $cnt = 1; $elements = explode($detectedDelimiter, $firstLine); foreach ($elements as $element) { if (!preg_match("/^["']?(.*?)["']?$/", trim($element), $matches)) { goto sXUWo; } $element = $matches[1]; sXUWo: $element = str_replace(" ", "_", trim($element)); if (preg_match("/^[a-zA-Z0-9_]*$/", $element)) { goto P443x; } $csv_fields[] = "csv_" . $cnt++; goto FopDy; P443x: if (preg_match("/^[a-zA-Z]/", $element)) { goto k2Ta3; } if (strlen($element)) { goto i5mW_; } $csv_fields[] = "csv_" . $cnt++; goto HbhlZ; i5mW_: $csv_fields[] = "csv_" . $element; HbhlZ: goto HEhvV; k2Ta3: $csv_fields[] = $element; HEhvV: FopDy: YOc_i: } kr2Vw: if (count($csv_fields)) { goto BAFmN; } @fclose($handle); $this->log("CSV structure was not recognized" . PHP_EOL); return false; BAFmN: $num = count($csv_fields); Qr2Qh: if (!(($data = @fgetcsv($handle, 8192, $detectedDelimiter)) !== false)) { goto U99GU; } $this->resetPost(); if (!(count($data) !== $num)) { goto w1jj3; } @fclose($handle); $this->log("CSV structure was not recognized" . PHP_EOL); return false; w1jj3: if (!(!is_array($data) || empty($data))) { goto tN30k; } @fclose($handle); $this->log("CSV structure was not recognized" . PHP_EOL); return false; tN30k: $this->xml_tags = []; $this->element_tag = "ITEM"; $c = 0; dI1Jx: if (!($c < $num)) { goto MHICv; } $custom_field_name = $this->getCustomField(mb_strtoupper($csv_fields[$c])); if (!strlen($custom_field_name)) { goto jfhjv; } $this->post["custom_fields"][$custom_field_name] = $data[$c]; jfhjv: $this->xml_tags[$csv_fields[$c]]["val"] = $data[$c]; if (in_array(strtolower($csv_fields[$c]), ["title", "name", "product", "product_name"])) { goto QksY2; } if (in_array(strtolower($csv_fields[$c]), ["description", "content"])) { goto dyFW5; } goto Pqw52; QksY2: $this->post["post_title"] = trim($data[$c]); goto Pqw52; dyFW5: $this->post["post_description"] = trim($data[$c]); Pqw52: jOJKV: $c++; goto dI1Jx; MHICv: $this->posts_found++; if (!$this->preview) { goto FAR0Q; } $this->displayPost(); $this->count++; return true; FAR0Q: $this->insertPost(); if (!$this->show_report) { goto Xj8xP; } echo str_repeat(" ", 1024); flush(); Xj8xP: if (!$this->failure) { goto VVVcV; } @fclose($handle); return false; VVVcV: if (!($this->count >= $this->max)) { goto Fyw0z; } goto U99GU; Fyw0z: goto Qr2Qh; U99GU: @fclose($handle); return true; } function generate_google_search_url($feed_url, $title) { $search_url = "https://www.google.com/search?"; $feed_params = []; parse_str(parse_url($feed_url, PHP_URL_QUERY), $feed_params); $params = ["q" => $title, "tbm" => "nws"]; $params["hl"] = isset($feed_params["hl"]) ? $feed_params["hl"] : "en"; $params["gl"] = isset($feed_params["gl"]) ? $feed_params["gl"] : "us"; $search_url .= http_build_query($params); return $search_url; } function parse_google_serp($html) { if (!preg_match_all("/"><a href="\/url\?q=(.*?)&sa/", $html, $google_results)) { goto wkvOy; } foreach ($google_results[1] as $link) { if (!(strpos($link, "%23") === false)) { goto TRzp8; } return $link; TRzp8: ztf7E: } g1chN: wkvOy: return false; } function get_redirect_url() { $gnf = get_option(CSEO_GNCACHE); if (!is_array($gnf)) { goto pffhf; } foreach ($gnf as $key => $value) { if (!($value["epoch"] + 86400 < time())) { goto Y_KmL; } unset($gnf[$key]); Y_KmL: N7cuF: } k6tni: goto kL9DZ; pffhf: $gnf = []; kL9DZ: if (!isset($gnf[$this->current_feed_url])) { goto ijGDM; } if (!($gnf[$this->current_feed_url]["title"] === $this->post["post_title"] && !empty($gnf[$this->current_feed_url]["url"]))) { goto kHzNS; } $gnf[$this->current_feed_url]["epoch"] = time(); update_option(CSEO_GNCACHE, $gnf); return $gnf[$this->current_feed_url]["url"]; kHzNS: ijGDM: $search_url = $this->generate_google_search_url($this->current_feed_url, $this->post["post_title"]); $serp = cseo_file_get_contents($search_url, false, '', "self", ''); $redirect = $this->parse_google_serp($serp); $nitem = ["title" => $this->post["post_title"], "url" => $redirect, "epoch" => time()]; $gnf[$this->current_feed_url] = $nitem; update_option(CSEO_GNCACHE, $gnf); return $redirect; } function filter_rss_items($content, $limit) { if (!(@simplexml_load_string($content) === false)) { goto Hgm8P; } return $content; Hgm8P: $xml = new SimpleXMLElement($content); $namespaces = $xml->getNamespaces(true); $items = $xml->channel->item; $count = count($items); if (!($count <= $limit)) { goto bdJEy; } return $content; bdJEy: $i = $count - 1; pNJTi: if (!($i >= $limit)) { goto rD5Pn; } unset($items[$i]); Dooq1: $i--; goto pNJTi; rD5Pn: return $xml->asXML(); } function parseFeed($feed_url) { global $cseo_xml_key; $this->tag = ''; $this->insideitem = 0; $this->element_tag = ''; $this->feed_title = ''; $this->generator = ''; $this->current_feed_url = $feed_url; $this->feed_charset_convert = ''; $this->posts_found = 0; $this->failure = false; $this->document_type = "XML"; $cseo_xml_key = ''; if (!(($this->current_feed["options"]["treat_as_csv"] ?? '') === "on" || isset($_POST["treat_as_csv"]))) { goto ekeDq; } $csv_parse_result = $this->parse_CSV_remote($feed_url, $this->current_feed["options"]); if (!$csv_parse_result) { goto Wn1Qk; } return true; Wn1Qk: ekeDq: if (is_object($feed_url)) { goto iTPe0; } if (strlen(trim($feed_url))) { goto ir9d9; } $feed_url = cseo_fixurl($feed_url); ir9d9: if (stripos($feed_url, "https://news.google.com/search?") === 0) { goto tRh4r; } if (stripos($feed_url, "https://news.google.com/topics/") === 0) { goto FNI1k; } goto RJgYa; tRh4r: $feed_url = str_ireplace("https://news.google.com/search?", "https://news.google.com/rss/search?", $feed_url); goto RJgYa; FNI1k: $feed_url = str_ireplace("https://news.google.com/topics/", "https://news.google.com/rss/topics/", $feed_url); RJgYa: if (preg_match("/https?:\/\/(www\.)?t\.me\/(.*?)\/?$/i", $feed_url, $matches)) { goto qbhIt; } if (preg_match("/^https?:\/\/news\.google\.com\/rss\/search/i", $feed_url) || preg_match("/^https?:\/\/news\.google\.com\/rss\/topics\//i", $feed_url)) { goto YNzPg; } if (preg_match("/https?:\/\/(www\.)?instagram\.com\/(.*?)[\/|\?]/", $feed_url . "/", $matches)) { goto ashzq; } if (preg_match("/https?:\/\/(www\.)?facebook\.com\/.*/", $feed_url)) { goto qz6GK; } if (preg_match("/https?:\/\/(www\.)?tiktok\.com/i", $feed_url . "/")) { goto w7PNv; } if (preg_match("/https?:\/\/(www\.)?amazon\.\S+\//", $feed_url . "/")) { goto CP_tc; } goto D1O8Z; qbhIt: if (!(isset($matches[2]) && strlen(trim($matches[2])))) { goto ThqWt; } $this->log("Telegram URL has been detected."); $content = cseo_file_get_contents("https://rsshub.app/telegram/channel/" . $matches[2]); if (strpos($content, "Error") === 0) { goto GhoK6; } $this->document_type = "Telegram"; $this->log("Success"); goto RnuxO; GhoK6: if (is_admin()) { goto Qdply; } $this->log($content); goto RF72i; Qdply: echo "<div id="message" class="error"><p>" . $content . "</p></div>"; RF72i: return false; RnuxO: ThqWt: goto D1O8Z; YNzPg: $this->document_type = "Google News"; $content = cseo_file_get_contents(cseo_fixurl($feed_url)); $content = $this->filter_rss_items($content, 1); goto D1O8Z; ashzq: if (!(isset($matches[2]) && strlen(trim($matches[2])))) { goto S1uns; } $this->log("Instagram URL has been detected"); $content = cseo_file_get_contents("https://www.cyberseo.net/versioncontrol/rssmaker.php?res=instagram&user=" . $matches[2] . "&name=" . urlencode(get_option(CXXX_REG_NAME)) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&ig_sess=" . get_option(CSEO_ACCOUNTS)["ig_session"] . "&site=" . urlencode(site_url())); if (strpos($content, "Error") === 0) { goto P_vqy; } $this->document_type = "Instagram"; $this->log("Success"); goto dmSGA; P_vqy: if (is_admin()) { goto hx3tQ; } $this->log($content); goto XiLbX; hx3tQ: echo "<div id="message" class="error"><p>" . $content . "</p></div>"; XiLbX: return false; dmSGA: S1uns: goto D1O8Z; qz6GK: $this->log("Facebook URL has been detected"); $content = cseo_file_get_contents("https://www.cyberseo.net/versioncontrol/rssmaker.php?res=facebook&url=" . urlencode($feed_url) . "&name=" . urlencode(get_option(CXXX_REG_NAME)) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&c_user=" . get_option(CSEO_ACCOUNTS)["fb_c_user"] . "&xs=" . get_option(CSEO_ACCOUNTS)["fb_xs"] . "&site=" . urlencode(site_url())); if (strpos($content, "Error") === 0) { goto fNm99; } $this->document_type = "Facebook"; $this->log("Success"); goto lH8Zy; fNm99: if (is_admin()) { goto wohu6; } $this->log($content); goto azcBG; wohu6: echo "<div id="message" class="error"><p>" . $content . "</p></div>"; azcBG: return false; lH8Zy: goto D1O8Z; w7PNv: if (preg_match("/https?:\/\/(www\.)?tiktok\.com\/tag\/(.*?)[\/|\?]/i", $feed_url . "/", $matches)) { goto rtHo8; } if (preg_match("/https?:\/\/(www\.)?tiktok\.com\/(@.*?)[\/|\?]/i", $feed_url . "/", $matches)) { goto OmmrI; } goto LmgTS; rtHo8: $this->log("Tiktok URL has been detected"); $content = cseo_file_get_contents("https://www.cyberseo.net/versioncontrol/rssmaker.php?res=tiktok&tag=" . trim($matches[2]) . "&name=" . urlencode(get_option(CXXX_REG_NAME)) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url())); goto LmgTS; OmmrI: $this->log("Tiktok URL has been detected"); $content = cseo_file_get_contents("https://www.cyberseo.net/versioncontrol/rssmaker.php?res=tiktok&user=" . trim($matches[2]) . "&name=" . urlencode(get_option(CXXX_REG_NAME)) . "&email=" . urlencode(get_option(CXXX_REG_EMAIL)) . "&site=" . urlencode(site_url())); LmgTS: if (strpos($content, "Error") === 0) { goto HHMzX; } $this->document_type = "Tiktok"; $this->log("Success"); goto IOnpf; HHMzX: if (is_admin()) { goto Axjx1; } $this->log($content); goto KiME0; Axjx1: echo "<div id="message" class="error"><p>" . $content . "</p></div>"; KiME0: return false; IOnpf: goto D1O8Z; CP_tc: $this->log("Amazon URL has been detected"); $cseo_amazon = new CyberSEO_Amazon_Product_Parser($feed_url, get_option(CSEO_ACCOUNTS)["amazon_tag"]); if ($this->preview) { goto Om_Ek; } $cseo_amazon->do_duplicate_check = true; $content = $cseo_amazon->amazon_parse_search_page($this->max); goto ZzKn2; Om_Ek: $cseo_amazon->do_duplicate_check = false; $content = $cseo_amazon->amazon_parse_search_page(1); ZzKn2: if (strpos($content, "Error") === 0) { goto BEHHW; } $this->document_type = "Amazon"; goto Fv1x3; BEHHW: if (!is_admin()) { goto Og6b0; } echo "<div id="message" class="error"><p>" . $content . "</p></div>"; Og6b0: $this->log($content); return false; Fv1x3: D1O8Z: if (is_string($feed_url) && preg_match(CSEO_DUMMY_FEED_PATTERN, $feed_url)) { goto Ex56_; } if ($this->document_type === "XML") { goto ODaFP; } goto Q93q2; Ex56_: $this->current_feed["options"]["xml_section_tags"] = "ITEM"; $content = "<?xml version="1.0" encoding="UTF-8"?><items><item><title> </title></item></items>"; goto Q93q2; ODaFP: $content = cseo_file_get_contents($feed_url); if (!preg_match("/^https?:\/\/(www\.)?youtube\.com\/@/", $feed_url)) { goto bZJb_; } if (!preg_match("#title="RSS" href="(https://www\.youtube\.com/feeds/videos\.xml\?channel_id=[A-Za-z0-9_-]+)"#", $content, $matches)) { goto tSibj; } $content = cseo_file_get_contents($matches[1]); tSibj: bZJb_: Q93q2: if (strpos($content, "PK") === 0) { goto Dex7_; } if (strpos($content, "\37\213\x8") === 0 || (strpos($content, "x\1") === 0 || strpos($content, "x\234") === 0 || strpos($content, "x\332") === 0)) { goto ak3z_; } if (strpos($content, "EZh") === 0) { goto fZCs7; } goto pVriS; Dex7_: $content = cseo_unzip($content); goto pVriS; ak3z_: $content = @gzuncompress($content); goto pVriS; fZCs7: $content = @bzdecompress($content); pVriS: if (!(!$this->preview || get_option(CSEO_DNPSOP) !== "on")) { goto qHzPL; } $content = $this->execPreprocessSource($this->current_feed["options"], $content); qHzPL: if (!(get_option("cxxx_full_text_extractor") !== '' && preg_match("/(<!doctype\s+html\s*>.*?<html\s*.*?>|<html\s*.*?>)/is", $content))) { goto rB1La; } $html2xml = cseo_file_get_contents(get_option("cxxx_full_text_extractor") . "?url=" . urlencode($feed_url) . "&links=preserve&exc=1&html=1"); if (!strlen(trim($html2xml))) { goto qgAMm; } $content = $html2xml; $this->document_type = "HTML"; $this->current_feed["options"]["xml_section_tags"] = "ITEM"; qgAMm: rB1La: if (!(get_option("cxxx_full_text_extractor") !== '' && preg_match("/<loc>http.*?<\/loc>/i", $content))) { goto puTeQ; } $this->document_type = "XML Sitemap"; puTeQ: $json = json_decode($content, true); if (is_array($json)) { goto NrDpd; } preg_match("/^(.*?)<\?xml/is", $content, $matches); if (!isset($matches[1])) { goto Vx4um; } $content = str_replace($matches[1], '', $content); Vx4um: if (!($this->current_feed["options"]["disable_item_tag_autodetect"] !== "on")) { goto z1gCb; } @cseo_xml2array($content); $this->current_feed["options"]["xml_section_tags"] = $cseo_xml_key; z1gCb: if (strlen(trim($this->current_feed["options"]["xml_section_tags"]))) { goto cBetu; } $this->current_feed["options"]["xml_section_tags"] = "ENTRY,ITEM"; cBetu: $this->current_feed["options"]["xml_section_tags"] = cseo_str_unique(strtoupper($this->current_feed["options"]["xml_section_tags"])); goto i0bwo; NrDpd: $content = cseo_json_array_to_xml($json); if (!($this->current_feed["options"]["disable_item_tag_autodetect"] !== "on")) { goto qpCce; } @cseo_xml2array($content); $this->current_feed["options"]["xml_section_tags"] = $cseo_xml_key; qpCce: if (strlen(trim($this->current_feed["options"]["xml_section_tags"]))) { goto tz_DJ; } $this->current_feed["options"]["xml_section_tags"] = "RESULTS_ITEM,TAGS_ITEM,LIST_ITEM,DATA_ITEM,ITEMS_ITEM"; tz_DJ: $this->document_type = "JSON"; $this->current_feed["options"]["xml_section_tags"] = cseo_str_unique(strtoupper($this->current_feed["options"]["xml_section_tags"])); i0bwo: $content = str_replace("’", "'", $content); $content = str_replace("a?", "a", $content); goto ATdZc; iTPe0: $content = $feed_url->import(); $this->feed_title = "CSV dump"; $this->document_type = "CSV"; $this->current_feed["options"]["xml_section_tags"] = "ITEM"; ATdZc: if (!preg_match("/body.*?(\{direction:rtl.*?\})/is", $content, $matches)) { goto cdrFA; } $content = str_replace($matches[1], '', $content); cdrFA: if (!preg_match("/body.*?(\{direction:ltr.*?\})/is", $content, $matches)) { goto sI4jQ; } $content = str_replace($matches[1], '', $content); sI4jQ: try { $xml = @new SimpleXMLElement($content, LIBXML_NOCDATA); if (isset($xml->channel->title)) { goto uDeUy; } if (isset($xml->title)) { goto rZafg; } goto GLJ0R; uDeUy: $this->feed_title = $xml->channel->title; goto GLJ0R; rZafg: $this->feed_title = $xml->title; GLJ0R: } catch (Exception $e) { $this->feed_title = ''; } if (!($this->current_feed["options"]["shuffle_xml_items"] && strpos($this->current_feed["options"]["xml_section_tags"], ",") === false)) { goto oez35; } $tag = trim($this->current_feed["options"]["xml_section_tags"]); preg_match_all("/(.*?)(<" . $tag . ">.*?<\/" . $tag . ">)/is", $content, $matches); if (!count($matches[2])) { goto o41WU; } shuffle($matches[2]); $content = $matches[1][0] . PHP_EOL . implode(PHP_EOL, $matches[2]); o41WU: oez35: if (!(!$content || !strlen($content))) { goto xXUjl; } if (is_admin()) { goto Ec0Df; } if (is_object($feed_url)) { goto QT7da; } $this->log("Unable to acquire " . $feed_url); goto LsZA2; QT7da: $this->log("End of dump"); LsZA2: goto hxQsd; Ec0Df: if (is_object($feed_url)) { goto xd29c; } echo "<div id="message" class="error"><p>Unable to acquire <a href="" . $feed_url . "" target="_blank">" . htmlentities(urldecode($feed_url)) . "</a></p></div>"; goto d1o8E; xd29c: echo "<div id="message" class="error"><p>End of dump</p></div>"; d1o8E: hxQsd: return false; xXUjl: $rss_lines = @explode("\xa", trim($content)); if (is_array($rss_lines) && count($rss_lines)) { goto HlBtK; } if (is_admin()) { goto NTQ1G; } $this->log("The source feed is empty."); goto NpLtC; NTQ1G: echo "<div id="message" class="error"><p>The source feed is empty.</p></div>"; NpLtC: return false; goto rxSJ9; HlBtK: preg_match("/encoding[. ]?=[. ]?["'](.*?)["']/i", $rss_lines[0], $matches); if (($matches[1] ?? '') !== '') { goto n0e_k; } $this->feed_charset = "not defined"; goto mAMc2; n0e_k: $this->feed_charset = trim($matches[1]); mAMc2: $xml_parser = xml_parser_create(); xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, $this->blog_charset); xml_set_object($xml_parser, $this); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "charData"); $do_mb_convert_encoding = $this->current_feed["options"]["convert_encoding"] === "on" && $this->feed_charset !== "not defined" && $this->blog_charset !== strtoupper($this->feed_charset); $do_uft8_encoding = $this->current_feed["options"]["utf8_encoding"] === "on" && $this->blog_charset === "UTF-8"; $is_flvembed = false; $this->xml_parse_error = 0; foreach ($rss_lines as $line) { $line = rtrim($line); if (!($this->count >= $this->max || $this->failure)) { goto DEJDn; } goto jvQZZ; DEJDn: if (!$do_uft8_encoding) { goto BjZHX; } $line = iconv("ISO-8859-1", "UTF-8", $line); BjZHX: if (!$do_mb_convert_encoding) { goto BFnqq; } $line = iconv($this->feed_charset, $this->blog_charset, $line); BFnqq: if (mb_strtolower(trim($line)) === "<flv_embed>") { goto AeKJ2; } if ($is_flvembed) { goto VPdlG; } goto wCb90; AeKJ2: $is_flvembed = true; goto wCb90; VPdlG: if (mb_strtolower(trim($line)) === "</flv_embed>") { goto KLxOi; } if (stripos(trim($line), "<![CDATA[") === false && stripos(trim($line), "]]>") === false) { goto NlvLG; } goto l6ci4; KLxOi: $is_flvembed = false; goto l6ci4; NlvLG: $line = "<![CDATA[" . trim($line) . "]]>"; l6ci4: wCb90: xml_parse($xml_parser, $line . PHP_EOL); $this->xml_parse_error = xml_get_error_code($xml_parser); if (!$this->xml_parse_error) { goto L9X3j; } xml_parser_free($xml_parser); if (is_admin()) { goto deiBX; } $this->log("XML parse error " . $this->xml_parse_error); goto lre1j; deiBX: echo "<div id="message" class="error"><p>XML parse error " . $this->xml_parse_error . ".</p></div>"; lre1j: return false; L9X3j: n8rA2: } jvQZZ: xml_parser_free($xml_parser); if ($this->count) { goto vVJW9; } if (is_admin()) { goto KRazM; } if (is_object($feed_url)) { goto VXQmK; } $this->log("0 items added from " . $feed_url); goto wR5np; VXQmK: $this->log("0 items added from the dump"); wR5np: KRazM: return 0; vVJW9: return $this->count; rxSJ9: } function modifyFeeds($new_options) { $feed_ids = unserialize(base64_decode($_POST["feed_ids"])); $feeds_cnt = count($this->feeds); if (!(is_array($feed_ids) && count($feed_ids) > 0)) { goto tmhYJ; } $i = 0; txdho: if (!($i < $feeds_cnt)) { goto U2BXT; } if (!in_array($i, $feed_ids)) { goto XSZN7; } foreach ($new_options as $option => $value) { if (!(strpos($option, "chk_") === 0)) { goto ov103; } $option_to_change = substr($option, 4); if ($option_to_change === "date_range") { goto fqcIk; } if ($option_to_change === "thumb_src_sizes") { goto SdXAR; } if ($option_to_change === "stable_diffusion_image_size") { goto UBRKl; } $this->feeds[$i]["options"][$option_to_change] = $new_options[$option_to_change] ?? ''; goto FwHp8; fqcIk: $this->feeds[$i]["options"]["date_min"] = $new_options["date_min"]; $this->feeds[$i]["options"]["date_max"] = $new_options["date_max"]; goto FwHp8; SdXAR: $this->feeds[$i]["options"]["thumb_src_min_width"] = $new_options["thumb_src_min_width"]; $this->feeds[$i]["options"]["thumb_src_max_width"] = $new_options["thumb_src_max_width"]; $this->feeds[$i]["options"]["thumb_src_min_height"] = $new_options["thumb_src_min_height"]; $this->feeds[$i]["options"]["thumb_src_max_height"] = $new_options["thumb_src_max_height"]; goto FwHp8; UBRKl: $this->feeds[$i]["options"]["stable_diffusion_width"] = $new_options["stable_diffusion_width"]; $this->feeds[$i]["options"]["stable_diffusion_height"] = $new_options["stable_diffusion_height"]; FwHp8: ov103: SRKKG: } ER8bX: XSZN7: lijRp: $i++; goto txdho; U2BXT: tmhYJ: update_option(CSEO_SYNDICATED_FEEDS, $this->feeds); } function syndicateFeeds($feed_ids, $check_time) { @set_time_limit(get_option(CSEO_MAX_EXEC_TIME)); $this->preview = false; $feeds_cnt = count($this->feeds); if (!(is_array($feed_ids) && count($feed_ids) > 0)) { goto xP1rS; } if (!$this->show_report) { goto yy2FF; } @ob_end_flush(); ob_implicit_flush(); echo "<div id="message" class="notice updated"><p>"; flush(); yy2FF: $this->parse_feed_log = ''; $i = 0; bKNqy: if (!($i < $feeds_cnt)) { goto CPGQZ; } if (!in_array($i, $feed_ids)) { goto AUcuQ; } if (!(!$check_time || $this->getUpdateTime($i) === "asap")) { goto meaw7; } update_option(CSEO_FEED_PULL_TIME, time()); $this->feeds_updated[$i] = time(); update_option(CSEO_FEEDS_UPDATED, $this->feeds_updated); $this->current_feed = $this->feeds[$i]; $this->resetPost(); $this->max = (int) $this->current_feed["options"]["max_items"]; if (!is_object($this->current_feed["url"])) { goto TEWG4; } $this->log("CSV dump id: " . $this->current_feed["url"]->get_id()); goto DXpq4; TEWG4: $this->log("Feed URL: " . $this->current_feed["url"]); DXpq4: if (!$this->show_report) { goto dJk0f; } if (!is_object($this->current_feed["url"])) { goto ao44f; } echo "Syndicating <strong>" . $this->current_feed["url"]->get_id() . "</strong>..."; goto dYwUm; ao44f: echo "Syndicating <a href="" . htmlspecialchars($this->current_feed["url"]) . "" target="_blank"><strong>" . $this->current_feed["title"] . "</strong></a>..."; dYwUm: flush(); dJk0f: if (!($this->current_feed["options"]["undefined_category"] === "use_global")) { goto aBJXj; } $this->current_feed["options"]["undefined_category"] = $this->global_options["undefined_category"]; aBJXj: $this->count = 0; $result = $this->parseFeed($this->current_feed["url"]); $archive_page = 2; if (!($this->max > $this->count && $this->current_feed["options"]["parse_archives"] === "on")) { goto BmOYt; } if (parse_url($this->current_feed["url"], PHP_URL_QUERY) !== null) { goto eEURF; } $url = $this->current_feed["url"] . "?paged="; goto lE2Xe; eEURF: $url = $this->current_feed["url"] . "&paged="; lE2Xe: cQznk: $last_post_link = $this->post["link"]; $last_post_title = $this->post["post_title"]; $last_count = $this->count; $arc_result = $this->parseFeed($url . $archive_page); $result_dup = false; if (!$this->post) { goto mrfVw; } switch ($this->current_feed["options"]["duplicate_check_method"]) { case "guid": $result_dup = $this->post["link"] == $last_post_link; goto qHSRS; case "title": $result_dup = $this->post["post_title"] == $last_post_title; goto qHSRS; case "guid_and_title": $result_dup = $this->post["link"] == $last_post_link && $this->post["post_title"] == $last_post_title; goto qHSRS; } oOaZE: qHSRS: mrfVw: if (!($last_count == $this->count || $this->count < $this->max)) { goto l2Qwp; } $archive_page++; l2Qwp: if ($arc_result !== false && $this->max > $this->count && !$this->failure) { goto cQznk; } CzEIO: if (!($arc_result === false)) { goto xNUwt; } $this->feeds[$i]["options"]["parse_archives"] = ''; update_option(CSEO_SYNDICATED_FEEDS, $this->feeds); xNUwt: BmOYt: if (!$this->show_report) { goto h6dx0; } if ($this->count === 1) { goto BHcbL; } echo $this->count . " " . $this->current_feed["options"]["post_type"] . "s were added"; $this->log($this->count . " " . $this->current_feed["options"]["post_type"] . "s were added." . PHP_EOL); goto ecW0C; BHcbL: echo $this->count . " " . $this->current_feed["options"]["post_type"] . " was added"; $this->log($this->count . " " . $this->current_feed["options"]["post_type"] . " was added" . PHP_EOL); ecW0C: if (!($result === false)) { goto C72G8; } echo "[!]"; $this->log("Feed syndication failed"); C72G8: echo "<br>"; flush(); $this->parse_feed_log .= PHP_EOL; h6dx0: meaw7: AUcuQ: kUGRF: $i++; goto bKNqy; CPGQZ: if (!$this->show_report) { goto I7wiV; } echo "</p></div>"; I7wiV: xP1rS: } function get_attributes($item) { $attr = ''; foreach ($item["attr"] as $atname => $atval) { $attr .= " " . strtolower($atname) . "="" . $atval . """; y2m4h: } sewY_: return $attr; } function displayPost() { if (!empty($this->feed_title)) { goto NQ3rf; } $host = parse_url($this->current_feed_url, PHP_URL_HOST); if (!empty($host)) { goto Gb2V4; } $this->feed_title = "no name"; goto qZg4K; Gb2V4: $this->feed_title = ucfirst(str_ireplace("www.", '', $host)); qZg4K: NQ3rf: if (!(!mb_strlen(trim($this->post["post_excerpt"])) && mb_strlen(trim($this->post["media_description"])))) { goto MMMu3; } $this->post["post_excerpt"] = $this->post["media_description"]; MMMu3: if (mb_strlen(trim($this->post["post_content"]))) { goto nDdJo; } $this->post["post_content"] = $this->post["post_excerpt"]; nDdJo: $attachment = ''; $video_extensions = wp_get_video_extensions(); if ($this->post["enclosure_url"] !== '') { goto v3xDe; } if (!count($this->post["media_content"])) { goto N5lMN; } $attachment .= "<div class="media_block">"; $i = 0; D6F1p: if (!($i < count($this->post["media_content"]))) { goto PliJ4; } $ext = mb_strtolower(pathinfo($this->post["media_content"][$i], PATHINFO_EXTENSION)); if (in_array($ext, $video_extensions)) { goto NQ70K; } if (isset($this->post["media_thumbnail"][$i])) { goto r3yak; } $attachment .= "<img style="max-width:100%" src="" . $this->post["media_content"][$i] . "">"; goto qLC77; NQ70K: $video = ["src" => $this->post["media_content"][$i]]; if (!isset($this->post["media_thumbnail"][$i])) { goto J4SHm; } $video["poster"] = $this->post["media_thumbnail"][$i]; J4SHm: $attachment .= wp_video_shortcode($video); goto qLC77; r3yak: $attachment .= "<a href="" . $this->post["media_content"][$i] . ""><img style="max-width:100%" src="" . $this->post["media_thumbnail"][$i] . "" class="media_thumbnail"></a>"; qLC77: KsBMo: $i++; goto D6F1p; PliJ4: $attachment .= "</div>"; N5lMN: if (!count($this->post["media_thumbnail"])) { goto LHgzn; } $attachment .= "<div class="media_block">"; $i = 0; YhTqb: if (!($i < sizeof($this->post["media_thumbnail"]))) { goto OMews; } $attachment .= "<img style="max-width:100%" src="" . $this->post["media_thumbnail"][$i] . "" class="media_thumbnail">"; W4JbE: $i++; goto YhTqb; OMews: $attachment .= "</div>"; LHgzn: goto p7TS6; v3xDe: $ext = mb_strtolower(pathinfo($this->post["enclosure_url"], PATHINFO_EXTENSION)); if (in_array($ext, $video_extensions)) { goto oF8bJ; } if ($this->post["enclosure_type"] === "audio/mpeg") { goto hmHgx; } if (stripos($this->post["enclosure_type"], "image/") !== false || $this->post["enclosure_type"] === '') { goto iMpM1; } goto xnc6q; hmHgx: $audio = ["src" => $this->post["enclosure_url"]]; $attachment .= wp_audio_shortcode($audio); goto xnc6q; iMpM1: $attachment .= "<img style="max-width:100%" src="" . $this->post["enclosure_url"] . "">"; xnc6q: goto n_RI7; oF8bJ: $video = ["src" => $this->post["enclosure_url"]]; if (!isset($this->post["media_thumbnail"][0])) { goto WoMyr; } $video["poster"] = $this->post["media_thumbnail"][0]; WoMyr: $attachment .= wp_video_shortcode($video); n_RI7: p7TS6: echo "\xd\xa <strong>Preview mode</strong>
<select id="preview_mode_switch" onchange="cseoChangePreviewMode();">
"; $anything_to_display = false; $post_content = cseo_fix_white_spaces(trim($this->post["post_content"])); $post_excerpt = cseo_fix_white_spaces(trim($this->post["post_excerpt"])); $post_content = strip_tags($post_content, "<a><style><code><pre><img><p><br><i><b><u><ul><ol><li><table><td><tr><th><div><span><h1><h2><h3><h4><h5><hr><video><audio>"); $post_content = trim(preg_replace("/<style.*?>.*?<\/style>/si", '', $post_content)); $post_excerpt = strip_tags($post_excerpt, "<a><style><code><pre><img><p><br><i><b><u><ul><ol><li><table><td><tr><th><div><span><h1><h2><h3><h4><h5><hr><video><audio>"); $post_excerpt = trim(preg_replace("/<style.*?>.*?<\/style>/si", '', $post_excerpt)); if (!(!strlen($post_content) && strlen($post_excerpt))) { goto p0MG6; } $post_content = $post_excerpt; p0MG6: if (!strlen($post_content)) { goto U_s0i; } echo "<option value="post_view">Post content</option>"; $anything_to_display = true; U_s0i: if (!($this->document_type !== "Amazon" && strlen(get_option("cxxx_full_text_extractor")) && isset($this->post["link"]))) { goto o1sAp; } if (!($this->document_type === "Google News")) { goto y6rRL; } $redirect_url = $this->get_redirect_url(); if (!$redirect_url) { goto u0yeR; } $this->xml_tags["description"]["val"] = strip_tags($this->xml_tags["description"]["val"], "<style><code><pre><img><p><br><i><b><u><ul><ol><li><table><td><tr><th><div><span><h1><h2><h3><h4><h5><hr><video><audio>"); $this->xml_tags["link"]["val"] = $this->xml_tags["guid"]["val"] = $redirect_url; $post_content = strip_tags($post_content, "<style><code><pre><img><p><br><i><b><u><ul><ol><li><table><td><tr><th><div><span><h1><h2><h3><h4><h5><hr><video><audio>"); $this->post["link"] = $redirect_url; u0yeR: y6rRL: $item = html_entity_decode(cseo_file_get_contents(get_option("cxxx_full_text_extractor") . "?url=" . urlencode($this->post["link"]) . "&max=1")); preg_match_all("/<description>(.*?)<\/description>/is", $item, $matches); if (!(strpos($matches[1][1] ?? '', "[unable to retrieve full-text content]") === false)) { goto cKTwT; } $full_text = strip_tags(trim($matches[1][1]), "<a><style><code><pre><img><p><br><i><b><u><ul><li><table><td><tr><th><div><span><h1><h2><h3><h4><h5><hr><video><audio>"); $full_text = trim(preg_replace("/<style.*?>.*?<\/style>/si", '', $full_text)); if (!strlen($full_text)) { goto RDU0c; } echo "<option value="full_text_view">Full-text article</option>"; $anything_to_display = true; RDU0c: cKTwT: o1sAp: if (!strlen($attachment)) { goto f9klE; } echo "<option value="attachment_view">Attachment</option>"; $anything_to_display = true; f9klE: if (!count($this->xml_tags)) { goto OtUhl; } echo "<option value="xml_view">XML structure</option>"; $anything_to_display = true; OtUhl: echo " </select>
\xa "; echo "<div id="post_view" style="display:none; overflow:auto; max-height:250pt; border:1px #ccc solid; background-color:white; padding:12px; margin:8px 0 8px; 0;">"; if (!strlen($post_content)) { goto skEXe; } echo force_balance_tags($post_content); skEXe: echo "</div>"; echo "<div id="full_text_view" style="display:none; overflow:auto; max-height:250pt; border:1px #ccc solid; background-color:white; padding:12px; margin:8px 0 8px; 0;">"; if (empty($full_text)) { goto HqJs4; } echo force_balance_tags($full_text); HqJs4: echo "</div>"; echo "<div id="xml_view" style="display:none; overflow:auto; max-height:350pt; border:1px #ccc solid; background-color:white; padding:12px; margin:8px 0 8px; 0;">"; if (!count($this->xml_tags)) { goto nu43Y; } $attr = $this->get_attributes($this->xml_tags[strtolower($this->element_tag)]); echo "<span style="font-family: monospace, monospace;"><strong><" . strtolower($this->element_tag) . $attr . "></strong><br>"; foreach ($this->xml_tags as $tag => $item) { if (!($item["val"] !== "<xml section>" && (($item["val"] ?? '') !== '' || count($item["attr"] ?? [])))) { goto Wkn1l; } $attr = $this->get_attributes($item); echo " <strong>" . htmlentities("<" . $tag . $attr . ">", ENT_QUOTES) . "</strong>" . htmlentities(trim($item["val"]), ENT_QUOTES) . "<strong>" . htmlentities("</" . $tag . ">", ENT_QUOTES) . "</strong>" . "<br>"; Wkn1l: ISWrt: } ttC0u: echo "<strong></" . strtolower($this->element_tag) . "></strong></span>"; nu43Y: echo "</div>"; echo "<div id="attachment_view" style="display:none; overflow:auto; max-height:350pt; border:1px #ccc solid; background-color:white; padding:12px; margin:8px 0 8px; 0;">"; if (!strlen($attachment)) { goto mw4v3; } echo $attachment . "<p>Adjust the <a href="#media-attachments">Media Attachments</a> settings to handle attachments.</p>"; mw4v3: echo "</div>"; if (!$anything_to_display) { goto YAAcM; } echo "<script type="text/javascript">cseoChangePreviewMode();</script>"; YAAcM: } function feedPreview($feed_url, $edit_existing = false) { echo "<br>"; $this->edit_existing = $edit_existing; $this->max = 1; $this->preview = true; $this->resetPost(); $this->count = 0; $result = $this->parseFeed($feed_url); if ($result) { goto G6gOY; } if (!is_object($feed_url)) { goto o2for; } echo "<div id="message" class="notice is-dismissible notice-error"><p><strong><strong>CyberSEO parse error:</strong> Unknown.</p></div>"; goto WEREN; o2for: if ($this->xml_parse_error) { goto fT16o; } goto oBcDQ; fT16o: echo "<div id="message" class="notice is-dismissible notice-error">"; echo "<p><strong>CyberSEO parser error:</strong> " . $this->xml_parse_error . " (" . xml_error_string($this->xml_parse_error) . "). Perhaps the feed is unreachable, broken or empty. "; echo "</p></div>"; oBcDQ: WEREN: G6gOY: return $result; } function startElement($parser, $name, $attribs) { $this->tag = $name; $this->current_custom_field_attr[$name] = $attribs; $this->xml_tags[strtolower($name)]["attr"] = $attribs; if (isset($this->xml_tags[strtolower($name)]["val"])) { goto tbPu2; } $this->xml_tags[strtolower($name)]["val"] = ''; tbPu2: $xml_section_tags = explode(",", trim($this->current_feed["options"]["xml_section_tags"])); if (in_array($name, $xml_section_tags)) { goto oNHkT; } if ($this->insideitem <= 0 && $name === "TITLE" && mb_strlen(trim($this->feed_title))) { goto e_Co9; } goto RlUmh; oNHkT: $this->insideitem++; $this->element_tag = $name; $this->resetPost(); $this->xml_tags[strtolower($name)]["attr"] = $attribs; $this->xml_tags[strtolower($name)]["val"] = "<xml section>"; goto RlUmh; e_Co9: $this->tag = ''; RlUmh: if (!($this->insideitem >= 0)) { goto AZVHX; } if (!(isset($attribs["TERM"]) && $name === "CATEGORY")) { goto SjdNr; } $this->current_category .= $attribs["TERM"]; SjdNr: if (!(isset($attribs["URL"]) && $name === "MEDIA:CONTENT")) { goto f_Aev; } $this->post["media_content"][] = $attribs["URL"]; if (!isset($attribs["TYPE"])) { goto MGww1; } $this->post["enclosure_type"] = $attribs["TYPE"]; MGww1: f_Aev: if (!(isset($attribs["URL"]) && $name === "MEDIA:THUMBNAIL")) { goto U4vQt; } $this->post["media_thumbnail"][] = $attribs["URL"]; if (!isset($attribs["TYPE"])) { goto ZNvNq; } $this->post["enclosure_type"] = $attribs["TYPE"]; ZNvNq: U4vQt: if (!($name === "ENCLOSURE")) { goto fm_Zo; } if (!isset($attribs["URL"])) { goto wEBnX; } $this->post["enclosure_url"] = $attribs["URL"]; if (!isset($attribs["TYPE"])) { goto J0a93; } $this->post["enclosure_type"] = $attribs["TYPE"]; J0a93: wEBnX: fm_Zo: if ($this->insideitem >= 0 && $name === "LINK" && isset($attribs["HREF"]) && isset($attribs["REL"])) { goto sSkH4; } if ($this->insideitem >= 0 && $name === "LINK" && $this->post["link"] === '' && isset($attribs["HREF"])) { goto LlJd_; } goto HuVpL; sSkH4: if (stripos($attribs["REL"], "enclosure") !== false) { goto kcYsI; } if (stripos($attribs["REL"], "alternate") !== false && $this->post["link"] === '') { goto kaq3n; } goto ekDjX; kcYsI: $this->post["enclosure_url"] = $attribs["HREF"]; if (!isset($attribs["TYPE"])) { goto myIpb; } $this->post["enclosure_type"] = $attribs["TYPE"]; myIpb: goto ekDjX; kaq3n: $this->post["link"] = $attribs["HREF"]; ekDjX: goto HuVpL; LlJd_: $this->post["link"] = $attribs["HREF"]; HuVpL: AZVHX: if (!(strlen(trim($name)) && $this->insideitem > 0 && !in_array($name, $this->parents))) { goto ZeUGe; } $this->parents = array_values($this->parents); $this->parents[] = $name; ZeUGe: } function endElement($parser, $name) { $this->new_tag = true; if (!($name === "CATEGORY")) { goto sN3cF; } $category = trim(cseo_fix_white_spaces($this->current_category)); if (!(mb_strlen($category) > 0)) { goto fbVm3; } $this->post["categories"][] = $category; fbVm3: $this->current_category = ''; sN3cF: $custom_field_name = $this->getCustomField($name); if (!strlen($custom_field_name)) { goto zYD0w; } if (isset($this->post["custom_fields"][$custom_field_name])) { goto tzmMJ; } $this->post["custom_fields"][$custom_field_name] = $this->current_custom_field; $this->post["custom_fields_attr"][$custom_field_name] = $this->current_custom_field_attr[$name]; goto oQjii; tzmMJ: if (is_array($this->post["custom_fields"][$custom_field_name])) { goto Oes6a; } $this->post["custom_fields"][$custom_field_name] = [$this->post["custom_fields"][$custom_field_name]]; $this->post["custom_fields_attr"][$custom_field_name] = [$this->post["custom_fields_attr"][$custom_field_name]]; Oes6a: $this->post["custom_fields"][$custom_field_name][] = $this->current_custom_field; $this->post["custom_fields_attr"][$custom_field_name][] = $this->current_custom_field_attr[$name]; oQjii: $this->current_custom_field_attr[$name] = []; $this->current_custom_field = ''; zYD0w: if ($name === $this->element_tag) { goto UoGto; } if ($this->count >= $this->max) { goto q3qwO; } goto I24fb; UoGto: $this->insideitem--; if (!($this->insideitem <= 0)) { goto GDa0b; } $this->posts_found++; if (!($this->count < $this->max)) { goto Dy8Cr; } if ($this->preview) { goto ZZpLd; } if ($this->failure) { goto UJoTP; } $this->insertPost(); UJoTP: if (!$this->show_report) { goto z0TNo; } echo str_repeat(" ", 1024); flush(); z0TNo: goto Puj50; ZZpLd: $this->displayPost(); $this->count++; Puj50: Dy8Cr: GDa0b: goto I24fb; q3qwO: $this->insideitem = 0; I24fb: if (!(strlen(trim($name)) && $this->insideitem > 0 && ($key = array_search($name, $this->parents)) !== false)) { goto D4uXV; } unset($this->parents[$key]); D4uXV: } function getCustomField($tag_name) { if (!(($this->current_feed["options"]["custom_fields"] ?? '') !== '')) { goto xQDHi; } $custom_fields_array = explode("\xa", $this->current_feed["options"]["custom_fields"]); foreach ($custom_fields_array as $item) { @(list($tag, $name) = explode("->", $item)); $tag = mb_strtoupper(trim($tag)); if (!($tag === $tag_name)) { goto c8GDD; } return trim($name); c8GDD: GT48b: } os92V: xQDHi: return false; } function customFieldsFromContent($content) { if (!(($this->current_feed["options"]["custom_fields"] ?? '') !== '')) { goto vKqIN; } $custom_fields_array = explode(PHP_EOL, $this->current_feed["options"]["custom_fields"]); foreach ($custom_fields_array as $item) { $item = stripslashes($item); @(list($rule, $name) = explode("->", $item)); $name = trim($name); if (preg_match("/regex:(.*?)$/su", $rule, $matches)) { goto BaBIt; } if (preg_match("/^(\w+)\s*(.*)$/", trim($rule), $matches)) { goto ccUnp; } goto k0l61; BaBIt: if (!@preg_match("/" . $matches[1] . "/su", $content, $res)) { goto AZOmO; } if (mb_strlen($name) > 2 && $name[0] === "%" && $name[mb_strlen($name) - 1] === "%") { goto CWPni; } $this->post["custom_fields"][$name] = $res[1]; goto nf1_k; CWPni: if (!isset($this->post[mb_substr($name, 1, mb_strlen($name) - 2)])) { goto KJy1n; } $this->post[mb_substr($name, 1, mb_strlen($name) - 2)] = $res[1]; KJy1n: nf1_k: AZOmO: goto k0l61; ccUnp: if (!isset($matches[1])) { goto lwU_X; } $e_tag = trim($matches[1]); $e_attributes = trim($matches[2] ?? ''); if (!($value = cseo_extract_outer_element($this->post["post_content"], $e_tag, $e_attributes))) { goto QVBPA; } if (mb_strlen($name) > 2 && $name[0] === "%" && $name[mb_strlen($name) - 1] === "%") { goto z6yhk; } $this->post["custom_fields"][$name] = $value; goto n85nI; z6yhk: if (!isset($this->post[mb_substr($name, 1, mb_strlen($name) - 2)])) { goto lKCLI; } $this->post[mb_substr($name, 1, mb_strlen($name) - 2)] = $value; lKCLI: n85nI: QVBPA: lwU_X: k0l61: VAg1P: } K5_BS: vKqIN: } function charData($parser, $data) { if ($this->insideitem >= 0) { goto PV_MV; } if ($this->tag === "TITLE") { goto K_PTi; } if ($this->tag === "GENERATOR") { goto CkJ_a; } goto chJ8j; PV_MV: if ($this->preview) { goto xZUpe; } $custom_field_name = $this->getCustomField($this->tag); if (!($custom_field_name && mb_strlen(trim($data)))) { goto LpkPh; } $this->current_custom_field .= html_entity_decode($data, ENT_QUOTES); LpkPh: xZUpe: $xml_section_tags = explode(",", trim(strtoupper($this->current_feed["options"]["xml_section_tags"]))); if (!in_array($data, ["&", "<", "|", chr(9), chr(10), chr(11), chr(13)])) { goto NZ49v; } $this->new_tag = false; NZ49v: if (!($this->tag && !in_array($this->tag, $xml_section_tags))) { goto CDKLA; } $tag = strtolower($this->tag); if (!isset($this->xml_tags[$tag]["val"])) { goto si2R8; } if ($this->new_tag && trim($this->xml_tags[$tag]["val"]) !== '' && trim($data) !== '') { goto QlZmE; } $this->xml_tags[$tag]["val"] .= $data; goto FJ0t5; QlZmE: $this->xml_tags[$tag]["val"] = trim($this->xml_tags[$tag]["val"]) . "," . $data; $this->new_tag = false; FJ0t5: goto yJpON; si2R8: $this->xml_tags[$tag]["val"] = $data; yJpON: CDKLA: switch ($this->tag) { case "TITLE": if (!(count($this->parents) >= 2)) { goto jtW23; } $xml_section_tags = explode(",", trim($this->current_feed["options"]["xml_section_tags"])); if (!in_array($this->parents[count($this->parents) - 2], $xml_section_tags)) { goto TMZVK; } $this->post["post_title"] .= $data; TMZVK: jtW23: goto fYqAT; case "DESCRIPTION": $this->post["post_excerpt"] .= $data; goto fYqAT; case "MEDIA:DESCRIPTION": $this->post["media_description"] .= $data; goto fYqAT; case "SUMMARY": $this->post["post_excerpt"] .= $data; goto fYqAT; case "LINK": if (!(trim($data) !== '')) { goto Wv3bV; } $this->post["link"] .= trim($data); Wv3bV: goto fYqAT; case "LOC": if (!(trim($data) !== '')) { goto xEEIL; } $this->post["link"] .= trim($data); xEEIL: goto fYqAT; case "CONTENT:ENCODED": if (!isset($this->post["post_content"])) { goto l2net; } $this->post["post_content"] .= $data; l2net: goto fYqAT; case "CONTENT": if (!isset($this->post["post_content"])) { goto glM55; } $this->post["post_content"] .= $data; glM55: goto fYqAT; case "TURBO:CONTENT": $this->post["post_content"] .= $data; goto fYqAT; case "YANDEX:FULL-TEXT": if (strlen(trim($this->post["post_content"]))) { goto FfCTE; } $this->post["post_content"] .= $data; FfCTE: goto fYqAT; case "CATEGORY": $this->current_category .= trim($data); goto fYqAT; case "TAGS": $tags = explode(",", trim(cseo_fix_white_spaces($data))); foreach ($tags as $tag) { if (!(mb_strlen(trim($tag)) > 0)) { goto WjQXP; } $this->post["categories"][] = trim($tag); WjQXP: hT7nH: } i_HJP: goto fYqAT; case "POST_TAGS": $tags = explode(",", trim(cseo_fix_white_spaces($data))); foreach ($tags as $tag) { if (!(mb_strlen(trim($tag)) > 0)) { goto z1tOj; } $this->post["tags_input"][] = trim($tag); z1tOj: hZe8S: } vHQIN: goto fYqAT; case "MEDIA:KEYWORDS": $this->post["tags_input"] = array_merge($this->post["tags_input"], explode(",", trim($data))); goto fYqAT; case "GUID": $this->post["guid"] .= trim($data); goto fYqAT; case "ID": $this->post["guid"] .= trim($data); goto fYqAT; case "ATOM:ID": $this->post["guid"] .= trim($data); goto fYqAT; case "DC:DATE": $this->post["post_date"] = $this->parse_w3cdtf($data); if (!$this->post["post_date"]) { goto pZz0X; } $this->tag = ''; pZz0X: goto fYqAT; case "DCTERMS:ISSUED": $this->post["post_date"] = $this->parse_w3cdtf($data); if (!$this->post["post_date"]) { goto wxcUn; } $this->tag = ''; wxcUn: goto fYqAT; case "UPDATED": $this->post["post_date"] = $this->parse_w3cdtf($data); if (!$this->post["post_date"]) { goto zeetq; } $this->tag = ''; zeetq: goto fYqAT; case "PUBLISHED": $this->post["post_date"] = $this->parse_w3cdtf($data); if (!$this->post["post_date"]) { goto fqCmI; } $this->tag = ''; fqCmI: goto fYqAT; case "ISSUED": $this->post["post_date"] = $this->parse_w3cdtf($data); if (!$this->post["post_date"]) { goto nbGAj; } $this->tag = ''; nbGAj: goto fYqAT; case "PUBDATE": $this->post["post_date"] = strtotime($data); if (!$this->post["post_date"]) { goto nxWqN; } $this->tag = ''; nxWqN: goto fYqAT; } INtWl: fYqAT: goto chJ8j; K_PTi: $this->feed_title .= cseo_fix_white_spaces($data); goto chJ8j; CkJ_a: $this->generator .= trim($data); chJ8j: } function shuffleUpdateTimes($feed_ids) { if (!(count($feed_ids) > 0)) { goto k3GdL; } $cnt = count($this->feeds); $i = 0; azIKa: if (!($i < $cnt)) { goto G2MXB; } if (!in_array($i, $feed_ids)) { goto nFAJh; } if (!intval(intval($this->feeds[$i]["options"]["interval"]))) { goto gFEKY; } $this->feeds_updated[$i] = time() - 60 * rand(60, intval($this->feeds[$i]["options"]["interval"])); gFEKY: nFAJh: oM4gE: $i++; goto azIKa; G2MXB: update_option(CSEO_FEEDS_UPDATED, $this->feeds_updated); k3GdL: } function deleteFeeds($feed_ids, $delete_posts = false, $delele_feeds = false) { global $wpdb; $feeds_cnt = count($feed_ids); if (!($feeds_cnt > 0)) { goto QCiZg; } @ob_end_flush(); ob_implicit_flush(); echo "<div id="message" class="updated fade"><p>"; echo "Please wait..."; flush(); $posts_deleted = 0; if (!$delete_posts) { goto EgeST; } $to_delete = "("; $cnt = count($feed_ids); $i = 0; ZqYwF: if (!($i < $cnt)) { goto HLlSY; } if (!is_object($this->feeds[$feed_ids[$i]]["url"])) { goto eEyO5; } $to_delete .= "'" . $this->feeds[$feed_ids[$i]]["url"]->get_id() . "', "; goto b7d0f; eEyO5: $to_delete .= "'" . $this->feeds[$feed_ids[$i]]["url"] . "', "; b7d0f: ZOr5t: $i++; goto ZqYwF; HLlSY: $to_delete .= ")"; $to_delete = str_replace(", )", ")", $to_delete); $post_ids = $wpdb->get_col("SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_key = 'cyberseo_rss_source' AND meta_value IN {$to_delete}"); if (!(count($post_ids) > 0)) { goto bS61I; } foreach ($post_ids as $post_id) { $this->delete_post_media($post_id); wp_delete_post($post_id, true); $posts_deleted++; echo str_repeat(" ", 1024); flush(); Hh7sx: } Iyg49: bS61I: EgeST: $feeds_deleted = 0; if (!$delele_feeds) { goto TTlyc; } $feeds = []; $feeds_updated = []; foreach ($this->feeds as $i => $feed) { if (!in_array($i, $feed_ids)) { goto PRQzx; } $feeds_deleted++; goto hFaR5; PRQzx: $feeds[] = $feed; $feeds_updated[] = $this->feeds_updated[$i] ?? $feed["updated"]; hFaR5: zgT78: } idg1U: $this->feeds = $feeds; $this->feeds_updated = $feeds_updated; update_option(CSEO_FEEDS_UPDATED, $this->feeds_updated); TTlyc: update_option(CSEO_SYNDICATED_FEEDS, $this->feeds); echo " " . $feeds_deleted . " feeds, " . $posts_deleted . " posts deleted.</p></div>"; QCiZg: } function serializeFeeds($feed_ids) { $feeds = []; $feeds_cnt = count($this->feeds); $i = 0; b5iTi: if (!($i < $feeds_cnt)) { goto RfDC5; } if (!in_array($i, $feed_ids)) { goto UXgtv; } $feeds[] = $this->feeds[$i]; UXgtv: jelX9: $i++; goto b5iTi; RfDC5: echo serialize($feeds); } function unserializeFeeds($file) { $new_feeds = @unserialize(cseo_remove_utf8_bom($file)); if (!(isset($new_feeds[0]) && is_array($new_feeds) && count($new_feeds))) { goto IKkTT; } echo "<div id="message" class="updated fade"><p>"; echo "Importing feeds from file...<br>"; foreach ($new_feeds as $feed) { $cnt = count($this->feeds); $replaced = false; $i = 0; ZCm9u: if (!($i < $cnt)) { goto H3rqa; } if (!($this->feeds[$i]["url"] === $feed["url"] && $this->feeds[$i]["title"] === $feed["title"])) { goto b_92f; } $this->feeds[$i] = $feed; $replaced = true; if (!is_object($this->feeds[$i]["url"])) { goto r52zg; } echo "<b>" . $this->feeds[$i]["title"] . "</b> has been replaced.<br>"; goto h4M4w; r52zg: echo "<a href="" . $this->feeds[$i]["url"] . "" target="_blank"><b>" . $this->feeds[$i]["title"] . "</b></a> has been replaced.<br>"; h4M4w: goto H3rqa; b_92f: F3o9Y: $i++; goto ZCm9u; H3rqa: if ($replaced) { goto f7OKO; } $this->feeds[] = $feed; if (!is_object($this->feeds[$i]["url"])) { goto anxmD; } echo "<b>" . $this->feeds[$i]["title"] . "</b> has been added.<br>"; goto cfDcd; anxmD: echo "<a href="" . $this->feeds[$i]["url"] . "" target="_blank"><b>" . $this->feeds[$i]["title"] . "</b></a> has been added.<br>"; cfDcd: f7OKO: EXCjw: } NjC1d: echo "</div></p>"; $i = 0; xB3aj: if (!($i < count($this->feeds))) { goto xm2Jb; } $this->feeds[$i]["options"] = $this->init_feed_options($this->feeds[$i]["options"]); uwgKZ: $i++; goto xB3aj; xm2Jb: update_option(CSEO_SYNDICATED_FEEDS, $this->feeds); IKkTT: } function convert_image($source_url) { if (!($this->current_feed["options"]["image_format"] === "keep" || $this->current_feed["options"]["store_images"] !== "on")) { goto pCp2Q; } return $source_url; pCp2Q: $headers = get_headers($source_url, 1); if (!(!isset($headers["Content-Type"]) || $headers["Content-Type"] !== "image/png")) { goto YRTnQ; } return $source_url; YRTnQ: $upload_dir = wp_upload_dir(); $upload_path = $upload_dir["basedir"]; $upload_url = $upload_dir["baseurl"]; $relative_path = str_replace($upload_url, '', $source_url); $source_path = $upload_path . $relative_path; $new_extension = $this->current_feed["options"]["image_format"] === "webp" ? ".webp" : ".jpg"; $new_filename = basename($source_path, ".png") . $new_extension; $new_path = $upload_path . dirname($relative_path) . "/" . $new_filename; $path_parts = pathinfo($new_path); $counter = 1; ZQ3rp: if (!file_exists($new_path)) { goto WULc5; } $new_filename = $path_parts["filename"] . "-" . $counter . "." . $path_parts["extension"]; $new_path = $path_parts["dirname"] . "/" . $new_filename; $counter++; goto ZQ3rp; WULc5: if (class_exists("Imagick")) { goto aq3r9; } if (function_exists("imagecreatefrompng")) { goto M_xxI; } $this->log("Neither Imagick nor GD extensions are available. Image conversion failed"); goto Ef6TX; aq3r9: $this->log("Convert image to " . $this->current_feed["options"]["image_format"] . " with Imagick"); $image = new Imagick($source_path); $image->setImageFormat($this->current_feed["options"]["image_format"]); $image->setImageCompressionQuality(intval($this->current_feed["options"]["compression_quality"])); $image->stripImage(); $image->writeImage($new_path); $image->destroy(); $this->log("Success"); goto Ef6TX; M_xxI: $this->log("Convert image to " . $this->current_feed["options"]["image_format"] . " with GD"); $image = imagecreatefrompng($source_path); switch ($this->current_feed["options"]["image_format"]) { case "webp": imagepalettetotruecolor($image); imagewebp($image, $new_path, intval($this->current_feed["options"]["compression_quality"])); goto BN4lW; case "jpeg": default: imagejpeg($image, $new_path, intval($this->current_feed["options"]["compression_quality"])); goto BN4lW; } RD4A6: BN4lW: imagedestroy($image); $this->log("Success"); Ef6TX: unlink($source_path); $new_url = $upload_url . dirname($relative_path) . "/" . $new_filename; return $new_url; } function save_image($image, $file_name, $ext = ".png") { $wp_upload_dir = wp_upload_dir(); $temp_name = wp_unique_filename($wp_upload_dir["path"], md5(time()) . ".tmp"); if (is_writable($wp_upload_dir["path"])) { goto NVerP; } $this->log($wp_upload_dir["path"] . " is not writable. The image will be hotlinked"); return false; NVerP: $file_name = sanitize_file_name(sanitize_title($file_name) . $ext); if (!file_exists($wp_upload_dir["path"] . "/" . $file_name)) { goto HJ29B; } if (!cseo_compare_files($wp_upload_dir["path"] . "/" . $temp_name, $wp_upload_dir["path"] . "/" . $file_name)) { goto z0IhQ; } unlink($wp_upload_dir["path"] . "/" . $temp_name); return $wp_upload_dir["url"] . "/" . $file_name; z0IhQ: $file_name = wp_unique_filename($wp_upload_dir["path"], $file_name); HJ29B: $image_path = $wp_upload_dir["path"] . "/" . $file_name; $local_image_url = $wp_upload_dir["url"] . "/" . $file_name; if (!file_put_contents($image_path, $image)) { goto m35qI; } return $this->convert_image($local_image_url); m35qI: $this->log("Unable to save " . $image_path); return false; } function execPreprocessSource($options, $content) { if (!(trim($options["preprocess_source_php"]) !== '')) { goto LjaIp; } $this->log("Executing preprocess source PHP code."); $userfunc = function ($content, $options) { try { $code = stripslashes($options["preprocess_source_php"]); if (!(strpos($code, "$cseo_syndicator") !== false)) { goto W_UZV; } $code = str_replace("$cseo_syndicator", "$cseo", $code); W_UZV: return eval($code . "
" . "return $content;"); } catch (Throwable $e) { $this->log("Error: " . $e->getMessage()); $this->failure = true; } }; $content = $userfunc($content, $options); $this->log("Done"); LjaIp: return $content; } function execUserFunction() { if (!(trim($this->current_feed["options"]["php_code"]) !== '')) { goto ZT6o5; } $this->log("Executing custom PHP code"); $userfunc = function ($post, $xml_tags) { try { $code = stripslashes($this->current_feed["options"]["php_code"]); if (!(strpos($code, "$cseo_syndicator") !== false)) { goto w2A_O; } $code = str_replace("$cseo_syndicator", "$cseo", $code); w2A_O: $pattern = "/\$xml_tags\[["'][^"']+["']\]\[["']attr["']\]\[["']([^"']+)["']\]/"; $code = preg_replace_callback($pattern, function ($matches) { return str_replace($matches[1], strtoupper($matches[1]), $matches[0]); }, $code); return eval($code . "
" . "return $post;"); } catch (Throwable $e) { $this->log("Error: " . $e->getMessage()); $this->failure = true; } }; foreach ($this->xml_tags as &$tag) { $tag["val"] = trim($tag["val"]); tKH62: } FU8EA: unset($tag); $this->post = $userfunc($this->post, $this->xml_tags); $this->log("Complete execution of custom PHP code"); ZT6o5: } function openai_apply_title_assignment() { $post_title_assignment = trim(cseo_apply_spintax($this->current_feed["options"]["openai_title_assignment"])); if (!strlen($post_title_assignment)) { goto aj2Aq; } $parsed_post_title_assignment = $this->parse_placeholders($post_title_assignment); if ($parsed_post_title_assignment === $post_title_assignment && stripos($parsed_post_title_assignment, "Rewrite ") === 0) { goto SxRfx; } $prompt = $parsed_post_title_assignment; goto sJ7EU; SxRfx: $prompt = $post_title_assignment . ": " . cseo_remove_emojis(stripslashes($this->post["post_title"])); sJ7EU: $request = ["prompt" => $this->parse_placeholders(cseo_apply_spintax($prompt)), "engine" => $this->legacy_engine($this->current_feed["options"]["openai_model"]), "max_tokens" => abs(intval($this->current_feed["options"]["openai_max_tokens"])), "temperature" => floatval($this->current_feed["options"]["openai_temperature"])]; $result = cyberseo_generate_text($request, null, true); if ($result) { goto rohdH; } $this->log("OpenAI was unable to complete the assignment. The post will not be added" . PHP_EOL); return false; goto NsZGn; rohdH: return cseo_strip_tags($result); NsZGn: aj2Aq: return $this->post["post_title"]; } function openai_apply_article_assignment() { $assignments = explode(CSEO_MORE, stripslashes($this->current_feed["options"]["openai_article_assignment"])); $article = ''; foreach ($assignments as $assignment) { $prompt = $this->parse_placeholders(cseo_apply_spintax(stripslashes($assignment))); if (!strlen($prompt)) { goto TtHnF; } $request = ["prompt" => $prompt, "engine" => $this->legacy_engine($this->current_feed["options"]["openai_model"]), "max_tokens" => abs(intval($this->current_feed["options"]["openai_max_tokens"])), "temperature" => floatval($this->current_feed["options"]["openai_temperature"])]; $article .= html_entity_decode(cyberseo_generate_text($request, null, true)); if (strlen($article)) { goto kbJXG; } $this->log("OpenAI was unable to complete the assignment. The post will not be added" . PHP_EOL); return false; kbJXG: TtHnF: Wo9vn: } Xe4PF: preg_match_all("/<img.*?srcset=['\"](.+?)['\"].*?>/is", $this->post["post_content"] . $this->post["post_excerpt"], $matches); if (!count($matches[1])) { goto zGAmx; } foreach ($matches[1] as $item) { preg_match_all("/(.+?)\s+.+?[\,'\"]/is", $item, $srcsets); if (!count($srcsets[1])) { goto swoiW; } foreach ($srcsets[1] as $link) { $this->image_urls[] = trim($link); GwHDg: } LoFOz: swoiW: jq6Sj: } nwLbo: zGAmx: switch ($this->current_feed["options"]["openai_position"]) { case "above": $this->post["post_content"] = $article . $this->post["post_content"]; goto iepBn; case "below": $this->post["post_content"] .= $article; goto iepBn; default: $this->post["post_content"] = $article; if (strlen($this->post["link"])) { goto KNzTe; } $this->post["link"] = "http://www.openai.com/" . md5($article); KNzTe: goto iepBn; } xwwQr: iepBn: return ''; } function getPostTitle($content) { try { $dom = new DOMDocument(); @$dom->loadHTML(@mb_convert_encoding($content, "HTML-ENTITIES", "UTF-8")); $xpath = new DOMXPath($dom); $titleNodes = $xpath->query("//title"); if (!($titleNodes->length > 0)) { goto Blg1d; } return $titleNodes->item(0)->nodeValue; Blg1d: } catch (Exception $e) { } return ''; } function filterPost() { $this->log("Apply post filtering"); if (!(!empty(trim($this->current_feed["options"]["filter_any_tags"])) && count($this->post["categories"]))) { goto jySmf; } $categories = array_map("mb_strtolower", $this->post["categories"]); $found = false; $this->log("The post must contain any of these tags: " . htmlentities($this->current_feed["options"]["filter_any_tags"], ENT_QUOTES)); foreach (explode(",", $this->current_feed["options"]["filter_any_tags"]) as $category) { if (!in_array(mb_strtolower(trim($category)), $categories)) { goto z3Lqw; } $found = true; goto djj_t; z3Lqw: EFITr: } djj_t: if ($found) { goto IpzVm; } $this->log("The post does not meet the tag/category filtering rules"); $this->log("The post will not be added" . PHP_EOL); return false; IpzVm: jySmf: if (!(!empty(trim($this->current_feed["options"]["filter_none_tags"])) && count($this->post["categories"]))) { goto T0yxP; } $categories = array_map("mb_strtolower", $this->post["categories"]); $this->log("The post must contain none of these tags (categories): " . htmlentities($this->current_feed["options"]["filter_none_tags"], ENT_QUOTES)); foreach (explode(",", $this->current_feed["options"]["filter_none_tags"]) as $category) { if (!in_array(mb_strtolower(trim($category)), $categories)) { goto TG1Bz; } $this->log("The post does not meet tag/category filtering rules"); $this->log("The post will not be added" . PHP_EOL); return false; TG1Bz: mH8c6: } D1Ni8: T0yxP: if (!(isset($this->current_feed["options"]["filter_days_newer"]) && (int) $this->current_feed["options"]["filter_days_newer"] && time() - $this->post["post_date_epoch"] > 86400 * (int) $this->current_feed["options"]["filter_days_newer"])) { goto Y1Ko8; } $this->log("The post date is older than a specified period"); $this->log("The post will not be added" . PHP_EOL); return false; Y1Ko8: if (!(isset($this->current_feed["options"]["filter_days_newer"]) && (int) $this->current_feed["options"]["filter_days_older"] && time() - $this->post["post_date_epoch"] < 86400 * (int) $this->current_feed["options"]["filter_days_older"])) { goto Y2eaT; } $this->log("The post date is newer than a specified period"); $this->log("The post will not be added" . PHP_EOL); return false; Y2eaT: if (!(isset($this->current_feed["options"]["filter_post_longer"]) && $this->current_feed["options"]["filter_post_longer"] != 0 && mb_strlen(cseo_strip_tags($this->post["post_content"])) < $this->current_feed["options"]["filter_post_longer"])) { goto tNQHl; } $this->log("The post is too short"); $this->log("The post will not be added" . PHP_EOL); return; tNQHl: if (!(($this->current_feed["options"]["filter_post_link"] ?? '') === "on")) { goto OWaTU; } if (empty($this->current_feed["options"]["filter_all_phrases"])) { goto r0kDu; } $this->log("The post link must contain all these keywords: " . htmlentities($this->current_feed["options"]["filter_all_phrases"], ENT_QUOTES)); $keywords = explode(",", $this->current_feed["options"]["filter_all_phrases"]); foreach ($keywords as $keyword) { if (stripos($this->post["link"], trim($keyword))) { goto qRfPj; } $this->log("The post link does not contain all the specified keywords"); $this->log("The post will not be added" . PHP_EOL); return false; qRfPj: z3I1R: } qix5p: r0kDu: if (empty($this->current_feed["options"]["filter_any_phrases"])) { goto JCinm; } $this->log("The post link must contain any of these keywords: " . htmlentities($this->current_feed["options"]["filter_any_phrases"], ENT_QUOTES)); $keywords = explode(",", $this->current_feed["options"]["filter_any_phrases"]); $found = false; foreach ($keywords as $keyword) { if (!stripos($this->post["link"], trim($keyword))) { goto kenSW; } $found = true; goto LoXsL; kenSW: y0gSN: } LoXsL: if ($found) { goto Ng_Nc; } $this->log("No mandatory keywords found in the post link"); $this->log("The post will not be added" . PHP_EOL); return false; Ng_Nc: JCinm: if (empty($this->current_feed["options"]["filter_none_phrases"])) { goto FShqF; } $this->log("The post link must contain none of these keywords: " . htmlentities($this->current_feed["options"]["filter_none_phrases"], ENT_QUOTES)); $keywords = explode(",", $this->current_feed["options"]["filter_none_phrases"]); foreach ($keywords as $keyword) { if (!stripos($this->post["link"], trim($keyword))) { goto v01oY; } $this->log("The post link contains at least one of blacklisted keywords."); $this->log("The post will not be added" . PHP_EOL); return false; v01oY: KDLMG: } uE_tG: FShqF: OWaTU: $text = " "; if (!(($this->current_feed["options"]["filter_post_title"] ?? '') === "on")) { goto AZJTT; } $text .= $this->post["post_title"] . " "; AZJTT: if (!(($this->current_feed["options"]["filter_post_content"] ?? '') === "on")) { goto FFqNl; } $text .= $this->post["post_content"] . " "; FFqNl: if (!(($this->current_feed["options"]["filter_post_excerpt"] ?? '') === "on")) { goto TUv07; } $text .= $this->post["post_excerpt"] . " "; TUv07: $text = html_entity_decode($text, ENT_QUOTES); if (!(mb_strlen($text) > 1)) { goto KDrD3; } if (empty($this->current_feed["options"]["filter_all_phrases"])) { goto Kqtwa; } $this->log("The post must contain all these phrases: " . htmlentities($this->current_feed["options"]["filter_all_phrases"], ENT_QUOTES)); $keywords = explode(",", $this->current_feed["options"]["filter_all_phrases"]); foreach ($keywords as $keyword) { if (preg_match("/\b" . preg_quote(trim($keyword, "/")) . "\b/isu", $text)) { goto ktH8H; } $this->log("The post does not contain all the specified keywords or phrases"); $this->log("The post will not be added" . PHP_EOL); return false; ktH8H: UIt32: } sc_Es: Kqtwa: if (empty($this->current_feed["options"]["filter_any_phrases"])) { goto AcAP5; } $this->log("The post must contain any of these phrases: " . htmlentities($this->current_feed["options"]["filter_any_phrases"], ENT_QUOTES)); $keywords = explode(",", $this->current_feed["options"]["filter_any_phrases"]); $found = false; foreach ($keywords as $keyword) { if (!preg_match("/\b" . preg_quote(trim($keyword), "/") . "\b/isu", $text)) { goto IT2B4; } $found = true; goto vPfSg; IT2B4: ybZyI: } vPfSg: if ($found) { goto N1XGj; } $this->log("No mandatory keywords or phrases found in the post"); $this->log("The post will not be added" . PHP_EOL); return false; N1XGj: AcAP5: if (empty($this->current_feed["options"]["filter_none_phrases"])) { goto ZRbAi; } $this->log("The post must contain none of these phrases: " . htmlentities($this->current_feed["options"]["filter_none_phrases"], ENT_QUOTES)); $keywords = explode(",", $this->current_feed["options"]["filter_none_phrases"]); foreach ($keywords as $keyword) { if (!preg_match("/\b" . preg_quote(trim($keyword), "/") . "\b/isu", $text)) { goto gzGtz; } $this->log("The post contains at least one of blacklisted keywords or phrases"); $this->log("The post will not be added" . PHP_EOL); return false; gzGtz: FxR92: } nqraa: ZRbAi: KDrD3: $this->log("Done"); return true; } function extract_shortcode_params($string, $shortcode_name) { $results = []; $buffer = ''; $is_capturing = false; $bracket_count = 0; $i = 0; N9jbh: if (!($i < strlen($string))) { goto aXQQX; } $char = $string[$i]; $shortcode_full = "[" . $shortcode_name; if (!(!$is_capturing && substr($string, $i, strlen($shortcode_full)) === $shortcode_full)) { goto pjyk8; } $is_capturing = true; $i += strlen($shortcode_full); $bracket_count = 1; goto pQ6Kw; pjyk8: if (!$is_capturing) { goto VFdfe; } $buffer .= $char; if ($char === "[") { goto bKABi; } if ($char === "]") { goto t8KbJ; } goto S9ijF; bKABi: $bracket_count++; goto S9ijF; t8KbJ: $bracket_count--; S9ijF: if (!($bracket_count == 0)) { goto LWFog; } $results[] = rtrim($buffer, "]"); $buffer = ''; $is_capturing = false; LWFog: VFdfe: pQ6Kw: $i++; goto N9jbh; aXQQX: return $results; } function a_parse_placeholders($atts) { foreach ($atts as &$att) { $att = $this->parse_placeholders($att); MlvQR: } EaGBL: return $atts; } function apply_wordpress_shortcodes($template) { $matches = $this->extract_shortcode_params(stripslashes($template), "cyberseo_openai"); if (!count($matches)) { goto uONMm; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (isset($atts["prompt"]) && !isset($atts[0])) { goto f0qB5; } $this->log("Error in the [cyberseo_openai] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto An01F; f0qB5: $template = preg_replace("~\[cyberseo_openai +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_openai_shortcode($this->a_parse_placeholders($atts)))), $template); An01F: wi5vH: } s_8ls: uONMm: $matches = $this->extract_shortcode_params(stripslashes($template), "cyberseo_pixabay_image"); if (!count($matches)) { goto hfuVF; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto qqosn; } $atts["name"] = $this->post["post_title"]; qqosn: if (isset($atts["q"]) && !isset($atts[0])) { goto RQbwl; } $this->log("Error in the [cyberseo_pixabay_image] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto rBnJV; RQbwl: $template = preg_replace("~\[cyberseo_pixabay_image +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_pixabay_shortcode($this->a_parse_placeholders($atts)))), $template); rBnJV: mOm6t: } Gi1pE: hfuVF: $matches = $this->extract_shortcode_params(stripslashes($template), "cyberseo_dalle"); if (!count($matches)) { goto s37KS; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto kNPp5; } $atts["name"] = $this->post["post_title"]; kNPp5: if (isset($atts["prompt"]) && !isset($atts[0])) { goto wbDOf; } $this->log("Error in the [cyberseo_dalle] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto ZwGkZ; wbDOf: $template = preg_replace("~\[cyberseo_dalle +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_dalle_shortcode($this->a_parse_placeholders($atts)))), $template); ZwGkZ: EJ8IU: } bhQnN: s37KS: $matches = $this->extract_shortcode_params(stripslashes($template), "cyberseo_stable_diffusion"); if (!count($matches)) { goto WSy95; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto veGXf; } $atts["name"] = $this->post["post_title"]; veGXf: if (isset($atts["text"]) && !isset($atts[0])) { goto Z1qKh; } $this->log("Error in the [cyberseo_stable_diffusion] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto SWKlW; Z1qKh: $template = preg_replace("~\[cyberseo_stable_diffusion +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_stable_diffusion_shortcode($this->a_parse_placeholders($atts)))), $template); SWKlW: FU951: } mdtTR: WSy95: $matches = $this->extract_shortcode_params(stripslashes($template), "openai_gpt"); if (!count($matches)) { goto txEmL; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (isset($atts["prompt"]) && !isset($atts[0])) { goto J_feG; } $this->log("Error in the [openai_gpt] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto uGETM; J_feG: $template = preg_replace("~\[openai_gpt +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_openai_shortcode($this->a_parse_placeholders($atts)))), $template); uGETM: KgKji: } beVcC: txEmL: $matches = $this->extract_shortcode_params(stripslashes($template), "claude"); if (!count($matches)) { goto u1qN0; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (isset($atts["prompt"]) && !isset($atts[0])) { goto Pk_WK; } $this->log("Error in the [claude] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto kI882; Pk_WK: $template = preg_replace("~\[claude +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_claude_shortcode($this->a_parse_placeholders($atts)))), $template); kI882: rhJZn: } DtyOl: u1qN0: $matches = $this->extract_shortcode_params(stripslashes($template), "gemini"); if (!count($matches)) { goto m0wPo; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (isset($atts["prompt"]) && !isset($atts[0])) { goto npPSB; } $this->log("Error in the [gemini] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto mAGpA; npPSB: $template = preg_replace("~\[gemini +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_gemini_shortcode($this->a_parse_placeholders($atts)))), $template); mAGpA: W2Z8T: } xpGf1: m0wPo: $matches = $this->extract_shortcode_params(stripslashes($template), "xai"); if (!count($matches)) { goto ZSu3D; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (isset($atts["prompt"]) && !isset($atts[0])) { goto NrZyn; } $this->log("Error in the [xai] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto jH6bj; NrZyn: $template = preg_replace("~\[xai +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_xai_shortcode($this->a_parse_placeholders($atts)))), $template); jH6bj: Uvboz: } KwBVb: ZSu3D: $matches = $this->extract_shortcode_params(stripslashes($template), "or_text"); if (!count($matches)) { goto mjPM5; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (isset($atts["prompt"]) && !isset($atts[0])) { goto oQc7U; } $this->log("Error in the [or_text] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto e_7LE; oQc7U: $template = preg_replace("~\[or_text +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_openrouter_shortcode($this->a_parse_placeholders($atts)))), $template); e_7LE: dSJhl: } HYyPq: mjPM5: $matches = $this->extract_shortcode_params(stripslashes($template), "gpt_article"); if (!count($matches)) { goto mI289; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (isset($atts["topic"]) && !isset($atts[0])) { goto WTbhj; } $this->log("Error in the [gpt_article] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto dbx0F; WTbhj: $template = preg_replace("~\[gpt_article +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_gpt_article_shortcode($this->a_parse_placeholders($atts)))), $template); dbx0F: XJNu2: } w7UXp: mI289: $matches = $this->extract_shortcode_params(stripslashes($template), "midjourney"); if (!count($matches)) { goto Kjv91; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto uCPk_; } $atts["name"] = $this->post["post_title"]; uCPk_: if (isset($atts["prompt"]) && !isset($atts[0])) { goto Q9Bo6; } $this->log("Error in the [midjourney] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto Fvfqm; Q9Bo6: $template = preg_replace("~\[midjourney +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_midjourney_shortcode($this->a_parse_placeholders($atts)))), $template); Fvfqm: c9J6C: } LdXZL: Kjv91: $matches = $this->extract_shortcode_params(stripslashes($template), "flux"); if (!count($matches)) { goto a6Ofo; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto kVtz0; } $atts["name"] = $this->post["post_title"]; kVtz0: if (isset($atts["prompt"]) && !isset($atts[0])) { goto UGJye; } $this->log("Error in the [flux] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto dUraI; UGJye: $template = preg_replace("~\[flux +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_flux_shortcode($this->a_parse_placeholders($atts)))), $template); dUraI: nrrQo: } MB1u8: a6Ofo: $matches = $this->extract_shortcode_params(stripslashes($template), "pixabay"); if (!count($matches)) { goto cWnwl; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto m4g0p; } $atts["name"] = $this->post["post_title"]; m4g0p: if (isset($atts["q"]) && !isset($atts[0])) { goto OU7Cf; } $this->log("Error in the [pixabay] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto byTU3; OU7Cf: $template = preg_replace("~\[pixabay +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_pixabay_shortcode($this->a_parse_placeholders($atts)))), $template); byTU3: tzqRR: } qVJQB: cWnwl: $matches = $this->extract_shortcode_params(stripslashes($template), "dalle"); if (!count($matches)) { goto PM0xP; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto na2rq; } $atts["name"] = $this->post["post_title"]; na2rq: if (isset($atts["prompt"]) && !isset($atts[0])) { goto OIi5n; } $this->log("Error in the [dalle] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto aeHBM; OIi5n: $template = preg_replace("~\[dalle +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_dalle_shortcode($this->a_parse_placeholders($atts)))), $template); aeHBM: wMTmt: } YEaEj: PM0xP: $matches = $this->extract_shortcode_params(stripslashes($template), "stable_diffusion"); if (!count($matches)) { goto QRdpH; } foreach ($matches as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", $shortcode)); if (!empty($atts["name"])) { goto y6aKB; } $atts["name"] = $this->post["post_title"]; y6aKB: if (isset($atts["text"]) && !isset($atts[0])) { goto O98zI; } $this->log("Error in the [stable_diffusion] shortcode, check it for internal double quotes and replace them with single quotes."); $template = ''; goto HKvYs; O98zI: $template = preg_replace("~\[stable_diffusion +" . preg_quote(addslashes($shortcode), "~") . "\s*\]~", addslashes(html_entity_decode(cyberseo_stable_diffusion_shortcode($this->a_parse_placeholders($atts)))), $template); HKvYs: rmf0n: } Xtm_p: QRdpH: return $template; } function maskShortCodes($content) { $shtps = ["%link%", "%post_title%", "%post_content%", "%post_content_notags%", "%post_excerpt%", "%post_excerpt_notags%", "%post_guid%", "%gpt_image_prompt%", "%media_description%", "%enclosure_url%", "%post_date%", "%gpt_keywords%", "%gpt_keywords_en%", "%gpt_keyphrase%", "%gpt_keyphrase_en%", "%post_tags%", "%categories%", "%post_content[", "%post_content_notags[", "%post_excerpt[", "%post_excerpt_notags[", "%post_date[", "%xml_tags[", "%xml_tags_attr[", "%params[", "%custom_fields[", "%custom_fields_attr[", "%media_thumbnail[", "%media_content[", "%random_image[", "%random_file[", "%gpt_prompt[", "%pixabay[", "%youtube_video[", "%youtube_transcript["]; foreach ($shtps as $shtp) { if (!(mb_strpos($content, $shtp) !== false)) { goto UgzfQ; } $content = str_replace($shtp, mb_substr($shtp, 0, 1) . CSEO_MASK . mb_substr($shtp, 1, mb_strlen($shtp) - 1), $content); UgzfQ: b6hKQ: } YvJxh: return $content; } function unmaskShortCodes($content) { return str_replace("%" . CSEO_MASK, "%", $content); } function remove_absolute_links($link, $source) { return preg_replace_callback("/href\s*=\s*(['"]?)" . preg_quote($link, "/") . "([^'"]*#[^'"]*)\1/", function ($matches) { return "href=" . $matches[1] . $matches[2] . $matches[1]; }, $source); } function process_post_template($template) { if ($this->current_feed["options"]["parse_spintax"] === "on") { goto S7d56; } $res = $this->apply_wordpress_shortcodes($template); goto GkXKy; S7d56: $res = $this->apply_wordpress_shortcodes(cseo_apply_spintax($template)); GkXKy: if (!($this->failure || $this->skip)) { goto q7sH_; } $this->log("The post will not be added" . PHP_EOL); return false; q7sH_: if (strlen($res)) { goto JoFY2; } return ''; goto qj6nB; JoFY2: return stripslashes($this->parse_placeholders($res)); qj6nB: } function insert_images($html, $tag, $cnt, $func, $atts) { $pattern = sprintf("/<%s[^>]*>.*?<\/%s>/s", preg_quote($tag, "/"), preg_quote($tag, "/")); preg_match_all($pattern, $html, $matches, PREG_OFFSET_CAPTURE); $tagsFound = count($matches[0]); if (!($tagsFound === 0 || $cnt <= 0)) { goto sAPcW; } return $html; sAPcW: $cnt = min($cnt, $tagsFound); $output = ''; $lastOffset = 0; if (!($cnt > 0)) { goto Sw0r_; } $interval = $tagsFound / $cnt; $f_atts = $atts; $i = 0; xBGgJ: if (!($i < $cnt)) { goto eZnq3; } $position = (int) floor($interval * $i); $insertionPoint = $matches[0][$position][1]; $secblock = substr($html, $lastOffset, $insertionPoint - $lastOffset); $output .= $secblock; foreach (["prompt", "text"] as $name) { if (!isset($atts[$name])) { goto fpGPU; } $prompt = $atts[$name]; if (!(strpos($prompt, "%gpt_image_prompt%") !== false)) { goto snb0v; } $gpt_prompt = cseo_get_image_promt('', $secblock); $prompt = str_replace("%gpt_image_prompt%", $gpt_prompt, $prompt); snb0v: $f_atts[$name] = $this->parse_placeholders(cseo_apply_spintax($prompt)); fpGPU: W6mxe: } cMqjM: if (!isset($atts["negative_prompt"])) { goto qs0_X; } $f_atts["negative_prompt"] = $this->parse_placeholders(cseo_apply_spintax($atts["negative_prompt"])); qs0_X: $output .= $func($f_atts); $lastOffset = $insertionPoint; WgcJ0: $i++; goto xBGgJ; eZnq3: Sw0r_: $output .= substr($html, $lastOffset); return $output; } function disable_thumbnails($sizes) { return array(); } private function handle_image_generation($generator_options) { $prompt_key = $generator_options["prompt_option"]; $prompt = trim($this->current_feed["options"][$prompt_key]); $position = $this->current_feed["options"][$generator_options["position_option"]]; if (!($position !== "no_image" && $prompt !== '')) { goto OOAUH; } $atts = []; if (!isset($generator_options["name_attr"])) { goto aVyw5; } $atts[$generator_options["name_attr"]] = $this->post["post_title"]; aVyw5: foreach ($generator_options["atts"] as $att_key => $option_key) { if (is_string($option_key)) { goto h0HFt; } $atts[$att_key] = $option_key; goto U3TTC; h0HFt: $atts[$att_key] = $this->current_feed["options"][$option_key]; U3TTC: b9vSb: } tNx5q: $pattern = "/<img\s+[^>]*src=["'][^"']+["'][^>]*>/is"; switch ($position) { case "above_content": $atts[$generator_options["prompt_attr"]] = $this->parse_placeholders(cseo_apply_spintax($prompt)); foreach ($generator_options["additional_prompts"] as $att_name => $prompt_option_key) { $additional_prompt = trim($this->current_feed["options"][$prompt_option_key]); $atts[$att_name] = $this->parse_placeholders(cseo_apply_spintax($additional_prompt)); QNTxA: } oc0Kl: if ($generator_options["use_shortcode"]) { goto e1G7Z; } $image = $generator_options["get_image_callable"]($atts); goto hnhdl; e1G7Z: $image = call_user_func($generator_options["get_image_callable"], $atts); hnhdl: if (empty($image)) { goto sfkmY; } $this->post["post_content"] = $image . "\xa" . $this->post["post_content"]; sfkmY: goto PDuGz; case "below_content": $atts[$generator_options["prompt_attr"]] = $this->parse_placeholders(cseo_apply_spintax($prompt)); foreach ($generator_options["additional_prompts"] as $att_name => $prompt_option_key) { $additional_prompt = trim($this->current_feed["options"][$prompt_option_key]); $atts[$att_name] = $this->parse_placeholders(cseo_apply_spintax($additional_prompt)); ePFlP: } PCvTh: if ($generator_options["use_shortcode"]) { goto LijG_; } $image = $generator_options["get_image_callable"]($atts); goto ugV6h; LijG_: $image = call_user_func($generator_options["get_image_callable"], $atts); ugV6h: if (empty($image)) { goto LNNey; } $this->post["post_content"] .= $image; LNNey: goto PDuGz; case "replace_1st": $atts[$generator_options["prompt_attr"]] = $this->parse_placeholders(cseo_apply_spintax($prompt)); foreach ($generator_options["additional_prompts"] as $att_name => $prompt_option_key) { $additional_prompt = trim($this->current_feed["options"][$prompt_option_key]); $atts[$att_name] = $this->parse_placeholders(cseo_apply_spintax($additional_prompt)); QHWOL: } WtGJ3: if ($generator_options["use_shortcode"]) { goto wMUn_; } $image = $generator_options["get_image_callable"]($atts); goto CZ0Om; wMUn_: $image = call_user_func($generator_options["get_image_callable"], $atts); CZ0Om: if (empty($image)) { goto MIujP; } if (preg_match($pattern, $this->post["post_content"])) { goto W6xtq; } $this->post["post_content"] = $image . "
" . $this->post["post_content"]; goto rE0SU; W6xtq: $this->post["post_content"] = preg_replace($pattern, $image, $this->post["post_content"], 1); rE0SU: MIujP: goto PDuGz; case "replace_all": if (!preg_match_all($pattern, $this->post["post_content"], $matches)) { goto SE3B8; } foreach ($matches[0] as $itag) { $atts[$generator_options["prompt_attr"]] = $this->parse_placeholders(cseo_apply_spintax($prompt)); foreach ($generator_options["additional_prompts"] as $att_name => $prompt_option_key) { $additional_prompt = trim($this->current_feed["options"][$prompt_option_key]); $atts[$att_name] = $this->parse_placeholders(cseo_apply_spintax($additional_prompt)); GZBxH: } I9iVA: if ($generator_options["use_shortcode"]) { goto qTQb5; } $replacement_image = $generator_options["get_image_callable"]($atts); goto eh3Wl; qTQb5: $replacement_image = call_user_func($generator_options["get_image_callable"], $atts); eh3Wl: $this->post["post_content"] = str_replace($itag, $replacement_image, $this->post["post_content"]); NUB1k: } vZdhK: SE3B8: goto PDuGz; case "thumb": $atts[$generator_options["prompt_attr"]] = $this->parse_placeholders(cseo_apply_spintax($prompt)); foreach ($generator_options["additional_prompts"] as $att_name => $prompt_option_key) { $additional_prompt = trim($this->current_feed["options"][$prompt_option_key]); $atts[$att_name] = $this->parse_placeholders(cseo_apply_spintax($additional_prompt)); XBmom: } WSKLh: if ($generator_options["use_shortcode"]) { goto lps7I; } $image = $generator_options["get_image_callable"]($atts); goto y4rH8; lps7I: $image = call_user_func($generator_options["get_image_callable"], $atts); y4rH8: if (!(!empty($image) && preg_match("/src="(.*?)"/", $image, $imgurl))) { goto XbBot; } $this->post["custom_fields"]["thumb"] = $imgurl[1]; XbBot: goto PDuGz; case "insert_images": if (!isset($generator_options["insert_images_shortcode"])) { goto ckkce; } $tag_for_split = $this->current_feed["options"][$generator_options["tag_for_split_option"]]; $number_of_images = $this->current_feed["options"][$generator_options["number_of_images_option"]]; $atts[$generator_options["prompt_attr"]] = $prompt; foreach ($generator_options["additional_prompts"] as $att_name => $prompt_option_key) { $atts[$att_name] = $this->current_feed["options"][$prompt_option_key]; qU0cx: } Bg3i1: $this->post["post_content"] = $this->insert_images($this->post["post_content"], $tag_for_split, $number_of_images, $generator_options["insert_images_shortcode"], $atts); ckkce: goto PDuGz; } tvQ3W: PDuGz: OOAUH: } function insertPost() { global $wpdb, $cseo_images_to_save, $cseo_images_to_attach, $cseo_last_effective_url; $this->link_checked = "none"; $this->image_urls = []; $this->polylang_translations = []; $this->wpml_translations = []; if (mb_strlen(trim($this->post["post_title"]))) { goto L18X3; } if (mb_strlen($this->post["post_excerpt"])) { goto PcL0z; } $text = cseo_strip_tags($this->post["post_content"]); goto BFm0B; PcL0z: $text = cseo_strip_tags($this->post["post_excerpt"]); BFm0B: $this->post["post_title"] = trim($this->post["post_title"]); if (!strlen($this->post["post_title"])) { goto hLrOM; } $this->post["post_title"] = mb_substr($text, 0, mb_strrpos(mb_substr($text, 0, 35), " ")) . "..."; hLrOM: L18X3: if (!empty($this->post["link"])) { goto LcY53; } $this->log("Generating a new post"); goto i7lVV; LcY53: $this->log("Processing a new post: " . $this->post["link"]); i7lVV: if (!$this->show_report) { goto vygAK; } echo str_repeat(" ", 1024); flush(); vygAK: if (!($this->current_feed["options"]["embed_videos"] === "on")) { goto VHM16; } if (strpos($this->post["link"], ".youtube.com/") !== false || strpos($this->post["link"], "//youtube.com/") !== false) { goto c7A6u; } if (strpos($this->post["link"], ".vimeo.com/") !== false || strpos($this->post["link"], "//vimeo.com/") !== false) { goto nTEVO; } if (strpos($this->post["link"], ".flickr.com/") !== false || strpos($this->post["link"], "//flickr.com/") !== false) { goto Ca9AJ; } if (strpos($this->post["link"], ".ign.com/") !== false || strpos($this->post["link"], "//ign.com/") !== false) { goto kCJFf; } if (strpos($this->post["link"], ".dailymotion.com/") !== false || strpos($this->post["link"], "//dailymotion.com/") !== false) { goto fFofM; } goto bzOrE; c7A6u: $this->post["post_excerpt"] = htmlentities($this->post["media_description"], ENT_QUOTES, "UTF-8"); $this->post["post_content"] = $this->post["link"] . "\xa" . $this->post["post_excerpt"]; goto bzOrE; nTEVO: preg_match("/\/(\d+)$/", $this->post["link"], $matches); $this->post["link"] = "https://vimeo.com/" . $matches[1]; $content = str_replace("\n", '', html_entity_decode(cseo_file_get_contents($this->post["link"]))); preg_match("/,"embedUrl":"(.*?)","name":"(.*?)","description":"(.*?)",/is", $content, $matches); $this->post["post_title"] = stripslashes($matches[2]); $this->post["post_excerpt"] = stripslashes($matches[3]); $this->post["post_content"] = "<p><iframe src="" . $matches[1] . "" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></p>" . $this->post["post_excerpt"]; goto bzOrE; Ca9AJ: $this->post["post_excerpt"] = $this->post["post_content"] = $this->post["link"] . "
<br>" . strip_tags($this->post["post_content"], "<br>,<b>,<p>,<a>"); goto bzOrE; kCJFf: $content = cseo_file_get_contents($this->post["link"], false, '', "self", CSEO_CURL_USER_AGENT); preg_match("/"url":"(https:[-\/\.a-z0-9]+\.mp4)","width":1920/", $content, $matches); if (!isset($matches[1])) { goto EgRhI; } $this->post["post_content"] = "<p>[video src="" . $matches[1] . ""]</p><br><p>" . $this->post["post_excerpt"] . "</p>"; EgRhI: goto bzOrE; fFofM: $this->post["post_excerpt"] = $this->post["post_content"] = $this->post["link"] . "\xa<br>" . strip_tags($this->post["post_excerpt"], "<br>,<b>,<p>,<a>"); bzOrE: VHM16: if (!(!mb_strlen(trim($this->post["post_excerpt"])) && mb_strlen(trim($this->post["media_description"])))) { goto SYAvp; } $this->post["post_excerpt"] = $this->post["media_description"]; SYAvp: if (!(!mb_strlen(trim($this->post["post_content"])) && mb_strlen(trim($this->post["post_excerpt"])))) { goto yk49y; } $this->post["post_content"] = $this->post["post_excerpt"]; yk49y: if (!(!strlen($this->post["link"]) && isset($this->xml_tags["url"]["val"]))) { goto FnP4U; } $this->post["link"] = $this->xml_tags["url"]["val"]; FnP4U: if (!(($this->current_feed["options"]["custom_fields"] ?? '') !== '')) { goto BFfsD; } $custom_fields_array = explode("\xa", stripslashes($this->current_feed["options"]["custom_fields"])); foreach ($custom_fields_array as $item) { list($value, $name) = explode("->", stripslashes($item)); $name = trim($name); $value = trim($value); if (isset($value) && mb_strlen($value) > 2 && $value[0] === """ && $value[mb_strlen($value) - 1] === """) { goto OwddW; } if (mb_strlen($value) > 2 && strpos($value, ":") !== false) { goto CWE9N; } goto s6NIy; OwddW: $this->post["custom_fields"][$name] = cseo_apply_spintax(mb_substr($value, 1, mb_strlen($value) - 2)); goto s6NIy; CWE9N: list($tag, $attr) = explode(":", $value); if (!isset($this->xml_tags[trim($tag)]["attr"][strtoupper(trim($attr))])) { goto IAQTp; } $this->post["custom_fields"][$name] = $this->xml_tags[trim($tag)]["attr"][strtoupper(trim($attr))]; IAQTp: s6NIy: if (!(mb_strlen($name) > 2 && $name[0] === "%" && $name[mb_strlen($name) - 1] === "%")) { goto XGWWA; } if (!isset($this->post["custom_fields"][$name])) { goto DLbex; } $cfval = $this->post["custom_fields"][$name]; if ($name === "%post_tags%") { goto GVlTz; } if ($name === "%categories%") { goto qxddt; } $this->post[mb_substr($name, 1, mb_strlen($name) - 2)] = $cfval; goto fAPX8; GVlTz: if (is_array($cfval)) { goto d4e4o; } $cfval = array_map("trim", explode(",", $cfval)); d4e4o: $this->post["tags_input"] = $cfval; goto fAPX8; qxddt: if (is_array($cfval)) { goto FRaIM; } $cfval = array_map("trim", explode(",", $cfval)); FRaIM: $this->post["categories"] = $cfval; fAPX8: unset($this->post["custom_fields"][$name]); DLbex: XGWWA: gmf6z: } Z0502: BFfsD: $this->post["post_date_epoch"] = $this->post["post_date"]; if ($this->current_feed["options"]["base_date"] === "syndication") { goto BlOWA; } $post_date = (int) $this->post["post_date"]; goto ItbNG; BlOWA: $post_date = time(); ItbNG: $post_date += 60 * ($this->current_feed["options"]["date_min"] + rand(0, $this->current_feed["options"]["date_max"] - $this->current_feed["options"]["date_min"])); $this->post["post_date"] = addslashes(gmdate("Y-m-d H:i:s", $post_date + 3600 * (int) get_option("gmt_offset"))); $this->post["post_modified"] = $this->post["post_date"]; $this->post["post_date_gmt"] = addslashes(gmdate("Y-m-d H:i:s", $post_date)); $this->post["post_modified_gmt"] = $this->post["post_date_gmt"]; $this->post["post_status"] = $this->current_feed["options"]["post_status"]; $this->post["comment_status"] = $this->current_feed["options"]["comment_status"]; $this->post["ping_status"] = $this->current_feed["options"]["ping_status"]; if (!($this->current_feed["options"]["filter_before"] === "ftrss" && !$this->filterPost())) { goto WJmrJ; } return; WJmrJ: if (!(is_string($this->current_feed_url) && preg_match(CSEO_DUMMY_FEED_PATTERN, $this->current_feed_url))) { goto TXDMi; } $this->post["link"] = site_url() . "/" . md5(microtime()); TXDMi: if (!($this->document_type === "Google News" || stripos($this->post["link"], "https://news.google.com/rss/articles/") === 0)) { goto MfLs0; } $this->log("Google News RSS feed detected"); $redirect_url = $this->get_redirect_url(); if (!$redirect_url) { goto NhXbd; } $this->post["link"] = $redirect_url; $this->log("Parsing redirect to " . $this->post["link"]); NhXbd: MfLs0: $result_dup = cseo_post_exists($this->post); if (!($this->current_feed["options"]["push_up"] === "on")) { goto dpweB; } if (!$result_dup) { goto N8Try; } $this->log("Republishing post ID " . $result_dup); $p = get_post($result_dup); $this->post["post_status"] = $p->post_status; $this->delete_post_media($result_dup); wp_delete_post($result_dup, true); $result_dup = false; N8Try: dpweB: if (!$result_dup) { goto WomCI; } $this->log("The post already exists ID: " . $result_dup); $this->log("Skipping" . PHP_EOL); return; WomCI: if ($this->current_feed["options"]["extract_full_articles"] === "on" && get_option("cxxx_full_text_extractor") && isset($this->post["link"])) { goto aIAiy; } if ($this->current_feed["options"]["extract_full_articles"] === "custom") { goto DNSi3; } goto nro8l; aIAiy: $this->log("Trying to extract full text article with Full-Text RSS script"); $item = html_entity_decode(cseo_remove_utf8_bom(cseo_file_get_contents(get_option("cxxx_full_text_extractor") . "?url=" . urlencode($this->post["link"])), ENT_QUOTES)); preg_match_all("/<description>(.*?)<\/description>/is", $item, $matches); if (isset($matches[1][1]) && strpos($matches[1][1], "[unable to retrieve full-text content]") === false) { goto xAI51; } $this->log("Operation failed. Unable to retrieve full-text content from " . $this->post["link"]); $this->log("The post will not be added" . PHP_EOL); return; goto IqlAh; xAI51: $this->post["post_content"] = str_replace("<p>[embedded content]</p>", '', $matches[1][1]); if (!empty($this->post["post_title"])) { goto MWNdC; } $this->post["post_title"] = $this->getPostTitle($item); MWNdC: IqlAh: $this->log("Done"); goto nro8l; DNSi3: $this->log("Trying to extract full text article"); $this->log("Tag specified: <" . $this->current_feed["options"]["custom_text_extractor_tag"] . ">"); if (empty($this->current_feed["options"]["custom_text_extractor_attrbutes"])) { goto JU1LU; } $this->log("Attributes specified: " . htmlentities(stripslashes($this->current_feed["options"]["custom_text_extractor_attrbutes"]))); JU1LU: $content = cseo_file_get_contents($this->post["link"]); $this->post["post_content"] = cseo_extract_outer_element($content, $this->current_feed["options"]["custom_text_extractor_tag"], $this->current_feed["options"]["custom_text_extractor_attrbutes"], $this->current_feed["options"]["custom_text_extractor_inclusive"] === "on"); if (!empty($this->post["post_content"])) { goto GDfym; } $this->log("Operation failed. Unable to retrieve full-text content from " . $this->post["link"]); $this->log("The post will not be added" . PHP_EOL); return; GDfym: $this->post["post_title"] = $this->getPostTitle($content); $this->log("Done"); nro8l: $this->customFieldsFromContent($this->post["post_content"]); if (!preg_match_all("/<img(.+?)src=['\"](.+?)['\"](.*?)>/is", $this->post["post_content"] . $this->post["post_excerpt"], $matches)) { goto nAm8j; } $o_imgs = array_merge($this->image_urls, array_unique($matches[2])); nAm8j: if (!strlen($this->current_feed["options"]["strip_tags"])) { goto cmbbe; } $this->post["post_content"] = cseo_strip_specific_tags($this->post["post_content"], explode(",", $this->current_feed["options"]["strip_tags"])); $this->post["post_excerpt"] = cseo_strip_specific_tags($this->post["post_excerpt"], explode(",", $this->current_feed["options"]["strip_tags"])); cmbbe: if (!($this->current_feed["options"]["filter_before"] === "ai-processor" && !$this->filterPost())) { goto Pv0gD; } return; Pv0gD: if (!($this->current_feed["options"]["ai_engine"] === "openai" && strlen(trim(get_option(CSEO_ACCOUNTS)["openai_api_key"])))) { goto PlGGg; } if ($this->current_feed["options"]["openai_processing_order"] === "title_first") { goto LJIsH; } if (!($this->openai_apply_article_assignment() === false)) { goto QLosX; } return; QLosX: if (!(($this->post["post_title"] = $this->openai_apply_title_assignment()) === false)) { goto Se3tG; } return; Se3tG: goto w12d4; LJIsH: if (!(($this->post["post_title"] = $this->openai_apply_title_assignment()) === false)) { goto FFuzs; } return; FFuzs: if (!($this->openai_apply_article_assignment() === false)) { goto YLXeu; } return; YLXeu: w12d4: PlGGg: if (!($this->current_feed["options"]["ai_engine"] === "article_forge" && strlen(trim(get_option(CSEO_ACCOUNTS)["article_forge_api_key"])))) { goto B62qT; } if (!$this->api_overlimit("article_forge_api_limit")) { goto HM4rs; } $this->log("ArticleForge API hourly request limit has been reached"); return; HM4rs: $this->log("Generating content with ArticleForge..."); $ch = curl_init($this->eps["articleforge"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); $sub_keywords = $this->current_feed["options"]["article_forge_sub_keywords"]; if (!($this->current_feed["options"]["article_forge_tags_as_subkeywords"] === "on")) { goto VYJvb; } $sub_keywords = (mb_strlen($sub_keywords) ? "," : '') . implode(",", $this->post["tags_input"]); if (!(!mb_strlen(trim($this->current_feed["options"]["article_forge_keyword"])) && count($this->post["tags_input"]))) { goto UQodb; } $this->current_feed["options"]["article_forge_keyword"] = $this->post["tags_input"][0]; UQodb: VYJvb: $keyword = mb_substr(cseo_remove_emojis(cseo_strip_tags($this->parse_placeholders(cseo_apply_spintax($this->current_feed["options"]["article_forge_keyword"])))), 0, 100); $sub_keywords = mb_substr(cseo_remove_emojis(cseo_strip_tags($this->parse_placeholders(cseo_apply_spintax($sub_keywords)))), 0, 100); curl_setopt($ch, CURLOPT_POSTFIELDS, "key=" . get_option(CSEO_ACCOUNTS)["article_forge_api_key"] . "&keyword=" . $keyword . "&sub_keywords=" . $sub_keywords . "&length=" . $this->current_feed["options"]["article_forge_length"] . "&quality=" . $this->current_feed["options"]["article_forge_quality"] . "&turing_spinner=" . $this->current_feed["options"]["article_forge_turing_spinner"] . "&rewrite_sentence=" . $this->current_feed["options"]["article_forge_rewrite_sentence"] . "&rearrange_sentence=" . $this->current_feed["options"]["article_forge_rearrange_sentence"] . "&shuffle_paragraphs=" . $this->current_feed["options"]["article_forge_shuffle_paragraphs"] . "&image=" . $this->current_feed["options"]["article_forge_image"] . "&video=" . $this->current_feed["options"]["article_forge_video"] . "&title=1"); $result = json_decode(curl_exec($ch), true); curl_close($ch); if (!($result["status"] === "Success")) { goto l7gHC; } Sum4D: sleep(3); $ch = curl_init("https://af.articleforge.com/api/get_api_progress"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "key=" . get_option(CSEO_ACCOUNTS)["article_forge_api_key"] . "&ref_key=" . $result["ref_key"]); $status = json_decode(curl_exec($ch), true); curl_close($ch); if (($status["api_status"] ?? '') != 201) { goto Sum4D; } knAkW: $ch = curl_init("https://af.articleforge.com/api/get_api_article_result"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "key=" . get_option(CSEO_ACCOUNTS)["article_forge_api_key"] . "&ref_key=" . $result["ref_key"]); $result = json_decode(curl_exec($ch), true); curl_close($ch); if (!($result["status"] === "Success")) { goto j3koQ; } $article_id = $result["article_id"]; preg_match("/<h1>(.*?)<\/h1>(.*?)$/is", $result["article"], $matches); if (!($this->current_feed["options"]["article_forge_title"] === "generated")) { goto XvVQ1; } $this->post["post_title"] = $matches[1]; XvVQ1: $article = $matches[2]; if (!($this->current_feed["options"]["article_forge_spintax_view"] === "on")) { goto PP43O; } $ch = curl_init("https://af.articleforge.com/api/view_article"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "key=" . get_option(CSEO_ACCOUNTS)["article_forge_api_key"] . "&article_id=" . $article_id . "&spintax_view=1"); $result = json_decode(curl_exec($ch), true); curl_close($ch); if (!($result["status"] === "Success" && isset($result["data"]))) { goto Rl1x_; } $article = $result["data"]; Rl1x_: PP43O: preg_match_all("/<img.*?srcset=['\"](.+?)['\"].*?>/is", $this->post["post_content"] . $this->post["post_excerpt"], $matches); if (!count($matches[1])) { goto a3VBx; } foreach ($matches[1] as $item) { preg_match_all("/(.+?)\s+.+?[\,'\"]/is", $item, $srcsets); if (!count($srcsets[1])) { goto qmDB7; } foreach ($srcsets[1] as $link) { $this->image_urls[] = trim($link); eYp3X: } NXH6z: qmDB7: ECvT4: } EQr2z: a3VBx: if ($this->current_feed["options"]["article_forge_position"] === "below") { goto ogkVe; } if ($this->current_feed["options"]["article_forge_position"] === "above") { goto h0SU1; } if ($this->current_feed["options"]["article_forge_position"] === "replace") { goto KAU02; } goto nV8le; ogkVe: $this->post["post_content"] .= $article; goto nV8le; h0SU1: $this->post["post_content"] = $article . $this->post["post_content"]; goto nV8le; KAU02: $this->post["post_content"] = $article; if (strlen($this->post["link"])) { goto FzkTp; } $this->post["link"] = "http://www.articleforge.com/" . md5($this->post["post_title"]); FzkTp: nV8le: $ch = curl_init("https://af.articleforge.com/api/delete_article"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "key=" . get_option(CSEO_ACCOUNTS)["article_forge_api_key"] . "&article_id=" . $article_id); curl_exec($ch); curl_close($ch); $this->log("Done"); j3koQ: l7gHC: if (!($result["status"] !== "Success")) { goto foY9E; } $this->log("Operation failed. " . $result["error_message"]); if (!($this->current_feed["options"]["article_forge_position"] === "replace")) { goto xrv2b; } $this->log("There is nothing to replace with. The post will not be added." . PHP_EOL); return; xrv2b: foY9E: B62qT: if (!($this->current_feed["options"]["balances_tags"] === "on")) { goto NpY8k; } $this->post["post_content"] = force_balance_tags($this->post["post_content"]); $this->post["post_excerpt"] = force_balance_tags($this->post["post_excerpt"]); NpY8k: if (!($this->current_feed["options"]["post_links_handling"] !== "intact")) { goto WEaSw; } $this->post["post_content"] = cseo_remove_links($this->post["post_content"], $this->current_feed["options"]["post_links_handling"]); $this->post["post_excerpt"] = cseo_remove_links($this->post["post_excerpt"], $this->current_feed["options"]["post_links_handling"]); WEaSw: $this->log("Processing post templates"); $this->post["post_title"] = $this->maskShortCodes($this->post["post_title"]); $this->post["post_content"] = $this->maskShortCodes($this->post["post_content"]); $this->post["post_excerpt"] = $this->maskShortCodes($this->post["post_excerpt"]); $order = explode(",", $this->current_feed["options"]["template_order"]); foreach ($order as $template) { switch ($template) { case "title": $res = $this->process_post_template($this->current_feed["options"]["post_title_template"]); if ($res !== false) { goto X5edv; } return; goto dz7R8; X5edv: $this->post["post_title"] = $res; dz7R8: goto e1siH; case "content": $res = $this->process_post_template($this->current_feed["options"]["post_content_template"]); if ($res !== false) { goto JVDvn; } return; goto qZYwC; JVDvn: $this->post["post_content"] = $res; qZYwC: goto e1siH; case "excerpt": $res = $this->process_post_template($this->current_feed["options"]["post_excerpt_template"]); if ($res !== false) { goto PYfS1; } return; goto o6dSv; PYfS1: $this->post["post_excerpt"] = $res; o6dSv: } QMyU3: e1siH: p5ojb: } MCsVH: $this->post["post_title"] = $this->unmaskShortCodes($this->post["post_title"]); $this->post["post_content"] = $this->unmaskShortCodes($this->post["post_content"]); $this->post["post_excerpt"] = $this->unmaskShortCodes($this->post["post_excerpt"]); $cyberseo_post_name = sanitize_title($this->post["post_title"]); if (!(!isset($this->post["tags_input"]) || !is_array($this->post["tags_input"]))) { goto nuw2l; } $this->post["tags_input"] = []; nuw2l: $this->post["custom_taxonomies"] = $this->current_feed["options"]["custom_taxonomies"]; $this->execUserFunction(); if (!($this->post === false || !is_array($this->post))) { goto XpPMY; } $this->log("The post will be skipped ($post === false)" . PHP_EOL); return; XpPMY: if ($this->current_feed["options"]["disable_2nd_check"] !== "on") { goto h5NSL; } $result_dup = false; goto oHxnG; h5NSL: $result_dup = cseo_post_exists($this->post); oHxnG: if (!($result_dup && cseo_check_files())) { goto BeZLr; } $this->log("The post already exists"); if (strlen($this->post["post_title"])) { goto LDQAO; } $this->log("Note that the post has no name (it is blank). Check your feed's settings and make sure your "Post title" template box on the "Post templates" is not empty."); LDQAO: if (strlen($this->post["post_content"])) { goto ewZL6; } $this->log("Note that the post has no content (it is blank). Check your feed's settings and make sure your "Post content" template box on the "Post templates" is not empty."); ewZL6: $this->log("Skipping" . PHP_EOL); return; BeZLr: if (!is_numeric($this->current_feed["options"]["shorten_excerpts"])) { goto djd88; } if ($this->current_feed["options"]["shorten_excerpts"] > 0) { goto pWZnG; } $this->post["post_excerpt"] = ''; goto aKo26; pWZnG: $words = explode(" ", cseo_strip_tags($this->post["post_excerpt"])); $this->post["post_excerpt"] = implode(" ", array_slice($words, 0, floor($this->current_feed["options"]["shorten_excerpts"]) + 1)) . "..."; aKo26: djd88: if (!($this->current_feed["options"]["filter_before"] === "translator" && !$this->filterPost())) { goto swi_d; } return; swi_d: if (!($this->current_feed["options"]["translator"] !== "none")) { goto UPmqi; } if (is_array($this->post["categories"])) { goto ROge7; } $this->post["categories"] = []; ROge7: if (is_array($this->post["tags_input"])) { goto S6gFo; } $this->post["tags_input"] = []; S6gFo: $packed_content = cseo_pack_conetnt($this->post, true); if ($this->current_feed["options"]["translator"] === "yandex_translate") { goto FT2q8; } if ($this->current_feed["options"]["translator"] === "google_translate") { goto iep8Q; } if ($this->current_feed["options"]["translator"] === "deepl_translate") { goto muIOZ; } if ($this->current_feed["options"]["translator"] === "ai_translate") { goto eabNu; } goto omPzh; FT2q8: $translated = cseo_yandex_translate(get_option(CSEO_ACCOUNTS)["yandex_api_key"], $packed_content, $this->current_feed["options"]["yandex_translation_dir"]); goto omPzh; iep8Q: $translated = cseo_google_translate(get_option(CSEO_ACCOUNTS)["google_api_key"], $packed_content, $this->current_feed["options"]["google_translation_source"], $this->current_feed["options"]["google_translation_target"]); goto omPzh; muIOZ: $translated = cseo_deepl_translate(get_option(CSEO_ACCOUNTS)["deepl_api_key"], $packed_content, $this->current_feed["options"]["deepl_translation_target"], $this->current_feed["options"]["deepl_use_api_free"] === "on"); goto omPzh; eabNu: $translated = cseo_ai_rwtr($packed_content, "translator", $this->current_feed["options"]["ai_translation_target"]); omPzh: if (!empty($translated)) { goto MCtAy; } $this->log("Translation failed."); $this->log("The post will not be added" . PHP_EOL); return; MCtAy: $this->post = cseo_unpack_content($this->post, $translated); UPmqi: if (is_array($this->current_feed["options"]["post_category"])) { goto CZcTu; } $post_categories = []; goto O5sJ1; CZcTu: $post_categories = $this->current_feed["options"]["post_category"]; O5sJ1: $cat_ids = $this->getCategoryIds($this->post["categories"]); if (!(empty($cat_ids) && $this->current_feed["options"]["undefined_category"] === "drop")) { goto rsVcz; } $this->log("No mandatory categories found in the post."); $this->log("The post will not be added" . PHP_EOL); return; rsVcz: if (!empty($cat_ids)) { goto dwMBG; } if ($this->current_feed["options"]["undefined_category"] === "use_default" && empty($post_categories)) { goto qYRHk; } goto DZA5M; dwMBG: $post_categories = array_merge($post_categories, $cat_ids); goto DZA5M; qYRHk: $post_categories[] = get_option("default_category"); DZA5M: $post_categories = array_unique($post_categories); $this->post["post_category"] = $post_categories; if (!($this->current_feed["options"]["create_tags"] === "on")) { goto WZpjW; } $this->post["tags_input"] = array_merge($this->post["tags_input"], $this->post["categories"]); WZpjW: if (!($this->current_feed["options"]["auto_tags"] === "on")) { goto kvP5H; } $terms = get_terms("post_tag", ["hide_empty" => false]); foreach ($terms as $term) { if (!preg_match("/\b" . preg_quote($term->name, "/") . "\b/isu", " " . cseo_strip_tags($this->post["post_title"] . " " . $this->post["post_content"] . " " . $this->post["post_excerpt"] . " "))) { goto a5fSp; } $this->post["tags_input"][] = $term->name; a5fSp: RKFku: } Utk3N: kvP5H: if (!($this->current_feed["options"]["post_tags"] !== '')) { goto zfGJT; } $tags = explode(",", $this->parse_placeholders(cseo_apply_spintax($this->current_feed["options"]["post_tags"]))); $this->post["tags_input"] = array_merge($this->post["tags_input"], $tags); zfGJT: if ($this->current_feed["options"]["parse_spintax"] === "on") { goto tF8ZB; } $meta_title = $this->apply_wordpress_shortcodes($this->current_feed["options"]["meta_title_template"]); goto ACwqG; tF8ZB: $meta_title = $this->apply_wordpress_shortcodes(cseo_apply_spintax($this->current_feed["options"]["meta_title_template"])); ACwqG: if ($this->current_feed["options"]["parse_spintax"] === "on") { goto o2dyT; } $meta_description = $this->apply_wordpress_shortcodes($this->current_feed["options"]["meta_description_template"]); goto GO7Z0; o2dyT: $meta_description = $this->apply_wordpress_shortcodes(cseo_apply_spintax($this->current_feed["options"]["meta_description_template"])); GO7Z0: if (!strlen($meta_title)) { goto JLvjl; } $meta_title = trim(stripslashes($this->parse_placeholders($meta_title))); if (!preg_match("/^"?(.*?)"?$/", $meta_title, $matches)) { goto hNCgi; } $meta_title = $matches[1]; hNCgi: JLvjl: if (!strlen($meta_description)) { goto k8L1v; } $meta_description = trim(stripslashes($this->parse_placeholders($meta_description))); if (!preg_match("/^"?(.*?)"?$/", $meta_description, $matches)) { goto ECxhD; } $meta_description = $matches[1]; ECxhD: k8L1v: if (!(!empty($meta_title) || !empty($meta_description))) { goto ejl1A; } include_once ABSPATH . "wp-admin/includes/plugin.php"; if (!is_plugin_active("wordpress-seo/wp-seo.php")) { goto sDnIH; } $this->log("Setting the post meta for Yoast SEO"); if (empty($meta_title)) { goto c15pH; } $this->post["custom_fields"]["_yoast_wpseo_title"] = $meta_title; c15pH: if (empty($meta_description)) { goto zY3FV; } $this->post["custom_fields"]["_yoast_wpseo_metadesc"] = $meta_description; zY3FV: sDnIH: if (!is_plugin_active("seo-by-rank-math/rank-math.php")) { goto HeLpq; } $this->log("Setting the post meta for Rank Math SEO"); if (empty($meta_title)) { goto nfH6W; } $this->post["custom_fields"]["rank_math_title"] = $meta_title; nfH6W: if (empty($meta_description)) { goto J7MEH; } $this->post["custom_fields"]["rank_math_description"] = $meta_description; J7MEH: HeLpq: if (!is_plugin_active("wp-seopress/seopress.php")) { goto r_bHN; } $this->log("Setting the post meta for SEOPress"); if (empty($meta_title)) { goto bkRnY; } $this->post["custom_fields"]["_seopress_titles_title"] = $meta_title; bkRnY: if (empty($meta_description)) { goto XPiEP; } $this->post["custom_fields"]["_seopress_titles_desc"] = $meta_description; XPiEP: r_bHN: if (!is_plugin_active("autodescription/autodescription.php")) { goto h6i0z; } $this->log("Setting the post meta for SEO Framework"); if (empty($meta_title)) { goto o8rSy; } $this->post["custom_fields"]["_genesis_title"] = $meta_title; o8rSy: if (empty($meta_description)) { goto i1nk4; } $this->post["custom_fields"]["_genesis_description"] = $meta_description; i1nk4: h6i0z: ejl1A: if (!(($this->current_feed["options"]["cats_to_woocommerce"] ?? '') === "on")) { goto M2A5W; } $cat_names = []; foreach ($this->post["post_category"] as $cat_id) { $cat_names[] = get_cat_name($cat_id); Tx2f6: } XPiXq: if (!isset($this->post["custom_taxonomies"]["product_cat"])) { goto xloio; } $this->post["custom_taxonomies"]["product_cat"] .= "," . implode(",", $cat_names); xloio: M2A5W: if (!(($this->current_feed["options"]["tags_to_woocommerce"] ?? '') === "on")) { goto Rodw2; } if (!isset($this->post["custom_taxonomies"]["product_tag"])) { goto F6Ekn; } $this->post["custom_taxonomies"]["product_tag"] .= "," . implode(",", $this->post["tags_input"]); F6Ekn: Rodw2: if (!($this->current_feed["options"]["filter_before"] === "spinner" && !$this->filterPost())) { goto ESxCL; } return; ESxCL: if (isset($this->post["post_type"])) { goto UmkXg; } $this->post["post_type"] = $this->current_feed["options"]["post_type"]; UmkXg: if (!(!isset($this->post["post_author"]) || $this->post["post_author"] === '')) { goto UCmxg; } if ($this->current_feed["options"]["post_author"] == 0) { goto wdElw; } $this->post["post_author"] = $this->current_feed["options"]["post_author"]; goto l9ChB; wdElw: $wp_user_search = get_users(["role__in" => ["author", "editor", "administrator"]]); shuffle($wp_user_search); $this->post["post_author"] = $wp_user_search[0]->ID; l9ChB: UCmxg: $title = $this->post["post_title"]; $spun_content = cseo_morph_content(cseo_pack_conetnt($this->post)); $this->post = cseo_unpack_content($this->post, $spun_content); if (!($this->current_feed["options"]["spinner"] !== CSEO_DISABLE_SPINNER)) { goto oxj9k; } if (empty(trim($this->post["post_excerpt"]))) { goto CQmMY; } $this->post["post_excerpt"] = $this->post["post_content"]; CQmMY: oxj9k: if ($this->current_feed["options"]["preserve_titles"] === "on") { goto SV3MR; } $this->post["post_title"] = addslashes($this->post["post_title"]); goto fakBl; SV3MR: $this->post["post_title"] = addslashes($title); fakBl: if (strlen($this->current_feed["options"]["post_slug_template"])) { goto GssjD; } $this->post["post_name"] = stripslashes(cseo_apply_spintax($this->post["post_title"])); goto i7d9Z; GssjD: $this->post["post_name"] = trim(stripslashes(cseo_apply_spintax($this->parse_placeholders($this->current_feed["options"]["post_slug_template"])))); i7d9Z: if (!($this->current_feed["options"]["remove_emojis_from_slugs"] === "on")) { goto wnVro; } $this->post["post_name"] = cseo_remove_emojis($this->post["post_name"]); wnVro: $this->post["tags_input"] = array_values(array_unique($this->post["tags_input"])); $shuffle = $this->current_feed["options"]["shuffle_paragraphs"] === "on"; $this->post["post_content"] = $this->modify_post_content($this->post["post_content"], false, $shuffle); $this->post["post_excerpt"] = $this->modify_post_content($this->post["post_excerpt"], false, $shuffle, $this->current_feed["options"]["include_post_headers"], $this->current_feed["options"]["include_post_footers"]); if (!($this->current_feed["options"]["filter_before"] === "media-processing" && !$this->filterPost())) { goto PmuUF; } return; PmuUF: if (!($this->current_feed["options"]["youtube_position"] !== "no_image")) { goto kMG_U; } $youtube_embed = cseo_get_youtube_video($this->parse_placeholders(cseo_apply_spintax($this->current_feed["options"]["youtube_query"]))); if (empty($youtube_embed)) { goto WSM0k; } if ($this->current_feed["options"]["youtube_position"] === "above_content") { goto xXrWA; } if ($this->current_feed["options"]["youtube_position"] === "below_content") { goto lz2dn; } if ($this->current_feed["options"]["youtube_position"] === "thumb") { goto p4gu4; } goto vUYUe; xXrWA: $this->post["post_content"] = $youtube_embed . $this->post["post_content"]; goto vUYUe; lz2dn: $this->post["post_content"] .= $youtube_embed; goto vUYUe; p4gu4: if (!preg_match("/https:\/\/(www\.)?youtube\.com\/embed\/(.*?)["'\?]/", $youtube_embed, $id)) { goto adpHl; } $this->post["custom_fields"]["thumb"] = "https://img.youtube.com/vi/" . $id[2] . "/maxresdefault.jpg"; adpHl: vUYUe: WSM0k: kMG_U: $generators = ["dalle" => ["prompt_option" => "openai_image_assignment", "position_option" => "openai_image_position", "atts" => ["model" => "openai_image_model", "size" => "openai_image_size", "class" => "openai_image_class"], "prompt_attr" => "prompt", "name_attr" => "name", "get_image_callable" => "cyberseo_dalle_shortcode", "use_shortcode" => true, "insert_images_shortcode" => "cyberseo_dalle_shortcode", "tag_for_split_option" => "openai_tag_for_split", "number_of_images_option" => "openai_number_of_images", "additional_prompts" => []], "stable_diffusion" => ["prompt_option" => "stable_diffusion_image_description", "position_option" => "stable_diffusion_image_position", "atts" => ["stable_diffusion_engine" => "stable_diffusion_engine", "style_preset" => "stable_diffusion_style_preset", "height" => "stable_diffusion_height", "width" => "stable_diffusion_width", "aspect_ratio" => "stable_diffusion_aspect_ratio", "samples" => 1, "steps" => "stable_diffusion_steps", "class" => "stable_diffusion_image_class"], "prompt_attr" => "text", "name_attr" => "name", "get_image_callable" => "cyberseo_stable_diffusion_shortcode", "use_shortcode" => true, "insert_images_shortcode" => "cyberseo_stable_diffusion_shortcode", "tag_for_split_option" => "stable_diffusion_tag_for_split", "number_of_images_option" => "stable_diffusion_number_of_images", "additional_prompts" => ["negative_prompt" => "stable_diffusion_negative_prompt"]], "flux" => ["prompt_option" => "flux_prompt", "position_option" => "flux_image_position", "atts" => ["provider" => "flux_provider", "height" => "flux_height", "width" => "flux_width", "model" => "flux_model", "class" => "flux_image_class"], "prompt_attr" => "prompt", "name_attr" => "name", "get_image_callable" => "cyberseo_flux_shortcode", "use_shortcode" => true, "insert_images_shortcode" => "cyberseo_flux_shortcode", "tag_for_split_option" => "flux_tag_for_split", "number_of_images_option" => "flux_number_of_images", "additional_prompts" => ["negative_prompt" => "flux_negative_prompt"]], "midjourney" => ["prompt_option" => "midjourney_prompt", "position_option" => "midjourney_image_position", "atts" => ["provider" => "midjourney_provider", "aspect_ratio" => "midjourney_aspect_ratio", "process_mode" => "midjourney_process_mode", "class" => "midjourney_image_class"], "prompt_attr" => "prompt", "name_attr" => "name", "get_image_callable" => "cyberseo_midjourney_shortcode", "use_shortcode" => true, "insert_images_shortcode" => "cyberseo_midjourney_shortcode", "tag_for_split_option" => "midjourney_tag_for_split", "number_of_images_option" => "midjourney_number_of_images", "additional_prompts" => []], "pixabay" => ["prompt_option" => "pixabay_q", "position_option" => "pixabay_image_position", "atts" => ["lang" => "pixabay_lang", "image_type" => "pixabay_image_type", "orientation" => "pixabay_orientation", "min_width" => "pixabay_min_width", "min_height" => "pixabay_min_height", "choose" => "pixabay_choose", "class" => "pixabay_image_class"], "prompt_attr" => "q", "name_attr" => "name", "get_image_callable" => "cyberseo_pixabay_shortcode", "use_shortcode" => true, "additional_prompts" => []], "google" => ["prompt_option" => "google_image_query", "position_option" => "google_image_position", "atts" => ["min_width" => "google_min_width", "min_height" => "google_min_height", "class" => "google_image_class"], "prompt_attr" => "query", "name_attr" => null, "get_image_callable" => function ($atts) { $query = $atts["query"]; $min_width = $atts["min_width"]; $min_height = $atts["min_height"]; $class = $atts["class"]; $img_url = cseo_get_random_image($query, $min_width, $min_height); if ($img_url) { goto twGJ1; } return ''; goto txnAe; twGJ1: return "<img class="" . $class . "" src="" . $img_url . "" />"; txnAe: }, "use_shortcode" => false, "additional_prompts" => []]]; foreach ($generators as $generator) { $this->handle_image_generation($generator); EOHC0: } k1uE2: if (!count($cseo_images_to_save)) { goto zP2JX; } foreach ($cseo_images_to_save as $image) { $new_image_url = $media_urls[] = cseo_save_image($image["image_url"], $image["preferred_name"], $image["width"], $image["height"], $image["compression"], $image["output_image_type"]); $this->post["post_content"] = str_replace($image["image_url"], $new_image_url, $this->post["post_content"]); $this->post["post_excerpt"] = str_replace($image["image_url"], $new_image_url, $this->post["post_excerpt"]); E_3tL: } KKSC2: zP2JX: if (!(!isset($this->post["media_thumbnail"][0]) && $this->post["enclosure_url"] !== '' && stripos($this->post["enclosure_type"], "image/") !== false)) { goto amQaE; } $this->post["media_thumbnail"][0] = $this->post["enclosure_url"]; amQaE: if (!(!isset($this->post["media_thumbnail"][0]) && !empty($this->post["media_content"][0]))) { goto Na4Mn; } $this->post["media_thumbnail"][0] = $this->post["media_content"][0]; Na4Mn: $video = ''; if (!($this->current_feed["options"]["use_video_custom_filed"] !== "no" && isset($this->post["custom_fields"]["video"]))) { goto TaV_T; } if (preg_match("/<iframe.*?\/iframe>/is", $this->post["custom_fields"]["video"])) { goto NNS3p; } $video = "<div class="video-container"><video><source src="" . $this->post["custom_fields"]["video"] . ""></video></div>"; goto i3XmP; NNS3p: $video = "<div class="video-container">" . $this->post["custom_fields"]["video"] . "</div>"; i3XmP: if ($this->current_feed["options"]["use_video_custom_filed"] === "top" && strlen($video)) { goto uEf_W; } if ($this->current_feed["options"]["use_video_custom_filed"] === "bottom" && strlen($video)) { goto AUcaP; } goto Ncg1d; uEf_W: $this->post["post_content"] = $video . $this->post["post_content"]; goto Ncg1d; AUcaP: $this->post["post_content"] .= $video; Ncg1d: TaV_T: $attachment = ''; if (!($this->current_feed["options"]["insert_media_attachments"] !== "no")) { goto KQcWA; } $attachment = ''; $video_extensions = wp_get_video_extensions(); if ($this->post["enclosure_url"] !== '') { goto IcQbE; } if (sizeof($this->post["media_content"])) { goto hJNMv; } if (sizeof($this->post["media_thumbnail"])) { goto lbYrf; } goto HDtf2; hJNMv: $attachment .= "<div class="media_block">"; $i = 0; LCnj_: if (!($i < sizeof($this->post["media_content"]))) { goto JfyVP; } $ext = mb_strtolower(pathinfo($this->post["media_content"][$i], PATHINFO_EXTENSION)); if (in_array($ext, $video_extensions)) { goto yc7Ld; } if (isset($this->post["media_thumbnail"][$i])) { goto YnXgc; } $attachment .= "<img src="" . $this->post["media_content"][$i] . "" class="media_thumbnail">"; goto mkRNu; yc7Ld: $attachment .= "<video controls src="" . $this->post["media_content"][$i] . """; if (!isset($this->post["media_thumbnail"][$i])) { goto MR7DH; } $attachment .= " poster="" . $this->post["media_thumbnail"][$i] . """; MR7DH: $attachment .= "></video>"; goto mkRNu; YnXgc: $attachment .= "<a href="" . $this->post["media_content"][$i] . ""><img src="" . $this->post["media_thumbnail"][$i] . "" class="media_thumbnail"></a>"; mkRNu: Kz55F: $i++; goto LCnj_; JfyVP: $attachment .= "</div>"; goto HDtf2; lbYrf: $attachment .= "<div class="media_block">"; $i = 0; iltiM: if (!($i < sizeof($this->post["media_thumbnail"]))) { goto enkVj; } $attachment .= "<img src="" . $this->post["media_thumbnail"][$i] . "" class="media_thumbnail">"; h3AbB: $i++; goto iltiM; enkVj: $attachment .= "</div>"; HDtf2: goto YVR2K; IcQbE: $attachment .= "<div class="media_block">"; $ext = mb_strtolower(pathinfo($this->post["enclosure_url"], PATHINFO_EXTENSION)); if (in_array($ext, $video_extensions)) { goto sAKhu; } if (in_array($this->post["enclosure_type"], ["audio/mpeg", "audio/ogg", "audio/wav"])) { goto sXPMh; } if (stripos($this->post["enclosure_type"], "image/") !== false) { goto DZtSb; } goto o8V9I; sXPMh: $attachment .= "<audio controls><source src="" . $this->post["enclosure_url"] . "" type="" . $this->post["enclosure_type"] . ""></audio>"; goto o8V9I; DZtSb: $attachment .= "<img src="" . $this->post["enclosure_url"] . "">"; o8V9I: goto HGbpn; sAKhu: $attachment .= "<video controls src="" . $this->post["enclosure_url"] . """; if (!isset($this->post["media_thumbnail"][0])) { goto BLlJS; } $attachment .= " poster="" . $this->post["media_thumbnail"][0] . """; BLlJS: $attachment .= "></video>"; HGbpn: $attachment .= "</div>"; YVR2K: KQcWA: if (!($attachment !== '')) { goto u0o5w; } if ($this->current_feed["options"]["insert_media_attachments"] === "top") { goto MAl9f; } if ($this->current_feed["options"]["insert_media_attachments"] === "bottom") { goto djIGv; } goto o7ZdN; MAl9f: $this->post["post_content"] = $attachment . $this->post["post_content"]; $this->post["post_excerpt"] = $attachment . $this->post["post_excerpt"]; goto o7ZdN; djIGv: $this->post["post_content"] .= $attachment; $this->post["post_excerpt"] .= $attachment; o7ZdN: u0o5w: preg_match_all("/<img(.+?)src=['\"](.+?)['\"](.*?)>/is", $this->post["post_content"] . $this->post["post_excerpt"], $matches); $this->image_urls = array_merge($matches[2], $this->image_urls); preg_match_all("/<img.*?srcset=['\"](.+?)['\"].*?>/is", $this->post["post_content"] . $this->post["post_excerpt"], $matches); if (!count($matches[1])) { goto CsLMp; } foreach ($matches[1] as $item) { preg_match_all("/(.+?)\s+.+?[\,'\"]/is", $item, $srcsets); if (!count($srcsets[1])) { goto MQlqu; } foreach ($srcsets[1] as $link) { $this->image_urls[] = trim($link); WfYFs: } XcgFX: MQlqu: EmoZe: } JUxLt: CsLMp: $this->image_urls = array_values(array_unique($this->image_urls)); if (!($this->current_feed["options"]["store_images"] === "on")) { goto GAfBt; } $home = get_option("home"); if (!count($this->image_urls)) { goto peRUi; } $i = 0; mkvAz: if (!($i < count($this->image_urls))) { goto Ef8ts; } if (!(isset($this->image_urls[$i]) && strpos($this->image_urls[$i], $home) === false)) { goto U66Yi; } $new_image_url = $media_urls[] = $images[] = cseo_save_image($this->image_urls[$i], $this->post["post_title"]); $this->post["post_content"] = str_replace($this->image_urls[$i], $new_image_url, $this->post["post_content"]); $this->post["post_excerpt"] = str_replace($this->image_urls[$i], $new_image_url, $this->post["post_excerpt"]); if (!$this->show_report) { goto svTRR; } echo str_repeat(" ", 1024); flush(); svTRR: U66Yi: VxWF4: $i++; goto mkvAz; Ef8ts: peRUi: GAfBt: if (!($this->current_feed["options"]["store_videos"] === "on")) { goto zjO7n; } preg_match_all("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|](\.mp4|\.m4v\.mov|\.wmv|\.avi|\.mpg|\.ogv|\.3gp|\.3g2)/i", $this->post["post_content"] . $this->post["post_excerpt"], $matches); foreach ($matches[0] as $url) { if (!strlen(trim($url))) { goto sfo9K; } $new_video_url = cseo_save_video($url, $this->post["post_title"]); $this->post["post_content"] = str_replace($url, $new_video_url, $this->post["post_content"]); $this->post["post_excerpt"] = str_replace($url, $new_video_url, $this->post["post_excerpt"]); if (!$this->show_report) { goto v1y1x; } echo str_repeat(" ", 1024); flush(); v1y1x: sfo9K: thENO: } f3ml5: zjO7n: if (!(empty($this->image_urls) && !empty($o_imgs))) { goto WZ9oP; } $this->image_urls = $o_imgs; WZ9oP: if ($this->current_feed["options"]["set_thumbnail"] === "first_image") { goto WxjMN; } if ($this->current_feed["options"]["set_thumbnail"] === "last_image") { goto XsSx6; } if ($this->current_feed["options"]["set_thumbnail"] === "random_image") { goto O0biK; } if ($this->current_feed["options"]["set_thumbnail"] === "media_attachment" && isset($this->post["media_content"][0]) && (str_ends_with($this->post["media_content"][0], ".jpg") || str_ends_with($this->post["media_content"][0], ".png") || str_ends_with($this->post["media_content"][0], ".webm"))) { goto NXnNH; } if ($this->current_feed["options"]["set_thumbnail"] === "media_attachment" && isset($this->post["media_thumbnail"][0])) { goto Hevms; } if ($this->current_feed["options"]["set_thumbnail"] === "thumb_field" && isset($this->post["custom_fields"]["thumb"])) { goto vWRI6; } if ($this->current_feed["options"]["set_thumbnail"] === "gpt_image") { goto D8Aqr; } goto pwtC5; WxjMN: if (empty($this->image_urls)) { goto Vxeih; } $post_thumb_src = $this->image_urls[0]; $this->log("Trying to generate post thumbnail from the first post image"); Vxeih: goto pwtC5; XsSx6: if (empty($this->image_urls)) { goto k2lvy; } $post_thumb_src = $this->image_urls[count($this->image_urls) - 1]; $this->log("Trying to generate post thumbnail from the last post image"); k2lvy: goto pwtC5; O0biK: if (empty($this->image_urls)) { goto ONe2z; } $post_thumb_src = $this->image_urls[rand(0, count($this->image_urls) - 1)]; $this->log("Trying to generate post thumbnail from a random post image"); ONe2z: goto pwtC5; NXnNH: $post_thumb_src = trim($this->post["media_content"][0]); $this->log("Trying to generate post thumbnail from the media content / attachment"); goto pwtC5; Hevms: $post_thumb_src = trim($this->post["media_thumbnail"][0]); $this->log("Trying to generate post thumbnail from the media thumbnail / attachment"); goto pwtC5; vWRI6: $post_thumb_src = trim($this->post["custom_fields"]["thumb"]); $this->log("Trying to generate post thumbnail from the "thumb" custom field"); goto pwtC5; D8Aqr: $post_thumb_src = cseo_get_gpt_image($this->current_feed["options"]["preferred_gpt_image_source"]); pwtC5: if (!isset($post_thumb_src)) { goto utJ3z; } if ($this->current_feed["options"]["use_fifu"] === "on") { goto iitr1; } $image_url = $media_urls[] = cseo_save_image($post_thumb_src, $this->post["post_title"]); goto Ln9RH; iitr1: $image_url = $post_thumb_src; Ln9RH: utJ3z: if (!has_action("wpml_switch_language")) { goto H06Sm; } if ($this->current_feed["options"]["wpml_language"] === '') { goto LMASp; } do_action("wpml_switch_language", $this->current_feed["options"]["wpml_language"]); goto umem4; LMASp: do_action("wpml_switch_language", null); umem4: H06Sm: if (!strlen(trim($this->current_feed["options"]["remove_outer_elements"]))) { goto XdScJ; } $outer_elements = explode(";", stripslashes($this->current_feed["options"]["remove_outer_elements"])); if (!count($outer_elements)) { goto hDsUA; } $this->log("Removing outer HTML elements"); foreach ($outer_elements as $element) { preg_match("/^(\w+)\s*(.*)$/", trim($element), $matches); if (!isset($matches[1])) { goto c8kyJ; } $e_tag = $matches[1]; $e_attributes = $matches[2] ?? ''; $this->post["post_content"] = cseo_remove_outer_element($this->post["post_content"], trim($e_tag), trim($e_attributes) ?? ''); c8kyJ: tXBwt: } a2sQG: hDsUA: XdScJ: $this->post["post_content"] = $this->remove_absolute_links($this->post["link"], $this->post["post_content"]); $this->post["post_excerpt"] = $this->remove_absolute_links($this->post["link"], $this->post["post_excerpt"]); $this->post["post_excerpt"] = $this->fix_excerpt($this->post["post_excerpt"]); $this->log("Inserting a new post into the WordPress database"); unset($this->post["guid"]); cseo_disable_kses(); $post_id = @wp_insert_post($this->post, true); cseo_enable_kses(); if (!$this->current_feed["options"]["delay"]) { goto B2iMW; } $this->log("Delay for " . $this->current_feed["options"]["delay"] . " second(s)"); sleep($this->current_feed["options"]["delay"]); B2iMW: if (!is_wp_error($post_id)) { goto CIG2F; } $wp_insert_post_error = "Internal WordPress error. " . $post_id->get_error_message($post_id->get_error_code()); goto yt4ob; CIG2F: if (!is_object($this->current_feed["url"])) { goto Is5nJ; } $res = add_post_meta($post_id, "cyberseo_rss_source", $this->current_feed["url"]->get_id()); goto KalPP; Is5nJ: $res = add_post_meta($post_id, "cyberseo_rss_source", $this->current_feed["url"]); KalPP: if ($res) { goto svYNI; } $this->log("Can't save the feed source URL"); $wp_insert_post_error = "Can't save the feed source URL."; goto T3gBG; svYNI: $wp_insert_post_error = false; T3gBG: yt4ob: if (!($this->current_feed["options"]["post_template"] !== "default")) { goto zSKxA; } add_post_meta($post_id, "_wp_page_template", $this->current_feed["options"]["post_template"]); zSKxA: if (!$wp_insert_post_error) { goto kQYnt; } if (!$this->show_report) { goto GxnZ_; } echo "<br>" . $wp_insert_post_error . "<br>"; GxnZ_: $wp_upload_dir = wp_upload_dir(); if (!(isset($media_urls) && count($media_urls))) { goto ndYto; } $media_urls = array_values(array_unique($media_urls)); foreach ($media_urls as $url) { preg_match("/\/wp-content\/(.*?)$/", $url, $link_match); preg_match("/.*?\/wp-content\//", $wp_upload_dir["path"], $path_match); if (isset($path_match[0]) && isset($link_match[1])) { goto m0rIO; } @unlink(str_replace($wp_upload_dir["url"], $wp_upload_dir["path"], $url)); goto U6Q4T; m0rIO: @unlink($path_match[0] . $link_match[1]); U6Q4T: bla4L: } cA6ov: ndYto: $this->log($wp_insert_post_error . PHP_EOL); @wp_delete_post($post_id, true); return; kQYnt: $this->log("Done"); if (!(function_exists("pll_set_post_language") && function_exists("pll_save_post_translations"))) { goto Xl0bm; } if (!($this->current_feed["options"]["polylang_language"] !== '')) { goto QbxIX; } $this->polylang_translations[$this->current_feed["options"]["polylang_language"]] = $post_id; pll_set_post_language($post_id, $this->current_feed["options"]["polylang_language"]); pll_save_post_translations($this->polylang_translations); QbxIX: Xl0bm: if (!(defined("ICL_SITEPRESS_VERSION") && isset($GLOBALS["sitepress"]))) { goto tmpfH; } if (!($this->current_feed["options"]["wpml_language"] !== '')) { goto Ed7lx; } $language_code = $this->current_feed["options"]["wpml_language"]; $element_type = "post_" . get_post_type($post_id); $this->wpml_translations[$language_code] = $post_id; $trid = null; foreach ($this->wpml_translations as $existing_language_code => $existing_post_id) { if (!($existing_language_code != $language_code)) { goto kaqjL; } $trid = apply_filters("wpml_element_trid", null, $existing_post_id, $element_type); goto vumzS; kaqjL: duC1W: } vumzS: if (!empty($trid)) { goto VApdd; } $trid = $post_id; VApdd: do_action("wpml_set_element_language_details", ["element_id" => $post_id, "element_type" => $element_type, "trid" => $trid, "language_code" => $language_code, "source_language_code" => null]); do_action("wpml_set_element_translations", $this->wpml_translations); Ed7lx: tmpfH: if (!($this->current_feed["options"]["post_format"] !== "default")) { goto KredE; } set_post_format($post_id, $this->current_feed["options"]["post_format"]); KredE: if (add_post_meta($post_id, "cyberseo_post_name", $cyberseo_post_name)) { goto Z5g0h; } $this->log("Can't save the post name"); $this->log("The post will not be added" . PHP_EOL); wp_delete_post($post_id, true); return; Z5g0h: if (add_post_meta($post_id, "cyberseo_post_link", $this->post["link"])) { goto yivbV; } $this->log("Can't save the post URL"); $this->log("The post will not be added" . PHP_EOL); wp_delete_post($post_id, true); return; yivbV: if ($this->current_feed["options"]["post_lifetime"] > 0) { goto HJGLM; } $res = add_post_meta($post_id, "cyberseo_post_lifetime", 2147483647); goto ctuTq; HJGLM: $res = add_post_meta($post_id, "cyberseo_post_lifetime", time() + $this->current_feed["options"]["post_lifetime"] * 3600); ctuTq: if ($res) { goto JPfOC; } $this->log("Can't save the post lifetime"); $this->log("The post will not be added" . PHP_EOL); wp_delete_post($post_id, true); return; JPfOC: foreach ($this->post["custom_fields"] as $name => $value) { cseo_disable_kses(); if (add_post_meta($post_id, $name, $value, true)) { goto FPb2C; } update_post_meta($post_id, $name, $value); FPb2C: cseo_enable_kses(); L1HGQ: } xJKqj: $args = ["public" => true, "_builtin" => false]; $output = "objects"; $operator = "and"; $taxonomies = get_taxonomies($args, $output, $operator); foreach ($taxonomies as $taxonomy) { if (!(in_array($this->post["post_type"], $taxonomy->object_type) && isset($this->post["custom_taxonomies"][$taxonomy->name]))) { goto cW8_e; } wp_set_object_terms($post_id, explode(",", $this->parse_placeholders($this->post["custom_taxonomies"][$taxonomy->name])), $taxonomy->name, true); cW8_e: Csbn1: } ZEx3j: if (!($this->current_feed["options"]["add_to_media_library"] === "on")) { goto m05GE; } if (!($this->current_feed["options"]["set_thumbnail"] === "thumb_field" && !empty($this->post["custom_fields"]["thumb"]))) { goto khNx5; } $this->image_urls[] = $this->post["custom_fields"]["thumb"]; khNx5: if (!count($this->image_urls)) { goto BBNOW; } global $post; $post = get_post($post_id); $this->log("Adding images to the Media Library"); $i = 0; CP9cR: if (!($i < count($this->image_urls))) { goto VGBfC; } if (!(isset($this->image_urls[$i]) && strpos($this->image_urls[$i], "//") != 0)) { goto YpjPi; } $image_url = $this->image_urls[$i]; $upload_dir = wp_upload_dir(); if (file_exists($upload_dir["path"] . "/" . basename($image_url))) { goto IJIHu; } $image_url = cseo_save_image($image_url, $title); IJIHu: $img_path = str_replace($upload_dir["url"], $upload_dir["path"], $image_url); add_filter("intermediate_image_sizes_advanced", [$this, "disable_thumbnails"]); $attachment_id = attachment_url_to_postid($image_url); if (!(file_exists($img_path) && filesize($img_path))) { goto s90HO; } if ($attachment_id) { goto TQurN; } $wp_filetype = wp_check_filetype($upload_dir["path"] . basename($image_url), null); $attachment = ["post_mime_type" => $wp_filetype["type"], "post_title" => preg_replace("/\.[^.]+$/", '', $post->post_title), "post_content" => '', "post_status" => "inherit"]; $attachment_id = wp_insert_attachment($attachment, $upload_dir["path"] . "/" . basename($image_url), $post_id); cseo_disable_kses(); wp_update_post(["ID" => $attachment_id, "post_parent" => $post_id]); cseo_enable_kses(); require_once ABSPATH . "wp-admin/includes/image.php"; require_once ABSPATH . "wp-admin/includes/media.php"; $attachment_data = wp_generate_attachment_metadata($attachment_id, $upload_dir["path"] . "/" . basename($image_url)); wp_update_attachment_metadata($attachment_id, $attachment_data); TQurN: s90HO: remove_filter("intermediate_image_sizes_advanced", [$this, "disable_thumbnails"]); if (!$this->show_report) { goto UM_7B; } echo str_repeat(" ", 1024); flush(); UM_7B: YpjPi: WAGko: $i++; goto CP9cR; VGBfC: cseo_disable_kses(); wp_update_post($post); cseo_enable_kses(); $this->log("Done"); BBNOW: m05GE: if (!(strpos($this->post["post_content"], "cyberseo_gallery") !== false)) { goto Io9TX; } global $post; $post = get_post($post_id); if (!preg_match_all("/\[cyberseo_gallery.*?\]/", $post->post_content, $matches)) { goto NTQ1Z; } $this->log("Generating and attaching image gallery"); foreach ($matches[0] as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", cseo_remove_emojis(cseo_strip_tags($this->parse_placeholders(cseo_apply_spintax(stripslashes($shortcode))))))); $content = cyberseo_gallery_shortcode($atts); if (!($content === false)) { goto QebOr; } $this->log("The plugin was unable to generate a gallery"); $this->log("The post will not be added" . PHP_EOL); $this->delete_post_media($post_id); wp_delete_post($post_id, true); return; QebOr: $post->post_content = str_replace($shortcode, $content, $post->post_content); FVxFs: } w8cjm: cseo_disable_kses(); wp_update_post($post); cseo_enable_kses(); $this->log("Done"); NTQ1Z: Io9TX: if (!(strpos($this->post["post_content"], "image_gallery") !== false)) { goto M8GQi; } global $post; $post = get_post($post_id); if (!preg_match_all("/\[image_gallery.*?\]/", $post->post_content, $matches)) { goto op3_s; } $this->log("Generating and attaching image gallery"); foreach ($matches[0] as $shortcode) { $atts = shortcode_parse_atts(str_replace("]", " ]", cseo_remove_emojis(cseo_strip_tags($this->parse_placeholders(cseo_apply_spintax(stripslashes($shortcode))))))); $content = cyberseo_gallery_shortcode($atts); if (!($content === false)) { goto Hk55O; } $this->log("The plugin was unable to generate a gallery"); $this->log("The post will not be added" . PHP_EOL); $this->delete_post_media($post_id); wp_delete_post($post_id, true); return; Hk55O: $post->post_content = str_replace($shortcode, $content, $post->post_content); tVqY9: } OIB1W: cseo_disable_kses(); wp_update_post($post); cseo_enable_kses(); $this->log("Done"); op3_s: M8GQi: if (!count($cseo_images_to_attach)) { goto rcd3q; } $attach_ids = []; foreach ($cseo_images_to_attach as $image) { if (!strlen(trim($image["url"]))) { goto yM3JW; } if ($image["title"] !== '') { goto YYDKz; } $attach_id = cseo_add_image_to_library($image["url"], stripslashes($this->post["post_title"]), $post_id); goto UayUd; YYDKz: $attach_id = cseo_add_image_to_library($image["url"], $image["title"], $post_id); UayUd: if (!$attach_id) { goto ZgPQX; } $attach_ids[] = $attach_id; ZgPQX: yM3JW: Yigdh: } vbUiE: if ($this->current_feed["options"]["set_thumbnail"] === "first_image") { goto tkTXy; } if ($this->current_feed["options"]["set_thumbnail"] === "last_image") { goto JOCRr; } if ($this->current_feed["options"]["set_thumbnail"] === "random_image") { goto HI46j; } goto z3pHB; tkTXy: $image_url = $attach_ids[0]; goto z3pHB; JOCRr: $image_url = $attach_ids[count($attach_ids) - 1]; goto z3pHB; HI46j: $image_url = $attach_ids[rand(0, count($attach_ids) - 1)]; z3pHB: rcd3q: if (!($this->current_feed["options"]["set_thumbnail"] !== "no_thumb")) { goto ohT89; } if (isset($image_url)) { goto pjXdx; } if (!(preg_match_all("/src.?=.?["']https:\/\/(www\.)?youtube\.com\/embed\/(.*?)["'\?]/is", stripslashes($this->post["post_content"] . $this->post["post_excerpt"]), $matches) && count($matches[2]))) { goto Bl6F6; } if ($this->current_feed["options"]["set_thumbnail"] === "first_image") { goto O3TAm; } if ($this->current_feed["options"]["set_thumbnail"] === "last_image") { goto IecBS; } $image_url = "https://img.youtube.com/vi/" . $matches[2][rand(0, count($matches[2]) - 1)] . "/maxresdefault.jpg"; goto YdIw5; O3TAm: $image_url = "https://img.youtube.com/vi/" . $matches[2][0] . "/maxresdefault.jpg"; goto YdIw5; IecBS: $image_url = "https://img.youtube.com/vi/" . $matches[2][count($matches[2] - 1)] . "/maxresdefault.jpg"; YdIw5: Bl6F6: pjXdx: if (!($this->current_feed["options"]["set_thumbnail"] === "alternative_image" || !isset($image_url))) { goto Fna14; } if (strlen(trim($this->current_feed["options"]["alt_post_thumbnail_src"]))) { goto WJP89; } $this->log("No alternative image source specified"); goto TM0y7; WJP89: $image_url = $this->parse_placeholders($this->current_feed["options"]["alt_post_thumbnail_src"]); TM0y7: Fna14: if (empty($image_url)) { goto j6js4; } if (cseo_check_image_size($image_url, $this->current_feed["options"]["thumb_src_min_width"], $this->current_feed["options"]["thumb_src_max_width"], $this->current_feed["options"]["thumb_src_min_height"], $this->current_feed["options"]["thumb_src_max_height"])) { goto ulrAu; } $this->log("The thumbnail source image does not match the specified size limits"); goto vgklf; ulrAu: if ($this->current_feed["options"]["use_fifu"] !== "on") { goto Mt4DP; } if (function_exists("fifu_dev_set_image") && ($thumb_id = fifu_dev_set_image($post_id, $image_url))) { goto V74Qy; } $this->log("The post thumbnail has not been set because FIFU is not active or the image source is invalid"); goto zfE3K; V74Qy: if (cseo_is_binary($image_url)) { goto B6D3i; } $this->log("The thumbnail source image was not found or broken"); $thumb_id = false; goto CBlge; B6D3i: $this->log("The post thumbnail is now handled by FIFU"); CBlge: zfE3K: goto tyDkr; Mt4DP: $thumb_id = cseo_attach_post_thumbnail($post_id, $image_url, $this->post["post_title"]); if (!($thumb_id !== false)) { goto mxlQ1; } $this->log("Post thumbnail successfully generated and saved to host"); mxlQ1: tyDkr: vgklf: j6js4: if (!($this->current_feed["options"]["require_thumbnail"] === "on" && empty($thumb_id))) { goto PIDr4; } $this->log("The plugin was unable to generate a post thumbnail" . PHP_EOL); $this->delete_post_media($post_id); wp_delete_post($post_id, true); return; PIDr4: if (!isset($post_thumb_src)) { goto jaUwW; } if (add_post_meta($post_id, "cyberseo_thumb_source", $post_thumb_src)) { goto MFRzp; } $this->log("Can't save the post thumbnail source URL" . PHP_EOL); $this->delete_post_media($post_id); wp_delete_post($post_id, true); return; MFRzp: jaUwW: ohT89: if (!(is_array($this->post["comments"]) && count($this->post["comments"]))) { goto ZBK3f; } foreach ($this->post["comments"] as $comment) { $comment["comment_post_ID"] = $post_id; if (!strlen(trim($comment["comment_content"] ?? ''))) { goto ftk3J; } $comment["comment_content"] = cseo_morph_content($comment["comment_content"]); wp_insert_comment($comment); ftk3J: XMhE2: } aSc1v: ZBK3f: if (!(get_post_meta($post_id, "cyberseo_rss_source", true) === '')) { goto NoJ01; } $this->log("Unable to set the cyberseo_rss_source filed"); $this->log("The post will not be added" . PHP_EOL); $this->delete_post_media($post_id); wp_delete_post($post_id, true); return; NoJ01: $this->count++; $this->log("New post title: " . cseo_fix_white_spaces(trim(strip_tags(stripslashes($this->post["post_title"]))))); $this->log("New post ID: " . $post_id . PHP_EOL); if (!has_action("wpml_switch_language")) { goto l5u5P; } do_action("wpml_switch_language", null); l5u5P: } function getCategoryIds($category_names) { global $wpdb; $cat_ids = []; if (!is_array($category_names)) { goto KDyvc; } foreach ($category_names as $cat_name) { if (function_exists("term_exists")) { goto fmAyX; } $cat_name_escaped = addslashes($cat_name); $results = $wpdb->get_results("SELECT cat_ID FROM {$wpdb->prefix}categories WHERE (LOWER(cat_name) = LOWER('{$cat_name_escaped}'))"); if ($results) { goto j5gLB; } if ($this->current_feed["options"]["undefined_category"] === "create_new") { goto BwBiu; } goto b8oyb; j5gLB: foreach ($results as $term) { $cat_ids[] = (int) $term->cat_ID; OAlxn: } f_aeS: goto b8oyb; BwBiu: if (function_exists("wp_insert_category")) { goto NsMP5; } $cat_name_sanitized = sanitize_title($cat_name); $wpdb->query("INSERT INTO {$wpdb->prefix}categories SET cat_name='{$cat_name_escaped}', category_nicename='{$cat_name_sanitized}'"); $cat_id = $wpdb->insert_id; goto wEL9S; NsMP5: $cat_id = wp_insert_category(["cat_name" => $cat_name]); wEL9S: $cat_ids[] = $cat_id; b8oyb: goto WdYck; fmAyX: $cat_id = term_exists($cat_name, "category"); if ($cat_id) { goto y3EYr; } if ($this->current_feed["options"]["undefined_category"] === "create_new") { goto G7nTB; } goto h24J6; y3EYr: $cat_ids[] = $cat_id["term_id"]; goto h24J6; G7nTB: $term = wp_insert_term($cat_name, "category"); if (!(!is_wp_error($term) && isset($term["term_id"]))) { goto SU6Lz; } $cat_ids[] = $term["term_id"]; SU6Lz: h24J6: WdYck: zT4kz: } YtvoR: KDyvc: if (!(count($cat_ids) != 0)) { goto EgRKx; } $cat_ids = array_unique($cat_ids); EgRKx: return $cat_ids; } function categoryChecklist($post_id = 0, $descendents_and_self = 0, $selected_cats = false) { wp_category_checklist($post_id, $descendents_and_self, $selected_cats); } function showChangeBox($change_selected, $name, $return = false) { if (!$change_selected) { goto M07L3; } $checkbox = "<input type="checkbox" style="border-color: red;" name="" . "chk_" . $name . "" id="" . "chk_" . $name . ""> "; if (!$return) { goto EFy_o; } return $checkbox; EFy_o: echo $checkbox; M07L3: } function ai_rwtr_engines($engine) { foreach (CSEO_AI_RWTR_ENGINES_REG as $m => $n) { echo "<option " . ($engine === $m ? "selected " : '') . "value="" . $m . "">" . $n . "</option>"; ThIt0: } jLxWJ: } function hTmpl() { return " [<a href="https://www.cyberseo.net/content-syndicator/#templates" target="_blank">?</a>]"; } function showSettings($islocal, $settings, $change_selected = false) { echo " <form name="feed_settings" action=""; echo preg_replace("/\&edit-feed-id\=[0-9]+/", '', cseo_REQUEST_URI()); echo "" method="post">
\xd\xa <input type="hidden" name="preset" value=""; echo $_POST["presets"] ?? "0"; echo ""> \xd\xa "; if (!(isset($_POST["treat_as_csv"]) || ($settings["treat_as_csv"] ?? '') === "on")) { goto dsUBT; } echo "<input type="hidden" name="treat_as_csv" value="on">"; dsUBT: echo "\xd\xa <ul class="tabs">\xd\xa <li class="active" rel="basic">Basic</li>\xd
<li rel="templates">Post templates</li>\xd\xa <li rel="advanced">Advanced</li>\xd
<li rel="expert">Expert</li>\xd\xa <li rel="ai">AI article generation</li>\xd
<li rel="image_generation">Media enrichment</li>\xd\xa <li rel="media_handling">Media handling</li>\xd
<li rel="filtering">Content filtering</li>
\xa </ul> \xd\xa
\xa <style>\xd\xa .CodeMirror {
resize: vertical;\xd\xa overflow: hidden;\xd\xa height: auto; \xd
}
\xa .CodeMirror-scroll {
overflow-y: auto;
}
</style>
<div id="basic" class="tab_content">
<br> \xd
<table class="form-table "; if (!$change_selected) { goto aQMVF; } echo "cseo-form"; aQMVF: echo "">\xd\xa "; if (!$islocal) { goto Np3ZX; } if ($this->edit_existing) { goto W8X1g; } if ($this->document_type === "Instagram" || $this->document_type === "Twitter") { goto s3DGI; } if ($this->document_type === "XML Sitemap") { goto fTmM2; } goto wQlWC; s3DGI: $settings["insert_media_attachments"] = "top"; $settings["store_images"] = "on"; goto wQlWC; fTmM2: $settings["extract_full_articles"] = "on"; wQlWC: W8X1g: echo " <tr>
\xa <th scope="row">Feed title</th>\xd\xa <td>\xd
<input type="text" name="feed_title" style="width:100%" value=""; echo $this->edit_existing ? htmlentities($this->feeds[(int) $_GET["edit-feed-id"]]["title"], ENT_QUOTES) : htmlentities($this->feed_title, ENT_QUOTES); echo "">
\xa <p class="description">A title of feed to be used in CyberSEO Pro Syndicator.</p>
</td>\xd\xa </tr>
\xa "; if (!is_object($this->current_feed_url)) { goto r4Bga; } echo " <!-- dump -->\xd\xa <tr>
\xa <th scope = "row">Dump</th>
\xa <td>
"; echo "<textarea cols="90" rows="10" wrap="on" name="dump" id="dump" style="margin:0;height:10em;width:100%;">"; foreach ($this->current_feed_url->dump as $line) { $tr = trim($line); if (empty($tr)) { goto HNc3F; } echo $tr . PHP_EOL; HNc3F: lhZsi: } I53rz: echo "</textarea>"; echo "
\xa </td>
\xa </tr>
\xa "; goto mjiN1; r4Bga: echo " <tr>\xd
<th scope="row">Feed URL</th>\xd
<td>
"; if (is_string($this->current_feed_url) && preg_match(CSEO_DUMMY_FEED_PATTERN, $this->current_feed_url)) { goto Y0k1X; } echo "<input type="text" name="url" style="width:100%" value="" . htmlspecialchars($this->current_feed_url) . "">"; goto GpV3M; Y0k1X: echo "<input type="text" name="url" style="width:100%" value="a dummy feed (no URL)" readonly>"; GpV3M: echo " <p class="description">The URL of the feed"; if (empty($this->document_type)) { goto UtXM_; } echo " (source: " . $this->document_type . ")"; UtXM_: echo ".</p>\xd\xa </td>
\xa </tr>
\xa "; mjiN1: Np3ZX: echo "\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "interval"); echo "Check for updates every</th>
<td>
\xa "; echo "<input type="number" min="0" name="interval" value="" . $settings["interval"] . "" size="4"> minutes."; echo " <p class="description">If you don't need automatic updates, set this parameter to 0.</p>
\xa </td>\xd
</tr>
\xa
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "delay"); echo "Delay</th> \xd
<td> \xd\xa "; echo "<input type="number" min="0" name="delay" value="" . $settings["delay"] . "" size="4"> seconds."; echo " <p class="description">Delay between adding new posts. Do not use values longer than a few seconds.<br>⚠ Read the manual before changing this option!</p>
\xa </td>\xd
</tr>
\xa\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "max_items"); echo "Maximum number of posts</th>
\xa <td>
"; if (is_string($this->current_feed_url) && preg_match(CSEO_DUMMY_FEED_PATTERN, $this->current_feed_url)) { goto eO44x; } echo "<input type="number" min="0" name="max_items" value="" . $settings["max_items"] . "" size="4">" . "<p class="description">Use low values to decrease the syndication time and improve SEO of your blog.</p>"; goto W98db; eO44x: echo "<input type="number" min="0" name="max_items" value="1" size="4" readonly>" . "<p class="description">Only one post can be added at a time when the dummy feed is pulled.</p>"; W98db: echo " </td>
</tr>
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "duplicate_check_method"); echo "Check for duplicates by</th>\xd
<td>\xd
<select name="duplicate_check_method">\xd
"; echo "<option " . ($settings["duplicate_check_method"] === "guid_and_title" ? "selected " : '') . "value="guid_and_title">Link and title</option>"; echo "<option " . ($settings["duplicate_check_method"] === "guid" ? "selected " : '') . "value="guid">Link only</option>"; echo "<option " . ($settings["duplicate_check_method"] === "title" ? "selected " : '') . "value="title">Title only</option>"; echo "<option " . ($settings["duplicate_check_method"] === "none" ? "selected " : '') . "value="none">Don't check for duplicate posts</option>"; echo " </select>\xd\xa <p class="description">Choose the method to skip existing posts.</p>
\xa </td>
\xa </tr>
<th scope="row">"; $this->showChangeBox($change_selected, "disable_2nd_check"); echo "Skip the 2nd check</th>\xd
<td>
\xa "; echo "<input type="checkbox" name="disable_2nd_check" id="disable_2nd_check" " . ($settings["disable_2nd_check"] === "on" ? "checked " : '') . ">"; echo " <label for="disable_2nd_check">enable this option if your custom PHP code does not modify the post title or source link. It will improve the performance of the plugin</label>
\xa <p class="description">⚠ Deselect this option if you want to modify the post title or post link using PHP code,
\xa or importing your feed using the "Treat as CSV" option.</p>
\xa </td>\xd
</tr>
\xa\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "post_type"); echo "Post type</th>\xd
<td>\xd\xa <select name="post_type" onchange="cseoChangePostType();">
\xa "; $post_types = get_post_types(); foreach ($post_types as $post_type) { echo "<option " . ($settings["post_type"] == $post_type ? "selected " : '') . "value="" . $post_type . "">" . $post_type . "</option>"; FYrad: } ljS6P: echo " </select>\xd
<p class="description">Select WordPress <em>post type</em>.</p>
</td>\xd\xa </tr>
\xa\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "custom_taxonomies"); echo "Custom taxonomies</th>\xd\xa <td>
\xa "; $args = ["public" => true, "_builtin" => false]; $output = "objects"; $operator = "and"; $taxonomies = get_taxonomies($args, $output, $operator); foreach ($taxonomies as $taxonomy) { if (isset($settings["custom_taxonomies"][$taxonomy->name])) { goto TwlZK; } $value = ''; goto oZD0f; TwlZK: $value = $settings["custom_taxonomies"][$taxonomy->name]; oZD0f: echo "<table id="custom_taxonomy_" . $taxonomy->name . "">"; echo "<tr>"; echo "<td style="padding:0px;">"; echo "<p class="description"><strong>" . $taxonomy->label . "</strong> (separate with commas)</p>"; echo "<input type="text" size="120" name="custom_taxonomies[" . $taxonomy->name . "]" value="" . $value . "">"; echo "</td>"; echo "</tr>"; echo "</table>"; reXcF: } px_TL: echo " <table id="custom_taxonomy_undefined">
<tr>
<td style="padding:0px">\xd
<input type="text" size="60" disabled value="No custom taxonomies defined for this post type.">
</td> \xd\xa </tr>
\xa </table>
\xa <p class="description">Assign WordPress <em>custom taxonomies</em>. The post template <em>placeholders</em> are allowed here.</p>\xd
</td>
</tr>
\xa
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "post_template"); echo "Custom post template</th>
\xa <td>
"; $custom = wp_get_theme()->get_post_templates(); $templates = ["Default"]; foreach ($custom as $post_type => $template) { foreach ($template as $template_file => $name) { $templates[] = $template_file; bIh6X: } AA0ff: JcW1d: } rwUPZ: $templates = array_unique($templates, SORT_STRING); echo "<select name="post_template">"; foreach ($templates as $name) { echo "<option " . ($settings["post_template"] === $name ? "selected " : '') . "value="" . $name . "">" . $name . "</option>"; GOedq: } nOQwk: echo "</select><br>"; echo " <p class="description">Select a custom template file for a single post type.</p>\xd\xa </td>
\xa </tr>
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "post_format"); echo "Post format</th>\xd\xa <td>
\xa <select name="post_format">\xd\xa "; foreach (["default", "aside", "gallery", "link", "image", "quote", "status", "video", "audio", "chat"] as $f) { echo "<option " . ($settings["post_format"] === $f ? "selected " : '') . "value="" . $f . "">" . $f . "</option>"; XeKGK: } fCtza: echo " </select>\xd
<p class="description">Set the WordPress <em>post format</em>.</p>
</td>\xd\xa </tr>
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "post_author"); echo "Post author</th>
\xa <td>\xd\xa <select name="post_author">
\xa "; $wp_user_search = get_users(["role__in" => ["author", "editor", "administrator"]]); foreach ($wp_user_search as $user) { echo "<option " . ($settings["post_author"] == $user->ID ? "selected " : '') . "value="" . $user->ID . "">" . esc_html($user->display_name) . "</option>"; qPlVJ: } Uaeie: echo "<option " . ($settings["post_author"] == 0 ? "selected " : '') . "value="0"><random author>"; echo " </select>\xd\xa <p class="description">Assign the post author.</p>\xd\xa </td>
</tr> \xd\xa\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "post_lifetime"); echo "Post lifetime</th>\xd
<td>
"; echo "<input type="number" min="0" name="post_lifetime" value="" . $settings["post_lifetime"] . "" size="4"> hours."; echo " <p class="description">The period of time after which the post will be deleted. If you don't want to limit the post lifetime, set this parameter to 0.</p>
\xa </td>\xd
</tr>
\xa\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "post_status"); echo "Post status</th>
<td>
\xa <select name="post_status">
"; echo "<option " . ($settings["post_status"] === "publish" ? "selected " : '') . "value="publish">Publish immediately</option>"; echo "<option " . ($settings["post_status"] === "pending" ? "selected " : '') . "value="pending">Hold for review</option>"; echo "<option " . ($settings["post_status"] === "draft" ? "selected " : '') . "value="draft">Save as draft</option>"; echo "<option " . ($settings["post_status"] === "private" ? "selected " : '') . "value="private">Save as private</option>"; echo " </select></td>
</tr> \xd
\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "base_date"); echo "Base date</th>
<td>
\xa <select name="base_date">\xd\xa "; echo "<option " . ($settings["base_date"] === "post" ? "selected " : '') . "value="post">Get date from post</option>"; echo "<option " . ($settings["base_date"] === "syndication" ? "selected " : '') . "value="syndication">Use syndication date</option>"; echo " </select></td>
\xa </tr>
\xa\xd\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "date_range"); echo "Post date adjustment range</th>\xd\xa <td>
\xa "; echo "<input type="number" name="date_min" value="" . $settings["date_min"] . "" size="6"> .. <input type="number" name="date_max" value="" . $settings["date_max"] . "" size="6">"; echo " minutes.\xd\xa <p class="description">This range will be used to randomly adjust the publication date for every generated post. For example, if you set the adjustment range as <code>[0..60]</code>,
\xa the post dates will be increased by a random value between 0 and 60 minutes. Negative values are allowed.</p>\xd
</td>\xd
</tr>
\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "parse_archives"); echo "Parse WordPress archives</th>
<td>
"; echo "<input type="checkbox" name="parse_archives" id="parse_archives" " . ($settings["parse_archives"] === "on" ? "checked " : '') . ">"; echo " <label for="parse_archives">if checked the CyberSEO Pro syndicator will aggregate archived (old) posts from WordPress blogs.</label>\xd
</td>
\xa </tr>
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "shuffle_xml_items"); echo "Shuffle feed items</th>\xd\xa <td>\xd\xa "; echo "<input type="checkbox" name="shuffle_xml_items" id="shuffle_xml_items" " . ($settings["shuffle_xml_items"] === "on" ? "checked " : '') . ">"; echo " <label for="shuffle_xml_items">check this option to shuffle the XML/RSS contents to make the posts be added in a random order. This function requires additional server resources, so use it wisely.</label>
\xa </td>
\xa </tr>
\xa\xd\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "post_category[]"); echo "Categories</th>\xd\xa <td>
\xa <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
<div id="categories-all" class="cyberseo-ui-tabs-panel">
\xa "; $this->categoryChecklist(null, false, $settings["post_category"]); echo " </div> \xd
</ul>
<p class="description">Assign the post to the selected categories.</p>\xd\xa </td>\xd
</tr>\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "undefined_category"); echo "Undefined categories</th>\xd\xa <td>\xd\xa <select name="undefined_category">
\xa "; if (!$islocal) { goto Wz4t4; } echo "<option " . ($settings["undefined_category"] === "use_global" ? "selected " : '') . "value="use_global">Use default settings</option>"; Wz4t4: echo "<option " . ($settings["undefined_category"] === "use_default" ? "selected " : '') . "value="use_default">Post to default WordPress category</option>"; echo "<option " . ($settings["undefined_category"] === "create_new" ? "selected " : '') . "value="create_new">Create new categories defined in syndicating post</option>"; echo "<option " . ($settings["undefined_category"] === "drop" ? "selected " : '') . "value="drop">Do not syndicate post that doesn't match at least one category defined above</option>"; echo " </select>\xd
<p class="description">This option defines what the CyberSEO Pro syndicator have to do if none of the post categories mutch the predefined defined ones.</p>
</td>\xd
</tr>
\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "create_tags"); echo "Tags from category names</th>
<td>
\xa "; echo "<input type="checkbox" name="create_tags" id="create_tags" " . ($settings["create_tags"] === "on" ? "checked " : '') . ">"; echo " <label for="create_tags">when checked, post category names will be added as post tags.</label>
\xa </td>
</tr>
\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "post_tags"); echo "Post tags</th>\xd
<td>\xd
"; echo "<input type="text" style="width:100%;" name="post_tags" value="" . stripslashes($settings["post_tags"]) . "">"; echo " <p class="description">Separate with commas. Spintax and post template placeholders are allowed, e.g: <code>{tag #1|tag #2|tag #3}</code>, or <code>%gpt_keywords%</code></p>\xd
</td>
\xa </tr> \xd\xa
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "auto_tags"); echo "Auto tags</th>\xd\xa <td>\xd\xa "; echo "<input type="checkbox" name="auto_tags" id="auto_tags" " . ($settings["auto_tags"] === "on" ? "checked " : '') . ">"; echo " <label for="auto_tags">if checked, the CyberSEO plugin will look for existing tags within your content and add them automatically.</label>\xd\xa </td>\xd
</tr> \xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "tags_to_woocommerce"); echo "Tags to WooCommerce</th>
<td>
\xa "; echo "<input type="checkbox" name="tags_to_woocommerce" id="tags_to_woocommerce" " . ($settings["tags_to_woocommerce"] === "on" ? "checked " : '') . ">"; echo " <label for="tags_to_woocommerce">check this option to assign importing post tags to WooCommerce product tags.</label>\xd\xa </td>
\xa </tr>
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "cats_to_woocommerce"); echo "Categories to WooCommerce</th>\xd\xa <td>
"; echo "<input type="checkbox" name="cats_to_woocommerce" id="cats_to_woocommerce" " . ($settings["cats_to_woocommerce"] === "on" ? "checked " : '') . ">"; echo " <label for="cats_to_woocommerce">check this option to assign importing post categories to WooCommerce product categories.</label>
</td>\xd\xa </tr> \xd
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "push_up"); echo "Republish existing posts</th>\xd
<td>"; echo "<input type="checkbox" name="push_up" id="push_up" " . ($settings["push_up"] === "on" ? "checked " : '') . ">"; echo " <label for="push_up">if checked, the existing posts will be republished every time the feed is pulled. Do not check this option if you are not sure on what you are doing!</label>\xd
</td>\xd
</tr>
\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "comment_status"); echo "Comments</th>\xd
<td>
<select name="comment_status">
\xa "; echo "<option " . ($settings["comment_status"] === "open" ? "selected " : '') . "value="open">Allow comments on syndicated posts</option>"; echo "<option " . ($settings["comment_status"] === "closed" ? "selected " : '') . "value="closed">Disallow comments on syndicated posts</option>"; echo " </select></td>
</tr>
\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "ping_status"); echo "Pings</th>\xd\xa <td>\xd\xa <select name="ping_status">\xd
"; echo "<option " . ($settings["ping_status"] === "open" ? "selected " : '') . "value="open">Accept pings</option>"; echo "<option " . ($settings["ping_status"] === "closed" ? "selected " : '') . "value="closed">Don't accept pings</option>"; echo " </select></td>
\xa </tr>
\xd
"; if (function_exists("pll_languages_list")) { goto MdTMU; } $languages = []; goto YzRTz; MdTMU: $languages = pll_the_languages(array("hide_if_empty" => 0, "raw" => 1)); if (!($settings["polylang_language"] === '')) { goto BRnA0; } $settings["polylang_language"] = pll_default_language(); BRnA0: YzRTz: echo "
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "polylang_language"); echo "Polylang language</th>
<td>
\xa <select name="polylang_language" "; if (count($languages)) { goto tk9T2; } echo "disabled"; tk9T2: echo ">\xd\xa "; if (count($languages)) { goto Sq8WK; } echo "<option value = "" . $settings["polylang_language"] . "">The Polylang plugin is inactive</option>"; goto wTZnX; Sq8WK: foreach ($languages as $l) { echo "<option " . ($settings["polylang_language"] === $l["slug"] ? "selected " : '') . "value = "" . $l["slug"] . "">" . $l["name"] . "</option>"; Ia3yN: } ewW4m: wTZnX: echo " </select> \xd
<p class="description">Assign a Polylang language to every post or page generated from this content source.</p>\xd\xa </td>
\xa </tr>\xd\xa\xd
"; if (defined("ICL_SITEPRESS_VERSION")) { goto VpXPM; } $languages = []; goto L98w8; VpXPM: $languages = apply_filters("wpml_active_languages", null, "orderby=id&order=desc"); if (!($settings["wpml_language"] === '')) { goto AwYja; } $settings["wpml_language"] = apply_filters("wpml_default_language", null); AwYja: L98w8: echo "
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "wpml_language"); echo "WPML language</th>\xd
<td>
<select name="wpml_language" "; if (count($languages)) { goto p3aN4; } echo "disabled"; p3aN4: echo ">
"; if (count($languages)) { goto cEA4z; } echo "<option value = "" . $settings["wpml_language"] . "">The WPML plugin is inactive</option>"; goto ZSqUj; cEA4z: foreach ($languages as $l) { echo "<option " . ($settings["wpml_language"] === $l["language_code"] ? "selected " : '') . "value = "" . $l["language_code"] . "">" . $l["native_name"] . "</option>"; CjInA: } IZQe_: ZSqUj: echo " </select>
<p class="description">Assign a WPML language to every post or page generated from this content source.</p>\xd
</td>
\xa </tr>
\xa </table>
\xa "; if (!is_object($this->current_feed_url)) { goto GqwZL; } echo " <script>
var dump = CodeMirror.fromTextArea(document.getElementById("dump"), {
\xa autoRefresh: true,
lineWrapping: true,
\xa lineNumbers: true,\xd
spellcheck: false,
\xa matchBrackets: true,\xd\xa mode: "text/html",\xd\xa indentUnit: 8,\xd
indentWithTabs: true,
enterMode: "keep",\xd
tabMode: "shift",
\xa });
\xa dump.setSize("100%", "15em");
</script>
"; GqwZL: echo " </div>\xd
<div id="ai" name="ai" class="tab_content">\xd
<br>\xd
<table class="form-table "; if (!$change_selected) { goto BZkdu; } echo "cseo-form"; BZkdu: echo "">\xd\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "ai_engine"); echo "Select AI article generator</th>
\xa <td>\xd\xa <select name="ai_engine" id="ai_engine" onchange="cseoAiEngine();">
\xa "; echo "<option " . ($settings["ai_engine"] === "none" ? "selected " : '') . "value="none">none</option>"; echo "<option " . ($settings["ai_engine"] === "openai" ? "selected " : '') . "value="openai">AI language model</option>"; echo "<option " . ($settings["ai_engine"] === "article_forge" ? "selected " : '') . "value="article_forge">Article Forge</option>"; echo " </select>
\xa <p class="description">The selected above AI article generation will be applied to this feed.</p>\xd\xa </td>\xd
</tr>\xd\xa </table> \xd
<div id="openai" display="none">
\xa "; if ($this->credentials_set("openai")) { goto Nx2Y3; } echo "<p><span style="color: red;">Warning!</span> The OpenAI API key is not provided. The service is not available. Please set it on the "Accounts" page.</p>"; Nx2Y3: echo "\xd
<table class="form-table "; if (!$change_selected) { goto nYO8X; } echo "cseo-form"; nYO8X: echo "">\xd\xa\xd\xa <tr>\xd
<th></th>
<td>\xd
<div class="cseo-box" style="padding: 8px;"><span style="color: red;">⚠</span> The following settings provide a simplified method with limited functionality.
This panel is a legacy from the old versions for compatibility reasons, and it is <strong>not</strong> recommended for article generation.\xd\xa Instead, you should use the special <a href="https://www.cyberseo.net/content-syndicator/#shortcodes" target="_blank">shortcodes</a>
\xa in <a href="https://www.cyberseo.net/content-syndicator/#templates" target="_blank">post templates</a> on the "Post templates" tab.
\xa Shortcodes give you more power and control over the generated content.</div>
</td>
</tr> \xd\xa
\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "openai_model"); echo "AI model</th>\xd\xa <td>
\xa <select name="openai_model">
"; foreach (CSEO_AI_ENGINES_REG as $model => $name) { echo "<option " . (($this->legacy_engine($settings["openai_model"]) ?? '') === $model ? "selected " : '') . "value="" . $model . "">" . $name . "</option>"; eVr6U: } ViFw8: echo " </select>\xd
<p class="description">Select the AI model.</p>\xd
</td>
\xa </tr>
\xa\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "openai_title_assignment"); echo "Post title assignment</th>
<td>
"; echo "<textarea cols="90" rows="10" wrap="on" name="openai_title_assignment" style="margin: 0; height: 10em; width: 100%;">" . stripslashes($settings["openai_title_assignment"]) . "</textarea>"; echo "
<p class="description">Give an assignment for the post title, or live it blank if you want to keep the original post title intact.\xd
You can use template placeholders here, e.g. <code>%post_title%</code>, <code>%post_content%</code>, <code>%xml_tags[]%</code> etc.</p>\xd\xa </td>\xd\xa </tr> \xd\xa\xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "openai_article_assignment"); echo "Article assignment</th>\xd
<td>
\xa "; echo "<textarea cols="90" rows="20" wrap="on" name="openai_article_assignment" style="margin: 0; height: 20em; width: 100%;">" . stripslashes($settings["openai_article_assignment"]) . "</textarea>"; echo " <p class="description">Set your free-form assignments for the OpenAI GPT, written in ordinary human language. CyberSEO Pro does not ask you\xd
to select an assignment language or the language you want to translate the generated text to. It does not make you choose the style of \xd\xa article, the keywords you want to be used from a set of drop-down lists with predefined options. Write them in a normal language, the same\xd
way you give an assignment to a human writer.</p>
\xa <p class="description">You can use template placeholders here, e.g. <code>%post_title%</code>, <code>%post_content%</code>, <code>%xml_tags[]%</code> etc.
\xa Learn more <a href="https://www.cyberseo.net/content-syndicator/#article-assignment" target="_blank">here</a>.</p>\xd
</td>
\xa </tr> \xd\xa\xd\xa <tr>\xd
<th>"; $this->showChangeBox($change_selected, "openai_processing_order"); echo "Processing order</th>
<td>\xd
<select name="openai_processing_order">
\xa "; echo "<option " . ($settings["openai_processing_order"] === "title_first" ? "selected " : '') . "value="title_first">Title first</option>"; echo "<option " . ($settings["openai_processing_order"] === "article_first" ? "selected " : '') . "value="article_first">Article first</option>"; echo " </select>\xd\xa <p class="description">Set the OpenAI GPT processing order. You may want to use the generated title as a <code>%post_title%</code> shortcode for article assignment, or use the generated article as a <code>%post_content%</code> shortcode for post assignment.</p>\xd
</td>\xd
</tr>
\xa <tr>
<th>"; $this->showChangeBox($change_selected, "openai_position"); echo "Article position</th>\xd\xa <td>
<select name="openai_position">
\xa "; echo "<option " . ($settings["openai_position"] === "replace" ? "selected " : '') . "value="replace">Replace the post content</option>"; echo "<option " . ($settings["openai_position"] === "above" ? "selected " : '') . "value="above">Above the post content</option>"; echo "<option " . ($settings["openai_position"] === "below" ? "selected " : '') . "value="below">Below the post content</option>"; echo " </select>\xd\xa </td>\xd\xa </tr>
\xa \xd\xa <tr>
<th>"; $this->showChangeBox($change_selected, "openai_max_tokens"); echo "Max tokens</th>
<td>
"; echo "<input type="number" min="0" name="openai_max_tokens" value="" . $settings["openai_max_tokens"] . "" size="6">"; echo "
\xa <p class="description">The maximum number of tokens to generate in the completion.</p>
</td>
\xa </tr>\xd\xa
\xa <tr>\xd
<th>"; $this->showChangeBox($change_selected, "openai_temperature"); echo "Temperature</th>
<td>
"; echo "<input type="number" step="0.1" min="0" name="openai_temperature" value="" . $settings["openai_temperature"] . "" size="4">"; echo "
<p class="description">What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative
applications, and 0 (argmax sampling) for ones with a well-defined answer.</p>
\xa </td>
</tr>
\xa\xd\xa "; echo " </table>
</div>
<div id="article_forge" name="article_forge" display="none">\xd
\xd\xa "; if ($this->credentials_set("article_forge")) { goto Gf0dy; } echo "<p><span style="color: red;">Warning!</span> The Article Forge API key is not provided. The service is not available. Please set it on the "Accounts" page.</p>"; Gf0dy: echo "
<table class="form-table "; if (!$change_selected) { goto a9_uX; } echo "cseo-form"; a9_uX: echo "">\xd
\xd\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "article_forge_keyword"); echo "Keyword</th>\xd
<td>
"; echo "<input style="width: 100%;" type="text" name="article_forge_keyword" value="" . htmlspecialchars(stripslashes($settings["article_forge_keyword"]), ENT_QUOTES) . "" size="60">"; echo "
<p class="description">Keyword in should not contain URLs, parentheses, brackets, commas or too many single characters.
\xa <br>You can use template placeholders here, e.g. <code>%post_title%</code>.</p>\xd\xa </td>
</tr>
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "article_forge_sub_keywords"); echo "Sub keywords</th>\xd
<td>
\xa "; echo "<input type="text" style="width: 100%;" name="article_forge_sub_keywords" value="" . htmlspecialchars(stripslashes($settings["article_forge_sub_keywords"]), ENT_QUOTES) . "" size="60">"; echo " \xd\xa <p class="description">A list of sub keywords separated by comma (e.g. subkeyword1,subkeyword2,subkeyword3). Article Forge has a five sub keyword limit per article. If
you enter more than 5 sub keywords, Article Forge will randomly select 5. Article Forge will also ignore any sub keywords longer than 10 characters. Sub Keywords in \xd
should not contain URLs, parentheses, brackets, or too many single characters.
<br>You can use template placeholders here, e.g. <code>%post_title%</code>.</p>
\xa </td>\xd\xa </tr> \xd
\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "article_forge_tags_as_subkeywords"); echo "Post tags as sub keys</th>\xd
<td>
\xa "; echo "<input type="checkbox" name="article_forge_tags_as_subkeywords" id="article_forge_tags_as_subkeywords" " . ($settings["article_forge_tags_as_subkeywords"] === "on" ? "checked " : '') . ">"; echo " <label for="article_forge_tags_as_subkeywords">when checked, the post tags (if available) will be used as subkeys for Article Forge.</label>\xd
</td>\xd\xa </tr> \xd\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "article_forge_spintax_view"); echo "Spintax view</th>
\xa <td>
"; echo "<input type="checkbox" name="article_forge_spintax_view" id="article_forge_spintax_view" " . ($settings["article_forge_spintax_view"] === "on" ? "checked " : '') . ">"; echo " <label for="article_forge_spintax_view">it is useful to enable this option in order to generate the Spintax version of your article.</label>
\xa </td>
\xa </tr>
\xa
\xa <tr>
<th>"; $this->showChangeBox($change_selected, "article_forge_length"); echo "Article length</th>
\xa <td>
<select name="article_forge_length">\xd
"; echo "<option " . ($settings["article_forge_length"] === "very_short" ? "selected " : '') . "value="very_short">Very short (approximately 50 words)</option>"; echo "<option " . ($settings["article_forge_length"] === "short" ? "selected " : '') . "value="short">Short (approximately 200 words)</option>"; echo "<option " . ($settings["article_forge_length"] === "medium" ? "selected " : '') . "value="medium">Medium (approximately 500 words)</option>"; echo "<option " . ($settings["article_forge_length"] === "long" ? "selected " : '') . "value="long">Long (approximately 750 words)</option>"; echo " </select>\xd\xa </td>\xd\xa </tr> \xd\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "article_forge_quality"); echo "Article quality</th>\xd
<td>\xd
<select name="article_forge_quality">
\xa "; echo "<option " . ($settings["article_forge_quality"] === "1" ? "selected " : '') . "value="1">Standard</option>"; echo "<option " . ($settings["article_forge_quality"] === "2" ? "selected " : '') . "value="2">Adventurous</option>"; echo "<option " . ($settings["article_forge_quality"] === "3" ? "selected " : '') . "value="3">More adventurous</option>"; echo "<option " . ($settings["article_forge_quality"] === "4" ? "selected " : '') . "value="4">Conservative</option>"; echo "<option " . ($settings["article_forge_quality"] === "5" ? "selected " : '') . "value="5">More conservative</option>"; echo " </select>\xd\xa </td>
\xa </tr> \xd
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "article_forge_turing_spinner"); echo "Turing spinner</th>
<td>\xd\xa <select name="article_forge_turing_spinner">
"; echo "<option " . ($settings["article_forge_turing_spinner"] === "0" ? "selected " : '') . "value="0">Disabled</option>"; echo "<option " . ($settings["article_forge_turing_spinner"] === "1" ? "selected " : '') . "value="1">Enabled</option>"; echo " </select>\xd\xa </td>\xd\xa </tr> \xd
<tr>
\xa <th>"; $this->showChangeBox($change_selected, "article_forge_rewrite_sentence"); echo "Rewrite sentence</th>
<td>
<select name="article_forge_rewrite_sentence">
"; echo "<option " . ($settings["article_forge_rewrite_sentence"] === "0" ? "selected " : '') . "value="0">Disabled</option>"; echo "<option " . ($settings["article_forge_rewrite_sentence"] === "1" ? "selected " : '') . "value="1">Enabled</option>"; echo " </select>\xd
<p class="description">This option is not supported since ArticleForge API version 3.0.</p>
\xa </td>
\xa </tr> \xd\xa <tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "article_forge_rearrange_sentence"); echo "Rearrange sentence</th>\xd\xa <td>\xd\xa <select name="article_forge_rearrange_sentence">
\xa "; echo "<option " . ($settings["article_forge_rearrange_sentence"] === "0" ? "selected " : '') . "value="0">Disabled</option>"; echo "<option " . ($settings["article_forge_rearrange_sentence"] === "1" ? "selected " : '') . "value="1">Enabled</option>"; echo " </select>\xd
<p class="description">This option is not supported since ArticleForge API version 3.0.</p>\xd
</td>\xd\xa </tr>
\xa <tr>\xd
<th>"; $this->showChangeBox($change_selected, "article_forge_position"); echo "Article position</th>\xd
<td>
<select name="article_forge_position">\xd\xa "; echo "<option " . ($settings["article_forge_position"] === "replace" ? "selected " : '') . "value="replace">Replace the post content</option>"; echo "<option " . ($settings["article_forge_position"] === "above" ? "selected " : '') . "value="above">Above the post content</option>"; echo "<option " . ($settings["article_forge_position"] === "below" ? "selected " : '') . "value="below">Below the post content</option>"; echo " </select>\xd\xa </td>
</tr>
<tr>\xd
<th>"; $this->showChangeBox($change_selected, "article_forge_image"); echo "Image probability</th>\xd\xa <td>\xd\xa <select name="article_forge_image">\xd
"; $i = 0; EsjKD: if (!($i <= 10)) { goto mz12q; } echo "<option " . ($settings["article_forge_image"] == $i / 10 ? "selected " : '') . "value="" . $i / 10 . "">" . $i * 10 . "%</option>"; liO1J: $i++; goto EsjKD; mz12q: echo " </select>
\xa <p class="description">The probability of adding an image into the article.</p>\xd\xa </td>\xd\xa </tr>
\xa <tr>
<th>"; $this->showChangeBox($change_selected, "article_forge_video"); echo "Video probability</th>
\xa <td>\xd\xa <select name="article_forge_video">\xd\xa "; $i = 0; xKgE3: if (!($i <= 10)) { goto QDdfC; } echo "<option " . ($settings["article_forge_video"] == $i / 10 ? "selected " : '') . "value="" . $i / 10 . "">" . $i * 10 . "%</option>"; ngdUt: $i++; goto xKgE3; QDdfC: echo " </select>\xd\xa <p class="description">The probability of adding a video into the article.</p>\xd
</td>
</tr>\xd
<tr>\xd
<th>"; $this->showChangeBox($change_selected, "article_forge_shuffle_paragraphs"); echo "Shuffle paragraphs</th>\xd\xa <td>\xd
<select name="article_forge_shuffle_paragraphs">\xd
"; echo "<option " . ($settings["article_forge_shuffle_paragraphs"] === "0" ? "selected " : '') . "value="0">Disabled</option>"; echo "<option " . ($settings["article_forge_shuffle_paragraphs"] === "1" ? "selected " : '') . "value="1">Enabled</option>"; echo " </select>\xd
<p class="description">This option is not supported since ArticleForge API version 3.0.</p>\xd
</td>
</tr>
<tr>
\xa <th>"; $this->showChangeBox($change_selected, "article_forge_title"); echo "Article title</th>
\xa <td>
\xa <select name="article_forge_title">
\xa "; echo "<option " . ($settings["article_forge_title"] === "original" ? "selected " : '') . "value="original">Leave the original post title</option>"; echo "<option " . ($settings["article_forge_title"] === "generated" ? "selected " : '') . "value="generated">Use the Article Forge generated title</option>"; echo " </select>\xd
</td>
\xa </tr>\xd\xa </table>\xd
</div> \xd\xa </div>\xd\xa \xd\xa <script>
document.addEventListener('DOMContentLoaded', function() {\xd
var settings = "; echo json_encode($settings); echo ";
\xa var modelSelect = document.querySelector('select[name="openai_image_model"]');
\xa var sizeSelect = document.querySelector('select[name="openai_image_size"]');
\xa
modelSelect.addEventListener('change', function() {\xd\xa while (sizeSelect.firstChild) {\xd
sizeSelect.removeChild(sizeSelect.firstChild);\xd
}
\xa
\xa var options = this.value === 'dall-e-2' ? {
\xa '256x256': '256x256 pixels',
'512x512': '512x512 pixels',
'1024x1024': '1024x1024 pixels'\xd\xa } : {\xd\xa '1024x1024': '1024x1024 pixels',
\xa '1792x1024': '1792x1024 pixels',\xd\xa '1024x1792': '1024x1792 pixels'\xd
};\xd
\xd\xa for (var value in options) {
var text = options[value];\xd
var selected = settings['openai_image_size'] === value;
var option = new Option(text, value, selected, selected);\xd\xa sizeSelect.appendChild(option);
\xa }\xd
});
\xa modelSelect.dispatchEvent(new Event('change'));\xd\xa
var selects = document.querySelectorAll('select[id$="_image_position"]');\xd
\xd
selects.forEach(function(select) {
var baseId = select.id.replace(/_image_position$/, ''); \xd
var tagForSplitInitialValue = select.getAttribute('data-tag-for-split');
var numberOfImagesInitialValue = select.getAttribute('data-number-of-images');\xd
\xd
var additionalOptions = document.createElement('div');\xd\xa additionalOptions.id = baseId + '_additional_options';\xd
additionalOptions.style.display = 'none';
\xa additionalOptions.style.verticalAlign = 'middle'; \xd
additionalOptions.innerHTML = `\xd
<label for="${baseId}_tag_for_split" style="margin-left: 20px; margin-right: 10px; vertical-align: middle;">Insert images before tag:</label>
\xa <select name="${baseId}_tag_for_split" id="${baseId}_tag_for_split" style="vertical-align: middle;">
\xa "; foreach (["p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "section", "article", "ul", "ol", "blockquote", "figure", "hr"] as $tag) { echo "<option value="" . $tag . "" ${tagForSplitInitialValue === "" . $tag . "" ? "selected" : ""}>" . $tag . "</option>"; EXXGd: } FKf7U: echo " </select>\xd
<label for="${baseId}_number_of_images" style="margin-left: 20px; margin-right: 10px; vertical-align: middle;">Number of images:</label>\xd\xa <input type="number" name="${baseId}_number_of_images" id="${baseId}_number_of_images" value="${numberOfImagesInitialValue}" min="1" style="vertical-align: middle; width: 4em;">\xd\xa `;\xd\xa
select.parentNode.insertBefore(additionalOptions, select.nextSibling);
\xa
\xa function toggleAdditionalOptions() {
\xa additionalOptions.style.display = select.value === 'insert_images' ? 'inline-block' : 'none';
}
\xd
select.addEventListener('change', toggleAdditionalOptions);\xd\xa toggleAdditionalOptions();\xd
});\xd
\xa var engineSelect = document.querySelector('select[name="stable_diffusion_engine"]');\xd
var steps = document.querySelector('input[name="stable_diffusion_steps"]').closest('tr');\xd\xa var stylePreset = document.querySelector('select[name="stable_diffusion_style_preset"]').closest('tr');\xd
var imageSize = document.querySelector('input[name="stable_diffusion_width"]').closest('tr');\xd
var aspectRatioRow = document.querySelector('select[name="stable_diffusion_aspect_ratio"]').closest('tr');
\xa var negativePrompt = document.querySelector('textarea[name="stable_diffusion_negative_prompt"]').closest('tr');\xd\xa\xd
function toggleOptions() {
\xa var engine = engineSelect.value;
\xd\xa steps.style.display = (engine === 'ultra' || engine === 'core' || engine === 'sd3' || engine === 'sd3.5') ? 'none' : '';\xd
imageSize.style.display = (engine === 'ultra' || engine === 'core' || engine === 'sd3' || engine === 'sd3.5') ? 'none' : '';
\xa aspectRatioRow.style.display = (engine === 'ultra' || engine === 'core' || engine === 'sd3' || engine === 'sd3.5') ? '' : 'none';\xd
stylePreset.style.display = (engine === 'core' || engine.includes('stable-diffusion-xl')) ? '' : 'none';\xd\xa negativePrompt.style.display = (engine === 'sd3' || engine === 'sd3.5') ? 'none' : '';
}\xd
\xd\xa engineSelect.addEventListener('change', toggleOptions);
\xa toggleOptions();
\xa });\xd
</script>\xd\xa
<div id="image_generation" class="tab_content">
\xa <br>
\xa <table class="form-table "; if (!$change_selected) { goto lEdGb; } echo "cseo-form"; lEdGb: echo "">\xd\xa\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "openai_image_position"); echo "DALL∙E image position</th>\xd\xa <td>
\xa <select name="openai_image_position" id="openai_image_position" data-tag-for-split=""; echo $settings["openai_tag_for_split"]; echo "" data-number-of-images=""; echo $settings["openai_number_of_images"]; echo "" onchange="cseoOpenAiImage();">\xd\xa "; echo "<option " . ($settings["openai_image_position"] === "no_image" ? "selected " : '') . "value="no_image">none</option>"; echo "<option " . ($settings["openai_image_position"] === "above_content" ? "selected " : '') . "value="above_content">above content</option>"; echo "<option " . ($settings["openai_image_position"] === "below_content" ? "selected " : '') . "value="below_content">below content</option>"; echo "<option " . ($settings["openai_image_position"] === "insert_images" ? "selected " : '') . "value="insert_images">batch insert</option>"; echo "<option " . ($settings["openai_image_position"] === "replace_1st" ? "selected " : '') . "value="replace_1st">replace first image</option>"; echo "<option " . ($settings["openai_image_position"] === "replace_all" ? "selected " : '') . "value="replace_all">replace all images</option>"; echo "<option " . ($settings["openai_image_position"] === "thumb" ? "selected " : '') . "value="thumb">store in the custom field "thumb"</option>"; echo " </select>\xd
</td>\xd\xa </tr> \xd\xa </table>
\xd\xa <div id="openai_image_settings" style="display: none;">\xd
"; if ($this->credentials_set("openai")) { goto CZ5qz; } echo "<p><span style="color: red;">Warning!</span> The OpenAI API key is not provided. The service is not available. Please set it on the "Accounts" page.</p>"; CZ5qz: echo "
<table class="cseo-box">
\xa <tr>\xd\xa <td>
\xa <table class="form-table "; if (!$change_selected) { goto DXvav; } echo "cseo-form"; DXvav: echo "">
\xa \xd\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "openai_image_model"); echo "Model</th>\xd\xa <td>\xd
<select name="openai_image_model">\xd\xa "; echo "<option " . ($settings["openai_image_model"] === "dall-e-2" ? "selected " : '') . "value="dall-e-2">DALL-E 2</option>"; echo "<option " . ($settings["openai_image_model"] === "dall-e-3" ? "selected " : '') . "value="dall-e-3">DALL-E 3</option>"; echo " </select>
</td>\xd
</tr>
\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "openai_image_assignment"); echo "Image assignment</th>
\xa <td>\xd\xa "; echo "<textarea cols="90" rows="10" wrap="on" name="openai_image_assignment" style="margin:0;height:5em;width:100%;">" . stripslashes($settings["openai_image_assignment"]) . "</textarea>"; echo " <p class="description">Enter your free-form assignment for For the DALL∙E 2 AI image generator. You can use a normal human language
to describe what kind of image you want to get created. The assignment is limited by 1000 characters and your imagination only. Placeholders and Spintax are allowed here.
Recommended placeholder: <code>%gpt_image_prompt%</code>.<p>
\xa </td>
\xa </tr>
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "openai_image_size"); echo "Image size 123</th>\xd\xa <td>
\xa <select name="openai_image_size">\xd\xa "; echo " </select>\xd
</td>\xd\xa </tr>
\xd\xa <tr>\xd
<th>"; $this->showChangeBox($change_selected, "openai_image_class"); echo "Image class</th>
\xa <td>\xd\xa "; echo "<input type="text" style="width: 100%;" name="openai_image_class" value="" . $settings["openai_image_class"] . "">"; echo " \xd\xa </td>\xd\xa </tr>
\xa </table> \xd\xa\xd
</td>
\xa </tr>
</table> \xd
</div>
\xa\xd\xa <table class="form-table "; if (!$change_selected) { goto jQYOZ; } echo "cseo-form"; jQYOZ: echo "">
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_image_position"); echo "Stable Diffusion image position</th>\xd\xa <td>
\xa <select name="stable_diffusion_image_position" id="stable_diffusion_image_position" data-tag-for-split=""; echo $settings["stable_diffusion_tag_for_split"]; echo "" data-number-of-images=""; echo $settings["stable_diffusion_number_of_images"]; echo "" onchange="cseoStableDiffusionImage();">
\xa "; echo "<option " . ($settings["stable_diffusion_image_position"] === "no_image" ? "selected " : '') . "value="no_image">none</option>"; echo "<option " . ($settings["stable_diffusion_image_position"] === "above_content" ? "selected " : '') . "value="above_content">above content</option>"; echo "<option " . ($settings["stable_diffusion_image_position"] === "below_content" ? "selected " : '') . "value="below_content">below content</option>"; echo "<option " . ($settings["stable_diffusion_image_position"] === "insert_images" ? "selected " : '') . "value="insert_images">batch insert</option>"; echo "<option " . ($settings["stable_diffusion_image_position"] === "replace_1st" ? "selected " : '') . "value="replace_1st">replace first image</option>"; echo "<option " . ($settings["stable_diffusion_image_position"] === "replace_all" ? "selected " : '') . "value="replace_all">replace all images</option>"; echo "<option " . ($settings["stable_diffusion_image_position"] === "thumb" ? "selected " : '') . "value="thumb">store in the custom field "thumb"</option>"; echo " </select>\xd
</td>
\xa </tr> \xd
</table>
\xa <div id="stable_diffusion_image_settings" style="display: none;">
\xa "; if ($this->credentials_set("stability")) { goto pn8WV; } echo "<p><span style="color: red;">Warning!</span> The Stability AI API key is not provided. The service is not available. Please set it on the "Accounts" page.</p>"; pn8WV: echo "
<table class="cseo-box">\xd\xa <tr>
<td>\xd
<table class="form-table "; if (!$change_selected) { goto b1juG; } echo "cseo-form"; b1juG: echo "">\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_engine"); echo "Engine</th>\xd
<td>
\xa <select name="stable_diffusion_engine">\xd
"; echo "<option " . ($settings["stable_diffusion_engine"] === "ultra" ? "selected " : '') . "value="ultra">Stable Image Ultra</option>"; echo "<option " . ($settings["stable_diffusion_engine"] === "core" ? "selected " : '') . "value="core">Stable Image Core</option>"; echo "<option " . ($settings["stable_diffusion_engine"] === "sd3.5" ? "selected " : '') . "value="sd3.5">Stable Diffusion 3.5</option>"; echo "<option " . ($settings["stable_diffusion_engine"] === "sd3" ? "selected " : '') . "value="sd3">Stable Diffusion 3</option>"; echo "<option " . ($settings["stable_diffusion_engine"] === "stable-diffusion-xl-1024-v1-0" ? "selected " : '') . "value="stable-diffusion-xl-1024-v1-0">Stable Diffusion SDXL v1.0</option>"; echo "<option " . ($settings["stable_diffusion_engine"] === "stable-diffusion-xl-beta-v2-2-2" ? "selected " : '') . "value="stable-diffusion-xl-beta-v2-2-2">Stable Diffusion SD Beta</option>"; echo " </select>\xd\xa <p class="description">Set the Stable Diffusion engine to use for generation.</p>\xd
</td>
</tr> \xd\xa\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_image_description"); echo "Image description</th>
<td>
"; echo "<textarea cols="90" rows="10" wrap="on" name="stable_diffusion_image_description" style="margin:0;height:5em;width:100%;">" . stripslashes($settings["stable_diffusion_image_description"]) . "</textarea>"; echo " <p class="description">Enter your Stable Diffusion image prompt here. If you leave it blank, the image will not be generated. Placeholders and Spintax are allowed here.<br> \xd
Please read the basic tips on text prompt composing for Stable Diffusion AI image generator <a href="https://www.cyberseo.net/blog/stable-diffusion/" target="_blank">here</a>.
\xa Recommended placeholder: <code>%gpt_image_prompt%</code>.<p>
\xa </td>
</tr>\xd\xa
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_negative_prompt"); echo "Negative prompt</th>\xd\xa <td>
"; echo "<textarea cols="90" rows="10" wrap="on" name="stable_diffusion_negative_prompt" style="margin:0;height:5em;width:100%;">" . stripslashes($settings["stable_diffusion_negative_prompt"]) . "</textarea>"; echo " <p class="description">You put what you DON\xe2\x80\231T want to see in the negative prompt. It gives you an additional way to control text-to-image generation.<p>
</td> \xd
</tr>
\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_style_preset"); echo "Style preset</th>\xd
<td>
\xa <select name="stable_diffusion_style_preset">
"; foreach (["3d-model", "analog-film", "anime", "cinematic", "comic-book", "digital-art", "enhance", "fantasy-art", "isometric", "line-art", "low-poly", "modeling-compound", "neon-punk", "origami", "photographic", "pixel-art"] as $p) { echo "<option " . ($settings["stable_diffusion_style_preset"] === $p ? "selected " : '') . "value="" . $p . "">" . $p . "</option>"; ri61h: } czs3A: echo " </select>\xd\xa </select>\xd
<p class="description">Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change.</p>
</td>
\xa </tr>
\xa\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_steps"); echo "Steps</th>
\xa <td>\xd
"; echo "<input type="text" name="stable_diffusion_steps" value="" . stripslashes($settings["stable_diffusion_steps"]) . "" size="4">"; echo " <p class="description">Number of diffusion steps to run.</p>\xd
</td>
\xa </tr>\xd\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_image_size"); echo "Image size</th>\xd\xa <td>\xd
"; echo "<input type="text" name="stable_diffusion_width" value="" . stripslashes($settings["stable_diffusion_width"]) . "" size="4"> x "; echo "<input type="text" name="stable_diffusion_height" value="" . stripslashes($settings["stable_diffusion_height"]) . "" size="4"> px"; echo " <p class="description">Width and height of the image.</p>\xd\xa </td>
\xa </tr> \xd\xa \xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "stable_diffusion_aspect_ratio"); echo "Aspect ratio</th>\xd\xa <td>\xd
<select name="stable_diffusion_aspect_ratio">\xd\xa "; foreach (["16:9", "1:1", "21:9", "2:3", "3:2", "4:5", "5:4", "9:16", "9:21"] as $ar) { echo "<option " . ($settings["stable_diffusion_aspect_ratio"] === $ar ? "selected " : '') . "value="" . $ar . "">" . $ar . "</option>"; HnfqU: } t9Ves: echo " </select>
<p class="description">Select the aspect ratio of the generated images.</p>
</td>\xd\xa </tr>
<tr>
\xa <th>"; $this->showChangeBox($change_selected, "stable_diffusion_image_class"); echo "Image class</th>
<td>
"; echo "<input type="text" style="width: 100%;" name="stable_diffusion_image_class" value="" . $settings["stable_diffusion_image_class"] . "">"; echo "
\xa </td>
\xa </tr>
\xa
</table>
\xa\xd\xa <td>
\xa </tr>\xd
</table>
\xa </div>\xd\xa \xd\xa <table class="form-table "; if (!$change_selected) { goto ziRif; } echo "cseo-form"; ziRif: echo "">\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "flux_image_position"); echo "Flux image position</th>\xd\xa <td>
\xa <select name="flux_image_position" id="flux_image_position" data-tag-for-split=""; echo $settings["flux_tag_for_split"]; echo "" data-number-of-images=""; echo $settings["flux_number_of_images"]; echo "" onchange="cseoFluxImage();">
"; echo "<option " . ($settings["flux_image_position"] === "no_image" ? "selected " : '') . "value="no_image">none</option>"; echo "<option " . ($settings["flux_image_position"] === "above_content" ? "selected " : '') . "value="above_content">above content</option>"; echo "<option " . ($settings["flux_image_position"] === "below_content" ? "selected " : '') . "value="below_content">below content</option>"; echo "<option " . ($settings["flux_image_position"] === "insert_images" ? "selected " : '') . "value="insert_images">batch insert</option>"; echo "<option " . ($settings["flux_image_position"] === "replace_1st" ? "selected " : '') . "value="replace_1st">replace first image</option>"; echo "<option " . ($settings["flux_image_position"] === "replace_all" ? "selected " : '') . "value="replace_all">replace all images</option>"; echo "<option " . ($settings["flux_image_position"] === "thumb" ? "selected " : '') . "value="thumb">store in the custom field "thumb"</option>"; echo " </select>
\xa </td>\xd\xa </tr> \xd\xa </table> \xd\xa\xd\xa <div id="flux_image_settings" style="display: none;">\xd\xa <table class="cseo-box">\xd\xa <tr>
\xa <td>
\xa <table class="form-table "; if (!$change_selected) { goto uuY1T; } echo "cseo-form"; uuY1T: echo "">\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "flux_model"); echo "Model</th>
<td>\xd
<select name="flux_model">\xd\xa "; echo "<option " . ($settings["flux_model"] === "flux1-dev" ? "selected " : '') . "value="flux1-dev">Flux.1 Dev</option>"; echo "<option " . ($settings["flux_model"] === "flux1-schnell" ? "selected " : '') . "value="flux1-schnell">Flux.1 Schnell</option>"; echo " </select>
<p class="description">Set the Flux engine to use for generation.</p>
</td>
</tr> \xd\xa\xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "flux_prompt"); echo "Prompt</th>\xd\xa <td>\xd
"; echo "<textarea cols="90" rows="10" wrap="on" name="flux_prompt" style="margin:0;height:5em;width:100%;">" . stripslashes($settings["flux_prompt"]) . "</textarea>"; echo " <p class="description">Enter your Flux image prompt here. If you leave it blank, the image will not be generated. Placeholders and Spintax are allowed here.<br>
\xa Recommended placeholder: <code>%gpt_image_prompt%</code>.<p>\xd\xa </td>
\xa </tr>
\xa \xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "flux_negative_prompt"); echo "Negative prompt</th>
\xa <td>
\xa "; echo "<textarea cols="90" rows="10" wrap="on" name="flux_negative_prompt" style="margin:0;height:5em;width:100%;">" . stripslashes($settings["flux_negative_prompt"]) . "</textarea>"; echo " <p class="description">You put what you DON\xe2\x80\x99T want to see in the negative prompt. It gives you an additional way to control text-to-image generation.<p>\xd\xa </td> \xd
</tr>\xd
\xd\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "flux_provider"); echo "API provider</th>\xd\xa <td>\xd
<select name="flux_provider">
"; echo "<option " . ($settings["flux_provider"] === "goapi" ? "selected " : '') . "value="goapi">GoAPI</option>"; echo " </select>
\xa </td>
\xa </tr>\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "flux_image_size"); echo "Image size</th>\xd\xa <td>
\xa "; echo "<input type="number" min="8" name="flux_width" value="" . stripslashes($settings["flux_width"]) . "" size="4"> x "; echo "<input type="number" min="8" name="flux_height" value="" . stripslashes($settings["flux_height"]) . "" size="4"> px"; echo " <p class="description">Width and height of the image. The <code>width*height</code> value cannot exceed <code>1048576</code>.</p>
</td>\xd
</tr> \xd
\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "flux_image_class"); echo "Image class</th>
<td>\xd
"; echo "<input type="text" style="width: 100%;" name="flux_image_class" value="" . $settings["flux_image_class"] . "">"; echo " \xd\xa </td>\xd
</tr>\xd\xa\xd
</table>\xd
\xd\xa <td>\xd\xa </tr>
</table>\xd\xa </div>\xd\xa
<table class="form-table "; if (!$change_selected) { goto M2SJM; } echo "cseo-form"; M2SJM: echo "">\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "midjourney_image_position"); echo "Midjourney image position</th>
\xa <td> \xd
<select name="midjourney_image_position" id="midjourney_image_position" data-tag-for-split=""; echo $settings["midjourney_tag_for_split"]; echo "" data-number-of-images=""; echo $settings["midjourney_number_of_images"]; echo "" onchange="cseoMidjourneyImage();">
"; echo "<option " . ($settings["midjourney_image_position"] === "no_image" ? "selected " : '') . "value="no_image">none</option>"; echo "<option " . ($settings["midjourney_image_position"] === "above_content" ? "selected " : '') . "value="above_content">above content</option>"; echo "<option " . ($settings["midjourney_image_position"] === "below_content" ? "selected " : '') . "value="below_content">below content</option>"; echo "<option " . ($settings["midjourney_image_position"] === "insert_images" ? "selected " : '') . "value="insert_images">batch insert</option>"; echo "<option " . ($settings["midjourney_image_position"] === "replace_1st" ? "selected " : '') . "value="replace_1st">replace first image</option>"; echo "<option " . ($settings["midjourney_image_position"] === "replace_all" ? "selected " : '') . "value="replace_all">replace all images</option>"; echo "<option " . ($settings["midjourney_image_position"] === "thumb" ? "selected " : '') . "value="thumb">store in the custom field "thumb"</option>"; echo " </select>
</td>\xd\xa </tr> \xd\xa </table>
\xd\xa <div id="midjourney_image_settings" style="display: none;">
\xa <table class="cseo-box">\xd
<tr>
\xa <td>\xd\xa <table class="form-table "; if (!$change_selected) { goto fUMzm; } echo "cseo-form"; fUMzm: echo "">
\xa \xd
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "midjourney_prompt"); echo "Prompt</th>
<td>
"; echo "<textarea cols="90" rows="10" wrap="on" name="midjourney_prompt" style="margin:0;height:5em;width:100%;">" . stripslashes($settings["midjourney_prompt"]) . "</textarea>"; echo " <p class="description">Enter your Midjourney prompt. You can use a normal human language to describe what kind of image\xd\xa you want to get created. Placeholders and Spintax are allowed here.</p>
</td>
</tr>
<tr>
\xa <th>"; $this->showChangeBox($change_selected, "midjourney_provider"); echo "API provider</th>\xd
<td>\xd\xa <select name="midjourney_provider">
"; echo "<option " . ($settings["midjourney_provider"] === "goapi" ? "selected " : '') . "value="goapi">GoAPI</option>"; echo " </select>
\xa </td>\xd\xa </tr>
\xa <tr>\xd
<th>"; $this->showChangeBox($change_selected, "midjourney_process_mode"); echo "Process mode</th>\xd
<td>
<select name="midjourney_process_mode">\xd\xa "; echo "<option " . ($settings["midjourney_process_mode"] === "relax" ? "selected " : '') . "value="relax">Relax</option>"; echo "<option " . ($settings["midjourney_process_mode"] === "fast" ? "selected " : '') . "value="fast">Fast</option>"; echo "<option " . ($settings["midjourney_process_mode"] === "turbo" ? "selected " : '') . "value="turbo">Turbo</option>"; echo " </select>
</td>
</tr>\xd
\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "midjourney_aspect_ratio"); echo "Aspect ratio</th>
<td>\xd
"; echo "<input type="text" name="midjourney_aspect_ratio" value="" . stripslashes($settings["midjourney_aspect_ratio"]) . "" size="4">"; echo " <p class="description">Aspect ratio of the image default value: 16:9</p>\xd\xa </td>
\xa </tr>
\xd\xa <tr>
<th>"; $this->showChangeBox($change_selected, "midjourney_image_class"); echo "Image class</th>\xd
<td>
\xa "; echo "<input type="text" style="width: 100%;" name="midjourney_image_class" value="" . $settings["midjourney_image_class"] . "">"; echo " \xd\xa </td>
</tr>\xd\xa </table> \xd
<td>\xd
</tr>
\xa </table>
</div> \xd
<table class="form-table "; if (!$change_selected) { goto y3YBo; } echo "cseo-form"; y3YBo: echo "">\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "pixabay_image_position"); echo "Pixabay image position</th>
\xa <td>
<select name="pixabay_image_position" id="pixabay_image_position" onchange="cseoPixabayImage();">
\xa "; echo "<option " . ($settings["pixabay_image_position"] === "no_image" ? "selected " : '') . "value="no_image">none</option>"; echo "<option " . ($settings["pixabay_image_position"] === "above_content" ? "selected " : '') . "value="above_content">above content</option>"; echo "<option " . ($settings["pixabay_image_position"] === "below_content" ? "selected " : '') . "value="below_content">below content</option>"; echo "<option " . ($settings["pixabay_image_position"] === "replace_1st" ? "selected " : '') . "value="replace_1st">replace first image</option>"; echo "<option " . ($settings["pixabay_image_position"] === "thumb" ? "selected " : '') . "value="thumb">store in the custom field "thumb"</option>"; echo " </select>\xd
</td>\xd\xa </tr>
</table>
\xa
<div id="pixabay_image_settings" style="display: none;">\xd
"; if ($this->credentials_set("pixabay")) { goto RvQz3; } echo "<p><span style="color: red;">Warning!</span> The Pixabay API key is not provided. The service is not available. Please set it on the "Accounts" page.</p>"; RvQz3: echo "
<table class="cseo-box">
\xa <tr>
\xa <td>\xd\xa <table class="form-table "; if (!$change_selected) { goto dOuT3; } echo "cseo-form"; dOuT3: echo "">\xd\xa
\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "pixabay_q"); echo "Query</th>\xd
<td>\xd\xa "; echo "<input style="width: 100%;" type="text" name="pixabay_q" value="" . $settings["pixabay_q"] . "" size="80">"; echo " <p class="description">You can use placeholders here, but the chances of Pixabay finding a suitable image for a post title are about zero. You can also use commas to separate your
list of keywords. In this case, a random keyword will be chosen. Placeholders and Spintax are allowed here.
Recommended placeholders: <code>%categories%</code> and <code>%gpt_keywords%</code>.</p>\xd
</td>
</tr>
\xd\xa <tr>\xd
<th>"; $this->showChangeBox($change_selected, "pixabay_lang"); echo "Query language</th>\xd\xa <td>
<select name="pixabay_lang">\xd
"; foreach (["en", "cs", "da", "de", "es", "fr", "id", "it", "hu", "nl", "no", "pl", "pt", "ro", "sk", "fi", "sv", "tr", "vi", "th", "bg", "ru", "el", "ja", "ko", "zh"] as $l) { echo "<option " . ($settings["pixabay_lang"] === $l ? "selected " : '') . "value="" . $l . "">" . $l . "</option>"; BjUKM: } yFAn4: echo " </select>\xd
</td>\xd\xa </tr>\xd
\xd\xa <tr>
<th>"; $this->showChangeBox($change_selected, "pixabay_image_type"); echo "Type</th>\xd
<td>
<select name="pixabay_image_type">
\xa "; foreach (["all", "photo", "illustration"] as $it) { echo "<option " . ($settings["pixabay_image_type"] === $it ? "selected " : '') . "value="" . $it . "">" . $it . "</option>"; AN2e4: } JZmfv: echo " </select>
</td>\xd\xa </tr>
<tr>
<th>"; $this->showChangeBox($change_selected, "pixabay_orientation"); echo "Orientation</th>\xd
<td>\xd\xa <select name="pixabay_orientation">\xd
"; foreach (["all", "horizontal", "vertical"] as $o) { echo "<option " . ($settings["pixabay_orientation"] === $o ? "selected " : '') . "value="" . $o . "">" . $o . "</option>"; zjplD: } VNAIH: echo " </select>
\xa </td>\xd
</tr>
\xa\xd
<tr>\xd
<th>"; $this->showChangeBox($change_selected, "pixabay_min_width"); echo "Min width</th>\xd
<td>
\xa "; echo "<input type="text" name="pixabay_min_width" value="" . $settings["pixabay_min_width"] . "" size="4">"; echo " \xd
</td>\xd\xa </tr>
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "pixabay_min_height"); echo "Min height</th>\xd
<td>
"; echo "<input type="text" name="pixabay_min_height" value="" . $settings["pixabay_min_height"] . "" size="4">"; echo "
\xa </td>\xd\xa </tr>\xd
\xd\xa <tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "pixabay_choose"); echo "Image number to choose</th>
\xa <td>
\xa "; echo "<input type="text" name="pixabay_choose" value="" . $settings["pixabay_choose"] . "" size="4">"; echo "
\xa <p class="description">Set the image number from 1 to 200, to be chosen from the Pixabay search results. Use <code>0</code> to choose a random one.</p>\xd
</td>
</tr>
\xa\xd
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "pixabay_image_class"); echo "Image class</th>
<td>\xd
"; echo "<input type="text" style="width: 100%;" name="pixabay_image_class" value="" . $settings["pixabay_image_class"] . "">"; echo "
</td>\xd\xa </tr>\xd
</table>
\xa
<td>
</tr>\xd\xa </table>\xd\xa </div>
\xd\xa <table class="form-table "; if (!$change_selected) { goto V1z9J; } echo "cseo-form"; V1z9J: echo "">\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "google_image_position"); echo "Google image position</th>
<td>\xd\xa <select name="google_image_position" id="google_image_position" onchange="cseoGoogleImage();">\xd
"; echo "<option " . ($settings["google_image_position"] === "no_image" ? "selected " : '') . "value="no_image">none</option>"; echo "<option " . ($settings["google_image_position"] === "above_content" ? "selected " : '') . "value="above_content">above content</option>"; echo "<option " . ($settings["google_image_position"] === "below_content" ? "selected " : '') . "value="below_content">below content</option>"; echo "<option " . ($settings["google_image_position"] === "replace_1st" ? "selected " : '') . "value="replace_1st">replace first image</option>"; echo "<option " . ($settings["google_image_position"] === "thumb" ? "selected " : '') . "value="thumb">store in the custom field "thumb"</option>"; echo " </select>
</td>\xd\xa </tr> \xd\xa </table>
\xa
<div id="google_image_settings" style="display: none;">
\xd
<table class="cseo-box">\xd\xa <tr>
<td>
<table class="form-table "; if (!$change_selected) { goto Xzp9O; } echo "cseo-form"; Xzp9O: echo "">\xd\xa\x9 \x9\x9 \xd
<tr>
\xa <th>"; $this->showChangeBox($change_selected, "google_image_query"); echo "Google search query</th>\xd
<td>\xd\xa "; echo "<input type="text" style="width: 100%;" name="google_image_query" value="" . $settings["google_image_query"] . "">"; echo " \xd
<p class="description">Enter your Google image search query here. Note that the plugin will only search for images with Creative Commons licenses.\xd
Placeholders and Spintax are allowed here.<br>\xd
Recommended placeholders: <code>%post_title%</code>, <code>%gpt_keyphrase%</code>, <code>%categories%</code> and <code>%gpt_keywords%</code>.</p>\xd\xa </td>
\xa </tr>
\xa \xd
<tr>
\xa <th>"; $this->showChangeBox($change_selected, "google_min_width"); echo "Min width</th>\xd
<td>
"; echo "<input type="text" name="google_min_width" value="" . $settings["google_min_width"] . "" size="4">"; echo " \xd
</td>\xd\xa </tr>\xd\xa\xd\xa <tr>\xd
<th>"; $this->showChangeBox($change_selected, "google_min_height"); echo "Min height</th>\xd
<td>
"; echo "<input type="text" name="google_min_height" value="" . $settings["google_min_height"] . "" size="4">"; echo " \xd\xa </td>\xd\xa </tr>\xd
<tr>
<th>"; $this->showChangeBox($change_selected, "google_image_class"); echo "Image class</th>
\xa <td>
"; echo "<input type="text" style="width: 100%;" name="google_image_class" value="" . $settings["google_image_class"] . "">"; echo "
</td>
\xa </tr>\xd\xa
\xa </table> \xd
\xd\xa </td>
</tr>
</table>
</div>
\xd
<table class="form-table "; if (!$change_selected) { goto rPKhu; } echo "cseo-form"; rPKhu: echo "">
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "youtube_position"); echo "YouTube video position</th>\xd
<td>
\xa <select name="youtube_position" id="youtube_position" onchange="cseoYouTubeVideo();">\xd\xa "; echo "<option " . ($settings["youtube_position"] === "no_image" ? "selected " : '') . "value="no_image">none</option>"; echo "<option " . ($settings["youtube_position"] === "above_content" ? "selected " : '') . "value="above_content">above content</option>"; echo "<option " . ($settings["youtube_position"] === "below_content" ? "selected " : '') . "value="below_content">below content</option>"; echo "<option " . ($settings["youtube_position"] === "thumb" ? "selected " : '') . "value="thumb">store in the custom field "thumb"</option>"; echo " </select>\xd
</td>
\xa </tr>
\xa </table>
\xa <div id="youtube_settings" style="display: none;">\xd
\xa <table class="cseo-box">
<tr>
<td>\xd\xa <table class="form-table "; if (!$change_selected) { goto jv_vU; } echo "cseo-form"; jv_vU: echo "">
\x9 \x9\x9\x9 \xd
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "youtube_query"); echo "YouTube search query</th>
\xa <td>\xd
"; echo "<input type="text" style="width: 100%;" name="youtube_query" value="" . $settings["youtube_query"] . "">"; echo "
\xa <p class="description">Enter your YouTube search query here. Placeholders and Spintax are allowed here. Recommended placeholders: <code>%post_title%</code>, <code>%gpt_keyphrase%</code>.</p>\xd
</td>\xd
</tr>
\xa\xd\xa </table> \xd\xa
\xa </td>
\xa </tr>
</table>
</div>
\xa </div> \xd\xa
\xa <script>
\xa jQuery(document).ready(function($) {\xd\xa function cseo_toggleCompressionQuality() {\xd\xa if ($('#image_format').val() === 'keep') {
$('#compression_quality').hide();
$('label[for="compression_quality"]').hide();\xd\xa } else {\xd\xa $('#compression_quality').show();
$('label[for="compression_quality"]').show();\xd\xa }\xd
}\xd
\xd\xa cseo_toggleCompressionQuality();
\xa
$('#image_format').change(function() {\xd
cseo_toggleCompressionQuality();\xd
});\xd\xa });
\xd\xa jQuery(document).ready(function($) {
\xa $('#store_images').change(function() {
var imageFormatRow = $('#image_format_selector').closest('tr');
\xa if ($(this).is(':checked')) {\xd\xa imageFormatRow.show();\xd
} else {
imageFormatRow.hide();\xd\xa }\xd\xa });
$('#store_images').trigger('change');\xd
});
</script>
\xa
<div id="media_handling" class="tab_content">
\xa <br>\xd
<table class="form-table "; if (!$change_selected) { goto glL4c; } echo "cseo-form"; glL4c: echo "">\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "store_images"); echo "Store images locally</th>\xd
<td>"; echo "<input type="checkbox" name="store_images" id="store_images" " . ($settings["store_images"] === "on" ? "checked " : '') . ">"; echo " <label for="store_images">if checked, all images will be copied into the default uploads folder.</label>\xd\xa </td>\xd\xa </tr>\xd\xa \xd
<th scope="row" id="image_format_selector">"; $this->showChangeBox($change_selected, "image_format"); echo "Convert PNG images to</th>
<td>
\xa <select name="image_format" id="image_format">
"; echo "<option " . ($settings["image_format"] === "keep" ? "selected " : '') . "value="keep">Do not convert</option>"; echo "<option " . ($settings["image_format"] === "jpeg" ? "selected " : '') . "value="jpeg">JPEG</option>"; echo "<option " . ($settings["image_format"] === "webp" ? "selected " : '') . "value="webp">WebP</option>"; echo " </select>\xd
<label for="compression_quality">Compression quality</label>\xd
<input style="vertical-align: middle;" type="number" id="compression_quality" name="compression_quality" min="10" max="100" value=""; echo $settings["compression_quality"]; echo "" size="4">\xd
<p class="description">Select the format to which you want to convert locally stored PNG images.</p>\xd
</td>\xd\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "add_to_media_library"); echo "Add to the Media Library</th>
\xa <td>"; echo "<input type="checkbox" name="add_to_media_library" id="add_to_media_library" " . ($settings["add_to_media_library"] === "on" ? "checked " : '') . ">"; echo " <label for="add_to_media_library">if checked, all images will be added to the WordPress Media Library.</label>\xd\xa </td>\xd
</tr>
\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "store_base64_encoded_images"); echo "Store base64-encoded images</th>\xd
<td>"; echo "<input type="checkbox" name="store_base64_encoded_images" id="store_base64_encoded_images" " . ($settings["store_base64_encoded_images"] === "on" ? "checked " : '') . ">"; echo " <label for="store_base64_encoded_images">if this option and <strong>Store images locally</strong> are enabled, all the base64-encoded images will be saved as regular image files (.jpg, .png, .gif etc).</label>
</td>
\xa </tr>
\xa
<tr>
<th scope="row"><a name="media-attachments"></a>"; $this->showChangeBox($change_selected, "insert_media_attachments"); echo "Media attachments</th>
\xa <td>\xd
<select name="insert_media_attachments">\xd
"; echo "<option " . ($settings["insert_media_attachments"] === "no" ? "selected " : '') . "value="no">Do not insert attachments</option>"; echo "<option " . ($settings["insert_media_attachments"] === "top" ? "selected " : '') . "value="top">Insert attachments at the top of the post</option>"; echo "<option " . ($settings["insert_media_attachments"] === "bottom" ? "selected " : '') . "value="bottom">Insert attachments at the bottom of the post</option>"; echo " </select>\xd\xa <p class="description">If enabled the CyberSEO Pro syndicator inserts media attachments (if available) into the aggregating post. The\xd\xa following types of attachments are supported: <code><media:content></code>, <code><media:thumbnail></code> and <code><enclosure></code>.\xd\xa <br>All the aggregated images will contain <code>class="media_thumbnail"</code> in the <code><img></code> tag.</p>
</td>
\xa </tr>
\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "set_thumbnail"); echo "Post thumbnails</th>
\xa <td>\xd
<select id="set_thumbnail" name="set_thumbnail" onchange="cseoSetThumbnail();">\xd\xa "; echo "<option " . ($settings["set_thumbnail"] === "no_thumb" ? "selected " : '') . "value="no_thumb">Do not create</option>"; echo "<option " . ($settings["set_thumbnail"] === "first_image" ? "selected " : '') . "value="first_image">Create from the first post image</option>"; echo "<option " . ($settings["set_thumbnail"] === "last_image" ? "selected " : '') . "value="last_image">Create from the last post image</option>"; echo "<option " . ($settings["set_thumbnail"] === "random_image" ? "selected " : '') . "value="random_image">Create from a random post image</option>"; echo "<option " . ($settings["set_thumbnail"] === "media_attachment" ? "selected " : '') . "value="media_attachment">Create from the image media attachment</option>"; echo "<option " . ($settings["set_thumbnail"] === "thumb_field" ? "selected " : '') . "value="thumb_field">Create from the "thumb" custom field</option>"; echo "<option " . ($settings["set_thumbnail"] === "gpt_image" ? "selected " : '') . "value="gpt_image">Find a relevant image using GPT (obsolete)</option>"; echo "<option " . ($settings["set_thumbnail"] === "alternative_image" ? "selected " : '') . "value="alternative_image">Use the alternative image source</option>"; echo " </select>
<p class="description">Select the source image for the post thumbnail.</p>
</td>\xd\xa </tr>\xd
\xd\xa <tr id="preferred_gpt_image_source_box" style="display: none;">
\xa <th scope="row">"; $this->showChangeBox($change_selected, "preferred_gpt_image_source"); echo "</th>
\xa <td>\xd\xa <div class="cseo-box" style="padding: 8px;">\xd\xa <strong>Preferred GPT image source</strong> \xd
<select name="preferred_gpt_image_source">
\xa "; echo "<option " . ($settings["preferred_gpt_image_source"] === "pixabay" ? "selected " : '') . "value="pixabay">Pixabay</option>"; echo "<option " . ($settings["preferred_gpt_image_source"] === "google_image_search" ? "selected " : '') . "value="google_image_search">Google Image seacrh results</option>"; echo " </select>
\xa <p class="description">Select the preferred source for GPT image search.</p>
</div>
</td>
</tr>
\xa
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "use_fifu"); echo "Use FIFU</th>\xd\xa <td>"; echo "<input type="checkbox" name="use_fifu" id="use_fifu" " . ($settings["use_fifu"] === "on" ? "checked " : '') . ">"; echo "<label for="use_fifu">when checked, the post thumbnail won't be stored locally. It will be hotlinked and displayed by the <a href="https://www.cyberseo.net/partners/fifu.php" target="_blank">FIFU</a> plugin, which must be installed and activated.</label>"; if (!function_exists("fifu_dev_set_image")) { echo "<p class="description" id="fifu_warning">⚠ FIFU is not detected. If you enable this option, the post thumbnail will not be generated. Please install and activate FIFU first.</p>"; } echo " </td>\xd
</tr> \xd
\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "alt_post_thumbnail_src"); echo "Alternative thumbnail source</th>\xd\xa <td>
"; echo "<input type="text" name="alt_post_thumbnail_src" style="margin:0;width:100%;" value="" . stripslashes($settings["alt_post_thumbnail_src"]) . "" size="20">"; echo " <p class="description">The alternative post thumbnail source for the case if the source image was not found. You can set here \xd
your default image URL or use the <code>%gpt_image_prompt%</code>, <code>%pixabay[KEYWORD]%</code> and <code>%random_image[KEYWORD]%</code> placeholders</a>.
<br>This field will be ignored if the "Post thumbnails" option is set to "do not generate".</p>
\xa </td>
\xa </tr>
\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "thumb_src_sizes"); echo "Thumbnail source size</th>
\xa <td>
"; echo "min width: <input type="number" min="0" name="thumb_src_min_width" value="" . $settings["thumb_src_min_width"] . "" size="5"> "; echo "max width: <input type="number" min="0" name="thumb_src_max_width" value="" . $settings["thumb_src_max_width"] . "" size="5"> "; echo "min height: <input type="number" min="0" name="thumb_src_min_height" value="" . $settings["thumb_src_min_height"] . "" size="5"> "; echo "max height: <input type="number" min="0" name="thumb_src_max_height" value="" . $settings["thumb_src_max_height"] . "" size="5">"; echo " <p class="description">Set minimum and maximum thumbnail source image size in pixels. If the source image is smaller than a minimum limit or larger than a maximum one,\xd\xa the post thumbnail will not be generated.<br>This helps to sort out the posts with very small images when the post thumbnail is required.\xd
Use <code>0</code> if you don't want to limit the thumbnail source image by size.</p>
\xa </td>
\xa </tr> \xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "require_thumbnail"); echo "Post thumbnail is required</th>
\xa <td>"; echo "<input type="checkbox" name="require_thumbnail" id="require_thumbnail" " . ($settings["require_thumbnail"] === "on" ? "checked " : '') . ">"; echo " <label for="require_thumbnail">if the plugin will not be able to create post thumbnail as specified above (e.g. the source image is missing or broken), the post will not be published.</label>\xd\xa </td>
\xa </tr>
\xa\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "store_videos"); echo "Store videos locally</th>
<td>"; echo "<input type="checkbox" name="store_videos" id="store_videos" " . ($settings["store_videos"] === "on" ? "checked " : '') . ">"; echo " <label for="store_videos">if checked, all videos will be copied into the default uploads folder. The following video extensions are supported: mp4, m4v, mov, wmv, avi, mpg, ogv, 3gp, 3g2.</label>
\xa </td>\xd
</tr>
\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "use_video_custom_filed"); echo "Use "video" custom field</th>
\xa <td>\xd
<select name="use_video_custom_filed">\xd
"; echo "<option " . ($settings["use_video_custom_filed"] === "no" ? "selected " : '') . "value="no">Do not embed video</option>"; echo "<option " . ($settings["use_video_custom_filed"] === "top" ? "selected " : '') . "value="top">Embed video at the top of the post</option>"; echo "<option " . ($settings["use_video_custom_filed"] === "bottom" ? "selected " : '') . "value="bottom">Embed video at the bottom of the post</option>"; echo " </select>\xd
<p class="description">If enabled the CyberSEO Pro syndicator will embed the contents the <code>video</code> custom filed. It can be a direct link to a video file or an embeddable code.</p>
\xa </td>
\xa </tr>
\xd
<tr>
<th scope="row" style="color: #888;">"; $this->showChangeBox($change_selected, "embed_videos"); echo "Embed videos</th>
\xa <td>
"; echo "<input type="checkbox" name="embed_videos" id="embed_videos" " . ($settings["embed_videos"] === "on" ? "checked " : '') . ">"; echo " <label for="embed_videos">inserts tube video embeds into the post. Supported feed sources: YouTube, Vimeo, Flickr, IGN, DailyMotion.</label>
<p class="description">Video feed example:
<em>https://www.youtube.com/feeds/videos.xml?user=vevo</em></p>
<p class="description">⚠ This option is added for compatibility with CyberSEO Lite. It's recommended to use presets instead.</p>\xd\xa </td>\xd\xa </tr> \xd
</table>\xd
</div> \xd\xa
<div id="advanced" class="tab_content"> \xd
<br>
\xa <table class="form-table "; if (!$change_selected) { goto ZCwBN; } echo "cseo-form"; ZCwBN: echo "">\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "extract_full_articles"); echo "Extract full text articles</th>
\xa <td>
<select name="extract_full_articles" onchange="cseoChangeTextExtractor();">\xd\xa "; echo "<option " . ($settings["extract_full_articles"] === '' ? "selected " : '') . "value="">Don't extract</option>"; if (empty(get_option("cxxx_full_text_extractor"))) { goto Wly8e; } echo "<option " . ($settings["extract_full_articles"] === "on" ? "selected " : '') . "value="on">Use Full-Text RSS script</option>"; Wly8e: echo "<option " . ($settings["extract_full_articles"] === "custom" ? "selected " : '') . "value="custom">Use custom settings</option>"; echo " </select>\xd\xa <p class="description">When enabled, CyberSEO Pro will try to extract the full articles from shortened RSS feeds.</p>\xd\xa <div id="custom_text_extractor">
\xa <table class="cseo-box8">
<tr>\xd
<th colspan="2" style="font-weight: normal;">\xd\xa Configure the options below to extract the full-text article from HTML pages. Specify the tag name and attributes that define the main content container,
and choose whether to include the container tag in the extracted content. The CyberSEO Pro plugin will use these settings to accurately identify and extract the full-text article \xd
from HTML pages with different layouts and structures.\xd
</th>\xd
</tr>
<tr> \xd
<th>"; $this->showChangeBox($change_selected, "custom_text_extractor_tag"); echo "Container tag</th>\xd\xa <td>
\xa <select id="tag-name" name="custom_text_extractor_tag">
\xa "; $tags = ["div", "p", "span", "section", "article", "nav", "aside", "header", "footer", "main", "figure", "figcaption", "details", "summary", "blockquote", "pre", "code", "ul", "ol", "li", "dl", "dt", "dd", "table", "tr", "td", "th", "thead", "tbody", "tfoot", "caption", "colgroup", "col", "form", "fieldset", "legend", "label", "input", "button", "select", "optgroup", "option", "textarea", "output", "progress", "meter", "datalist", "canvas", "iframe"]; foreach ($tags as $tag) { echo "<option " . ($settings["custom_text_extractor_tag"] === $tag ? "selected " : '') . "value="" . $tag . "">" . $tag . "</option>"; Oe_6D: } NTPUU: echo " </select>
\xa <p class="description">Enter the tag name that wraps the main content of the HTML page (e.g., 'article', 'div', 'section'). This tag will be used to identify the element containing the full-text article.</p>
\xa </td>
\xa </tr>\xd
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "custom_text_extractor_attrbutes"); echo "Attributes (JSON format)</th>\xd\xa <td>"; echo "<input style="width:100%" name="custom_text_extractor_attrbutes" value="" . htmlspecialchars(stripslashes($settings["custom_text_extractor_attrbutes"]), ENT_QUOTES) . "" placeholder='{"class": "name"}'>"; echo " \xd\xa <p class="description">Specify the attributes and their values for the tag selected above. Use JSON format to define attribute-value pairs. E.g. <code>{"class": "article", "id": "main"}</code><br>
\xa This will help the plugin to accurately identify the correct element containing the full-text article if there are multiple elements with the same tag name.</p>
\xa </td>
\xa </tr>\xd\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "custom_text_extractor_inclusive"); echo "Inclusive</th>
\xa <td>\xd
"; echo "<input type="checkbox" name="custom_text_extractor_inclusive" " . ($settings["custom_text_extractor_inclusive"] === "on" ? "checked " : '') . ">"; echo " <label for="custom_text_extractor_inclusive">check this option if you want to include the selected tag and its attributes in the extracted content. Leave it unchecked if you only want to extract the inner content of the tag.</label>
\xa </td>\xd
</tr>
</table>
</div> \xd\xa </td>
\xa </tr> \xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "strip_tags"); echo "HTML tags to strip</th>
\xa <td>
\xa "; echo "<input type="text" name="strip_tags" style="margin:0;width:100%;" value="" . stripslashes($settings["strip_tags"]) . "" size="20">"; echo " <p class="description">Enter a comma-separated list of tags to remove from the generated posts, e.g.: <code>h1, img, p, div</code>.</p>
</td>
\xa </tr>\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "remove_outer_elements"); echo "Remove outer HTML elements</th>
\xa <td>
\xa "; echo "<input type="text" name="remove_outer_elements" style="margin:0;width:100%;" value="" . htmlspecialchars(stripslashes($settings["remove_outer_elements"])) . "" size="20">"; echo " <p class="description">Specify the HTML block elements you want to remove from the post content by entering them in a semicolon separated list. Each element should be specified
\xa using the tag name and its attribute-value pairs in JSON format, separated by a space.\xd
For example, to remove all <strong>div</strong> elements with the attribute <strong>class="ad"</strong> and all <strong>p</strong> elements with the attributes\xd\xa <strong>class="description"</strong> and <strong>id="block"</strong>, you should enter:<br><code>div {"class": "ad"}; p {"class": "description", "id": "block"}</code></p>\xd
<p class="description">Please ensure that the tag names and attribute-value pairs are correctly specified in the JSON format for effective removal of the specified HTML elements.</p>\xd\xa </td>
\xa </tr>\xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "convert_markdown"); echo "Convert Markdown to HTML</th>\xd
<td>\xd
"; echo "<input type="checkbox" name="convert_markdown" id="convert_markdown" " . ($settings["convert_markdown"] === "on" ? "checked " : '') . ">"; echo " <label for="convert_markdown">converts basic <a href="https://www.markdownguide.org/" target="_blank">Markdown</a> formatting to HTML.</label>
\xa </td>
\xa </tr>
\xa \xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "shuffle_paragraphs"); echo "Shuffle paragraphs</th>
<td>
\xa "; echo "<input type="checkbox" name="shuffle_paragraphs" id="shuffle_paragraphs" " . ($settings["shuffle_paragraphs"] === "on" ? "checked " : '') . ">"; echo " <label for="shuffle_paragraphs">check this option to shuffle post paragraphs.</label>\xd\xa </td>
\xa </tr>
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "utf8_encoding"); echo "UTF-8 encoding</th>
\xa <td>
\xa "; echo "<input type="checkbox" name="utf8_encoding" id="utf8_encoding" " . ($settings["utf8_encoding"] === "on" ? "checked " : '') . ">"; echo " <label for="utf8_encoding">enables UTF-8 encoding. This option converts an ISO-8859-1 string to UTF-8 that may be required when parsing the XML/RSS feeds containing invalid UTF-8 start bytes e.g. <code><0x92></code>.</label>
</td>\xd\xa </tr>\xd
\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "convert_encoding"); echo "Convert character encoding</th>
\xa <td>
\xa "; echo "<input type="checkbox" name="convert_encoding" id="convert_encoding" " . ($settings["convert_encoding"] === "on" ? "checked " : '') . ">"; echo " <label for="convert_encoding">enables character encoding conversion. This option might be useful when parsing XML/RSS feeds in national charsets different than UTF-8.</label>\xd\xa </td>
\xa </tr>\xd
\xd\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "sanitize"); echo "Sanitize content</th>
\xa <td>\xd
"; echo "<input type="checkbox" name="sanitize" id="sanitize" " . ($settings["sanitize"] === "on" ? "checked " : '') . ">"; echo " <label for="sanitize">sanitize content for allowed HTML tags for post content.</label>\xd\xa </td>\xd
</tr>
\xa\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "balances_tags"); echo "Balance HTML tags</th>
\xa <td>
\xa "; echo "<input type="checkbox" name="balances_tags" id="balances_tags" " . ($settings["balances_tags"] === "on" ? "checked " : '') . ">"; echo " <label for="balances_tags">balances the redundant and unclosed HTML tags of the post content and the post excerpt.</label>\xd
</td>\xd\xa </tr>
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "shorten_excerpts"); echo "Shorten post excerpts</th>\xd
<td>
"; echo "<input type="text" name="shorten_excerpts" value="" . $settings["shorten_excerpts"] . "" size="4">"; echo " <p class="description">set the max number of words to be left in the post excerpts. Use 0 to remove the excerpts completely or leave it blank to keep the excerpts untouched.</p>
\xa </td>
</tr>
\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "post_links_handling"); echo "Link handling</th>\xd\xa <td>\xd\xa <select name="post_links_handling">\xd\xa "; echo "<option " . ($settings["post_links_handling"] === "intact" ? "selected " : '') . "value="intact">Keep links intact</option>"; echo "<option " . ($settings["post_links_handling"] === "rm_all" ? "selected " : '') . "value="rm_all">Remove all links</option>"; echo "<option " . ($settings["post_links_handling"] === "rm_text" ? "selected " : '') . "value="rm_text">Remove all links except links in images</option>"; echo "<option " . ($settings["post_links_handling"] === "rm_img" ? "selected " : '') . "value="rm_img">Remove links from images only</option>"; echo " </select>\xd\xa <p class="description">Use this option to selectively remove links from posts.</p>\xd\xa </td>
\xa </tr>
\xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "translator"); echo "Translation</th>\xd\xa <td>
\xa <select name="translator" onchange="cseoChangeTranslator();">\xd\xa "; echo "<option " . ($settings["translator"] === "none" ? "selected " : '') . "value="none">Do not translate</option>"; echo "<option " . ($settings["translator"] === "ai_translate" ? "selected " : '') . "value="ai_translate">AI Translate</option>"; echo "<option " . ($settings["translator"] === "deepl_translate" ? "selected " : '') . "value="deepl_translate">DeepL Translate</option>"; echo "<option " . ($settings["translator"] === "yandex_translate" ? "selected " : '') . "value="yandex_translate">Yandex Translate</option>"; echo "<option " . ($settings["translator"] === "google_translate" ? "selected " : '') . "value="google_translate">Google Translate</option>"; echo " </select>\xd\xa <p class="description"><strong>Important</strong>: if the plugin will not be able to translate the article, the post won't be added.</p>
\xd
<div id="ai_translate_settings">
<table class="cseo-box8">
<tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "ai_translation_target"); echo "Target</th>
\xa <td>\xd\xa <select name="ai_translation_target">
"; $langs = $this->langs["AI_TRANSLATE_LANGS"]; foreach ($langs as $dir => $lang) { echo "<option " . ($settings["ai_translation_target"] == $dir ? "selected " : '') . "value="" . $dir . "">" . $lang . "</option>"; NU7CL: } sfTup: echo "
\xa </select>\xd
</td>
\xa </tr>
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "ai_translator_engine"); echo "AI model</th>
\xa <td>\xd
<select name="ai_translator_engine">\xd\xa "; $this->ai_rwtr_engines($settings["ai_translator_engine"]); echo " </select>\xd
</td>\xd\xa </tr>
\xa </table>
\xa </div> \xd
\xd
<div id="yandex_translate_settings">
\xa <table class="cseo-box8">
\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "yandex_translation_dir"); echo "Direction</th>
<td>
\xa <select name="yandex_translation_dir"> "; $langs = $this->langs["YANDEX_TRANSLATE_LANGS"]; asort($langs); foreach ($langs as $dir => $lang) { echo "<option " . ($settings["yandex_translation_dir"] == $dir ? "selected " : '') . "value="" . $dir . "">" . $lang . "</option>"; Dvqvs: } FMGph: echo " </select>
</td>\xd\xa </tr>\xd
</table>\xd\xa </div>
\xa
<div id="google_translate_settings">\xd\xa <table class="cseo-box8">
\xa <tr>
<th>"; $this->showChangeBox($change_selected, "google_translation_source"); echo "Source</th>\xd\xa <td><select name="google_translation_source">\xd
"; $langs = $this->langs["GOOGLE_TRANSLATE_LANGS"]; asort($langs); foreach ($langs as $dir => $lang) { echo "<option " . ($settings["google_translation_source"] == $dir ? "selected " : '') . "value="" . $dir . "">" . $lang . "</option>"; Q0qoT: } gV95Q: echo " </select>\xd
</td>
\xa </tr>\xd\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "google_translation_target"); echo "Target</th>
<td><select name="google_translation_target">
\xa "; foreach ($langs as $dir => $lang) { echo "<option " . ($settings["google_translation_target"] == $dir ? "selected " : '') . "value="" . $dir . "">" . $lang . "</option>"; Ix1lO: } Uaaot: echo " </select>
\xa </td>
</tr>
</table>
</div>
<div id="deepl_translate_settings">\xd\xa <table class="cseo-box8">
\xa <tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "deepl_translation_target"); echo "Target language</th>\xd
<td>\xd
<select name="deepl_translation_target">\xd
"; $langs = $this->langs["DEEPL_TRANSLATE_LANGS"]; foreach ($langs as $dir => $lang) { echo "<option " . ($settings["deepl_translation_target"] == $dir ? "selected " : '') . "value="" . $dir . "">" . $lang . "</option>"; ufGLQ: } mkJfM: echo " </select> \xd
</td>
\xa </tr>\xd\xa <tr>
\xa <th>"; $this->showChangeBox($change_selected, "deepl_use_api_free"); echo "Use DeepL API Free</th>
<td>\xd\xa <input type="checkbox" name="deepl_use_api_free" id="deepl_use_api_free"\xd
"; if (!($settings["deepl_use_api_free"] === "on")) { goto O0p80; } echo "checked"; O0p80: echo " />
<label for="deepl_use_api_free">DeepL API Free is a variant of our DeepL API Pro plan that allows developers to translate up to 500,000 characters per month for free.</label>\xd
</td>\xd
</tr>\xd\xa </table> \xd\xa </div>
</td>\xd
</tr>
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "synonymizer"); echo "Built-in synonymizer</th>
\xa <td>\xd
<select name="synonymizer">
\xa "; echo "<option " . ($settings["synonymizer"] === "off" ? "selected " : '') . "value="off">Disable</option>"; echo "<option " . ($settings["synonymizer"] === "before" ? "selected " : '') . "value="before">Use built-in synonymizer before content spinner</option>"; echo "<option " . ($settings["synonymizer"] === "after" ? "selected " : '') . "value="after">Use built-in synonymizer after content spinner</option>"; echo " </select>\xd
<p class="description">The built-in synonymizer mode.</p>
\xa </td>\xd\xa </tr>\xd\xa \xd\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "preserve_titles"); echo "Protect post titles</th>\xd\xa <td>
"; echo "<input type="checkbox" name="preserve_titles" id="preserve_titles" " . ($settings["preserve_titles"] === "on" ? "checked " : '') . ">"; echo " <label for="preserve_titles">should be used to protect titles from synonymization when importing from CSV.</label>\xd
</td>\xd
</tr>
\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "spinner"); echo "Content spinner</th>
\xa <td>\xd
<select name="spinner" onchange="cseoChangeSpinner();">
\xa "; echo "<option " . ($settings["spinner"] == CSEO_DISABLE_SPINNER ? "selected " : '') . "value="" . CSEO_DISABLE_SPINNER . "">Disable</option>"; echo "<option " . ($settings["spinner"] == CSEO_AI_SPINNER ? "selected " : '') . "value="" . CSEO_AI_SPINNER . "">AI Spinner</option>"; echo "<option " . ($settings["spinner"] == CSEO_SPINNERCHIEF ? "selected " : '') . "value="" . CSEO_SPINNERCHIEF . "">SpinnerChief</option>"; echo "<option " . ($settings["spinner"] == CSEO_SPINREWRITER ? "selected " : '') . "value="" . CSEO_SPINREWRITER . "">SpinRewriter</option>"; echo "<option " . ($settings["spinner"] == CSEO_CHIMPREWRITER ? "selected " : '') . "value="" . CSEO_CHIMPREWRITER . "">ChimpRewriter</option>"; echo "<option " . ($settings["spinner"] == CSEO_WORDAI ? "selected " : '') . "value="" . CSEO_WORDAI . "">WordAi</option>"; echo "<option " . ($settings["spinner"] == CSEO_ESPINNER ? "selected " : '') . "value="" . CSEO_ESPINNER . "">ESPinner</option>"; echo "<option " . ($settings["spinner"] == CSEO_XSPINNER ? "selected " : '') . "value="" . CSEO_XSPINNER . "">X-Spinner</option>"; echo "<option " . ($settings["spinner"] == CSEO_TEXTOROBOT ? "selected " : '') . "value="" . CSEO_TEXTOROBOT . "">Textorobot</option>"; echo " </select>\xd\xa <p class="description">Select the desired text spinner.</p>
\xa <div id="openai_gpt_settings"> \xd\xa <table class="cseo-box8">
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "ai_spinner_engine"); echo "AI model</th>\xd\xa <td>\xd
<select name="ai_spinner_engine">
"; $this->ai_rwtr_engines($settings["ai_spinner_engine"]); echo " </select>\xd
<p class="description">The AI Spinner supports many different languages.</p>\xd
</td>
</tr> \xd
</table>
</div>
\xa <div id="spinrewriter_settings">\xd\xa <table class="cseo-box8">
\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_protected_terms"); echo "Protected terms</th>\xd\xa <td>\xd
<textarea cols="90" rows="5" wrap="off" name="spinrewriter_protected_terms" style="margin:0; height:10em; width:100%;">"; echo $settings["spinrewriter_protected_terms"]; echo "</textarea><br>\xd
<p class="description">a list of keywords and key phrases that you do NOT want to spin. One term per line.</p>\xd\xa </td>
\xa </tr> \xd
\xd\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_auto_protected_terms"); echo "Auto protected terms</th>\xd
<td>
\xa <input type="checkbox" name="spinrewriter_auto_protected_terms" id="spinrewriter_auto_protected_terms"
"; if (!($settings["spinrewriter_auto_protected_terms"] === "on")) { goto fYugb; } echo "checked"; fYugb: echo " />
<label for="spinrewriter_auto_protected_terms">should SpinRewriter automatically protect all Capitalized Words except for those in the title of your original text?</label>\xd\xa </td>\xd\xa </tr>
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_confidence_level"); echo "Confidence level</th>
\xa <td>
<select name="spinrewriter_confidence_level">\xd
"; echo "<option " . ($settings["spinrewriter_confidence_level"] === "low" ? "selected " : '') . "value="low">low </option>"; echo "<option " . ($settings["spinrewriter_confidence_level"] === "medium" ? "selected " : '') . "value="medium">medium </option>"; echo "<option " . ($settings["spinrewriter_confidence_level"] === "high" ? "selected " : '') . "value="high">high </option>"; echo " </select>
\xa <p class="description">The confidence level of the rewrite process.<br>
<strong>low</strong>: largest number of synonyms for various words and phrases, least readable unique variations of text;<br>\xd
<strong>medium</strong>: relatively reliable synonyms, usually well readable unique variations of text (default setting);<br>
<strong>high</strong>: only the most reliable synonyms, perfectly readable unique variations of text.</p>\xd
</td>
</tr>
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_auto_sentences"); echo "Auto sentences</th>
\xa <td><input type="checkbox" name="spinrewriter_auto_sentences" id="spinrewriter_auto_sentences"\xd
"; if (!($settings["spinrewriter_auto_sentences"] === "on")) { goto EmUtc; } echo "checked"; EmUtc: echo " />
<label for="spinrewriter_auto_sentences">should SpinRewriter spin complete sentences? If enabled, some sentences will be replaced with a (shorter) spun variation.</label>
</td>
</tr> \xd\xa
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_auto_new_paragraphs"); echo "Auto new paragraphs</th>
<td>\xd
<input type="checkbox" name="spinrewriter_auto_new_paragraphs" id="spinrewriter_auto_new_paragraphs"
"; if (!($settings["spinrewriter_auto_new_paragraphs"] === "on")) { goto TZaoQ; } echo "checked"; TZaoQ: echo " />
\xa <label for="spinrewriter_auto_new_paragraphs">should SpinRewriter automatically write additional paragraphs on its own? If enabled, the returned spun text will contain additional paragraphs.</label>
</td>
</tr>
\xa
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_auto_sentence_trees"); echo "Auto sentence trees</th>
\xa <td>\xd\xa <input type="checkbox" name="spinrewriter_auto_sentence_trees" id="spinrewriter_auto_sentence_trees"\xd
"; if (!($settings["spinrewriter_auto_sentence_trees"] === "on")) { goto xQz32; } echo "checked"; xQz32: echo " />\xd\xa <label for="spinrewriter_auto_sentence_trees">if checked, SpinRewriter will change "If he is hungry, John eats." to "John eats if he is hungry." and "John eats and drinks." to "John drinks and eats."</label>
</td>
</tr>
\xa
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_use_only_synonyms"); echo "Use only synonyms</th>\xd\xa <td>
\xa <input type="checkbox" name="spinrewriter_use_only_synonyms" id="spinrewriter_use_only_synonyms"\xd\xa "; if (!($settings["spinrewriter_use_only_synonyms"] === "on")) { goto ck7eb; } echo "checked"; ck7eb: echo " />
\xa <label for="spinrewriter_use_only_synonyms">if checked, SpinRewriter will never use any of the original words of phrases if there is a synonym available. This significantly improves the uniqueness of generated spun content.</label>
</td>\xd
</tr>
\xa
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_text_with_spintax"); echo "Text with Spintax</th>
\xa <td>
\xa <input type="checkbox" name="spinrewriter_text_with_spintax" id="spinrewriter_text_with_spintax"
"; if (!($settings["spinrewriter_text_with_spintax"] === "on")) { goto e0lL2; } echo "checked"; e0lL2: echo " />\xd
<label for="spinrewriter_text_with_spintax">if checked, returns the processed spun text with Spintax. This option can be useful for generation of unique feeds in <a href="https://www.cyberseo.net/morphing-rss-host-mode-content-spinner/" target="_blank">Morphing RSS host mode</a>.</label>\xd
</td>
</tr> \xd
\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "spinrewriter_nested_spintax"); echo "Nested Spintax</th>\xd\xa <td>
\xa <input type="checkbox" name="spinrewriter_nested_spintax" id="spinrewriter_nested_spintax"
"; if (!($settings["spinrewriter_nested_spintax"] === "on")) { goto Do2Zj; } echo "checked"; Do2Zj: echo " />\xd\xa <label for="spinrewriter_nested_spintax">if checked, the returned spun text might contain 2 levels of nested spinning syntax.</label>\xd\xa </td>
\xa </tr>
</table>
\xa </div>\xd
<div id="wordai_settings">
<table class="cseo-box8">
\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "wordai_uniqueness"); echo "Uniqueness</th>
\xa <td>
<select name="wordai_uniqueness">
"; echo "<option " . ($settings["wordai_uniqueness"] == 1 ? "selected " : '') . "value="1">more conservative</option>"; echo "<option " . ($settings["wordai_uniqueness"] == 2 ? "selected " : '') . "value="2">regular</option>"; echo "<option " . ($settings["wordai_uniqueness"] == 3 ? "selected " : '') . "value="3">more adventurous</option>"; echo " </select>
</td>\xd
</tr>
\xa
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "wordai_return_rewrites"); echo "Return rewrites</th>
\xa <td>\xd
<input type="checkbox" name="wordai_return_rewrites" id="wordai_return_rewrites"
"; if (!($settings["wordai_return_rewrites"] === "on")) { goto zbL2j; } echo "checked"; zbL2j: echo " />
\xa <label for="wordai_return_rewrites">check it if you want to receive a rewritten article. Otherwise, the output returned will be the <a href="https://www.cyberseo.net/blog/what-is-spintax-and-how-to-use-it/" target=_blank">Spintax</a> of your text.</label>
</td>\xd
</tr>
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "wordai_protect_words"); echo "Protect words</th>\xd\xa <td>\xd\xa <input type="checkbox" name="wordai_protect_words" id="wordai_protect_words"\xd\xa "; if (!($settings["wordai_protect_words"] === "on")) { goto kbrv7; } echo "checked"; kbrv7: echo " />
\xa <label for="wordai_protect_words">check it to use the protect words master settings in your account, which can be viewed and updated <a href="https://wai.wordai.com/rewrite_settings" target="_blank">here</a>.</label>
\xa </td>\xd
</tr>
\xd\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "wordai_use_custom_synonyms"); echo "Use custom synonyms</th>\xd
<td>\xd
<input type="checkbox" name="wordai_use_custom_synonyms" id="wordai_use_custom_synonyms"\xd\xa "; if (!($settings["wordai_use_custom_synonyms"] === "on")) { goto ub5qE; } echo "checked"; ub5qE: echo " />\xd
<label for="wordai_use_custom_synonyms">enable it to use the custom synonyms master settings in your account, which can be viewed and updated <a href="https://wai.wordai.com/rewrite_settings" target="_blank">here</a>.</label>\xd
</td>\xd\xa </tr>\xd
\xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "wordai_avoid_ai_detection"); echo "Avoid AI detection</th>
<td>\xd\xa <input type="checkbox" name="wordai_avoid_ai_detection" id="wordai_avoid_ai_detection"
\xa "; if (!($settings["wordai_avoid_ai_detection"] === "on")) { goto htkNA; } echo "checked"; htkNA: echo " />\xd
<label for="wordai_avoid_ai_detection">when checked, WordAI accepts your original text and returns a "ghosted" version of the text which avoids AI detection. Note that all the settings above will be ignored.</label>\xd\xa </td>
\xa </tr>\xd
\xa </table>
</div> \xd\xa
<div id="chimprewriter_settings"> \xd
<table class="cseo-box8">
\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_quality"); echo "Quality</th>\xd\xa <td>\xd\xa <select name="chimprewriter_quality">\xd\xa "; echo "<option " . ($settings["chimprewriter_quality"] == 1 ? "selected " : '') . "value="1">1</option>"; echo "<option " . ($settings["chimprewriter_quality"] == 2 ? "selected " : '') . "value="2">2</option>"; echo "<option " . ($settings["chimprewriter_quality"] == 3 ? "selected " : '') . "value="3">3</option>"; echo "<option " . ($settings["chimprewriter_quality"] == 4 ? "selected " : '') . "value="4">4</option>"; echo "<option " . ($settings["chimprewriter_quality"] == 5 ? "selected " : '') . "value="5">5</option>"; echo " </select>
\xa <p class="description">spin quality: 5 - Best, 4 - Better, 3 - Good, 2 - Average, 1 - All.</p>
\xa </td>\xd\xa </tr>\x9\xd\xa
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_posmatch"); echo "POS match</th>\xd
<td>\xd
<select name="chimprewriter_posmatch">
\xa "; echo "<option " . ($settings["chimprewriter_posmatch"] == 0 ? "selected " : '') . "value="0">0</option>"; echo "<option " . ($settings["chimprewriter_posmatch"] == 1 ? "selected " : '') . "value="1">1</option>"; echo "<option " . ($settings["chimprewriter_posmatch"] == 2 ? "selected " : '') . "value="2">2</option>"; echo "<option " . ($settings["chimprewriter_posmatch"] == 3 ? "selected " : '') . "value="3">3</option>"; echo "<option " . ($settings["chimprewriter_posmatch"] == 4 ? "selected " : '') . "value="4">4</option>"; echo " </select>
\xa <p class="description">required Part of Speech (POS) match for a spin: 4 - FullSpin, 3 - Full, 2 - Loose, 1 - Extremely Loose, 0 - None. "FullSpin" removes some common POS replacements that tend to reduce quality of spin.</p>
\xa </td>
\xa </tr>
\xa
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_protectedterms"); echo "Protected terms</th>
\xa <td>
<input type="text" style="width: 100%;" name="chimprewriter_protectedterms" size="60" value=""; echo $settings["chimprewriter_protectedterms"]; echo "">
<p class="description">comma separated list of words or phrases to protect from spin, i.e. "my main keyword,my second keyword".</p>
</td>
</tr>
\xa\xd\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_rewrite"); echo "Rewrite</th>\xd\xa <td>
\xa <input type="checkbox" name="chimprewriter_rewrite" id="chimprewriter_rewrite"\xd\xa "; if (!($settings["chimprewriter_rewrite"] === "on")) { goto saz5c; } echo "checked"; saz5c: echo " />\xd
<label for="chimprewriter_rewrite">if checked, results are returned as a rewritten article with no Spintax. Otherwise, an article with Spintax is returned. Note that with rewrite enabled, the original word will always be removed.</label>
</td>
\xa </tr>
\xa\xd\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_phraseignorequality"); echo "Phrase ignore quality</th>\xd
<td>\xd
<input type="checkbox" name="chimprewriter_phraseignorequality" id="chimprewriter_phraseignorequality"\xd
"; if (!($settings["chimprewriter_phraseignorequality"] === "on")) { goto iu0RP; } echo "checked"; iu0RP: echo " />\xd\xa <label for="chimprewriter_phraseignorequality">if checked, quality is ignored when finding phrase replacements for phrases. This results in a huge amount of spin, but quality can vary.</label>\xd\xa </td>
</tr> \xd\xa\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_spinwithinspin"); echo "Spin within spin</th>\xd\xa <td>\xd\xa <input type="checkbox" name="chimprewriter_spinwithinspin" id="chimprewriter_spinwithinspin"\xd
"; if (!($settings["chimprewriter_spinwithinspin"] === "on")) { goto zmSnj; } echo "checked"; zmSnj: echo " />
\xa <label for="chimprewriter_spinwithinspin">if checked and if there is existing spin syntax in the content you send up, the ChimpRewriter will spin any relevant content inside this syntax. If disabled, the API will skip over this content and only spin outside of existing syntax.</label>
\xa </td>\xd\xa </tr>
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_spinwithinhtml"); echo "Spin within HTML</th>
\xa <td>
\xa <input type="checkbox" name="chimprewriter_spinwithinhtml" id="chimprewriter_spinwithinhtml"
"; if (!($settings["chimprewriter_spinwithinhtml"] === "on")) { goto xbdXY; } echo "checked"; xbdXY: echo " />\xd\xa <label for="chimprewriter_spinwithinhtml">spin inside HTML tags. This includes <p> tags, for example if you send up "<p>Here is a paragraph<\p>", nothing would be spun unless "Spin within HTML" is enabled.</label>
\xa </td>
</tr>
\xa\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_applyinstantunique"); echo "Apply instant unique</th>\xd
<td>\xd\xa <input type="checkbox" name="chimprewriter_applyinstantunique" id="chimprewriter_applyinstantunique"
\xa "; if (!($settings["chimprewriter_applyinstantunique"] === "on")) { goto C0S1Y; } echo "checked"; C0S1Y: echo " />\xd\xa <label for="chimprewriter_applyinstantunique">runs a spin tidy pass over the result article. This fixes any common a/an type grammar mistakes and repeated words due to phrase spinning. Generally increases the quality of the article. <strong>Costs one extra query.</strong></label>
\xa </td>\xd
</tr> \xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_tagprotect"); echo "Tag protect</th>\xd
<td>
\xa <input type="text" style="width: 100%;" name="chimprewriter_tagprotect" size="60" value=""; echo $settings["chimprewriter_tagprotect"]; echo "">
<p class="description">protects anything between any syntax you define. Separate start and end syntax with a pipe "|" and separate multiple tags with a comma ",". For example, you could protect anything in square brackets by assigning "[|]". You could also protect anything between "begin" and "end" by assigning "[|],begin|end".</p>
</td>\xd
</tr> \xd
\xd\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "chimprewriter_maxspindepth"); echo "Max spin depth</th>
\xa <td>\xd\xa <input type="checkbox" name="chimprewriter_maxspindepth" id="chimprewriter_maxspindepth"
"; if (!($settings["chimprewriter_maxspindepth"] === "on")) { goto rkmyO; } echo "checked"; rkmyO: echo " />
<label for="chimprewriter_maxspindepth">sets a maximum spin level depth in returned article. If enabled, no nested spin will appear in the spun result. This parameter only matters if "Rewrite" is disabled. Disable it for no limit on spin depth.</label>\xd
</td>\xd\xa </tr>
\xa
</table>\xd\xa </div> \xd\xa\xd\xa <div id="espinner_settings"> \xd\xa <table class="cseo-box8">\xd
\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "espinner_delete_frases"); echo "Delete phrases</th>\xd\xa <td>\xd\xa <select name="espinner_delete_frases">\xd\xa "; echo "<option " . ($settings["espinner_delete_frases"] == 0 ? "selected " : '') . "value="0">No</option>"; echo "<option " . ($settings["espinner_delete_frases"] == 1 ? "selected " : '') . "value="1">Yes</option>"; echo " </select>
<p class="description">if checked, ESPinner randomly deletes (nested spintax) entire phrases if it is activated.</p> \xd\xa </td>\xd\xa </tr> \x9\x9\x9\x9\x9\xd\xa\xd\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "espinner_p_words"); echo "Protected words</th>
<td>\xd
<input type="text" style="width: 100%;" name="espinner_p_words" size="60" value=""; echo $settings["espinner_p_words"]; echo "">\xd
<p class="description">comma separated (word1,word2,word3).</p>\xd\xa </td>
</tr>\x9\x9 \xd\xa
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "espinner_text_with_spintax"); echo "Text with Spintax</th>
<td>\xd
<input type="checkbox" name="espinner_text_with_spintax" id="espinner_text_with_spintax"\xd
"; if (!($settings["espinner_text_with_spintax"] === "on")) { goto foaP9; } echo "checked"; foaP9: echo " />\xd\xa <label for="espinner_text_with_spintax">if checked, returns the processed spun text with Spintax. This option can be useful for generation of unique feeds in <a href="https://www.cyberseo.net/morphing-rss-host-mode-content-spinner/" target="_blank">Morphing RSS host mode</a>.</label>
</td>\xd
</tr>
\xd
</table>
\xa </div>
<div id="xspinner_settings">
<table class="cseo-box8">
\xd\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "xspinner_post_url"); echo "Post URL</th>\xd
<td>
\xa <input type="text" style="width: 100%;" name="xspinner_post_url" size="60" value=""; echo $settings["xspinner_post_url"]; echo "">\xd
<p class="description">The HTTP POST URL is up to which IP and Port does <a href="https://www.cyberseo.net/partners/x-spinner.php" target="_blank"><strong>X-Spinner</strong></a> listen at. \xd
The default listen IP and port of X-Spinner is 127.0.0.1 and 80 port, so the default post URL is <strong>http://127.0.0.1:80/</strong>. But X-Spinner user may change the listen IP and port,\xd\xa so you'd better let your users input the X-Spinner listen IP and port in your software and get the right post url.</p>
</td>
</tr>
\xa
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "xspinner_spintype"); echo "Spin type</th>
<td>\xd\xa <select name="xspinner_spintype">\xd\xa "; echo "<option " . ($settings["xspinner_spintype"] == 0 ? "selected " : '') . "value="0">Spin to new article</option>"; echo "<option " . ($settings["xspinner_spintype"] == 1 ? "selected " : '') . "value="1">Text with Spintax</option>"; echo " </select>\xd\xa <p class="description">"Text with Spintax" can be useful for generation of unique feeds in <a href="https://www.cyberseo.net/morphing-rss-host-mode-content-spinner/" target="_blank">Morphing RSS</a> host mode.</p> \xd
</td>
\xa </tr>
\xa
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "xspinner_removeold"); echo "Remove old</th>
\xa <td>\xd
<select name="xspinner_removeold">
"; echo "<option " . ($settings["xspinner_removeold"] == 0 ? "selected " : '') . "value="0">No</option>"; echo "<option " . ($settings["xspinner_removeold"] == 1 ? "selected " : '') . "value="1">Yes</option>"; echo " </select>\xd\xa <p class="description">Should the word be removed from the spin result.</p> \xd\xa </td> \xd
</tr>
\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "xspinner_protectw"); echo "Protect words</th>\xd\xa <td>
\xa <input type="text" style="width: 100%;" name="xspinner_protectw" size="60" value=""; echo $settings["xspinner_protectw"]; echo "">
<p class="description">If you want to protect some words, set it like "word1,word2,word3", then X-Spinner will not spin these words.</p>
\xa </td>\xd\xa </tr> \xd
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "xspinner_spinway"); echo "Spin way</th>
\xa <td>\xd
<select name="xspinner_spinway">\xd\xa "; echo "<option " . ($settings["xspinner_spinway"] == 0 ? "selected " : '') . "value="0">Free spin</option>"; echo "<option " . ($settings["xspinner_spinway"] == 1 ? "selected " : '') . "value="1">Normal spin</option>"; echo "<option " . ($settings["xspinner_spinway"] == 2 ? "selected " : '') . "value="2">Super spin</option>"; echo " </select>\xd
</td>
\xa </tr> \xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "xspinner_thesaurus"); echo "Thesaurus</th>\xd\xa <td>
<input type="text" style="width: 100%;" name="xspinner_thesaurus" size="60" value=""; echo $settings["xspinner_thesaurus"]; echo "">\xd\xa <p class="description"> Arabic, Belarusian, Bulgarian, Croatian, Danish, Dutch, English, Filipino, Finnish, French, German, Greek, Hebrew,
Indonesian, Italian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish, Swedish, Turkish, \xd
Vietnamese and yourself thesaurus name in X-Spinner. This parameter only be valid in X-Spinner Developer Version.</p>\xd\xa </td> \xd
</tr>
\xd
</table>
\xa </div>\xd
</td>
\xa </tr>\xd\xa \xd\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "post_header"); echo "Post headers</th>\xd\xa <td>
"; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="post_header" id="post_header">" . stripslashes($settings["post_header"]) . "</textarea>"; echo " <p class="description">You may have a several versions of post header. In such a case your HTML code chunks have to be separated with <code><!--more--></code> divider.\xd
These changes will be randomly inserted into the posts.</p>\xd
</td>
</tr>
\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "include_post_headers"); echo "Add post headers to excerpts</th>\xd
<td>
\xa "; echo "<input type="checkbox" name="include_post_headers" id="include_post_headers" " . ($settings["include_post_headers"] === "on" ? "checked " : '') . ">"; echo " <label for="include_post_headers">check this option if you want the post headers to be inserted into excerpts.</label>\xd
</td>\xd
</tr>
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "post_footer"); echo "Post footers</th>
\xa <td>
\xa "; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="post_footer" id="post_footer">" . stripslashes($settings["post_footer"]) . "</textarea>"; echo " <p class="description">You may have a several versions of post footer. In such a case your HTML code chunks have to be separated with <code><!--more--></code> divider.
These changes will be randomly inserted into the posts.</p>\xd\xa </td>
</tr>
\xa\xd
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "include_post_footers"); echo "Add post footers to excerpts</th>\xd\xa <td>
"; echo "<input type="checkbox" name="include_post_footers" id="include_post_footers" " . ($settings["include_post_footers"] === "on" ? "checked " : '') . ">"; echo " <label for="include_post_footers">check this option if you want the post footers to be inserted into excerpts.</label>\xd
</td>\xd\xa </tr>\xd\xa\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "custom_fields"); echo "Custom fields</th>
\xa <td>
"; echo "<textarea cols="90" rows="10" id="custom_fields" name="custom_fields" style="margin:0;height:15em;width:100%;">" . stripslashes($settings["custom_fields"]) . "</textarea>"; echo " <p class="description">Here you can assign the XML tag values to the custom fields of the syndicating post. [<a href="https://www.cyberseo.net/blog/how-to-automate-wordpress-custom-fields/" target="_blank">?</a>]</p>\xd\xa </td>\xd\xa </tr> \xd
</table> \xd\xa\xd
<script>
\xa var custom_fields = CodeMirror.fromTextArea(document.getElementById("custom_fields"), {
\xa autoRefresh: true,
lineWrapping: true,\xd
lineNumbers: true,
spellcheck: false,\xd\xa matchBrackets: true,
mode: "mathematica",
indentUnit: 8,\xd
indentWithTabs: true,
\xa enterMode: "keep",\xd
tabMode: "shift"\xd\xa });
custom_fields.setSize("100%", "10em");
</script>\xd\xa </div>\xd\xa
\xa <div id="templates" class="tab_content">
<br>
\xa <table class="form-table "; if (!$change_selected) { goto yu0OM; } echo "cseo-form"; yu0OM: echo "">
"; $order = explode(",", $settings["template_order"] ?? "title,content,excerpt"); $items = ["title" => "<div id="title-item" class="template-item" data-template="title-item">🠈🢭🠊 post title </div>", "content" => "<div id="content-item" class="template-item" data-template="content-item">🠈🢭🠊 post content </div>", "excerpt" => "<div id="excerpt-item" class="template-item" data-template="excerpt-item">🠈🢭🠊 post excerpt </div>"]; echo " \xd\xa
\xa <tr>\xd\xa <th>"; $this->showChangeBox($change_selected, "template_order"); echo "Template processing order
<input type="hidden" name="template_order" id="template_order" value=""; echo esc_attr($settings["template_order"] ?? "title,content,excerpt"); echo "">\xd\xa </th>
\xa <td>
<span id="template-order-container">
"; foreach ($order as $template) { echo " "; echo $items[$template]; echo " "; hk8Cz: } VmNQ4: echo " </span>
\xa <p class="description">Drag the <strong>post title</strong>, <strong>post content</strong>, and <strong>post excerpt</strong> templates to set the left-to-right order in which they will be processed by the plugin.</p>\xd
</td>
</tr>\xd\xa
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "parse_spintax"); echo "Parse Spintax</th>
<td>"; echo "<input type="checkbox" name="parse_spintax" id="parse_spintax" " . ($settings["parse_spintax"] === "on" ? "checked " : '') . ">"; echo " <label for="parse_spintax">converts Spintax into a regular spun text in the <strong>post title</strong>, <strong>post content</strong>, and <strong>post excerpt</strong> templates.</label>
\xa </td>
\xa </tr>\xd
\xd\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "post_title_template"); echo "Post title</th>\xd
<td>\xd
"; echo "<textarea style="width:100%; height:5em; background-color:white;" wrap="on" name="post_title_template" id="post_title_template">" . stripslashes($settings["post_title_template"]) . "</textarea>"; echo "<p class="description">Post title template. Make sure it's not empty. The default template value is <code>%post_title%</code>. Placeholders and shortcodes are available for this field." . $this->hTmpl() . "</p>"; if (strlen($settings["post_title_template"])) { goto IMVXf; } echo "<p><span style="color: red;">⚠</span> Your post title template is empty. This means that the post to be generated will not have a title.</p>"; IMVXf: echo " </td>\xd
</tr>
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "post_slug_template"); echo "Post slug</th>
<td>
\xa "; echo "<input type="text" name="post_slug_template" style="margin:0;width:100%;" value="" . stripslashes($settings["post_slug_template"]) . "" size="20">"; echo " <p class="description">Post slug template. By default it's the same as title, but you can alter it according to your needs.</p>
</td>\xd\xa </tr>
\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "remove_emojis_from_slugs"); echo "Remove emojis from post slugs</th>
<td>"; echo "<input type="checkbox" name="remove_emojis_from_slugs" id="remove_emojis_from_slugs" " . ($settings["remove_emojis_from_slugs"] === "on" ? "checked " : '') . ">"; echo " <label for="remove_emojis_from_slugs">removes emoji symbols from post slugs.</label>\xd\xa </td>
\xa </tr> \xd\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "post_content_template"); echo "Post content</th>
\xa <td>
\xa "; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="post_content_template" id="post_content_template">" . stripslashes($settings["post_content_template"]) . "</textarea>"; echo "<p class="description">Post content template. Make sure it's not empty. The default template value is <code>%post_content%</code>. Placeholders and shortcodes are available for this field." . $this->hTmpl() . "</p>"; if (strlen($settings["post_content_template"])) { goto PdZxt; } echo "<p><span style="color: red;">⚠</span> Your post content template is empty. This means that the generated post will not have a content.</p>"; PdZxt: echo " </td>\xd\xa </tr>\xd\xa
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "post_excerpt_template"); echo "Post excerpt</th>
\xa <td>
"; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="post_excerpt_template" id="post_excerpt_template">" . stripslashes($settings["post_excerpt_template"]) . "</textarea>"; echo "<p class="description">Post excerpt template. The default template value is <code>%post_excerpt%</code>. Placeholders and shortcodes are available for this field." . $this->hTmpl() . "</p>"; echo " </td>
</tr>\xd\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "meta_title_template"); echo "Meta title</th>\xd
<td>\xd\xa "; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="meta_title_template" id="meta_title_template">" . stripslashes($settings["meta_title_template"]) . "</textarea>"; echo "<p class="description">Use placeholders and shortcodes to generate meta titles based on the current post. The following SEO plugins are supported: Yoast SEO, Rank Math SEO, The SEO Framework, SEOPress." . $this->hTmpl() . "</p>"; echo " </td>\xd\xa </tr>
\xd\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "meta_description_template"); echo "Meta description</th>
<td>\xd\xa "; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="meta_description_template" id="meta_description_template">" . stripslashes($settings["meta_description_template"]) . "</textarea>"; echo "<p class="description">Use placeholders and shortcodes to generate meta descriptions based on the current post. The following SEO plugins are supported: Yoast SEO, Rank Math SEO, The SEO Framework, SEOPress. [<a href="https://www.cyberseo.net/blog/how-to-create-meta-descriptions-with-cyberseo-pro/" target="_blank">?</a>]</p>"; echo " </td>\xd
</tr>
\xa </table>
</div>
\xa
<div id="expert" class="tab_content">
\xa <br>\xd
"; $this->showExpertBox($settings, true, $change_selected); echo " </div>
\xa <div id="filtering" class="tab_content">
<br>
\xa <table class="form-table "; if (!$change_selected) { goto hqFZb; } echo "cseo-form"; hqFZb: echo "">
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "filter_before"); echo "Apply filters before</th>\xd\xa <td>
\xa <select name="filter_before">
"; echo "<option " . ($settings["filter_before"] === "ftrss" ? "selected " : '') . "value="ftrss">full article extraction</option>"; echo "<option " . ($settings["filter_before"] === "ai-processor" ? "selected " : '') . "value="ai-processor">AI text processor</option>"; echo "<option " . ($settings["filter_before"] === "translator" ? "selected " : '') . "value="translator">text translator</option>"; echo "<option " . ($settings["filter_before"] === "spinner" ? "selected " : '') . "value="spinner">text spinner</option>"; echo "<option " . ($settings["filter_before"] === "media-processing" ? "selected " : '') . "value="media-processing">media processing</option>"; echo " </select>
<p class="description">Specify when exactly to apply the filter parameters.</p>\xd
</td>\xd\xa </tr>
\xa\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "filter_post_title"); echo "Apply filtering to</th>
\xa <td>"; echo "<input type="checkbox" name="filter_post_title" id="filter_post_title" " . ($settings["filter_post_title"] === "on" ? "checked " : '') . "> <label for="filter_post_title">post title</label> "; echo "<input type="checkbox" name="filter_post_content" id="filter_post_content" " . ($settings["filter_post_content"] === "on" ? "checked " : '') . "> <label for="filter_post_content">post content</label> "; echo "<input type="checkbox" name="filter_post_excerpt" id="filter_post_excerpt" " . ($settings["filter_post_excerpt"] === "on" ? "checked " : '') . "> <label for="filter_post_excerpt">post excerpt</label> "; echo "<input type="checkbox" name="filter_post_link" id="filter_post_link" " . ($settings["filter_post_link"] === "on" ? "checked " : '') . "> <label for="filter_post_link">post link</label> "; echo " </td>\xd\xa </tr>
\xa\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "filter_any_phrases"); echo "Must contain any of these keywords</th>
\xa <td>\xd\xa "; echo "<input type="text" style="width:100%" name="filter_any_phrases" value="" . stripslashes($settings["filter_any_phrases"]) . "">"; echo " <p class="description">Separate keywords and phrases with commas.</p>
</td>
</tr>
\xa
\xa <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "filter_all_phrases"); echo "Must contain all these keywords</th>
\xa <td>
"; echo "<input type="text" style="width:100%" name="filter_all_phrases" value="" . stripslashes($settings["filter_all_phrases"]) . "">"; echo " <p class="description">Separate keywords and phrases with commas.</p>
\xa </td>\xd
</tr>
\xa\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "filter_none_phrases"); echo "Must contain none of these keywords</th>\xd
<td>\xd
"; echo "<input type="text" style="width:100%" name="filter_none_phrases" value="" . stripslashes($settings["filter_none_phrases"]) . """; echo " <p class="description">Separate keywords and phrases with commas.</p>\xd
</td>\xd\xa </tr> \xd
\xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "filter_any_tags"); echo "Must contain any of these tags</th>\xd
<td>
\xa "; echo "<input type="text" style="width:100%" name="filter_any_tags" value="" . stripslashes($settings["filter_any_tags"]) . """; echo " <p class="description">Separate tags and phrases with commas.</p>
</td>\xd
</tr> \xd\xa
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "filter_none_tags"); echo "Must contain none of these tags</th>
\xa <td>\xd
"; echo "<input type="text" style="width:100%" name="filter_none_tags" value="" . stripslashes($settings["filter_none_tags"]) . "">"; echo " <p class="description">Separate tags and phrases with commas.</p>
</td>
\xa </tr>
\xa
\xa <tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "filter_days_newer"); echo "Must be newer than</th>\xd\xa <td>\xd
"; echo "<input type="number" min="0" name="filter_days_newer" value="" . stripslashes($settings["filter_days_newer"]) . "" size="3"> day(s)."; echo " <p class="description">Specify the date of a news publication in the feed (if present). Use 0 to not filter by date.</p>
\xa </td>
\xa </tr> \xd\xa
\xa <tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "filter_days_older"); echo "Must be older than</th>
<td>\xd
"; echo "<input type="number" min="0" name="filter_days_older" value="" . stripslashes($settings["filter_days_older"]) . "" size="3"> day(s)."; echo " <p class="description">Specify the date of a news publication in the feed (if present). Use 0 to not filter by date.</p>\xd\xa </td>\xd
</tr> \xd
\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "filter_post_longer"); echo "Must be longer than</th>\xd\xa <td>
\xa "; echo "<input type="number" min="0" name="filter_post_longer" value="" . stripslashes($settings["filter_post_longer"]) . "" size="3"> character(s)."; echo " <p class="description">Specify the the minimum post length. Use 0 for any size.</p>\xd
</td>\xd
</tr> \xd\xa </table>
\xa <br>\xd
<p class="description">*The filtering routine is case-insensitive and it does not match full words. Thus please be careful when using short keywords that may unintentionally match parts of other words.</p>
</div>\xd\xa <script type="text/javascript">\xd\xa var post_content_template = CodeMirror.fromTextArea(document.getElementById("post_content_template"), {\xd
autoRefresh: true,\xd
lineWrapping: true,
lineNumbers: true,
spellcheck: false,\xd\xa matchBrackets: true,
\xa mode: "application/x-httpd-php",
indentUnit: 8,\xd
indentWithTabs: true,\xd\xa enterMode: "keep",
tabMode: "shift"\xd\xa });\xd
post_content_template.setSize("100%", "20em");\xd
\xd\xa var post_excerpt_template = CodeMirror.fromTextArea(document.getElementById("post_excerpt_template"), {
\xa autoRefresh: true,\xd\xa lineWrapping: true,\xd\xa lineNumbers: true,\xd\xa spellcheck: false,
matchBrackets: true,\xd
mode: "application/x-httpd-php",
indentUnit: 8,
\xa indentWithTabs: true,\xd\xa enterMode: "keep",
tabMode: "shift"
});\xd\xa post_excerpt_template.setSize("100%", "20em");\xd
\xd\xa var meta_title_template = CodeMirror.fromTextArea(document.getElementById("meta_title_template"), {\xd\xa autoRefresh: true,
\xa lineWrapping: true,\xd
lineNumbers: true,
spellcheck: false,\xd\xa matchBrackets: true,\xd
mode: "application/x-httpd-php",\xd\xa indentUnit: 8,\xd\xa indentWithTabs: true,
enterMode: "keep",
tabMode: "shift"\xd
});\xd\xa meta_title_template.setSize("100%", "10em");
\xd
var meta_description_template = CodeMirror.fromTextArea(document.getElementById("meta_description_template"), {
autoRefresh: true,\xd
lineWrapping: true,\xd
lineNumbers: true,
spellcheck: false,
matchBrackets: true,
mode: "application/x-httpd-php",\xd\xa indentUnit: 8,\xd\xa indentWithTabs: true,
\xa enterMode: "keep",
tabMode: "shift"\xd\xa });\xd
meta_description_template.setSize("100%", "10em");
\xa
var post_header = CodeMirror.fromTextArea(document.getElementById("post_header"), {\xd
autoRefresh: true,
lineWrapping: true,\xd\xa lineNumbers: true,
\xa spellcheck: false,
matchBrackets: true,
\xa mode: "application/x-httpd",
\xa indentUnit: 8,\xd
indentWithTabs: true,\xd
enterMode: "keep",
\xa tabMode: "shift"\xd
});
\xa post_header.setSize("100%", "10em");
\xd\xa var post_footer = CodeMirror.fromTextArea(document.getElementById("post_footer"), {\xd\xa autoRefresh: true,\xd
lineWrapping: true,
lineNumbers: true,
\xa spellcheck: false,
\xa matchBrackets: true,
\xa mode: "application/x-httpd",
indentUnit: 8,\xd\xa indentWithTabs: true,
\xa enterMode: "keep",\xd
tabMode: "shift"\xd\xa });
\xa post_footer.setSize("100%", "10em");\xd\xa </script>\xd
"; echo "<div class="submit">"; if (isset($_POST["modify_selected_feeds"]) && check_admin_referer("cseo_xml_syndicator")) { goto byu1G; } if ($islocal) { goto hlJ6R; } echo "<input class="button-primary" name="update_default_settings" value="Update default settings" type="submit"> "; echo "<input class="button" name="cancel" value="Cancel" type="submit">"; goto FsKJx; hlJ6R: if ($this->edit_existing) { goto iXON1; } echo "<input class="button-primary" name="syndicate_feed" value="Syndicate This Feed" type="submit"> "; echo "<input class="button" name="cancel" value="Cancel" type="submit">"; if (is_object($this->current_feed_url)) { goto FmhwK; } echo "<input type="hidden" name="feed_url" value="" . htmlspecialchars($this->current_feed_url) . "">"; goto b9sIm; FmhwK: echo "<input type="hidden" name="feed_url" value="" . base64_encode(gzcompress(serialize($this->current_feed_url))) . "">"; b9sIm: goto hqjfF; iXON1: echo "<input class="button-primary" name="update_feed_settings" value="Update Feed Settings" type="submit"> "; echo "<input class="button" name="cancel" value="Cancel" type="submit">"; echo "<input type="hidden" name="feed_id" value="" . (int) $_GET["edit-feed-id"] . "">"; hqjfF: FsKJx: echo "<br><div align="right"><input class="button" name="export_as_preset" value="Export as preset" type="submit"></div>"; goto eUnej; byu1G: echo "<input type="hidden" name="feed_ids" value="" . base64_encode(serialize($_POST["feed_ids"])) . "">"; echo "<input class="button-primary" name="apply_settings_to_selected_feeds" value="Apply these settings to selected feeds" type="submit"> "; echo "<input class="button" name="cancel" value="Cancel" type="submit">"; eUnej: echo "</div>"; wp_nonce_field("cseo_xml_syndicator"); echo " </form>\xd\xa <script type='text/javascript'>
\xa cseoChangePostType();\xd
cseoChangeTextExtractor();\xd
cseoChangeTranslator();
\xa cseoChangeSpinner();\xd
cseoAiEngine();
cseoOpenAiImage();\xd
cseoStableDiffusionImage();\xd\xa cseoFluxImage();
\xa cseoMidjourneyImage();\xd\xa cseoPixabayImage();
cseoGoogleImage();
\xa cseoYouTubeVideo();
cseoSetThumbnail();\xd\xa </script>\xd\xa "; } function getUpdateTime($id) { $time = time(); $interval = 60 * (int) $this->feeds[$id]["options"]["interval"]; if (isset($this->feeds_updated[$id])) { goto rQHx_; } $updated = (int) $this->feeds[$id]["updated"]; goto tr1i2; rQHx_: $updated = (int) $this->feeds_updated[$id]; tr1i2: if (intval($this->feeds[$id]["options"]["interval"]) === 0) { goto Ejf7g; } if (intval($this->feeds[$id]["options"]["max_items"]) === 0) { goto sJTs9; } if ($time - $updated >= $interval) { goto pjnsF; } return "in " . round(($interval - ($time - $updated)) / 60) . " minutes"; goto AAQaq; Ejf7g: return "never"; goto AAQaq; sJTs9: return "skip"; goto AAQaq; pjnsF: return "asap"; AAQaq: } function showPresetBox() { echo " <tr>
\xa <th scope="row">\xd\xa Select processing rules (preset)\xd
</th>
<td>\xd\xa <select name="presets">\xd\xa "; $presets = cseo_load_presets(); $i = 0; zuYWC: if (!($i < count($presets))) { goto mAPRo; } echo "<option value="" . $i . "">" . str_replace(" (adult)", '', $presets[$i]["name"]) . "</option>"; HXHCH: $i++; goto zuYWC; mAPRo: echo " </select>
<p class="description">For more information about presets, click <a href="https://www.cyberseo.net/presets/" target="_blank">here</a>.</p>
\xa </td>
</tr>
"; } function showExpertBox($settings, $full_menu = false, $change_selected = false) { echo " <table class="form-table "; if (!$change_selected) { goto Nr3Nu; } echo "cseo-form"; Nr3Nu: echo "">\xd
<tr>\xd
<th scope="row">"; $this->showChangeBox($change_selected, "proxy_mode"); echo "Proxy mode</th>
\xa <td>\xd
<select name="proxy_mode">\xd\xa "; echo "<option " . ($settings["proxy_mode"] === "noproxy" ? "selected " : '') . "value="noproxy">No proxy</option>"; echo "<option " . ($settings["proxy_mode"] === "use_proxy" ? "selected " : '') . "value="use_proxy">Use proxy list</option>"; echo " </select>
<p class="description">This option allows one to enable or disable proxies from the list, specified in <a href="admin.php?page=cyberseo_general_settings">General Settings</a>.</p>
\xa </td>
</tr> \xd\xa
<tr>\xd\xa <th scope="row">"; $this->showChangeBox($change_selected, "user_agent"); echo "User agent</th>
\xa <td>\xd\xa "; echo "<input type="text" style="width:100%" name="user_agent" value="" . stripslashes($settings["user_agent"]) . "">"; echo " <p class="description">Use this field to set a fake <a href="https://en.wikipedia.org/wiki/User-Agent_header" target="_blank">user agent</a>.</p>
</td>\xd
</tr> \xd\xa
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "http_referrer"); echo "HTTP referrer</th>\xd
<td>
\xa "; echo "<input type="text" style="width:100%" name="http_referrer" value="" . stripslashes($settings["http_referrer"]) . "">"; echo " <p class="description">Set URL for the <a href="https://en.wikipedia.org/wiki/Referer_spoofing" target="_blank">referer spoofing</a>. When set to "self", the actual feed's URL will be used.</p>\xd
</td>
</tr> \xd\xa\xd
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "http_headers"); echo "HTTP headers</th>\xd\xa <td>
\xa "; echo "<textarea cols="90" rows="10" wrap="off" name="http_headers" style="margin:0;height:10em;width:100%;">" . stripslashes($settings["http_headers"]) . "</textarea>"; echo " <p class="description">HTTP headers from a request follow this basic structure of an HTTP header: a case-insensitive string followed\xd
by a colon (':') and a value whose structure depends upon the header. One header per line.</p>
\xa </td>\xd\xa </tr>
\xa
\xa <tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "xml_section_tags"); echo "XML section names</th>
<td>\xd\xa "; echo "<input type="text" style="width:100%" name="xml_section_tags" value="" . stripslashes($settings["xml_section_tags"]) . "">"; echo " <p class="description">Separate with commas.</p>
</td>
</tr>\xd\xa
<tr>
\xa <th scope="row">"; $this->showChangeBox($change_selected, "disable_item_tag_autodetect"); echo "Disable JSON and XML tag detection</th>\xd\xa <td>\xd
"; echo "<input type="checkbox" name="disable_item_tag_autodetect" id="disable_item_tag_autodetect" " . ($settings["disable_item_tag_autodetect"] === "on" ? "checked " : '') . ">"; echo " <label for="disable_item_tag_autodetect">use section names defined in "XML section names" only.</label>\xd\xa </td>
</tr> \xd\xa\xd
<tr>
<th scope="row">"; $this->showChangeBox($change_selected, "preprocess_source_php"); echo "Preprocess source PHP code</th>\xd\xa <td>\xd\xa "; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="preprocess_source_php" id="preprocess_source_php">" . stripslashes($settings["preprocess_source_php"]) . "</textarea>"; echo " <p class="description">The form above allows you to execute a custom PHP code on the raw source file before it will be parsed by the content syndicator. You may fix or reformat
the source content in order to transform it into a valid XML format. The source content is stored in the <code>$content</code> string variable.\xd
You are free to modify it according to you need. Just keep in mind that the altered contents of the <code>$content</code> variable must be a valid XML document. <a href="https://www.cyberseo.net/content-syndicator/#preprocess-php-code" target="_blank">Documentation</a>.</p>
\xa </td> \xd\xa </tr> \xd
\xd\xa "; if (!$full_menu) { goto HLDgn; } echo " <tr>
<th scope="row">"; $this->showChangeBox($change_selected, "php_code"); echo "Custom PHP code</th>\xd
<td>\xd\xa "; echo "<textarea style="width:100%; height:20em; background-color:white;" wrap="on" name="php_code" id="php_code">" . stripslashes($settings["php_code"]) . "</textarea>"; echo " <p class="description">You can use this form to execute a custom PHP code for every aggregating post. This tool is intended for advanced users
\xa only and can be highly useful, for example, if you need to modify post's title, content, date, GUID etc. All post-related info is stored in the
\xa <code>$post</code> array variable which you can alter in order to apply your own changes to every aggregating post. If you don't want to aggregate some particular\xd\xa post, assign <code>false</code> to the <code>$post</code> array variable. <a href="https://www.cyberseo.net/content-syndicator/#php-code" target="_blank">Documentation</a>\xd\xa </p>
\xa </td>
\xa </tr> \xd
"; HLDgn: echo "
\xa\xd
</table>\xd\xa <script type="text/javascript">\xd\xa var preprocess_source_php = CodeMirror.fromTextArea(document.getElementById("preprocess_source_php"), {
\xa autoRefresh: true,\xd
lineWrapping: true,\xd\xa lineNumbers: true,\xd
spellcheck: false,\xd\xa matchBrackets: true,
mode: "text/x-php",\xd\xa indentUnit: 8,
indentWithTabs: true,\xd
enterMode: "keep",\xd\xa tabMode: "shift"
});\xd\xa preprocess_source_php.setSize("100%", "20em");
\xa "; if (!$full_menu) { goto SZFes; } echo " var php_code = CodeMirror.fromTextArea(document.getElementById("php_code"), {
autoRefresh: true,\xd
lineWrapping: true,
\xa lineNumbers: true,\xd
spellcheck: false,\xd\xa matchBrackets: true,\xd\xa mode: "text/x-php",
indentUnit: 8,\xd\xa indentWithTabs: true,
enterMode: "keep",\xd\xa tabMode: "shift"\xd
});\xd\xa php_code.setSize("100%", "20em");
"; SZFes: echo " </script>
\xa "; } function showMainPage($showsettings = true) { echo " <div class="metabox-holder postbox-container" style="width:100%;">\xd
<ul class="tabs"> \xd
<li class="active" rel="xml_feed">Source feed</li>\xd\xa <li rel="csv_dump">CSV or text dump</li>\xd\xa </ul>
\xd\xa <div class="tab_container">
\xa <div id="xml_feed" class="tab_content">
<form action=""; echo cseo_REQUEST_URI(); echo "" method="post">
\xd
<table class="form-table">
\xa <tr>\xd
<th scope="row">\xd\xa New feed URL
\xa </th> \xd
<td>
<div style="display: flex; justify-content: space-between; width: 100%;">\xd\xa <div style="flex-grow: 1; margin-right: 10px;">\xd
<input type="text" name="feed_url" value="" style="width: 100%;">\xd
</div>
\xa\xd\xa <div style="align-self: center;">\xd
<input class="button-primary" name="new_feed" value=" Syndicate » " type="submit">\xd\xa </div>\xd\xa </div>
\xa </td> \xd\xa </tr>\xd
\xa <tr>\xd
<th scope="row">
Treat as CSV\xd\xa </th> \xd\xa <td colspan="2">\xd
<input type="checkbox" name="treat_as_csv"> when checked, the source content will be parsed as a CSV file with a header.\xd
</td>
</tr>\xd\xa "; $this->showPresetBox(); echo " </table>
\xa <div style="margin-top:16pt;">\xd
<button type="button" class="cseo-button" id="show_override_box" onclick="cseoSwitchQODS();">⬇ Quick override default settings</button>
\xa <button type="button" class="cseo-button" id="hide_override_box" style="display:none;" onclick="cseoSwitchQODS();">⬆ Hide the override panel</button>\xd
<div id="expert_box_override" style="display:none;">\xd\xa <br>
"; $this->showExpertBox($this->global_options); echo " </div>
\xa </div>\xd\xa "; wp_nonce_field("cseo_xml_syndicator"); echo " </form> \xd\xa </div>
\xa
<div id="csv_dump" class="tab_content">
<form action=""; echo cseo_REQUEST_URI(); echo "" method="post">
<table class="form-table">\xd\xa <tr>\xd\xa <th scope="row">
Dump Format:\xd
</th>\xd
<td>\xd\xa "; $i = 0; sc5aA: if (!($i < 18)) { goto PD2u6; } echo " <select name="fields[]">\xd\xa <option value="ignore" selected>Ignore</option>
\xa <option value="link">Link</option>\xd\xa <option value="title">Title</option>
\xa <option value="tags">Tags</option>\xd\xa <option value="categories">Categories</option>
<option value="description">Description</option>\xd
<option value="content">Content</option>\xd\xa <option value="thumb">Thumbnail</option>
<option value="date">Date</option>
\xa <option value="custom">Custom</option>
\xa </select>
\xa "; BRodu: $i++; goto sc5aA; PD2u6: echo " </td>
\xa </tr>
\xd
<tr>
\xa <th scope="row">\xd\xa Delimiter:\xd
</th>\xd
<td>\xd\xa <select name="delimiter">\xd
<option value="csv_pipe">|</option>\xd
<option value="csv_comma">,</option>
\xa <option value="csv_semicolon">;</option>\xd\xa <option value="csv_tab">TAB</option>\xd
</select>
\xa <p class="description">define the dump format</p>\xd
</td>\xd
</tr>\xd
\xd\xa <tr>\xd\xa <th scope="row">
Skip header\xd
</th>
<td colspan="2">
\xa <input type="checkbox" name="skip_header"> when checked, the first line of a CSV dump is considered a header and is skipped.
</td>
\xa </tr>\xd
\xd
<tr>
\xa <th scope="row">\xd
Dump:
</th>\xd
<td>\xd\xa <textarea style="width: 100%; height: 30em; background-color: white;" spellcheck="false" wrap="on" id="dump" name="dump"></textarea>\xd
<p class="description">put the CSV dump here</p>
</td>\xd\xa </tr>
"; $this->showPresetBox(); echo " </table>
\xa <p><input class="button-primary" name="new_feed" value="Import dump »" type="submit"></p>\xd
<input type="hidden" name="feed_url" value="dump">\xd
"; wp_nonce_field("cseo_xml_syndicator"); echo " </form>
\xa <script type="text/javascript">
var dump = CodeMirror.fromTextArea(document.getElementById("dump"), {\xd
autoRefresh: true,
lineWrapping: true,
lineNumbers: true,\xd
spellcheck: false,\xd
matchBrackets: true,
mode: "text/html",
indentUnit: 8,\xd
indentWithTabs: true,
enterMode: "keep",\xd
tabMode: "shift"\xd\xa });
dump.setSize("100%", "30em");\xd\xa </script>
</div>
\xa\xd
</div>\xd
<form id="syndycated_feeds" action=""; echo cseo_REQUEST_URI(); echo "" method="post">
\xa "; if (!(count($this->feeds) > 0)) { goto WUni6; } $display_feeds = []; $i = 0; Yu6rA: if (!($i < count($this->feeds))) { goto Vw8mm; } $feed_item = "<tr>"; $feed_item .= "<th><input name="feed_ids[]" value="" . $i . "" type="checkbox" id="f" . $i . ""></th>"; $feed_item .= "<td><label for="f" . $i . "">" . $this->feeds[$i]["title"] . " [<a href="" . cseo_REQUEST_URI() . "&edit-feed-id=" . $i . "">edit</a>]</label></td>"; if (!is_object($this->feeds[$i]["url"])) { goto h7r3W; } $feed_item .= "<td>CSV</td>"; goto hb2Fi; h7r3W: if (is_string($this->feeds[$i]["url"]) && preg_match(CSEO_DUMMY_FEED_PATTERN, $this->feeds[$i]["url"])) { goto MqQxk; } $feed_item .= "<td><a href="" . $this->feeds[$i]["url"] . "" target="_blank">" . cseo_chop_str(htmlspecialchars($this->feeds[$i]["url"]), 100) . "</a></td>"; goto wK8eB; MqQxk: $feed_item .= "<td>dummy</td>"; wK8eB: hb2Fi: $feed_item .= "<td>" . $this->getUpdateTime($i) . "</td>"; if (isset($this->feeds_updated[$i])) { goto Ocnye; } $last_update = $this->feeds[$i]["updated"]; goto wonu5; Ocnye: $last_update = $this->feeds_updated[$i]; wonu5: if ($last_update) { goto dAsm1; } $feed_item .= "<td> - </td>"; goto i9paY; dAsm1: $feed_item .= "<td>" . round((time() - $last_update) / 60) . " minutes ago</td>"; i9paY: $feed_item .= "</tr>"; $display_feeds[] .= "<!--" . $this->feeds[$i]["title"] . $i . "-->" . $feed_item . PHP_EOL; UnK52: $i++; goto Yu6rA; Vw8mm: if (!(get_option(CSEO_SORT_FEED_SOURCES) === "name")) { goto zfTM2; } asort($display_feeds); zfTM2: echo "<table class="widefat" style="margin-top: .5em" width="100%">"; echo "<tr style="background: #f0f0f0;">"; echo "<th scope="row" style="width:3%;"><input type="checkbox" onclick="cseoCheckAllLs(document.getElementById('syndycated_feeds'));"></th>"; echo "<th scope="row" style="font-weight: 600; width:25%;">Feed title</th>"; echo "<th scope="row" style="font-weight: 600; width:50%;">URL</th>"; echo "<th scope="row" style="font-weight: 600; width:10%;">Next update</th>"; echo "<th scope="row" style="font-weight: 600; width:12%;">Last update</th>"; echo "</tr>"; $i = 0; foreach ($display_feeds as $item) { if (!($i++ % 2)) { goto Nkrjx; } $item = str_replace("<tr>", "<tr class="alternate">", $item); Nkrjx: echo $item; FizLQ: } a6vyA: echo "</table>"; echo " \xd\xa <table width="100%">\xd
<tr>\xd\xa <td>\xd
<div align="left">\xd
<input class="button-primary" name="check_for_updates" value="⏩ Pull selected feeds now!" type="submit">\xd\xa <input class="button secondary" name="modify_selected_feeds" value="Mass modify selected feeds" type="submit">\xd\xa <input class="button secondary" name="shuffle_update_time" value="Shuffle update times" type="submit">
</div>\xd\xa </td>\xd
<td>\xd
<div align="right">
\xa <input class="button secondary" name="delete_feeds_and_posts" value="❌ Delete selected feeds and syndicated posts" type="submit" onClick="return confirm('Delete selected feeds and syndicated posts?')">\xd
<input class="button secondary" name="delete_feeds" value="❌ Delete selected feeds" type="submit" onClick="return confirm('Delete selected feeds?')">
<input class="button secondary" name="delete_posts" value="❌ Delete posts syndicated from selected feeds" type="submit" onClick="return confirm('Delete posts syndicated from selected feeds?')">\xd
</div>\xd\xa </td>\xd\xa </tr>\xd\xa </table>
"; WUni6: echo " \xd
<table width="100%">\xd
<tr>
\xa <td>
<div align="right">
\xa <br>\xd
<input class="button-primary" name="alter_default_settings" value="Alter default settings" type="submit">\xd\xa </div>\xd\xa </td>
</tr>
</table>
\xa
<h2>Export</h2>
<table class="widefat">\xd
<tr>
<td>\xd
<p class="description">Use this option to export all selected feeds along with their settings into a file.</p>
<input type="submit" name="export_feeds" id="submit" class="button-secondary" value="Export Selected Feeds" />\xd\xa </td>\xd\xa </tr>\xd
</table>
"; wp_nonce_field("cseo_xml_syndicator"); echo " </form>
\xa <br>
\xa <form action=""; echo cseo_REQUEST_URI(); echo "" method="post" enctype="multipart/form-data">\xd
<h2>Import</h2>
\xa <table class="widefat">
\xa <tr>
\xa <td>
<p><strong>Filename:</strong> <input type="file" name="file" id="file" /></p>
<p class="description">Use this option to import feeds from a local file. <strong>Warning!</strong> The existing feed settings will be overwritten.</p>\xd\xa <input class="button-secondary" type="submit" name="import_feeds" id="import_feeds" value="Import Feed Settings" disabled />
\xa </td>
\xa </tr>\xd
</table>\xd
"; wp_nonce_field("cseo_xml_syndicator"); echo " </form>
<script>\xd\xa document.getElementById('file').addEventListener('change', function() {\xd\xa const importButton = document.getElementById('import_feeds');
if (this.files.length > 0) {\xd
importButton.disabled = false;
} else {
importButton.disabled = true;
}
\xa });
\xa </script>\xd
"; if (!$showsettings) { goto I3puZ; } $this->showSettings(false, $this->global_options); I3puZ: echo " </div>
\xa "; } function enqueue_scripts() { wp_enqueue_style("codemirror", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css"); wp_enqueue_script("codemirror", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.js"); wp_enqueue_script("xml", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/xml/xml.min.js"); wp_enqueue_script("javascript", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/javascript/javascript.min.js"); wp_enqueue_script("css", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/css/css.min.js"); wp_enqueue_script("clike", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/clike/clike.min.js"); wp_enqueue_script("php", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/php/php.min.js"); wp_enqueue_script("autorefresh", "https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/addon/display/autorefresh.min.js"); wp_enqueue_script("jquery-ui-sortable"); } function init() { if (!(isset($_POST["reset_registration_info"]) && check_admin_referer("cseo_general_settings"))) { goto aRbPG; } delete_option("cxxx_reg_name"); delete_option("cxxx_reg_email"); delete_option("cxxx_xcd"); delete_option("cxxx_core_version"); header("Location: " . str_replace("cyberseo_general_settings", "cyberseo", $_SERVER["REQUEST_URI"])); die; aRbPG: } function cron_init() { if (get_option(CSEO_RSS_PULL_MODE) === "auto") { goto OyM1D; } if (!(function_exists("wp_clear_scheduled_hook") && wp_next_scheduled("cseo_update_by_wp_cron"))) { goto CYXWB; } wp_clear_scheduled_hook("cseo_update_by_wp_cron"); CYXWB: goto WGcot; OyM1D: add_action("cseo_update_by_wp_cron", [$this, "update_feeds"]); if (wp_next_scheduled("cseo_update_by_wp_cron")) { goto tQajk; } wp_schedule_event(time(), CSEO_PC_NAME, "cseo_update_by_wp_cron"); tQajk: WGcot: } function admin_head() { echo " <style type="text/css">\xd\xa /*
\xa .CodeMirror {\xd\xa resize: vertical;\xd\xa overflow: auto !important;
\xa }\xd
*/
\xa #template-order-container {
\xa display: flex;\xd
justify-content: start;
gap: 8px;\xd
padding: 8px;\xd\xa border: 1px solid #999;
border-radius: 4px;\xd
width: fit-content;\xd\xa background-color: #f0f0f0;\xd\xa flex-wrap: nowrap; \xd\xa height: auto;
\xa }\xd\xa\xd\xa .template-item {
\xa display: flex;
align-items: center; \xd
padding: 4px 6px;\xd
border: 1px solid #ccc;
background-color: #fff;
\xa cursor: grab;\xd\xa border-radius: 4px;\xd\xa font-size: 0.8em;\xd
line-height: normal;
\xa white-space: nowrap;\xd\xa height: fit-content; \xd
user-select: none;\xd\xa -moz-user-select: none;
\xa -webkit-user-select: none;
-ms-user-select: none;\xd
}\xd
.error a {
\xa color: #100;
\xa }\xd\xa
div.cyberseo-ui-tabs-panel {
margin: 0;\xd
padding-left: 6pt;
\xa max-height: 13em;
width: 100%;
overflow: auto;
border: 1px solid #999;
\xa border-radius: 4px;
}
ul.tabs {
margin: 0;
padding: 0;
\xa float: left;\xd\xa list-style: none;
\xa height: 32px;
\xa border-bottom: 1px solid #ddd;
\xa border-left: 1px solid #ddd;
width: 100%;\xd\xa }\xd
ul.tabs li {
\xa float: left;\xd
margin: 0;
\xa cursor: pointer;\xd\xa padding: 0px 21px;\xd
height: 31px;\xd\xa line-height: 31px;\xd\xa border: 1px solid #DDD;\xd
border-left: none;
font-weight: bold;\xd\xa background: #EEE;\xd\xa overflow: hidden;
position: relative;
\xa }\xd\xa ul.tabs li:hover {\xd\xa background: #DDD;
}\xd\xa ul.tabs li.active{\xd
background: #FFF;\xd
border-bottom: 1px solid #FFF;\xd\xa }\xd\xa .tab_container {\xd
-webkit-box-shadow:inset 0px 0px 0px 1px #DDD;\xd\xa -moz-box-shadow:inset 0px 0px 0px 1px #DDD;
box-shadow:inset 0px 0px 0px 1px #DDD;
clear: both;
float: left;
\xa width: 100%;
background: #FFF;
}\xd\xa .tab_content {
padding: 20px;\xd
display: none;
}\xd\xa .cseo-button {
\xa text-decoration: none;
\xa cursor: pointer;\xd
color: #333;\xd
padding: 4pt 8pt;\xd\xa border-style: solid;
border-color: #2271b1;\xd\xa background-color: #fff;
\xa border-width: 1pt;\xd\xa border-radius: 3pt;
}
.cseo-button:hover {\xd
background-color: #eee;\xd
}\xd\xa .cseo-form th {\xd
width: 20em;
\xa }
\xa
.cseo-box {
width: 100%;\xd
border: 1px dashed #ccc;\xd\xa padding: 0 8px 0 8px;\xd\xa width: 100;\xd\xa }
\xa .cseo-box8 {
width: 100%;\xd\xa border: 1px dashed #ccc;\xd
padding: 0 8px 0 8px;
\xa margin-top: 12px;\xd
width: 100%;
}
\xa </style>
\xa\xd
<script type="text/javascript">
\xa jQuery(document).ready(function($) {\xd\xa $(".tab_content").hide();
$(".tab_content:first").show();
\xa $("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active");\xd
$(this).addClass("active");\xd\xa $(".tab_content").hide();
var activeTab = $(this).attr("rel");
\xa $("#" + activeTab).show();\xd\xa });\xd
});
\xd\xa jQuery(document).ready(function($) {\xd
$("#template-order-container").sortable({\xd
axis: 'x',
containment: "parent",
update: function(event, ui) {\xd\xa var order = $(this).sortable('toArray', { attribute: 'data-template' })
\xa .map(function(value) { return value.replace('-item', ''); });
$("#template_order").val(order.join(','));\xd\xa }\xd
}).disableSelection();\xd
});
\xd\xa function cseoCheckAllLs(form) {\xd
for (i = 0, n = form.elements.length; i < n; i++) {\xd
if (form.elements[i].type === "checkbox" && !(form.elements[i].getAttribute('onclick', 2))) {\xd\xa if (form.elements[i].checked === true)\xd
form.elements[i].checked = false;
\xa else\xd\xa form.elements[i].checked = true;
}
\xa }
\xa }\xd
\xd
function cseoCheckAll(form) {
for (i = 0, n = form.elements.length; i < n; i++) {\xd\xa if (form.elements[i].type === "checkbox") {
form.elements[i].checked = true;
\xa }
\xa }\xd\xa }
\xa\xd
function cseoUncheckAll(form) {\xd\xa for (i = 0, n = form.elements.length; i < n; i++) {
if (form.elements[i].type === "checkbox") {\xd\xa form.elements[i].checked = false;\xd\xa }\xd
}\xd\xa }\xd\xa
function cseoInverseSelection(form) {
\xa for (i = 0, n = form.elements.length; i < n; i++) {
\xa if (form.elements[i].type === "checkbox") {\xd\xa if (form.elements[i].checked === true)\xd
form.elements[i].checked = false;
else\xd\xa form.elements[i].checked = true;\xd
}
\xa }
}
\xd
function cseoChangeMode() {\xd
if (general_settings."; echo CSEO_RSS_PULL_MODE; echo ".value === "auto") {
auto.style.display = 'block';\xd
cron.style.display = 'none';\xd
} else {\xd
auto.style.display = 'none';
cron.style.display = 'block';
\xa }\xd
}\xd
\xd\xa function cseoAiEngine() {\xd\xa if (ai_engine.value === "none") {
openai.style.display = 'none';
\xa article_forge.style.display = "none";
}
if (ai_engine.value === "openai") {
openai.style.display = "block";\xd
article_forge.style.display = "none";
\xa }
\xa if (ai_engine.value === "article_forge") {
\xa openai.style.display = "none";\xd\xa article_forge.style.display = "block";
}
}\xd
\xd\xa function cseoYouTubeVideo() {\xd\xa if (youtube_position.value === "no_image") {\xd\xa youtube_settings.style.display = "none";
\xa } else {
youtube_settings.style.display = "block";
}
}\xd\xa\xd\xa function cseoOpenAiImage() {\xd
if (openai_image_position.value === "no_image") {
openai_image_settings.style.display = "none";\xd\xa } else {\xd\xa openai_image_settings.style.display = "block";\xd
}
\xa }
\xa
\xa function cseoGoogleImage() {
if (google_image_position.value === "no_image") {
\xa google_image_settings.style.display = "none";
\xa } else {
google_image_settings.style.display = "block";\xd\xa }
\xa }\xd\xa
function cseoStableDiffusionImage() {
if (stable_diffusion_image_position.value === "no_image") {
stable_diffusion_image_settings.style.display = "none";
} else {\xd
stable_diffusion_image_settings.style.display = "block";
}\xd\xa }
\xa function cseoPixabayImage() {\xd
if (pixabay_image_position.value === "no_image") {\xd
pixabay_image_settings.style.display = "none";
} else {\xd\xa pixabay_image_settings.style.display = "block";\xd
}\xd
}\xd
\xd\xa function cseoFluxImage() {\xd
if (flux_image_position.value === "no_image") {\xd\xa flux_image_settings.style.display = "none";\xd
} else {
\xa flux_image_settings.style.display = "block";\xd
}
\xa }
\xd\xa function cseoMidjourneyImage() {\xd\xa if (midjourney_image_position.value === "no_image") {\xd
midjourney_image_settings.style.display = "none";
\xa } else {\xd\xa midjourney_image_settings.style.display = "block";
\xa }
\xa }\xd
\xd\xa function cseoSetThumbnail() {
if (set_thumbnail.value === "gpt_image") {
\xa preferred_gpt_image_source_box.style.display = "table-row";
\xa } else {
preferred_gpt_image_source_box.style.display = "none";\xd\xa }\xd
}\xd\xa\xd
function cseoChangeACSource() {\xd\xa ac_text.style.display = 'none';\xd
ac_rss.style.display = 'none';
\xa ac_openai.style.display = 'none';
\xa if (ac_source.value === 'text') {\xd
ac_text.style.display = 'inline';
ac_openai_rewrite_cb.style.display = 'table-row';
\xa }\xd
if (ac_source.value === 'rss') {
ac_rss.style.display = 'inline';
\xa ac_openai_rewrite_cb.style.display = 'table-row';
\xa }
\xa if (ac_source.value === 'openai') {
ac_openai.style.display = 'inline';
\xa ac_openai_rewrite_cb.style.display = 'none';
\xa }
\xa }
function cseoSwitchQODS() {
if (expert_box_override.style.display === 'none') {
\xa expert_box_override.style.display = 'block';
show_override_box.style.display = 'none';
hide_override_box.style.display = 'inline';
\xa } else {\xd
expert_box_override.style.display = 'none';
\xa show_override_box.style.display = 'inline';
hide_override_box.style.display = 'none';
}
\xa }\xd
function cseoChangeTextExtractor() {
\xa custom_text_extractor.style.display = 'none';\xd\xa if (feed_settings.extract_full_articles.value === 'custom') {\xd
custom_text_extractor.style.display = 'inline';\xd\xa }
}\xd\xa\xd\xa function cseoChangeTranslator() {\xd\xa ai_translate_settings.style.display = 'none';
\xa yandex_translate_settings.style.display = 'none';
google_translate_settings.style.display = 'none';
deepl_translate_settings.style.display = 'none';
if (feed_settings.translator.value === 'ai_translate') {
\xa ai_translate_settings.style.display = 'inline';\xd\xa }
if (feed_settings.translator.value === 'yandex_translate') {\xd\xa yandex_translate_settings.style.display = 'inline';
\xa }\xd\xa if (feed_settings.translator.value === 'google_translate') {\xd\xa google_translate_settings.style.display = 'inline';\xd\xa }\xd
if (feed_settings.translator.value === 'deepl_translate') {\xd
deepl_translate_settings.style.display = 'inline';
}
}\xd\xa
\xa function cseoChangeSpinner() {\xd
spinrewriter_settings.style.display = 'none';\xd\xa wordai_settings.style.display = 'none';\xd\xa chimprewriter_settings.style.display = 'none';
\xa espinner_settings.style.display = 'none';
xspinner_settings.style.display = 'none';
\xa openai_gpt_settings.style.display = 'none';
if (feed_settings.spinner.value === '"; echo CSEO_SPINREWRITER; echo "') {
spinrewriter_settings.style.display = 'inline';\xd
}
if (feed_settings.spinner.value === '"; echo CSEO_WORDAI; echo "') {\xd
wordai_settings.style.display = 'inline';
}\xd\xa if (feed_settings.spinner.value === '"; echo CSEO_CHIMPREWRITER; echo "') {
\xa chimprewriter_settings.style.display = 'inline';
}
\xa if (feed_settings.spinner.value === '"; echo CSEO_ESPINNER; echo "') {\xd
espinner_settings.style.display = 'inline';\xd
}\xd\xa if (feed_settings.spinner.value === '"; echo CSEO_XSPINNER; echo "') {\xd
xspinner_settings.style.display = 'inline';
\xa }\xd\xa if (feed_settings.spinner.value === '"; echo CSEO_AI_SPINNER; echo "') {
openai_gpt_settings.style.display = 'inline';
\xa }
}\xd
\xd
function cseoSelectModificationTool() {
\xa mt_exec_php.style.display = "none";\xd
post_type_selector.style.display = "none";\xd
post_field_selector.style.display = "none";
if (modification_tools.mt_tool.value === "mt_exec_php") {
mt_exec_php.style.display = "block";\xd\xa }\xd\xa if (modification_tools.mt_tool.value === "mt_synonymize") {
post_type_selector.style.display = "block";
\xa post_field_selector.style.display = "block";
}
\xa if (modification_tools.mt_tool.value === "mt_generate_thumbnails") {\xd\xa post_type_selector.style.display = "block";\xd\xa }
\xa }
\xa
\xa function cseoChangePostType() {
\xa var post_type = document.feed_settings.post_type.value;\xd
var undefined = document.getElementById("custom_taxonomy_undefined");\xd\xa undefined.style.display = "block";\xd\xa "; $args = ["public" => true, "_builtin" => false]; $output = "objects"; $operator = "and"; $taxonomies = get_taxonomies($args, $output, $operator); foreach ($taxonomies as $taxonomy) { echo "var element = document.getElementById("custom_taxonomy_" . $taxonomy->name . "");"; echo "element.style.display = "none";"; foreach ($taxonomy->object_type as $object_type) { echo "if (post_type == "" . $object_type . "") {"; echo "element.style.display = "block";"; echo "undefined.style.display = "none";"; echo "}" . PHP_EOL; oJiq3: } aGJBL: xkpl3: } kbxjU: echo " }\xd\xa
function cseoChangePreviewMode() {\xd
switch (preview_mode_switch.value) {\xd\xa case "post_view":\xd\xa post_view.style.display = "block";
full_text_view.style.display = "none";
\xa attachment_view.style.display = "none";\xd\xa xml_view.style.display = "none";
\xa break;
case "full_text_view":\xd
post_view.style.display = "none";\xd
full_text_view.style.display = "block";\xd\xa attachment_view.style.display = "none";\xd\xa xml_view.style.display = "none";\xd
break;
case "attachment_view":\xd\xa post_view.style.display = "none";\xd
full_text_view.style.display = "none";
attachment_view.style.display = "block";\xd
xml_view.style.display = "none";
\xa break;
case "xml_view":\xd\xa post_view.style.display = "none";
\xa full_text_view.style.display = "none";
attachment_view.style.display = "none";
\xa xml_view.style.display = "block";\xd
break;
}\xd\xa }\xd\xa </script>
\xa "; } } if (!(get_option(CSEO_ENABLE_DEBUG_MODE) === "on")) { goto qwCZe; } error_reporting(-1); ini_set("display_errors", "On"); qwCZe: if (!(get_option(CSEO_PREVIOUS_VERSION) !== get_option(CXXX_CORE_VERSION))) { goto jF3SU; } update_option(CSEO_PREVIOUS_VERSION, get_option(CXXX_CORE_VERSION)); cseo_upgrade(); jF3SU: if (!is_admin()) { goto NbsvO; } cseo_default_options(); NbsvO: $cseo = new CyberSEO_Syndicator(); if (!is_admin()) { goto EiXI_; } add_action("init", [$cseo, "init"]); add_action("admin_bar_menu", "cseo_add_admin_menu_item"); add_action("admin_head", [$cseo, "admin_head"]); add_action("admin_enqueue_scripts", [$cseo, "enqueue_scripts"]); add_filter("plugin_action_links_" . plugin_basename(__FILE__), "cseo_plugins_action_link"); define("CSEO_OWNER", "%%EMAIL%%"); if (isset($_POST["export_feeds"])) { goto hoAVU; } if (isset($_POST["export_as_preset"])) { goto Cy3wd; } goto xK4Es; hoAVU: if (!function_exists("check_admin_referer")) { require_once ABSPATH . "wp-includes/pluggable.php"; } if (!(isset($_POST["feed_ids"]) && check_admin_referer("cseo_xml_syndicator"))) { goto nKJ7d; } header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=" . sanitize_key(get_bloginfo("name")) . "-feed-settings.dat"); header("Content-Type: text/xml; charset=" . get_option("blog_charset"), true); $cseo->serializeFeeds($_POST["feed_ids"]); exit; nKJ7d: goto xK4Es; Cy3wd: $preset = []; $preset["treat_as_csv"] = isset($_POST["treat_as_csv"]) ? "on" : ''; $preset["extract_full_articles"] = addslashes($_POST["extract_full_articles"]); $preset["ai_engine"] = $_POST["ai_engine"]; $preset["openai_article_assignment"] = addslashes($_POST["openai_article_assignment"]); $preset["openai_title_assignment"] = addslashes($_POST["openai_title_assignment"]); $preset["openai_processing_order"] = addslashes($_POST["openai_processing_order"]); $preset["openai_position"] = addslashes($_POST["openai_position"]); $preset["openai_model"] = addslashes($_POST["openai_model"]); $preset["openai_max_tokens"] = intval($_POST["openai_max_tokens"]); $preset["openai_temperature"] = floatval($_POST["openai_temperature"]); $preset["openai_image_position"] = $_POST["openai_image_position"]; $preset["openai_tag_for_split"] = $_POST["openai_tag_for_split"]; $preset["openai_number_of_images"] = $_POST["openai_number_of_images"]; $preset["openai_image_assignment"] = addslashes($_POST["openai_image_assignment"]); $preset["openai_image_model"] = $_POST["openai_image_model"]; $preset["openai_image_size"] = $_POST["openai_image_size"]; $preset["openai_image_class"] = $_POST["openai_image_class"]; $preset["midjourney_image_position"] = $_POST["openai_image_position"]; $preset["midjourney_tag_for_split"] = $_POST["midjourney_tag_for_split"]; $preset["midjourney_number_of_images"] = $_POST["midjourney_number_of_images"]; $preset["midjourney_prompt"] = addslashes($_POST["midjourney_prompt"]); $preset["midjourney_aspect_ratio"] = $_POST["midjourney_aspect_ratio"]; $preset["midjourney_process_mode"] = $_POST["midjourney_process_mode"]; $preset["midjourney_provider"] = $_POST["midjourney_provider"]; $preset["midjourney_image_class"] = $_POST["openai_image_class"]; $preset["stable_diffusion_image_position"] = $_POST["stable_diffusion_image_position"]; $preset["stable_diffusion_tag_for_split"] = $_POST["stable_diffusion_tag_for_split"]; $preset["stable_diffusion_number_of_images"] = $_POST["stable_diffusion_number_of_images"]; $preset["stable_diffusion_image_description"] = addslashes($_POST["stable_diffusion_image_description"]); $preset["stable_diffusion_negative_prompt"] = addslashes($_POST["stable_diffusion_negative_prompt"]); $preset["stable_diffusion_engine"] = $_POST["stable_diffusion_engine"]; $preset["stable_diffusion_style_preset"] = $_POST["stable_diffusion_style_preset"]; $preset["stable_diffusion_steps"] = intval($_POST["stable_diffusion_steps"]); $preset["stable_diffusion_width"] = intval($_POST["stable_diffusion_width"]); $preset["stable_diffusion_height"] = intval($_POST["stable_diffusion_height"]); $preset["stable_diffusion_aspect_ratio"] = intval($_POST["stable_diffusion_aspect_ratio"]); $preset["stable_diffusion_image_class"] = $_POST["stable_diffusion_image_class"]; $preset["midjourney_image_position"] = $_POST["midjourney_image_position"]; $preset["pixabay_image_position"] = $_POST["pixabay_image_position"]; $preset["pixabay_q"] = addslashes($_POST["pixabay_q"]); $preset["pixabay_lang"] = $_POST["pixabay_lang"]; $preset["pixabay_image_type"] = $_POST["pixabay_image_type"]; $preset["pixabay_orientation"] = $_POST["pixabay_orientation"]; $preset["pixabay_min_width"] = intval($_POST["pixabay_min_width"]); $preset["pixabay_min_height"] = intval($_POST["pixabay_min_height"]); $preset["pixabay_choose"] = intval($_POST["pixabay_choose"]); $preset["pixabay_image_class"] = $_POST["pixabay_image_class"]; $preset["google_image_position"] = $_POST["google_image_position"]; $preset["google_image_query"] = $_POST["google_image_query"]; $preset["google_min_width"] = intval($_POST["google_min_width"]); $preset["google_min_height"] = intval($_POST["google_min_height"]); $preset["google_image_class"] = $_POST["google_image_class"]; $preset["google_image_position"] = $_POST["google_image_position"]; $preset["youtube_position"] = $_POST["youtube_position"]; $preset["youtube_query"] = addslashes($_POST["youtube_query"]); $preset["use_video_custom_filed"] = isset($_POST["use_video_custom_filed"]) ? "on" : ''; $preset["user_agent"] = addslashes($_POST["user_agent"]); $preset["duplicate_check_method"] = addslashes($_POST["duplicate_check_method"]); $preset["disable_2nd_check"] = isset($_POST["disable_2nd_check"]) ? "on" : ''; $preset["http_headers"] = addslashes($_POST["http_headers"]); $preset["http_referrer"] = addslashes($_POST["http_referrer"]); $preset["post_type"] = $_POST["post_type"]; $preset["post_format"] = $_POST["post_format"]; $preset["post_template"] = $_POST["post_template"]; $preset["xml_section_tags"] = $_POST["xml_section_tags"]; $preset["disable_item_tag_autodetect"] = isset($_POST["disable_item_tag_autodetect"]) ? "on" : ''; $preset["template_order"] = $_POST["template_order"]; $preset["preserve_titles"] = isset($_POST["preserve_titles"]) ? "on" : ''; $preset["insert_media_attachments"] = $_POST["insert_media_attachments"]; $preset["custom_text_extractor_tag"] = $_POST["custom_text_extractor_tag"]; $preset["custom_text_extractor_attrbutes"] = $_POST["custom_text_extractor_attrbutes"]; $preset["custom_text_extractor_inclusive"] = isset($_POST["custom_text_extractor_inclusive"]) ? "on" : ''; $preset["post_links_handling"] = $_POST["post_links_handling"]; $preset["set_thumbnail"] = $_POST["set_thumbnail"]; $preset["preferred_gpt_image_source"] = $_POST["preferred_gpt_image_source"]; $preset["parse_archives"] = isset($_POST["parse_archives"]) ? "on" : ''; $preset["remove_outer_elements"] = addslashes($_POST["remove_outer_elements"]); $preset["utf8_encoding"] = isset($_POST["utf8_encoding"]) ? "on" : ''; $preset["convert_encoding"] = isset($_POST["convert_encoding"]) ? "on" : ''; $preset["balances_tags"] = isset($_POST["balances_tags"]) ? "on" : ''; $preset["convert_markdown"] = isset($_POST["convert_markdown"]) ? "on" : ''; $preset["require_thumbnail"] = isset($_POST["require_thumbnail"]) ? "on" : ''; $preset["use_fifu"] = isset($_POST["use_fifu"]) ? "on" : ''; $preset["sanitize"] = isset($_POST["sanitize"]) ? "on" : ''; $preset["store_images"] = isset($_POST["store_images"]) ? "on" : ''; $preset["add_to_media_library"] = isset($_POST["add_to_media_library"]) ? "on" : ''; $preset["store_videos"] = isset($_POST["store_videos"]) ? "on" : ''; $preset["shorten_excerpts"] = addslashes($_POST["shorten_excerpts"]); $preset["tags_to_woocommerce"] = isset($_POST["tags_to_woocommerce"]) ? "on" : ''; $preset["cats_to_woocommerce"] = isset($_POST["cats_to_woocommerce"]) ? "on" : ''; $preset["push_up"] = isset($_POST["push_up"]) ? "on" : ''; $preset["post_lifetime"] = $_POST["post_lifetime"]; $preset["custom_fields"] = addslashes($_POST["custom_fields"]); $preset["alt_post_thumbnail_src"] = addslashes($_POST["alt_post_thumbnail_src"]); $preset["thumb_src_min_width"] = abs(intval($_POST["thumb_src_min_width"])); $preset["thumb_src_max_width"] = abs(intval($_POST["thumb_src_max_width"])); $preset["thumb_src_min_height"] = abs(intval($_POST["thumb_src_min_height"])); $preset["thumb_src_max_height"] = abs(intval($_POST["thumb_src_max_height"])); $preset["strip_tags"] = addslashes($_POST["strip_tags"]); $preset["post_title_template"] = addslashes($_POST["post_title_template"]); $preset["post_slug_template"] = addslashes($_POST["post_slug_template"]); $preset["post_content_template"] = addslashes($_POST["post_content_template"]); $preset["post_excerpt_template"] = addslashes($_POST["post_excerpt_template"]); $preset["meta_description_template"] = addslashes($_POST["meta_description_template"]); $preset["php_code"] = addslashes($_POST["php_code"]); $preset["preprocess_source_php"] = addslashes($_POST["preprocess_source_php"]); $preset["parse_spintax"] = isset($_POST["parse_spintax"]) ? "on" : ''; $preset["remove_emojis_from_slugs"] = isset($_POST["remove_emojis_from_slugs"]) ? "on" : ''; if (!isset($_POST["custom_taxonomies"])) { goto A5WNm; } $preset["custom_taxonomies"] = $_POST["custom_taxonomies"]; A5WNm: header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=" . ".preset"); header("Content-Type: text/xml; charset=" . get_option("blog_charset"), true); echo serialize($preset); exit; xK4Es: goto Sk99G; EiXI_: add_action("wp_loaded", [$cseo, "cron_init"]); add_filter("cron_schedules", [$cseo, "add_custom_cron_interval"]); if (!(($_GET["pull-feeds"] ?? '') === get_option(CSEO_CRON_MAGIC))) { goto Vag7b; } require_once ABSPATH . "wp-admin/includes/taxonomy.php"; add_action("shutdown", [$cseo, "update_feeds"]); Vag7b: if (!(get_option(CSEO_LINK_TO_SOURCE) === "on")) { goto bQzls; } add_filter("post_link", [$cseo, "permalink"]); bQzls: if (!(get_option(CSEO_URLS_ENCRYPT) === "on")) { goto n_1hP; } add_action("template_redirect", [$cseo, "page_template_redirect"]); n_1hP: add_filter("the_content", [$cseo, "the_content"]); add_filter("wp_footer", [$cseo, "wp_footer"]); if (!(get_option(CSEO_SERVER_MODE) === "on")) { goto ATgQc; } add_filter("the_post", [$cseo, "the_post"]); add_filter("the_title", [$cseo, "modify_title"]); add_filter("wp_title", [$cseo, "modify_title"]); add_filter("the_content", [$cseo, "apply_runtime_changes"]); add_filter("the_excerpt", [$cseo, "apply_runtime_changes"]); add_filter("document_title_parts", [$cseo, "document_title_parts"]); add_filter("the_excerpt_rss", [$cseo, "excerpt_rss"]); ATgQc: if (!(get_option(CSEO_POST_IMAGES) !== "keep" || get_option(CSEO_URLS_NOFOLLOW) === "on" || get_option(CSEO_URLS_NOREFERRER) === "on" || get_option(CSEO_URLS_TARGET_BLANK) === "on" || get_option(CSEO_URLS_ENCRYPT) === "on")) { goto gJqJq; } add_filter("the_content", [$cseo, "runtime_post_modification"]); add_filter("the_excerpt", [$cseo, "runtime_post_modification"]); gJqJq: if (!isset($_GET["custom_tags"])) { goto si31J; } add_action("rss2_item", [$cseo, "rss2_item"]); si31J: if (!count(get_option(CSEO_COMMENT_CAMPAIGNS))) { goto x0MrN; } add_filter("template_redirect", [$cseo, "add_auto_comment"]); x0MrN: if (!(get_option(CSEO_POST_IMAGES) === "hide_featured_in_single")) { goto UDgPp; } add_filter("post_thumbnail_html", [$cseo, "hide_thumbnail"]); UDgPp: if (!(time() - get_option(CSEO_POST_LIFE_CHECK_DATE) > CSEO_POST_LIFE_CHECK_PERIOD)) { goto PDTcR; } $post_ids = $wpdb->get_col("SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_key = 'cyberseo_post_lifetime' AND meta_value < " . time() . " AND meta_value NOT IN (0, 2147483647)"); if (!(count($post_ids) > 0)) { goto KueMz; } foreach ($post_ids as $post_id) { $cseo->delete_post_media($post_id); wp_delete_post($post_id, true); MDPbC: } K6upn: KueMz: update_option(CSEO_POST_LIFE_CHECK_DATE, time()); PDTcR: Sk99G: register_deactivation_hook(__FILE__, [$cseo, "deactivation"]); add_filter("sanitize_title", [$cseo, "sanitize_title"]); if (!(get_option(CSEO_KEEP_IMAGES) !== "on")) { goto J2fu6; } add_action("before_delete_post", [$cseo, "delete_post_media"]); J2fu6: if (get_option(CSEO_CHECK_DATE) == 0) { goto uLhxj; } if (isset($_POST["cseo_update"])) { goto kJmdh; } goto YvO2Y; uLhxj: $cseo->maintenance(true); goto YvO2Y; kJmdh: if (!function_exists("check_admin_referer")) { require_once ABSPATH . "wp-includes/pluggable.php"; } if (!check_admin_referer("cseo_update")) { goto HaFNM; } $cseo->maintenance(false, true); HaFNM: YvO2Y: if (!(strlen(get_option(CXXX_REG_NAME)) && strlen(get_option(CXXX_REG_EMAIL)))) { goto N8prQ; } function cseo_main_menu() { $icon = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3Jn" . "L0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94" . "bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgMjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPiAgPGltYWdlIGlkPSJp" . "bWFnZTAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgeD0iMCIgeT0iMCIKICAgIGhyZWY9ImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBQlFBQUFBVUNBTUFBQUM2ViswL0FBQUFCR2RCVFVFQUFMR1BDL3ho" . "QlFBQUFDQmpTRkpOCkFBQjZKZ0FBZ0lRQUFQb0FBQUNBNkFBQWRUQUFBT3BnQUFBNm1BQUFGM0NjdWxFOEFBQUI3RkJNVkVYLy8vLzE5UFB5OHZERHY3YSsKdWJYeDhPL3o4L0w3K3ZxN3Nxdkl3cm4vL3Y2dnFabll5N0w0OU8zczZ1YWNsSURa" . "MWRLcG9ZN0h3Ny9Jdzc5N2RXMmNsSC9OdnAzZgp6ck9xbzVIRXdMVGkyY2Z0NDlQTnliNi91YkQyOVBQT3lzYnU3ZTN3OE8zYTFNcjYrUGZCdkxqVHpzank4ZkRmM05uaTROdnk4T3paCjF0RC8vLy8vLy8vNit2bng4TzcvL3Y3cDUrUDE4L0w5" . "L1B2dzcrejUrZmYvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KL3YvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLzA4L1ArL2YzLy92NzE5UFAvLy8vLwovLy9Qd0tMLy8vLy8vLy8z" . "OS9hNnQ3VEx5TVgwOC9QLy8vLzA5UFRRemN2ZTJkYTZ0clAyOXZYLy8vLy8vLy9lejdTd3FwbnA1dC8vCi8vL3o4L0oyY0dpdnFxWHY3Kzd4OFBDdnFxWHk4ZkgvLy8vLy8vL3Q2dVc5dDZqMDlQTC8vLy8vLy8vNysvdlF6c3ZwNStmRndyLzUK" . "K2ZuNit2ckN3THptNU9QTHljZjYrdnIvLy8vLy8vLzI5dlhuNXVMLy8vLy8vLy8vLy8vKy9mMy8vLy85L1B6Ly8vL3M2K2VtbjQzZgoyczcvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vbTRkYXpyWjMvLy8vLy8vLy8vLy8vLy8vLy8vLy8v" . "Ly8vLy8vLy8vLy8vLy8vCi8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLytYYUFON0FBQUFvM1JTVGxNQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUEKQUFBQUFBQUFBQmU5SmFHd0tjSWRicStEZ2ExMEZ6UXdWdGhnV2RsYk1CdE51" . "OHJIdzhYRXlyNVZLZGJSMk5MTXo5VXpXOUNpeHNtbQoyV3NPWjlmTFNrdkl6c3BWQlVySzJuWU5NSTlpdlFFRHRiZ0p0ZHh0aVQyV3FsblFYUmRmemMxZkZWUE1acG1haGExYTFNUFR2YUNPCkdYRE5hVVJHWDh0eWJTTklZOGx4TFRoWXhtRUhV" . "bmgxZEZjSnNtN1hCZ0FBQUFGaVMwZEVBSWdGSFVnQUFBQUpjRWhaY3dBQUN4TUEKQUFzVEFRQ2FuQmdBQUFBSGRFbE5SUWZtQlIwRklTOUgzN2hjQUFBQkgwbEVRVlFZMDJOZ0lCb3dBZ0VUczZ5Y3ZJS2lrcklLQ3lzYgpFRUJrMkRsVTFkUTFO" . "TFU0dVJDcXRYVjA5ZlFOREkyTVRYUk1ZV0ptNWhhV1ZoYldOclpXbGhaMjloQXhCMHRISjJjWFZ6YzNWeWRuCkozZFhENkFRTjQrbm81ZWx0NCticTZ1YnI1K2xtMzhBTHg4RGYyQlFjRWlvUUZpNFcwUmtWSFJNYkZ4OGdpQkRZbEp5Y0VxcVVG" . "cTYKazFOR3ByQklWblpPYmg1RGZrR2hlMUZ4U1dsWlJFUjVSV1ZWZFZ4TmJSMURmVU5qVTRSWHMxZUxpMHVMVjJ0RWhIOU5XenREUjJkTgpVNWRyaEZkM1QyOWZ2MXVYcS9PRWlaTVlSTVdTSGJ1QU51ZE1uanhsS3BEaFAwMWNna0ZTYW5wL1Uw" . "U0VXNU9MUzVOYlJFU0wxd3hwCkdaRHJaMXIzVzFoWTlJT0pXYk9oM3B3emQ5NzhCUkF3YitFaTRnTVlGd0FBWUFWVDMwWjZ6L3dBQUFBbGRFVllkR1JoZEdVNlkzSmwKWVhSbEFESXdNakl0TURVdE1qbFVNREk2TXpNNk5EY3JNRE02TURCVTBF" . "c0NBQUFBSlhSRldIUmtZWFJsT20xdlpHbG1lUUF5TURJeQpMVEExTFRJNVZEQXlPak16T2pRM0t6QXpPakF3SlkzenZnQUFBQUJKUlU1RXJrSmdnZz09IiAvPgo8L3N2Zz4K"; add_menu_page("Feed Syndicator", "CyberSEO Pro", "manage_options", "cyberseo", "cseo_xml_syndicator_menu", $icon); add_submenu_page("cyberseo", "General Settings", "General Settings", "manage_options", "cyberseo_general_settings", "cseo_options_menu"); add_submenu_page("cyberseo", "Accounts", "Accounts", "manage_options", "cyberseo_accounts", "cseo_accounts_menu"); add_submenu_page("cyberseo", "Post Modification Tools", "Modification Tools", "manage_options", "cyberseo_tools", "cseo_tools_menu"); add_submenu_page("cyberseo", "Synonymizer/Rewriter", "Synonymizer/Rewriter", "manage_options", "cyberseo_synonymizer", "cseo_synonymizer_menu"); add_submenu_page("cyberseo", "Duplicate Post Finder", "Duplicate Post Finder", "manage_options", "cyberseo_duplicate_post_finder", "cseo_duplicate_post_finder_menu"); add_submenu_page("cyberseo", "Auto-comments", "Auto-comments", "manage_options", "cyberseo_auto_comments", "cseo_auto_comments_menu"); add_submenu_page("cyberseo", "Syndicator log", "Syndicator log", "manage_options", "cyberseo_syndicator_log", "cseo_syndicator_log_menu"); } N8prQ:
// CORE END ?>
Did this file decode correctly?
Original Code
// CORE BEGIN
// CORE VERSION [11.140]
define("\x43\x53\x45\117\x5f\x43\x52\x4f\x4e\x5f\x4d\x41\107\x49\103", "\143\170\x78\x78\x5f\143\x72\x6f\x6e\x5f\155\x61\x67\x69\x63"); define("\103\x53\x45\x4f\137\x50\122\x45\126\x49\117\125\x53\x5f\126\x45\x52\123\x49\x4f\116", "\x63\170\170\170\137\x70\x72\x65\x76\151\157\x75\x73\137\166\145\x72\x73\x69\x6f\x6e"); define("\x43\123\105\x4f\x5f\x4d\101\x58\137\103\x55\x52\114\137\122\x45\104\x49\x52\x45\x43\x54\123", 20); define("\103\123\105\x4f\137\101\125\124\117\x5f\x55\120\x44\x41\x54\x45\x5f\120\105\122\111\x4f\x44", 86400); define("\103\123\105\117\137\x50\117\123\x54\x5f\114\x49\106\105\137\x43\x48\105\103\x4b\137\120\105\122\111\117\x44", 3600); define("\x43\x53\105\x4f\137\115\111\x4e\x5f\125\x50\x44\x41\x54\x45\137\x54\111\x4d\105", 5); define("\x43\123\x45\x4f\137\103\125\122\x4c\137\x55\x53\105\x52\137\x41\107\105\116\x54", "\x4d\x6f\x7a\x69\x6c\154\x61\x2f\x35\x2e\60\40\50\127\x69\156\x64\157\x77\163\x20\x4e\x54\40\61\60\56\60\73\40\127\151\156\x36\64\x3b\x20\x78\x36\64\x29\40\101\x70\160\x6c\145\x57\x65\142\x4b\x69\x74\57\65\63\x37\56\x33\66\x20\50\113\110\x54\x4d\x4c\x2c\x20\154\x69\x6b\x65\40\107\145\x63\x6b\157\51\x20\103\150\x72\x6f\155\x65\x2f\61\x31\x34\x2e\60\x2e\60\56\60\40\123\141\146\x61\x72\151\x2f\x35\x33\x37\56\x33\66"); define("\103\x53\105\x4f\137\x43\x48\x45\x43\x4b\x5f\x44\101\x54\105", "\143\x78\170\x78\x5f\x63\x68\145\143\153\144\141\164\145"); define("\x43\123\x45\117\x5f\120\117\123\124\137\114\111\x46\x45\137\x43\x48\x45\x43\113\x5f\x44\x41\x54\x45", "\x63\x78\x78\170\137\160\x6f\163\x74\x5f\154\x69\146\145\137\143\x68\x65\143\x6b\x5f\144\141\164\145"); define("\x43\123\105\x4f\x5f\120\x52\105\x53\x45\x54\x5f\104\x49\x52", "\143\x78\x78\x78\137\160\162\x65\x73\145\164\x5f\x64\151\x72"); define("\x43\x53\105\x4f\x5f\x41\x43\103\117\x55\116\x54\x53", "\x63\x78\170\170\137\141\143\x63\141\165\x6e\164\163"); define("\103\123\105\x4f\x5f\x54\x4f\x54\x44", "\x63\170\170\x78\x5f\x74\157\164\x64"); define("\x43\x53\105\117\x5f\122\x45\x50\114\x41\103\105\115\105\x4e\x54\123", "\143\x78\x78\x78\137\162\x65\x70\x6c\x61\143\x65\x6d\145\x6e\164\163"); define("\103\123\x45\117\137\120\x52\117\130\x59\x5f\x4c\111\123\124", "\x63\x78\x78\170\137\160\162\157\170\x79\137\154\x69\163\x74"); define("\x43\123\x45\x4f\x5f\x53\105\122\x56\x45\122\x5f\x4d\x4f\104\x45", "\x63\170\170\x78\137\162\163\x73\x5f\x73\145\162\166\145\162\137\x6d\157\x64\145"); define("\103\x53\x45\117\137\120\x4f\123\124\x5f\x49\115\101\x47\x45\123", "\x63\x78\x78\170\137\160\157\x73\164\x5f\151\155\x61\147\145\163"); define("\103\123\x45\117\x5f\125\x52\114\x53\x5f\116\x4f\106\117\114\x4c\117\x57", "\x63\x78\x78\x78\137\165\162\154\x73\x5f\x6e\157\146\x6f\x6c\154\x6f\167"); define("\x43\x53\105\x4f\137\x44\105\106\101\125\114\124\137\x41\111\x5f\x4d\117\104\105\114", "\143\x78\x78\x78\137\x64\x65\146\141\165\154\164\x5f\141\x69\x5f\155\x6f\144\x65\x6c"); define("\103\123\x45\x4f\x5f\125\122\x4c\123\137\116\117\122\x45\106\105\122\x52\x45\122", "\143\x78\x78\x78\137\165\162\154\163\x5f\156\x6f\162\x65\x66\145\x72\162\145\162"); define("\x43\123\105\117\137\x55\122\114\123\x5f\105\x4e\103\122\131\x50\124", "\x63\170\x78\x78\x5f\165\x72\154\x73\137\x65\x6e\143\x72\x79\x70\x74"); define("\103\x53\x45\117\x5f\x55\x52\x4c\x53\137\124\101\122\107\105\124\137\102\114\101\116\113", "\x63\x78\x78\x78\137\x75\x72\154\163\x5f\164\x61\162\x67\145\164\137\x62\154\x61\156\153"); define("\x43\123\x45\117\137\106\105\x45\x44\x5f\x4f\120\x54\111\x4f\x4e\123", "\x63\x78\170\x78\x5f\x66\145\145\x64\137\x6f\160\164\x69\157\x6e\163"); define("\x43\123\105\117\x5f\106\105\x45\104\x53\x5f\125\120\104\101\124\105\104", "\143\170\170\170\137\146\x65\x65\x64\163\x5f\165\x70\144\141\164\145\x64"); define("\103\123\105\117\137\x47\x4e\x43\x41\103\110\105", "\x63\170\x78\x78\x5f\x67\156\x63\x61\143\x68\x65"); define("\x43\123\105\117\x5f\103\x4f\x4d\x4d\x45\116\x54\x5f\x43\101\x4d\120\x41\111\107\116\123", "\143\170\x78\x78\137\143\x6f\x6d\155\x65\156\x74\x5f\143\x61\x6d\x70\141\x69\147\156\163"); define("\x43\x53\105\117\137\103\117\x4d\x4d\105\x4e\x54\x5f\x41\125\124\110\117\x52\x53", "\x63\x78\x78\x78\137\x63\x6f\x6d\155\x65\156\x74\x5f\x61\165\164\150\x6f\162\163"); define("\x43\x53\x45\x4f\137\x43\x4f\x4d\115\x45\116\x54\123\x5f\120\117\x53\x54\105\104", "\143\170\170\x78\137\143\157\155\155\x65\x6e\x74\163\x5f\160\157\x73\164\145\x64"); define("\103\123\105\x4f\137\x53\131\116\104\x49\103\101\x54\105\104\137\x46\x45\x45\x44\123", "\143\x78\x78\170\137\x73\171\x6e\x64\x69\143\x61\x74\x65\x64\137\x66\145\x65\144\163"); define("\103\123\x45\117\x5f\122\123\x53\x5f\120\x55\x4c\x4c\137\x4d\117\104\105", "\143\170\170\x78\x5f\162\x73\163\x5f\160\165\154\154\x5f\x6d\157\144\x65"); define("\x43\123\x45\x4f\137\x52\x41\x4e\x44\137\123\x48\x41", "\x63\170\170\x78\x5f\x72\141\x6e\x64\x5f\x73\x68\x61"); define("\x43\123\x45\117\x5f\x50\x43\x5f\x49\116\x54\105\x52\x56\101\x4c", "\x63\170\170\170\137\x70\163\x65\165\x64\x6f\x5f\143\162\157\156\137\151\x6e\x74\145\162\166\x61\x6c"); define("\x43\123\x45\117\137\x46\105\105\x44\x5f\120\x55\x4c\114\x5f\124\111\x4d\x45", "\143\170\170\x78\137\146\x65\145\x64\x5f\160\x75\154\x6c\x5f\x74\151\155\145"); define("\x43\x53\x45\x4f\137\x44\x4e\x50\x53\x4f\120", "\x63\x78\x78\x78\137\x64\156\x70\x73\x6f\160"); define("\103\123\105\117\x5f\115\x41\130\x5f\105\130\105\x43\137\x54\111\115\x45", "\143\x78\x78\170\137\x6d\x61\170\x5f\x65\170\x65\x63\137\x74\x69\155\145"); define("\x43\123\x45\x4f\137\105\116\x41\102\114\x45\x5f\104\105\x42\125\x47\137\115\x4f\x44\x45", "\143\x78\170\x78\x5f\x65\156\141\142\154\145\x5f\x64\x65\x62\x75\147\x5f\155\157\x64\x65"); define("\x43\123\105\117\x5f\x45\x4e\101\x42\114\x45\137\115\122\x50", "\143\170\x78\170\x5f\x65\x6e\x61\142\x6c\145\x5f\155\162\160"); define("\x43\123\x45\x4f\x5f\123\117\x52\124\137\106\105\x45\x44\x5f\x53\x4f\125\122\103\x45\x53", "\143\x78\170\170\x5f\x73\157\162\x74\x5f\146\145\145\x64\x5f\163\157\x75\x72\143\145\163"); define("\103\x53\x45\x4f\x5f\x53\x48\125\106\106\x4c\105\137\120\x52\117\x58\x49\x45\123", "\x63\x78\x78\170\137\163\150\x75\146\146\154\145\x5f\160\x72\157\x78\151\145\163"); define("\103\x53\105\x4f\137\114\111\x4e\113\x5f\124\x4f\x5f\123\117\125\x52\103\105", "\143\x78\170\x78\x5f\154\151\156\x6b\x5f\164\x6f\137\x73\157\x75\162\143\x65"); define("\103\123\105\117\137\101\x55\x54\117\111\x4e\123\x54\101\114\114\137\106\x54\x52\123\123", "\x63\170\170\170\x5f\x61\x75\x74\157\x69\x6e\x73\164\x61\x6c\154\137\x66\x6c\x72\163\x73"); define("\103\x53\105\x4f\137\115\x4f\x52\x45", "\x3c\x21" . "\x2d\55\155\157\162\145\55\55" . "\x3e"); define("\x43\x53\105\x4f\x5f\114\x4f\x47", "\143\x78\x78\x78\137\160\141\162\x73\x65\x5f\x66\145\145\144\137\x6c\157\x67"); define("\103\123\105\x4f\137\102\x4c\x4f\103\x4b\x5f\x44\x49\126\x49\104\105\122", "\70\x32\x35\66\67\60\66\62\62\x31\67\63"); define("\x43\123\105\x4f\137\x4d\x41\123\113", "\66\61\62\65\61\x32\67\x31\x33\x38\x34\x31"); define("\103\x53\x45\117\x5f\104\125\115\115\x59\x5f\106\105\x45\x44\x5f\x50\101\124\x54\105\x52\116", "\x2f\x5e\134\x23\x5c\x64\x2b\x24\57"); define("\103\x53\x45\117\x5f\x4b\x45\105\120\137\111\115\x41\107\105\x53", "\x63\x78\x78\x78\x5f\x6b\145\x65\160\137\x69\155\141\147\145\x73"); define("\103\123\105\117\137\104\111\123\101\102\x4c\x45\137\x53\120\111\116\116\x45\x52", "\x30"); define("\x43\123\105\x4f\x5f\123\x50\x49\x4e\116\105\122\103\x48\x49\x45\x46", "\x31"); define("\103\123\105\117\x5f\123\x50\x49\x4e\x52\105\x57\122\111\x54\x45\122", "\62"); define("\103\123\105\117\x5f\103\x48\111\x4d\120\122\x45\127\122\x49\124\x45\122", "\x33"); define("\x43\x53\x45\117\137\127\117\122\x44\x41\111", "\65"); define("\103\123\x45\x4f\x5f\105\x53\120\x49\116\116\105\x52", "\66"); define("\103\x53\x45\117\x5f\x58\123\x50\111\x4e\116\105\x52", "\x37"); define("\103\123\x45\x4f\137\x54\105\130\124\117\122\x4f\x42\x4f\x54", "\x38"); define("\103\x53\x45\117\137\101\111\x5f\123\x50\111\x4e\x4e\x45\122", "\x39"); const CSEO_AI_ENGINES_REG = ["\x6f\160\x65\x6e\x61\x69\55\147\x70\x74\x2d\x34\157\55\155\x69\156\x69" => "\x4f\160\145\156\101\x49\x20\107\120\124\x2d\64\157\x20\x6d\151\156\x69", "\x6f\160\x65\x6e\141\x69\x2f\147\160\x74\x2d\64\x6f\x2d\155\x69\156\151" => "\117\x70\x65\x6e\x41\111\40\107\120\124\x2d\64\x6f\40\x6d\151\156\x69\x20\x28\x4f\160\145\156\x52\157\165\164\x65\x72\x29", "\157\x70\x65\x6e\141\151\55\x67\160\164\x2d\x34\157" => "\x4f\160\x65\x6e\101\x49\x20\107\120\x54\55\64\157", "\157\160\145\156\x61\x69\57\147\160\164\x2d\64\x6f" => "\117\160\x65\156\101\x49\40\107\x50\x54\55\64\x6f\40\x28\x4f\160\x65\x6e\122\x6f\165\x74\145\x72\x29", "\x6f\160\x65\156\x61\x69\55\x67\160\164\x2d\x34\55\x33\x32\153" => "\x4f\x70\x65\x6e\101\x49\40\107\x50\124\55\64\x20\x33\x32\x6b", "\157\x70\x65\x6e\141\x69\57\147\x70\x74\55\x34\x2d\63\x32\153" => "\x4f\x70\145\156\x41\x49\40\107\120\x54\55\x34\x20\63\62\x6b\40\50\x4f\x70\145\156\122\157\165\x74\x65\x72\x29", "\x6f\160\x65\x6e\x61\151\55\x67\160\164\55\x33\56\65\55\164\165\x72\x62\157\55\x31\66\x6b" => "\117\160\x65\156\101\x49\x20\107\120\124\x2d\63\56\x35\40\x54\x75\162\142\x6f\x20\x31\66\153", "\x6f\x70\x65\156\141\151\57\147\x70\x74\x2d\x33\56\x35\55\x74\165\162\x62\x6f\55\61\66\x6b" => "\117\160\145\x6e\101\111\40\107\120\x54\55\x33\x2e\65\x20\x54\x75\x72\142\157\x20\x31\x36\153\x20\50\117\x70\145\156\x52\157\165\164\x65\x72\51", "\x6f\x70\145\x6e\141\151\55\x6f\61\x2d\155\x69\x6e\151" => "\117\160\x65\156\x41\111\40\157\61\x20\155\151\156\x69", "\157\x70\145\156\x61\x69\x2f\x6f\61\x2d\155\151\x6e\151" => "\117\x70\145\156\101\111\40\157\x31\40\x6d\151\156\x69\x20\x28\x4f\x70\145\x6e\122\x6f\165\x74\x65\162\51", "\141\156\x74\x68\x72\x6f\x70\x69\143\x2d\150\x61\x69\x6b\165" => "\101\x6e\164\x68\162\x6f\x70\x69\x63\x20\103\154\141\x75\x64\x65\40\63\56\x35\40\110\141\x69\153\x75", "\x61\x6e\164\x68\x72\157\x70\x69\143\x2d\143\x6c\141\x75\x64\x65" => "\x41\156\x74\150\162\157\160\151\x63\x20\x43\154\x61\x75\x64\145\x20\x33\56\65\x20\123\x6f\156\156\145\x74", "\x61\156\x74\150\x72\157\160\x69\x63\x2f\x63\x6c\141\165\x64\x65\x2d\63\x2d\65\x2d\150\141\151\153\165\72\142\x65\x74\141" => "\101\156\164\150\162\157\160\151\x63\x20\103\154\x61\x75\x64\145\x20\x33\x2e\x35\x20\x48\x61\151\153\x75\x20\50\x4f\160\x65\x6e\122\157\x75\164\x65\x72\51", "\x61\156\x74\x68\x72\x6f\x70\151\x63\x2f\143\x6c\141\165\144\x65\55\63\56\65\x2d\163\157\x6e\x6e\145\x74" => "\x41\156\x74\x68\x72\157\x70\151\143\40\103\x6c\141\165\x64\x65\x20\63\56\65\x20\123\157\156\x6e\145\x74\40\50\x4f\160\x65\x6e\x52\157\x75\x74\x65\x72\51", "\141\x6e\x74\150\162\x6f\160\x69\x63\57\143\154\x61\165\144\x65\55\63\55\x73\157\156\156\145\164" => "\x41\x6e\x74\150\x72\x6f\x70\151\x63\40\x43\154\x61\165\144\x65\x20\x33\40\x53\x6f\156\x6e\145\164\x20\50\117\160\x65\x6e\x52\157\x75\164\x65\x72\51", "\x67\157\157\147\x6c\145\55\147\x65\x6d\151\156\x69\x2d\x70\162\157" => "\107\157\157\x67\x6c\x65\40\x47\x65\x6d\151\156\151\x20\120\162\157\x20\61\56\x35", "\147\157\157\x67\154\x65\x2f\x67\145\155\x69\156\151\55\160\x72\157\55\x31\x2e\x35" => "\x47\157\x6f\x67\154\145\40\x47\x65\155\151\156\151\40\x50\x72\x6f\x20\x31\x2e\x35\x20\50\x4f\x70\145\156\122\157\x75\164\145\x72\51", "\x67\157\x6f\147\154\x65\55\x67\145\155\x69\156\x69\55\146\154\141\163\150" => "\107\157\x6f\x67\154\145\40\x47\145\x6d\151\x6e\x69\x20\106\154\141\x73\150\x20\61\56\x35", "\x67\x6f\157\147\x6c\x65\x2f\x67\145\x6d\151\x6e\151\x2d\146\x6c\x61\x73\x68\55\x31\56\x35" => "\x47\x6f\157\x67\x6c\x65\x20\107\145\155\x69\x6e\x69\40\x46\154\x61\x73\x68\40\61\56\65\40\50\x4f\160\145\156\x52\157\x75\x74\145\x72\51", "\170\141\151\x2d\x67\162\x6f\153" => "\x78\x41\x49\x20\x47\162\x6f\153", "\x78\x2d\141\x69\x2f\147\x72\x6f\x6b\x2d\142\145\164\141" => "\x78\101\111\x20\x47\162\157\x6b\x20\x28\117\x70\145\x6e\x52\x6f\165\x74\x65\x72\x29", "\155\x65\164\141\x2d\x6c\154\141\155\141\57\x6c\154\141\x6d\141\x2d\63\56\x31\x2d\x34\x30\65\x62\55\x69\x6e\163\x74\x72\x75\x63\164" => "\115\x65\164\x61\40\114\x6c\141\155\x61\40\63\56\61\40\64\60\x35\x42\40\50\x4f\160\145\156\122\x6f\165\x74\145\162\x29", "\x70\145\x72\160\x6c\145\170\x69\164\x79\x2f\154\x6c\x61\x6d\x61\x2d\x33\x2e\61\55\163\x6f\x6e\x61\x72\55\150\165\147\x65\55\x31\62\x38\153\x2d\x6f\156\154\x69\x6e\x65" => "\120\x65\x72\x70\x6c\x65\x78\x69\164\171\x20\114\154\141\155\x61\x20\x33\x2e\x31\x20\x53\x6f\156\141\x72\x20\64\60\x35\102\x20\117\x6e\x6c\151\x6e\x65\40\50\117\160\145\156\122\x6f\x75\x74\145\162\x29", "\x6d\151\x73\164\x72\141\x6c\141\151\x2f\x6d\x69\x73\x74\162\x61\154\x2d\x6c\141\x72\x67\145" => "\x4d\151\163\164\162\x61\x6c\x20\x4c\x61\x72\x67\x65\x20\x28\117\160\145\156\x52\157\165\x74\x65\162\x29", "\x70\x65\x72\160\154\145\x78\151\164\171\57\154\x6c\x61\155\141\55\63\56\61\x2d\x73\x6f\156\x61\162\55\154\141\162\x67\145\55\61\62\x38\x6b\55\157\156\154\151\x6e\145" => "\120\145\162\x70\x6c\145\170\151\x74\x79\x20\x4c\154\x61\x6d\x61\40\63\56\x31\x20\123\157\x6e\x61\162\40\x37\x30\102\x20\117\156\154\151\156\145\40\50\x4f\x70\145\x6e\x52\157\165\x74\145\x72\51", "\160\145\x72\x70\154\x65\x78\151\164\171\57\154\x6c\141\x6d\x61\x2d\x33\x2e\x31\x2d\x73\x6f\x6e\x61\x72\x2d\x68\165\x67\x65\55\61\x32\70\x6b\55\x6f\156\154\x69\156\x65" => "\x50\x65\x72\160\154\x65\170\x69\164\x79\x20\x4c\x6c\141\x6d\x61\x20\63\x2e\61\40\x53\157\x6e\x61\162\40\64\60\x35\x42\x20\117\x6e\x6c\x69\156\x65\40\x28\117\x70\145\x6e\122\157\x75\x74\x65\162\x29"]; const CSEO_DEFAULT_AI_ENGINES_REG = ["\x6f\x70\x65\156\141\151\x2d\147\x70\x74\55\x34\157\55\155\151\156\x69" => "\117\x70\145\x6e\x41\x49\x20\x47\x50\x54\55\64\157\x20\x6d\x69\156\x69", "\x6f\x70\x65\x6e\x61\151\57\147\160\164\x2d\x34\157\x2d\x6d\x69\x6e\x69" => "\117\x70\x65\156\x41\111\40\107\x50\124\x2d\64\157\40\155\x69\x6e\151\x20\50\x4f\x70\x65\156\x52\x6f\165\164\145\162\51", "\x61\156\164\150\x72\x6f\x70\151\143\x2d\150\x61\151\153\165" => "\x41\x6e\164\150\162\x6f\x70\x69\x63\40\x43\154\141\x75\144\x65\x20\x33\x2e\65\x20\110\141\151\153\165", "\x61\x6e\x74\x68\x72\157\160\151\143\57\143\x6c\141\x75\x64\145\x2d\63\55\65\x2d\150\x61\x69\153\x75\72\x62\x65\x74\141" => "\x41\x6e\164\150\x72\x6f\160\x69\x63\40\103\x6c\141\165\x64\145\x20\x33\x2e\65\40\x48\141\151\153\x75\40\x28\x4f\x70\145\x6e\x52\157\165\164\x65\x72\x29", "\147\157\157\x67\x6c\x65\55\147\x65\155\x69\x6e\x69\x2d\x66\x6c\x61\x73\x68" => "\107\157\x6f\x67\x6c\x65\40\107\145\155\x69\156\151\40\61\56\x35\40\106\154\141\163\150", "\147\x6f\157\147\154\x65\57\x67\145\x6d\x69\156\x69\55\146\x6c\141\x73\150\55\61\56\65" => "\107\x6f\157\x67\154\145\40\107\145\x6d\x69\x6e\151\x20\x31\56\65\x20\106\154\141\163\x68\40\50\x4f\160\145\x6e\122\157\x75\x74\145\162\51", "\157\x70\145\x6e\141\151\55\157\61\x2d\155\151\x6e\151" => "\x4f\x70\x65\156\101\x49\x20\157\61\40\x6d\151\x6e\x69", "\157\x70\145\x6e\x61\x69\x2f\157\61\x2d\x6d\151\156\x69" => "\x4f\160\x65\156\101\x49\40\x6f\x31\40\155\x69\156\x69\40\50\117\160\145\156\x52\x6f\x75\164\x65\162\x29", "\x78\x61\151\55\147\x72\157\153" => "\170\x41\111\x20\107\x72\x6f\153", "\170\55\x61\151\x2f\x67\x72\x6f\153\x2d\x62\x65\164\141" => "\x78\101\111\x20\x47\162\x6f\153\x20\x28\117\160\x65\156\122\157\x75\x74\x65\x72\51", "\x70\145\162\160\x6c\145\x78\x69\164\171\57\x6c\154\x61\x6d\141\x2d\63\x2e\61\x2d\x73\x6f\156\141\x72\55\x73\x6d\x61\x6c\x6c\55\x31\x32\70\153\55\x6f\156\154\x69\156\x65" => "\120\x65\162\x70\x6c\x65\x78\x69\164\171\x20\114\x6c\141\x6d\141\40\x33\56\61\x20\x53\157\156\x61\162\40\x38\x42\40\x4f\156\154\151\x6e\145\40\x28\x4f\x70\x65\156\x52\157\x75\164\x65\x72\51", "\160\145\162\160\x6c\145\x78\151\164\171\57\154\x6c\141\x6d\x61\55\63\56\x31\55\x73\157\156\x61\162\x2d\x6c\141\162\x67\x65\x2d\61\x32\x38\x6b\55\x6f\x6e\x6c\x69\156\145" => "\120\x65\x72\x70\154\145\x78\x69\x74\x79\40\114\154\x61\155\141\x20\x33\x2e\x31\x20\123\x6f\156\141\x72\40\67\x30\102\40\x4f\x6e\x6c\151\x6e\x65\40\x28\117\x70\x65\x6e\122\157\x75\x74\x65\x72\x29"]; const CSEO_AI_RWTR_ENGINES_REG = ["\x6f\160\145\x6e\x61\151\55\x67\x70\x74\55\x34\157\55\155\x69\x6e\x69" => "\x4f\x70\145\x6e\101\111\x20\x47\120\124\55\x34\157\x20\x6d\151\156\151", "\157\160\145\156\x61\x69\57\147\160\x74\55\64\157\55\x6d\151\x6e\151" => "\117\x70\145\x6e\x41\111\x20\x47\x50\x54\x2d\x34\x6f\x20\x6d\151\156\151\x20\50\x4f\160\145\x6e\x52\x6f\x75\x74\x65\x72\51", "\157\x70\x65\x6e\x61\x69\55\147\160\x74\x2d\64\157" => "\x4f\160\x65\x6e\x41\x49\x20\x47\120\x54\x2d\64\157", "\x6f\x70\x65\x6e\x61\x69\x2f\x67\x70\x74\55\64\x6f" => "\117\160\x65\x6e\101\x49\x20\107\120\124\x2d\64\x6f\x20\x28\117\x70\145\156\x52\157\165\164\145\162\51", "\147\157\157\x67\154\x65\55\x67\145\x6d\151\156\x69\x2d\146\x6c\x61\x73\x68" => "\107\157\x6f\x67\154\x65\x20\x47\x65\x6d\151\x6e\x69\x20\61\x2e\65\x20\106\x6c\141\x73\x68", "\x67\x6f\x6f\147\154\x65\x2f\147\x65\155\151\156\x69\x2d\x66\x6c\x61\x73\150\55\x31\x2e\x35" => "\x47\157\157\x67\154\x65\40\x47\x65\155\x69\156\151\40\61\56\x35\x20\106\154\x61\163\150\x20\x28\117\160\145\156\x52\157\165\164\145\162\51", "\155\x69\163\x74\162\141\154\x61\151\x2f\155\x69\x73\164\x72\x61\x6c\55\154\141\x72\147\145" => "\115\151\x73\x74\162\141\154\40\x4c\x61\x72\x67\x65\x20\x28\x4f\x70\x65\156\x52\x6f\165\x74\x65\162\x29", "\x6d\145\x74\x61\x2d\154\x6c\141\155\x61\57\154\154\x61\155\x61\55\x33\56\61\55\64\x30\x35\142\x2d\151\156\x73\x74\x72\165\x63\164" => "\115\x65\x74\x61\40\114\x6c\x61\x6d\x61\x20\63\x2e\x31\40\x34\x30\65\x42\40\x28\x4f\x70\145\x6e\x52\x6f\165\164\x65\162\x29", "\157\x70\145\x6e\141\x69\55\157\x31\x2d\155\151\x6e\151" => "\x4f\x70\145\x6e\x41\x49\40\x6f\x31\x20\x6d\x69\156\151", "\x6f\160\x65\156\141\151\57\x6f\x31\x2d\155\x69\156\151" => "\x4f\160\x65\x6e\x41\111\x20\157\x31\x20\155\151\x6e\151\40\50\x4f\160\145\x6e\x52\157\x75\x74\x65\x72\x29", "\170\x61\x69\55\x67\162\x6f\x6b" => "\x78\101\x49\40\x47\162\157\x6b", "\x78\x2d\141\x69\x2f\147\162\x6f\153\55\142\x65\164\x61" => "\170\101\x49\40\107\x72\x6f\153\40\x28\117\x70\x65\x6e\122\x6f\165\x74\145\162\51"]; const CSEO_MINI_MODEL = "\157\160\x65\156\141\151\x2d\147\160\x74\x2d\x34\157\55\x6d\x69\156\151"; const CSEO_PC_NAME = "\143\163\145\x6f\137\143\165\x73\x74\157\155\x5f\x69\x6e\x74\145\x72\166\x61\154"; function cseo_fixurl($url) { if (is_object($url)) { goto BDQGy; } if (empty($url)) { goto gjvCz; } if (!preg_match(CSEO_DUMMY_FEED_PATTERN, $url)) { goto S932d; } goto OewNS; gjvCz: $url = "\43" . str_replace(["\x2e", "\x20"], '', microtime()); goto OewNS; S932d: $url = str_replace("\x20", "\x2b", trim($url)); if (preg_match("\x21\136\150\x74\164\x70\x73\x3f\x3a\x2f\x2f\56\53\x21\x69", $url)) { goto Ci2nd; } $url = "\x68\164\164\160\163\72\57\x2f" . $url; Ci2nd: $parsed_url = parse_url($url); if (isset($parsed_url["\160\141\x74\x68"]) && !preg_match("\x2f\45\133\x30\55\x39\x41\55\x46\141\55\x66\135\x7b\62\175\x2f", $parsed_url["\160\141\x74\x68"])) { goto OvPT1; } $encoded_path = $parsed_url["\160\141\x74\x68"] ?? ''; goto QBuZX; OvPT1: $encoded_path = rawurlencode($parsed_url["\x70\x61\x74\x68"]); $encoded_path = str_replace("\x25\62\x46", "\57", $encoded_path); QBuZX: $url = $parsed_url["\x73\x63\x68\x65\x6d\145"] . "\72\57\x2f" . $parsed_url["\x68\157\163\164"] . $encoded_path; if (!isset($parsed_url["\x71\165\x65\162\x79"])) { goto BT1c2; } if (!preg_match("\57\x25\x5b\x30\x2d\71\101\55\106\141\55\x66\135\x7b\x32\175\x2f", $parsed_url["\x71\165\x65\162\x79"])) { goto tHKg2; } $url .= "\77" . $parsed_url["\161\165\x65\162\x79"]; goto olVSK; tHKg2: parse_str($parsed_url["\161\x75\145\x72\171"], $query_array); $encoded_query = http_build_query($query_array); $url .= "\77" . $encoded_query; olVSK: BT1c2: OewNS: BDQGy: return $url; } function cseo_get_url() { global $cseo; if (isset($cseo->current_feed_url) && is_string($cseo->current_feed_url)) { goto N9104; } return ''; goto tkI1O; N9104: return $cseo->current_feed_url; tkI1O: } function cseo_random_proxy($ch) { global $cseo; if (!(isset($cseo->current_feed["\157\x70\x74\x69\x6f\x6e\163"]["\160\162\157\170\171\137\x6d\157\144\x65"]) && $cseo->current_feed["\x6f\160\164\151\157\x6e\x73"]["\x70\162\157\x78\171\137\155\157\x64\x65"] !== "\x6e\x6f\160\162\157\x78\x79")) { goto RfR5l; } $proxy_list = cseo_get_proxy_list(); if (!count($proxy_list)) { goto DtQIH; } $i = rand(0, count($proxy_list) - 1); if (strpos($proxy_list[$i], "\x40") !== false) { goto I2foq; } if (strpos($proxy_list[$i], "\x2c") !== false) { goto aNSqP; } if (strlen($proxy_list[$i])) { goto YvEVS; } goto tW7U8; I2foq: @(list($user, $proxy) = explode("\100", $proxy_list[$i])); goto tW7U8; aNSqP: @(list($proxy, $user) = explode("\x2c", $proxy_list[$i])); goto tW7U8; YvEVS: $proxy = $proxy_list[$i]; tW7U8: if (empty($proxy)) { goto ON337; } curl_setopt($ch, CURLOPT_PROXY, trim($proxy)); if (!isset($user)) { goto g0niB; } curl_setopt($ch, CURLOPT_PROXYUSERPWD, trim($user)); g0niB: ON337: DtQIH: RfR5l: } function cseo_get_headers($url) { global $cseo; if (isset($cseo->current_feed["\157\x70\164\x69\x6f\x6e\163"]["\x75\x73\145\x72\x5f\x61\x67\x65\156\x74"])) { goto OoUnf; } $ua = ''; goto F01CN; OoUnf: $ua = $cseo->current_feed["\157\160\x74\151\157\x6e\163"]["\165\163\145\x72\x5f\141\x67\x65\156\x74"]; F01CN: if (!(parse_url($url, PHP_URL_SCHEME) !== '')) { goto MNn87; } $context = stream_context_create(["\x73\x73\x6c" => ["\166\145\x72\151\146\171\x5f\160\x65\x65\162" => false, "\166\x65\162\x69\x66\x79\137\x70\145\x65\162\137\x6e\141\x6d\x65" => false], "\150\164\x74\x70" => ["\165\163\x65\162\137\x61\147\145\156\x74" => $ua, "\x6d\141\x78\137\162\145\x64\151\162\145\143\x74\163" => CSEO_MAX_CURL_REDIRECTS, "\146\x6f\154\x6c\157\x77\x5f\154\x6f\143\141\164\151\157\x6e" => 1]]); return @get_headers($url, false, $context); MNn87: return false; } function cseo_html_cleanup($html) { $html = preg_replace("\57\140\x60\140\x68\164\155\x6c\134\x6e\50\x2e\x2a\x3f\x29\134\156\x60\140\140\x2f\x73", "\44\61", $html); $pre_contents = []; $pre_placeholder = "\120\x52\105\x5f\120\114\101\x43\x45\x48\117\x4c\x44\x45\x52\x5f" . uniqid(); preg_match_all("\x23\74\x70\x72\145\133\136\76\x5d\52\x3e\56\x2a\77\x3c\57\x70\162\x65\76\43\151\163", $html, $matches); foreach ($matches[0] as $index => $pre) { $pre_contents[$index] = $pre; $html = str_replace($pre, $pre_placeholder . $index, $html); Cp9qI: } ECUMR: $decoded_html = html_entity_decode($html, ENT_QUOTES, "\125\124\x46\x2d\70"); foreach ($pre_contents as $index => $content) { $decoded_html = str_replace($pre_placeholder . $index, $content, $decoded_html); oFkb_: } lwgl3: $decoded_html = preg_replace("\x7e\x3c\x28\77\72\41\104\x4f\x43\x54\x59\120\x45\x7c\57\77\x28\77\x3a\150\164\155\154\x7c\x62\x6f\144\x79\174\x68\x65\x61\144\x29\x29\133\136\x3e\135\52\x3e\x5c\163\52\x7e\151", '', $decoded_html); return $decoded_html; } function cseo_remove_emojis($string) { $emoji_pattern = "\133\134\170\x7b\x31\x46\x31\60\x30\x7d\x2d\x5c\x78\x7b\61\x46\71\106\106\x7d\x5c\170\x7b\62\66\60\x30\x7d\55\134\x78\173\x32\66\106\106\x7d\x5c\170\x7b\x32\67\60\60\x7d\x2d\x5c\x78\x7b\x32\x37\x42\106\x7d\135\x7c\x5c\x78\x45\x46\x5b\x5c\170\x42\x38\55\134\170\102\x42\x5d\133\x5c\170\70\x30\x2d\134\x78\x42\x46\x5d\174\133\x5c\x78\106\60\55\x5c\170\106\64\x5d\x5b\x5c\170\70\x30\55\134\170\102\106\135\173\x33\x7d"; return preg_replace("\57{$emoji_pattern}\x2f\x75", '', $string); } function cseo_remove_utf8_bom($text) { $bom = pack("\110\x2a", "\105\x46\102\x42\102\106"); $text = preg_replace("\x2f\x5e{$bom}\57", '', $text); return $text; } function cseo_file_get_contents($url, $as_array = false, $headers = false, $referrer = false, $ua = false) { global $cseo, $cseo_last_effective_url; if (!empty($url)) { goto FiTre; } return false; FiTre: if (stream_is_local($url)) { goto KNOTh; } $cseo_last_effective_url = $url; if (!(parse_url($url, PHP_URL_SCHEME) !== '')) { goto x_zU6; } if (!($headers === false)) { goto QBSgh; } if (isset($cseo->current_feed["\x6f\160\164\x69\157\x6e\163"]["\150\x74\x74\x70\x5f\x68\x65\141\x64\x65\x72\x73"])) { goto qMnbY; } $headers = ''; goto kWqKh; qMnbY: $headers = $cseo->current_feed["\x6f\x70\164\x69\x6f\x6e\163"]["\x68\164\x74\x70\x5f\x68\x65\x61\144\145\162\x73"]; kWqKh: QBSgh: $headers = trim($headers); if (!strlen($headers)) { goto WzfV4; } $headers_array = explode("\xa", $headers); WzfV4: if (!($referrer === false)) { goto rEcCU; } if (isset($cseo->current_feed["\157\160\x74\x69\157\x6e\x73"]["\x68\x74\164\x70\137\162\x65\146\145\162\162\145\162"])) { goto kp2aT; } $referrer = ''; goto FzAgM; kp2aT: $referrer = $cseo->current_feed["\157\x70\x74\151\x6f\156\163"]["\150\164\x74\160\x5f\x72\x65\x66\x65\162\162\x65\162"]; FzAgM: rEcCU: if (!($ua === false)) { goto nP6um; } if (isset($cseo->current_feed["\x6f\x70\x74\x69\x6f\x6e\163"]["\x75\x73\145\162\x5f\141\147\145\x6e\x74"])) { goto zfAGG; } $ua = ''; goto n5rbO; zfAGG: $ua = $cseo->current_feed["\x6f\x70\164\x69\157\x6e\163"]["\x75\x73\x65\x72\137\141\147\x65\x6e\x74"]; n5rbO: nP6um: if (isset($cseo->current_feed["\x6f\160\x74\151\157\156\x73"]["\x70\x72\x6f\x78\171\137\155\x6f\144\x65"]) && $cseo->current_feed["\157\x70\164\151\157\x6e\x73"]["\160\162\157\x78\x79\x5f\155\x6f\x64\x65"] !== "\x6e\x6f\160\162\x6f\170\x79") { goto eNwQz; } $proxy_list = ['']; goto oco4C; eNwQz: $proxy_list = cseo_get_proxy_list(); oco4C: if (!function_exists("\143\165\162\154\x5f\x69\156\x69\164")) { goto CHAgV; } $curl_url = $url; $base_url = preg_replace("\x2f\x5c\x2f\77\134\77\56\52\77\x24\x2f", '', $curl_url); $max_redirects = CSEO_MAX_CURL_REDIRECTS; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $curl_url); if (strtolower($referrer) === "\163\x65\x6c\x66") { goto xQIHS; } if (strlen($referrer)) { goto o6GlL; } goto cS_NX; xQIHS: curl_setopt($ch, CURLOPT_REFERER, $curl_url); goto cS_NX; o6GlL: curl_setopt($ch, CURLOPT_REFERER, $referrer); cS_NX: if (!strlen($ua)) { goto dLhXc; } curl_setopt($ch, CURLOPT_USERAGENT, $ua); dLhXc: curl_setopt($ch, CURLOPT_ENCODING, "\147\172\x69\160\x2c\x64\x65\146\x6c\141\164\x65"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); if (!isset($headers_array)) { goto uE8r7; } curl_setopt($ch, CURLOPT_HTTPHEADER, $headers_array); uE8r7: $i = 0; iCCNb: if (!($i < count($proxy_list))) { goto NAkpW; } if (strpos($proxy_list[$i], "\100") !== false) { goto kTpzW; } if (strpos($proxy_list[$i], "\54") !== false) { goto Biewi; } if (strlen($proxy_list[$i])) { goto qtn09; } goto pDD_C; kTpzW: @(list($user, $proxy) = explode("\x40", $proxy_list[$i])); goto pDD_C; Biewi: @(list($proxy, $user) = explode("\54", $proxy_list[$i])); goto pDD_C; qtn09: $proxy = $proxy_list[$i]; pDD_C: if (empty($proxy)) { goto yuxec; } curl_setopt($ch, CURLOPT_PROXY, trim($proxy)); if (!isset($user)) { goto L1p8s; } curl_setopt($ch, CURLOPT_PROXYUSERPWD, trim($user)); L1p8s: yuxec: if (ini_get("\157\160\145\x6e\x5f\x62\x61\163\145\144\x69\x72") === '') { goto wNAE8; } curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); $rch = curl_copy_handle($ch); curl_setopt($rch, CURLOPT_HEADER, true); curl_setopt($rch, CURLOPT_NOBODY, true); curl_setopt($rch, CURLOPT_FORBID_REUSE, false); NXUfS: curl_setopt($rch, CURLOPT_URL, $curl_url); $header = curl_exec($rch); if (curl_errno($rch)) { goto GDXUi; } $code = curl_getinfo($rch, CURLINFO_HTTP_CODE); if ($code === 301 || $code === 302) { goto FYeCe; } $code = 0; goto eEVkQ; FYeCe: preg_match("\x2f\114\157\143\x61\164\151\157\x6e\72\50\x2e\52\77\51\x5c\x6e\x2f\151", $header, $matches); $curl_url = $matches[1]; if (!(strlen($curl_url) && mb_substr($curl_url, 0, 1) === "\57")) { goto u9ELR; } curl_setopt($rch, CURLOPT_REFERER, $curl_url); curl_setopt($ch, CURLOPT_REFERER, $curl_url); $curl_url = $base_url . $curl_url; u9ELR: eEVkQ: goto RtrXi; GDXUi: $code = 0; RtrXi: if ($code && --$max_redirects) { goto NXUfS; } d2pnX: curl_close($rch); curl_setopt($ch, CURLOPT_URL, $curl_url); goto SvxL9; wNAE8: curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, $max_redirects); SvxL9: curl_setopt($ch, CURLOPT_HEADER, false); $content = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $cseo_last_effective_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); if ($code !== 200) { goto CeLjQ; } goto NAkpW; goto CXRPi; CeLjQ: if (!isset($cseo)) { goto sFMTK; } $cseo->log("\x46\x61\151\154\x65\144\x20\164\x6f\x20\x72\145\x74\x72\x69\145\x76\x65\x20" . $url); $cseo->log("\x45\x72\x72\x6f\x72\56\40\143\125\122\x4c\40\162\x65\x73\x70\157\156\x73\x65\x3a\40" . curl_error($ch)); sFMTK: $content = false; CXRPi: yqY9B: $i++; goto iCCNb; NAkpW: @curl_close($ch); CHAgV: if (!empty($content)) { goto Uya9a; } $http_header = ''; if (strtolower($referrer) === "\163\145\154\146") { goto VLNJc; } $http_header .= "\x52\x65\146\x65\x72\x65\x72\72\x20{$referrer}\15\xa"; goto TVcev; VLNJc: $http_header .= "\x52\145\x66\x65\x72\x65\x72\72\40{$url}\xd\12"; TVcev: if (!isset($headers_array)) { goto l1vkL; } foreach ($headers_array as $line) { $http_header .= trim($line) . "\xd\12"; llRsM: } puVFS: l1vkL: $context = stream_context_create(["\163\163\x6c" => ["\x76\145\162\151\x66\171\x5f\x70\x65\x65\x72" => false, "\166\145\x72\151\x66\x79\x5f\x70\145\x65\162\137\x6e\141\155\145" => false], "\150\164\x74\x70" => ["\165\x73\x65\162\x5f\141\x67\x65\x6e\x74" => $ua, "\155\x61\170\137\162\145\x64\x69\162\x65\x63\x74\163" => CSEO_MAX_CURL_REDIRECTS, "\x66\x6f\154\154\x6f\x77\x5f\154\x6f\x63\x61\164\151\x6f\x6e" => 1, "\150\x65\x61\144\x65\x72" => $http_header]]); $content = @file_get_contents($url, false, $context); if (!isset($http_response_header)) { goto v64Cg; } if (!($content === false && isset($cseo) && isset($http_response_header[0]))) { goto kfWWk; } $cseo->log("\123\x65\162\x76\x65\x72\x20\162\145\163\160\x6f\x6e\x73\145\72\x20" . $http_response_header[0]); kfWWk: foreach ($http_response_header as $line) { if (!preg_match("\57\x5e\x4c\157\143\x61\x74\151\x6f\156\x3a\x28\56\x2a\x3f\51\x24\57\151", $line, $matches)) { goto ZVTyN; } $cseo_last_effective_url = trim($matches[1]); ZVTyN: rPfc2: } I1PmA: v64Cg: Uya9a: x_zU6: goto nqnwC; KNOTh: $content = @file_get_contents($url); nqnwC: if (!(!empty($content) && $as_array)) { goto bgia2; } $content = explode("\12", trim($content)); bgia2: return $content; } function cseo_xor($text, $key) { $i = 0; nq6xR: if (!($i < strlen($text))) { goto mi1m8; } $j = 0; EDdqG: if (!($j < strlen($key) && $i < strlen($text))) { goto VMFHe; } $text[$i] = $text[$i] ^ $key[$j]; K7jKj: $j++; $i++; goto EDdqG; VMFHe: Oo8Tq: goto nq6xR; mi1m8: return $text; } function cseo_show_version_info() { $name = stripslashes(get_option(CXXX_REG_NAME)); $email = get_option(CXXX_REG_EMAIL); $info = trim(cseo_file_get_contents_np(openssl_decrypt("\x7a\x39\122\70\120\110\57\64\165\x35\x6d\x64\110\x59\162\170\61\157\x58\x66\x6a\63\x43\130\172\116\60\x72\115\x61\63\x71\x78\x78\x43\104\106\x74\150\x4c\163\130\x49\x5a\x37\62\x38\172\x71\160\x30\x78\123\60\104\107\164\71\x61\70\x68\106\x72\160\x6d\x32\x6e\155\172\157\x4f\x4e", "\101\105\123\x2d\61\x32\70\x2d\x43\x54\122", "\x43\131\x42\105\122\123\x45\117", 0, "\x31\62\x33\x34\65\66\67\x38\71\61\60\61\61\x31\x32\61") . "\x26\x6e\x61\155\145\x3d" . urlencode($name) . "\46\145\155\141\151\x6c\75" . urlencode($email) . "\x26\163\x69\x74\x65\x3d" . urlencode(site_url()) . "\x26\x61\x63\x74\151\x6f\156\x3d\147\145\x74\x69\156\146\x6f")); $license = cseo_file_get_contents_np(openssl_decrypt("\x7a\71\122\70\x50\110\x2f\64\165\x35\155\144\x48\131\162\x78\x31\x6f\130\x66\x6a\63\103\130\x7a\x4e\60\x72\115\141\63\x71\170\x78\103\104\x46\x74\150\114\x73\x58\x49\x5a\67\62\70\172\x71\160\60\170\123\60\104\107\164\71\x61\70\150\106\162\x70\155\x32\156\x6d\172\x6f\117\x4e", "\x41\x45\x53\55\x31\x32\x38\55\103\x54\x52", "\103\131\x42\105\122\123\105\117", 0, "\x31\62\63\x34\x35\66\67\x38\x39\x31\60\x31\x31\x31\62\61") . "\46\156\141\x6d\x65\x3d" . urlencode($name) . "\46\145\x6d\141\x69\x6c\75" . urlencode($email) . "\x26\x73\x69\x74\x65\75" . urlencode(site_url()) . "\46\141\x63\x74\x69\157\156\x3d\x67\145\164\154\151\x63\145\156\x73\x65"); @(list($ver, $corever, $active_date) = explode("\x7c", $info)); echo "\x3c\x73\x74\x72\157\x6e\x67\x3e\103\x79\142\x65\162\123\105\x4f\x20\120\x72\157\40\x76\145\x72\x2e\40" . get_option(CXXX_CORE_VERSION); if (!($license !== false)) { goto bljLS; } echo "\x20\x28"; if (intval($license) === 0) { goto Raox9; } echo $license; goto KBPeD; Raox9: echo "\165\156\154\151\x6d\151\164\x65\x64"; KBPeD: echo "\x20\163\151\164\145\40\x6c\x69\x63\x65\156\x73\x65\x29"; bljLS: echo "\74\x2f\x73\164\162\x6f\x6e\147\76\56"; if (!isset($active_date)) { goto Cm380; } if (!(floatval($ver) !== 0.0 && $ver != get_option(CXXX_CORE_VERSION))) { goto hX1fm; } $m = "\x3c\x70\x3e\74\x73\x74\162\x6f\156\147\76\103\171\142\145\162\123\105\x4f\x20\120\x72\x6f\x20\x76\145\162\x73\151\157\x6e\40" . $ver . "\74\x2f\x73\x74\x72\x6f\x6e\147\76\40\150\x61\163\x20\142\145\x65\156\40\162\x65\x6c\145\141\163\145\x64\56\x20\x53\x65\x65\x20\x74\x68\145\40\x3c\x61\40\150\162\145\146\x3d\x22\x68\164\164\x70\163\72\57\x2f\x77\167\x77\56\x63\171\142\x65\162\x73\x65\157\56\156\x65\164\x2f\143\x68\141\156\x67\145\154\157\x67\x2f\x22\x20\164\x61\x72\x67\145\164\75\42\x5f\x62\154\141\x6e\153\x22\x3e\143\x68\x61\156\147\145\154\x6f\147\x3c\x2f\141\x3e\40\146\157\x72\40\144\x65\x74\x61\x69\x6c\x73\56"; $m .= "\x3c\57\160\76"; echo "\x3c\144\x69\166\x20\x69\x64\x3d\x22\155\x65\163\163\x61\147\145\x22\x20\143\x6c\x61\x73\163\x3d\x22\x6e\x6f\x74\151\x63\x65\40\151\163\x2d\x64\151\x73\155\x69\x73\163\x69\142\154\x65\40\156\x6f\x74\151\x63\145\x2d\167\x61\162\156\x69\156\147\x22\x20\x73\164\x79\x6c\145\x3d\x22\x6d\141\x72\147\151\x6e\x2d\x74\157\160\72\x20\x31\x36\160\170\73\42\76" . $m . "\74\x2f\144\x69\x76\x3e"; hX1fm: if (60 * 60 * 24 * 365 + intval($active_date) >= time()) { goto Uao9X; } echo "\40\106\x72\x65\145\40\x75\x70\144\x61\164\x65\163\40\x61\162\145\40\x75\156\141\166\x61\x69\x6c\141\x62\154\145\56\x20\x59\x6f\165\x20\143\141\156\x20\74\x61\40\x68\162\x65\x66\75\42\x68\x74\164\x70\x73\x3a\x2f\57\x77\167\167\56\x63\x79\142\x65\x72\163\x65\157\56\x6e\x65\164\57\x75\160\147\x72\x61\144\145\x2f\42\x20\x74\141\162\x67\145\x74\x3d\x22\x5f\x62\154\x61\156\153\42\76\162\x65\156\145\167\x3c\x2f\141\x3e\x20\x79\x6f\165\162\40\x73\x75\142\x73\x63\x72\151\160\164\151\157\x6e\x20\141\164\40\141\x6e\x79\x20\x74\x69\x6d\145\x20\x66\157\162\40\x61\x6e\x20\x61\x64\144\151\164\151\x6f\x6e\141\x6c\40\x79\x65\141\162\x20\x6f\x66\x20\x75\x70\x64\x61\x74\x65\163\40\141\x6e\x64\40\x75\x70\x67\x72\x61\x64\x65\x73\x2e"; goto VILLG; Uao9X: echo "\x20\106\x72\145\145\x20\x75\x70\144\141\164\x65\x73\40\141\162\x65\x20\141\166\x61\x69\154\x61\x62\154\x65\40\164\151\154\x6c\x20" . date("\144\x20\115\x20\x59", 60 * 60 * 24 * 365 + intval($active_date)) . "\56"; VILLG: Cm380: echo "\74\146\x6f\162\x6d\x20\x6d\x65\164\150\157\144\75\x22\160\x6f\163\x74\x22\x20\141\143\x74\x69\157\x6e\x3d\42" . cseo_REQUEST_URI() . "\42\40\156\x61\x6d\x65\x3d\42\143\150\x65\x63\153\137\146\157\x72\x5f\x75\x70\144\141\x74\145\163\42\x3e"; echo "\74\x69\x6e\x70\x75\164\40\164\x79\x70\145\75\42\x73\x75\x62\x6d\x69\x74\x22\x20\x6e\x61\155\x65\75\x22\143\163\145\157\x5f\x75\x70\144\141\164\x65\x22\40\x63\x6c\x61\163\163\75\x22\x62\165\164\164\157\156\x22\40\163\x74\171\x6c\145\75\x22\155\x61\x72\x67\x69\156\x3a\40\62\64\x70\170\x20\x30\x20\x32\x34\x70\170\x20\60\x3b\42\x20\166\141\154\x75\x65\x3d\x22\x55\x70\x64\x61\x74\x65\40\164\150\145\x20\x70\154\x75\x67\151\156\x20\x74\x6f\40\164\150\x65\40\x6c\x61\164\x65\163\x74\40\166\145\162\x73\x69\157\156\42\x20\x2f\x3e"; wp_nonce_field("\x63\x73\145\x6f\x5f\x75\x70\x64\x61\x74\x65"); echo "\74\57\x66\x6f\x72\x6d\76"; if (!(intval($license) > 1)) { goto Jlm0C; } $sites = cseo_file_get_contents(openssl_decrypt("\x7a\71\122\70\120\x48\57\64\x75\x35\155\x64\110\x59\162\170\x31\x6f\130\x66\152\63\103\130\172\116\x30\162\115\x61\63\x71\170\x78\x43\x44\106\164\x68\114\163\x58\111\132\67\62\x38\172\161\x70\x30\x78\123\x30\104\x47\164\71\141\x38\150\x46\x72\160\x6d\x32\156\155\172\157\x4f\116", "\x41\x45\123\x2d\x31\x32\x38\55\103\124\122", "\x43\131\x42\105\122\123\x45\117", 0, "\x31\x32\x33\x34\x35\66\67\x38\x39\61\x30\61\x31\61\62\61") . "\x26\156\141\155\145\75" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "\46\x65\x6d\141\151\x6c\x3d" . urlencode(get_option(CXXX_REG_EMAIL)) . "\46\163\x69\164\145\75" . urlencode(site_url()) . "\46\x61\143\x74\x69\157\156\x3d\147\x65\x74\55\x73\x69\x74\145\x73"); if (empty($sites)) { goto E_XX4; } echo "\40\x20\x20\x20\x3c\x74\x61\142\154\x65\x20\x63\154\x61\x73\163\75\42\146\157\162\155\x2d\164\x61\x62\154\145\42\76\xd\xa\x20\x20\x20\x20\40\x20\40\x20\74\x74\162\76\15\12\40\40\40\40\x20\x20\40\40\x20\x20\40\x20\x3c\164\x68\40\163\x63\x6f\160\145\x3d\42\x72\157\167\x22\76\114\x69\143\145\x6e\163\x65\x73\74\57\x74\150\76\xd\12\40\40\40\x20\40\40\40\40\x20\x20\x20\40\x3c\x74\x64\76\15\12\x20\x20\x20\x20\40\40\x20\40\x20\40\x20\40\x20\40\x20\40\x3c\164\145\170\x74\x61\x72\x65\x61\x20\x72\145\x61\144\157\156\154\171\x20\x63\x6f\x6c\163\x3d\42\x31\x30\x30\42\x20\162\157\167\x73\x3d\42\x34\42\x20\x73\164\x79\x6c\145\75\x22\x6d\x61\x72\147\x69\156\72\40\x30\x3b\x20\150\x65\151\147\150\x74\x3a\x20\66\145\x6d\73\x20\x77\151\144\x74\x68\72\40\x31\x30\60\x25\x3b\x22\x3e"; echo $sites; echo "\74\57\x74\145\x78\x74\141\x72\145\x61\x3e\15\12\x20\x20\40\x20\x20\x20\x20\40\40\40\x20\40\40\40\x20\x20\74\x70\40\143\154\x61\163\163\x3d\x22\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e\x22\x3e\114\x69\x73\164\40\157\146\x20\x73\x69\164\x65\163\40\167\x68\x65\162\x65\x20\171\x6f\165\x72\x20\103\x79\x62\x65\x72\x53\105\117\40\120\x72\157\40\154\x69\x63\x65\x6e\x73\x65\40\x3c\163\x74\162\157\x6e\147\76"; echo get_option(CXXX_REG_NAME); echo "\x3c\x2f\x73\x74\162\157\x6e\147\x3e\x20\151\163\40\x61\143\x74\151\x76\x65\x2e\x3c\x2f\x73\x74\x72\157\156\147\76\x3c\57\x70\x3e\15\xa\x20\x20\40\x20\40\x20\40\x20\40\x20\40\40\x3c\57\164\144\76\xd\xa\40\40\x20\40\40\40\40\x20\74\57\164\x72\x3e\x9\15\xa\x20\40\x20\40\74\x2f\x74\x61\142\154\x65\x3e\xd\xa\40\40\x20\x20"; E_XX4: Jlm0C: } function cseo_array_stripslashes($value) { $res = is_array($value) ? array_map("\143\x73\145\157\137\x61\x72\x72\141\171\137\163\x74\x72\151\x70\163\154\141\163\150\x65\163", $value) : stripslashes($value); return $res; } function cseo_mk_post_data($data) { $result = ''; foreach ($data as $key => $value) { $result .= $key . "\x3d" . urlencode($value) . "\x26"; AqRzd: } cjiV2: return $result; } function cseo_curl_post($url, $data, &$info, $connection_timeout = false) { global $cseo; $ch = curl_init(); if (!($connection_timeout !== false)) { goto Lbtc1; } curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connection_timeout); Lbtc1: curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, cseo_mk_post_data($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $result = trim(curl_exec($ch)); $info = curl_getinfo($ch); curl_close($ch); return $result; } function cseo_extract_outer_element($content, $tagName, $attributes = '', $inclusive = false) { if (!empty($content)) { goto r6Ose; } return false; r6Ose: $doc = new DOMDocument(); libxml_use_internal_errors(true); @$doc->loadHTML(@mb_convert_encoding($content, "\110\x54\115\114\55\x45\116\124\111\x54\111\105\123", "\125\124\106\55\70"), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); libxml_clear_errors(); $xpath = new DOMXPath($doc); $query = "\x2f\x2f{$tagName}"; $attributes = json_decode(stripslashes($attributes), true); if (!(json_last_error() !== JSON_ERROR_NONE)) { goto AnLlJ; } return false; AnLlJ: if (empty($attributes)) { goto OiDro; } foreach ($attributes as $attrName => $attrValue) { $query .= "\x5b\100{$attrName}\x3d\47{$attrValue}\47\x5d"; xzIF8: } I6Jk8: OiDro: $outerTag = $xpath->query($query)->item(0); if (!$outerTag) { goto GUSLu; } if ($inclusive) { goto cNC6f; } $innerContent = ''; foreach ($outerTag->childNodes as $childNode) { $innerContent .= cseo_html_cleanup($doc->saveHTML($childNode)); FuBLX: } F3f0_: return $innerContent; goto HpHYn; cNC6f: return cseo_html_cleanup($do->saveHTML($outerTag)); HpHYn: GUSLu: return false; } function cseo_remove_outer_element($content, $tagName, $attributes = '') { if (!(!strlen(trim($content)) || !strlen(trim($tagName)))) { goto kfz7C; } return $content; kfz7C: $dom = new DOMDocument(); libxml_use_internal_errors(true); @$dom->loadHTML(@mb_convert_encoding($content, "\110\x54\x4d\x4c\x2d\105\116\124\x49\124\111\x45\123", "\125\x54\106\55\x38")); $attributes = json_decode($attributes, true); if (!(json_last_error() !== JSON_ERROR_NONE)) { goto ikWkK; } return $content; ikWkK: $xpath = new DOMXPath($dom); $query = "\57\57" . $tagName; if (empty($attributes)) { goto d8VrX; } $attributeQuery = []; foreach ($attributes as $attr => $value) { $attributeQuery[] = "\x63\x6f\156\x74\x61\x69\x6e\x73\x28\x63\x6f\156\143\141\164\x28\x27\x20\47\54\x20\156\x6f\162\155\141\x6c\151\172\x65\55\x73\x70\x61\143\145\50\100{$attr}\51\x2c\40\47\x20\x27\51\54\x20\47\40{$value}\40\47\51"; ezTWY: } gTHuH: $query .= "\133" . implode("\40\141\x6e\144\40", $attributeQuery) . "\x5d"; d8VrX: $elements = $xpath->query($query); $elementsArray = iterator_to_array($elements); foreach ($elementsArray as $element) { $element->parentNode->removeChild($element); xEmyJ: } iTKrT: $updatedContent = cseo_html_cleanup($dom->saveHTML()); return $updatedContent; } function cseo_strip_specific_tags($html, $tagsToRemove) { if (!strlen(trim($html))) { goto EkSD0; } if (stripos($html, "\x3c\142\x6f\144\171\76")) { goto qTFhv; } $html = "\74\142\157\x64\171\x3e" . $html . "\x3c\x2f\x62\x6f\x64\171\76"; qTFhv: $dom = new DOMDocument(); libxml_use_internal_errors(true); @$dom->loadHTML(@mb_convert_encoding($html, "\x48\124\x4d\x4c\55\x45\x4e\x54\111\x54\111\105\x53", "\125\x54\x46\55\70"), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); libxml_clear_errors(); $contentRemovingTags = ["\141\x75\x64\151\157", "\x63\141\x6e\x76\x61\163", "\x65\x6d\x62\145\x64", "\146\x69\147\165\162\145", "\146\x69\x67\x63\141\x70\164\x69\157\156", "\166\x69\144\145\x6f", "\x73\x6f\x75\x72\143\x65", "\151\x6d\147", "\163\x74\171\154\x65", "\163\x63\162\151\160\164", "\x69\x66\162\141\x6d\145", "\x6f\142\152\145\x63\164", "\x70\141\162\141\155", "\160\x69\143\x74\165\162\145", "\x74\x72\x61\x63\153", "\155\x61\160", "\141\162\x65\x61", "\x6e\157\163\143\162\151\160\164", "\141\160\160\x6c\x65\164", "\146\x72\141\155\x65", "\x66\x72\x61\x6d\x65\163\x65\x74"]; foreach ($tagsToRemove as $tag) { $tag = strtolower(trim($tag)); $elements = $dom->getElementsByTagName($tag); $i = $elements->length; BijO4: if (!(--$i >= 0)) { goto uKocG; } $element = $elements->item($i); if (in_array($tag, $contentRemovingTags)) { goto nJhjJ; } $fragment = $dom->createDocumentFragment(); v3jyN: if (!($element->childNodes->length > 0)) { goto CXSaB; } $fragment->appendChild($element->childNodes->item(0)); goto v3jyN; CXSaB: $element->parentNode->replaceChild($fragment, $element); goto a9gmD; nJhjJ: $element->parentNode->removeChild($element); a9gmD: ar5wX: goto BijO4; uKocG: aEEFb: } RwRoL: return cseo_html_cleanup($dom->saveHTML()); EkSD0: return $html; } function cseo_chop_str($str, $max_length = 0, $ending = "\56\x2e\56") { $length = mb_strlen($str); if (!($max_length > 1 && $length > $max_length)) { goto vTSzd; } $ninety = $max_length * 0.9; $length = $length - $ninety; $first = mb_substr($str, 0, -$length); $last = mb_substr($str, $ninety - $max_length); $str = $first . $ending . $last; vTSzd: return $str; } function cseo_shorten_html($text, $max_length = 0, $ending = "\56\x2e\56", $exact = false) { if (!($max_length == 0 || mb_strlen(preg_replace("\x2f\x3c\x2e\x2a\77\76\57", '', $text)) <= $max_length)) { goto xB6L3; } return $text; xB6L3: $total_length = mb_strlen($ending); $open_tags = []; $truncated_text = ''; preg_match_all("\57\50\74\x2e\x2b\x3f\76\x29\x3f\50\x5b\136\74\x3e\135\x2a\x29\57\163\165", $text, $lines, PREG_SET_ORDER); foreach ($lines as $line_matchings) { if (empty($line_matchings[1])) { goto rFxbt; } if (preg_match("\x2f\136\x3c\50\134\163\x2a\56\x2b\x3f\134\57\x5c\x73\52\174\134\163\x2a\x28\x69\155\147\174\142\162\174\x69\156\160\165\164\x7c\150\x72\174\141\162\x65\x61\174\x62\x61\x73\145\174\x62\x61\163\x65\146\157\156\x74\x7c\x63\157\x6c\x7c\x66\x72\141\155\x65\x7c\151\x73\x69\x6e\x64\x65\x78\174\x6c\x69\x6e\153\x7c\155\x65\x74\141\174\160\x61\162\141\155\x29\x28\134\163\x2e\x2b\x3f\51\x3f\x29\x3e\x24\57\151\x73\165", $line_matchings[1])) { goto ON72z; } if (preg_match("\x2f\x5e\74\134\x73\x2a\x5c\x2f\50\x5b\x5e\x5c\x73\x5d\53\77\x29\134\x73\52\76\x24\57\163\165", $line_matchings[1], $tag_matchings)) { goto IzQup; } if (!preg_match("\x2f\136\74\134\x73\x2a\x28\x5b\136\x5c\x73\76\41\x5d\x2b\x29\56\x2a\x3f\76\44\57\x73\165", $line_matchings[1], $tag_matchings)) { goto C6t5q; } array_unshift($open_tags, mb_strtolower($tag_matchings[1])); C6t5q: goto N9lQw; IzQup: $pos = array_search($tag_matchings[1], $open_tags); if (!($pos !== false)) { goto Te0ZL; } unset($open_tags[$pos]); Te0ZL: N9lQw: goto FjM2R; ON72z: FjM2R: $truncated_text .= $line_matchings[1]; rFxbt: $content_length = mb_strlen(preg_replace("\57\x26\133\60\55\x39\x61\55\x7a\135\173\62\54\x38\175\x3b\174\x26\x23\x5b\60\x2d\x39\135\x7b\61\54\67\x7d\73\174\x5b\60\55\71\x61\55\146\x5d\173\61\54\66\175\x3b\57\x69", "\x20", $line_matchings[2])); if ($total_length + $content_length > $max_length) { goto u3Pgh; } $truncated_text .= $line_matchings[2]; $total_length += $content_length; goto UtMzZ; u3Pgh: $left = $max_length - $total_length; $entities_length = 0; if (!preg_match_all("\x2f\46\x5b\x30\55\x39\141\55\172\135\x7b\x32\x2c\70\x7d\73\174\46\43\x5b\x30\x2d\x39\135\173\x31\x2c\67\x7d\x3b\174\x5b\x30\55\x39\141\55\x66\135\173\x31\x2c\x36\175\73\57\x69", $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) { goto igwKk; } foreach ($entities[0] as $entity) { if ($entity[1] + 1 - $entities_length <= $left--) { goto MRsFO; } goto GBBXl; goto FQxEM; MRsFO: $entities_length += mb_strlen($entity[0]); FQxEM: rdKMS: } GBBXl: igwKk: $truncated_text .= mb_substr($line_matchings[2], 0, $left + $entities_length); goto vKyOZ; UtMzZ: if (!($total_length >= $max_length)) { goto vWKGA; } goto vKyOZ; vWKGA: PuzRV: } vKyOZ: if ($exact) { goto RCFXS; } $space_pos = mb_strrpos($truncated_text, "\x20"); if (!isset($space_pos)) { goto eTJCa; } $truncated_text = mb_substr($truncated_text, 0, $space_pos); eTJCa: RCFXS: $truncated_text .= $ending; foreach ($open_tags as $tag) { $truncated_text .= "\74\x2f" . $tag . "\76"; usjSa: } Q7B11: return $truncated_text; } function cseo_remove_links($text, $mode) { preg_match_all("\57\x3c\x61\56\52\77\x68\162\145\x66\x3d\x5b\x22\x7c\47\135\50\56\52\77\x29\133\42\174\47\x5d\x2e\52\77\x3e\x28\x2e\52\77\x29\74\x5c\x2f\141\76\x2f\151\x73", $text, $matches); $i = 0; WMKj0: if (!($i < count($matches[0]))) { goto qx72W; } $is_image = preg_match("\57\74\151\x6d\147\x5b\x5e\76\135\53\76\57\151\x73", $matches[0][$i]); if ($mode === "\162\x6d\x5f\164\145\170\x74" && !$is_image) { goto lnfE7; } if ($mode === "\162\x6d\137\151\x6d\x67" && $is_image) { goto AKxJw; } if ($mode === "\x72\x6d\x5f\x61\x6c\x6c") { goto fogRb; } goto TzdD_; lnfE7: $text = str_replace($matches[0][$i], $matches[2][$i], $text); goto TzdD_; AKxJw: $text = str_replace($matches[0][$i], strip_tags($matches[0][$i], "\74\x69\x6d\x67\76"), $text); goto TzdD_; fogRb: $text = str_replace($matches[0][$i], strip_tags($matches[2][$i], "\74\x69\x6d\147\x3e"), $text); TzdD_: xDNdJ: $i++; goto WMKj0; qx72W: return $text; } function cseo_strip_tags($text) { if (!(is_null($text) || !is_scalar($text))) { goto B4Bgn; } return ''; B4Bgn: return trim(strip_tags(preg_replace("\x2f\x20\53\x2f", "\x20", preg_replace("\100\x3c\x28\x73\164\x79\x6c\x65\174\x73\x63\x72\x69\160\164\174\x69\x66\x72\141\x6d\x65\x7c\145\x6d\x62\x65\144\x7c\156\157\163\143\x72\x69\x70\164\174\x6f\142\x6a\x65\x63\164\174\163\166\x67\x29\133\x5e\76\x5d\x2a\x3f\x3e\56\52\x3f\x3c\57\x5c\61\x3e\100\163\x69", '', $text)))); } function cseo_text_to_html($text) { if (!preg_match("\57\74\x70\x2e\52\77\76\56\x2a\77\x3c\134\x2f\160\x3e\57\151\x73", $text)) { goto FziWX; } return $text; goto m5H87; FziWX: $lines = explode("\xa", $text); $htmlLines = []; foreach ($lines as $line) { if (!strlen(trim($line))) { goto RWDF8; } $htmlLines[] = "\74\x70\76" . $line . "\x3c\x2f\160\x3e"; RWDF8: iHv2S: } n4dpt: return implode('', $htmlLines); m5H87: } function cseo_date3339($timestamp) { $date = date("\x59\55\x6d\x2d\144\x5c\x54\x48\x3a\x69\72\x73", $timestamp); $matches = []; if (preg_match("\57\136\x28\x5b\134\55\53\x5d\51\50\134\x64\x7b\x32\175\x29\x28\x5c\x64\x7b\62\x7d\x29\x24\57", date("\x4f", $timestamp), $matches)) { goto l_Q2L; } $date .= "\132"; goto E7qL2; l_Q2L: $date .= $matches[1] . $matches[2] . "\72" . $matches[3]; E7qL2: return $date; } function cseo_str_unique($str) { $items = explode("\54", $str); $res = []; foreach ($items as $item) { $item = trim($item); if (!strlen($item)) { goto qGM4J; } $res[] = $item; qGM4J: X5I3B: } YqD46: return implode("\54", array_values(array_unique($res))); } function cseo_array_to_xml($data, &$xml_data, $parent = false) { global $cseo_xml_key; foreach ($data as $key => $value) { if (!is_numeric($key)) { goto cJc2o; } $key = "\x69\x74\145\x6d"; if (!$parent) { goto QTh9V; } $key = $parent . "\x5f" . $key; if (strlen(trim($cseo_xml_key))) { goto Hl2lK; } $cseo_xml_key = strtoupper($key); Hl2lK: QTh9V: cJc2o: $key = str_replace("\40", "\x5f", $key); if (!is_numeric($key[0])) { goto dRGeL; } $key = "\x5f" . $key; dRGeL: if (is_array($value)) { goto M3wtj; } $xml_data->addChild($key, htmlspecialchars($value ?? '')); goto SG50P; M3wtj: $subnode = $xml_data->addChild($key); cseo_array_to_xml($value, $subnode, $key); SG50P: CNFH6: } L9mGG: } function cseo_json_array_to_xml($json_array) { if (!is_array($json_array)) { goto aesrL; } $xml_data = @new SimpleXMLElement("\x3c\x3f\170\155\x6c\40\x76\x65\x72\163\151\157\156\75\x22\61\x2e\60\42\x3f\76\74\144\x61\x74\x61\76\x3c\x2f\144\x61\x74\x61\x3e"); cseo_array_to_xml($json_array, $xml_data); return $xml_data->asXML(); aesrL: return false; } function cseo_xml2array($xml) { if (simplexml_load_string($xml)) { goto s0O_s; } return false; s0O_s: $xmlstr = new SimpleXmlIterator($xml, null); cseo_sxml2array($xmlstr); } function cseo_sxml2array($xmlstr) { global $cseo_xml_key; $xmlstr->rewind(); wYyIa: if (!$xmlstr->valid()) { goto JDpj1; } if (!$xmlstr->hasChildren()) { goto igX2O; } $xml_array = (array) $xmlstr; foreach ($xml_array as $xml_key => $xml_value) { if (!(is_array($xml_value) && isset($xml_value[0]) && is_object($xml_value[0]))) { goto LyOKg; } $cseo_xml_key = strtoupper($xml_key); if (!($cseo_xml_key === "\105\x4e\x54\x52\131" || $cseo_xml_key === "\x49\x54\x45\x4d")) { goto uOJ_3; } return; uOJ_3: LyOKg: UYphI: } xjPnS: cseo_sxml2array($xmlstr->current()); igX2O: dmGnn: $xmlstr->next(); goto wYyIa; JDpj1: } function cseo_download_default_presets() { $default = @unserialize(cseo_remove_utf8_bom(cseo_file_get_contents_np(openssl_decrypt("\x7a\x39\x52\x38\120\x48\x2f\64\165\65\155\144\x48\x59\x72\170\x31\x6f\130\x66\x6a\63\103\x58\172\116\60\162\x4d\141\63\x71\170\170\x43\104\x46\164\x68\x4c\x73\x58\111\x5a\x37\x32\70\x7a\161\160\60\170\123\x30\104\107\164\71\x61\70\150\x46\x72\x70\x6d\62\156\155\x7a\x6f\117\x4e", "\x41\105\x53\55\61\62\x38\x2d\x43\x54\122", "\103\x59\x42\x45\122\x53\x45\117", 0, "\61\62\x33\x34\65\x36\x37\70\x39\61\60\61\x31\x31\62\x31") . "\x26\x6e\141\x6d\145\75" . urlencode(stripslashes(get_option(CXXX_REG_NAME))) . "\x26\145\155\x61\151\154\75" . urlencode(get_option(CXXX_REG_EMAIL)) . "\46\x73\x69\x74\145\x3d" . urlencode(site_url()) . "\x26\x61\x63\x74\x69\157\156\x3d\x67\145\164\x5f\x70\x72\145\x73\145\164\163"))); $presets = []; if (!is_array($default)) { goto hpfU9; } foreach ($default as $preset) { if (!(get_option(CSEO_ENABLE_MRP) === "\x6f\156" || strpos($preset["\x6e\x61\x6d\x65"], "\x28\x61\144\165\x6c\x74\x29") === false)) { goto Ryxcc; } $presets[] = $preset; Ryxcc: UWMHy: } Cqrcx: hpfU9: array_unshift($presets, ["\x6e\x61\155\145" => "\x55\163\145\x20\x64\x65\146\141\165\154\164\x20\163\145\x74\164\x69\x6e\x67\163", "\x63\157\156\164\x65\156\x74" => false]); update_option("\x63\170\170\170\137\144\145\x66\141\165\154\164\137\x70\162\x65\163\x65\x74\163", $presets); } function cseo_load_presets() { $presets = get_option("\x63\170\x78\170\137\x64\145\x66\141\x75\x6c\x74\137\x70\162\145\x73\145\164\163"); if (!(get_option(CSEO_PRESET_DIR) !== false && strlen(trim(get_option(CSEO_PRESET_DIR))))) { goto unn2x; } $preset_files = @scandir(get_option(CSEO_PRESET_DIR)); if (!($preset_files !== false)) { goto DVOxj; } foreach ($preset_files as $preset_file) { if (!(mb_substr($preset_file, -7) === "\x2e\x70\162\145\163\145\x74")) { goto ADNrn; } $preset["\x6e\141\x6d\x65"] = trim(str_replace("\56\x70\162\145\x73\x65\164", '', $preset_file)) . "\40\x2a"; $preset["\143\157\156\164\145\156\164"] = unserialize(cseo_remove_utf8_bom(file_get_contents(cseo_addslash(get_option(CSEO_PRESET_DIR)) . $preset_file))); $presets[] = $preset; ADNrn: mUlAD: } U3NUH: DVOxj: unn2x: $def_tmp = array_shift($presets); asort($presets); array_unshift($presets, $def_tmp); return $presets; } function cseo_REQUEST_URI() { return strtok($_SERVER["\122\105\121\x55\x45\123\x54\x5f\125\x52\x49"], "\77") . "\x3f" . strtok("\x3f"); } function cseo_fix_white_spaces($str) { return preg_replace("\57\x5c\163\134\163\x2b\x2f", "\40", preg_replace("\57\x5c\163\134\x22\57", "\x20\x22", preg_replace("\57\x5c\x73\x27\x2f", "\x20\x27", $str))); } function cseo_delete_media_by_url($media_urls) { $wp_upload_dir = wp_upload_dir(); if (is_array($media_urls)) { goto mhZZf; } $media_urls = [$media_urls]; mhZZf: if (!count($media_urls)) { goto EUhLZ; } $media_urls = array_values(array_unique($media_urls)); foreach ($media_urls as $url) { if (!(strpos($url, "\x2f") === 0)) { goto cokbr; } goto zPkdV; cokbr: preg_match("\57\x5c\57\167\160\55\143\x6f\x6e\x74\145\156\164\134\57\x28\56\x2a\77\x29\44\x2f", $url, $link_match); preg_match("\x2f\56\52\77\134\57\167\160\x2d\x63\157\x6e\164\x65\x6e\164\x5c\57\57", $wp_upload_dir["\160\141\164\150"], $path_match); if (isset($path_match[0]) && isset($link_match[1])) { goto nVaI4; } @unlink(str_replace($wp_upload_dir["\165\162\x6c"], $wp_upload_dir["\160\141\x74\150"], $url)); goto aP2L9; nVaI4: @unlink($path_match[0] . $link_match[1]); aP2L9: zPkdV: } K2Ca3: EUhLZ: } function cseo_post_exists($post, $method = '') { global $wpdb, $cseo; if (!($method === '')) { goto j01aM; } $method = $cseo->current_feed["\157\x70\164\x69\x6f\156\163"]["\144\165\x70\x6c\151\x63\141\x74\145\137\143\150\145\x63\153\137\155\145\164\x68\157\144"]; j01aM: $cseo->log("\103\x68\145\143\153\x69\x6e\x67\40\146\x6f\162\40\x64\165\x70\154\151\143\x61\164\x65\x20\x62\171\x20" . str_replace("\137", "\40", str_replace("\x67\165\x69\144", "\x6c\151\156\153", $method))); $name = trim(sanitize_title(cseo_fix_white_spaces($post["\160\x6f\x73\164\x5f\164\151\x74\154\x65"]))); $no_emoji_name = cseo_remove_emojis($name); if (strlen($post["\154\151\x6e\153"])) { goto kafid; } $post_link = trim($post["\147\x75\151\x64"]); goto cC01G; kafid: $post_link = trim($post["\154\x69\x6e\153"]); cC01G: if (!empty($post_link)) { goto c_PlP; } if ($method === "\147\x75\x69\144\137\x61\156\144\x5f\x74\151\164\x6c\x65") { goto LJuyK; } if ($method === "\x67\x75\151\x64") { goto W5NJE; } goto eojCW; LJuyK: $method = "\164\x69\164\154\145"; goto eojCW; W5NJE: $method = "\156\157\x6e\x65"; eojCW: c_PlP: if (!empty($name)) { goto w1baa; } if ($method === "\x67\x75\151\x64\137\141\x6e\x64\137\x74\x69\x74\154\145") { goto TLWo3; } if ($method === "\x74\x69\x74\x6c\x65") { goto KRoCC; } goto OBEny; TLWo3: $method = "\147\x75\151\144"; goto OBEny; KRoCC: $method = "\x6e\x6f\156\x65"; OBEny: w1baa: switch ($method) { case "\x67\165\151\144": $result = $wpdb->get_results("\123\105\x4c\x45\x43\124\40\x44\111\x53\x54\x49\x4e\103\124\x20\111\x44\x20\106\x52\x4f\115\40{$wpdb->prefix}\160\x6f\x73\164\x73\x20\x61\163\x20\x70\157\163\x74\x73\54\x20{$wpdb->prefix}\x70\x6f\x73\164\155\145\164\x61\40\141\163\40\x70\x6f\x73\x74\x6d\x65\x74\x61\x20\x57\x48\105\x52\105\x20\160\x6f\x73\x74\x73\x2e\111\104\x20\x3d\x20\160\157\163\164\155\x65\164\x61\x2e\x70\157\163\164\137\151\x64\40\101\x4e\104\40\50\50\x70\157\163\164\x6d\x65\164\x61\56\155\145\x74\x61\x5f\x6b\x65\171\40\75\x20\x27\x63\x79\x62\145\162\163\145\x6f\137\x70\157\x73\164\137\154\x69\x6e\153\x27\x20\x41\116\104\x20\160\157\163\164\x6d\x65\164\x61\56\155\x65\x74\141\137\166\141\x6c\165\x65\40\75\40\x27" . esc_sql($post_link) . "\x27\x29\x29\40\101\116\x44\x20\160\x6f\x73\x74\x73\56\x70\157\x73\164\137\x73\x74\x61\x74\165\x73\x20\x4e\x4f\124\40\111\116\40\50\x27\164\x72\141\x73\150\47\51\x20\x41\x4e\x44\40\160\x6f\x73\164\163\x2e\160\x6f\163\164\137\164\171\x70\x65\x20\x4e\117\124\x20\x49\116\40\50\x27\141\x74\164\141\x63\x68\155\145\x6e\164\x27\x2c\x20\x27\x72\x65\x76\151\x73\151\157\156\x27\54\x20\47\x6e\x61\166\137\x6d\x65\156\165\x5f\151\164\x65\x6d\x27\x29"); $cseo->link_checked = $post_link; goto o3DPV; case "\x74\x69\x74\154\145": $result = $wpdb->get_results("\x53\x45\114\105\103\x54\40\104\x49\x53\x54\x49\116\103\x54\x20\111\104\40\x46\122\x4f\115\40{$wpdb->prefix}\160\157\x73\164\x73\40\x61\x73\40\160\157\x73\164\163\x2c\x20{$wpdb->prefix}\160\x6f\x73\x74\155\145\x74\141\x20\x61\163\40\160\157\x73\164\x6d\x65\164\141\x20\x57\x48\105\122\x45\40\160\157\x73\x74\163\56\x49\x44\40\75\40\x70\157\163\x74\155\x65\x74\141\x2e\x70\157\x73\x74\x5f\151\144\40\x41\x4e\104\40\x28\x28\160\157\163\x74\155\145\x74\141\x2e\155\x65\164\x61\137\x6b\x65\x79\x20\75\40\47\x63\171\142\x65\162\163\x65\x6f\x5f\x70\x6f\163\164\x5f\x6e\141\x6d\145\47\x20\x41\116\104\x20\160\157\x73\164\x6d\145\164\141\x2e\x6d\145\x74\x61\x5f\x76\141\x6c\165\145\x20\75\40\47" . $name . "\47\x29\x20\117\x52\x20\50\160\157\x73\164\163\56\160\x6f\163\x74\137\156\141\155\x65\x20\75\x20\x27" . $name . "\x27\x29\40\117\122\x20\50\160\157\x73\164\163\56\160\x6f\163\x74\137\156\x61\x6d\x65\40\x3d\x20\47" . $no_emoji_name . "\47\51\51\40\101\116\x44\x20\x70\157\x73\164\x73\x2e\160\x6f\x73\x74\x5f\163\x74\x61\164\165\163\40\116\117\124\x20\x49\x4e\40\50\47\x74\162\x61\x73\150\47\x29\40\101\116\x44\x20\x70\x6f\163\x74\x73\56\160\157\163\164\x5f\x74\x79\160\145\40\x4e\117\124\40\111\x4e\x20\x28\x27\x61\x74\x74\141\143\x68\155\145\156\x74\47\54\x20\x27\x72\x65\166\x69\163\x69\157\x6e\x27\54\40\47\156\141\x76\137\x6d\145\156\165\137\x69\164\x65\x6d\x27\51"); goto o3DPV; case "\x67\165\151\x64\137\x61\156\x64\x5f\164\x69\x74\154\145": $result = $wpdb->get_results("\x53\105\x4c\105\x43\124\40\104\111\x53\x54\111\x4e\x43\124\x20\111\x44\40\106\122\117\115\40{$wpdb->prefix}\x70\x6f\163\x74\x73\40\141\x73\40\160\x6f\163\164\x73\x2c\40{$wpdb->prefix}\x70\x6f\163\164\155\145\x74\x61\40\x61\x73\x20\x70\157\163\x74\x6d\145\164\x61\x20\x57\110\105\x52\105\x20\160\x6f\x73\x74\x73\x2e\111\x44\40\75\40\160\157\x73\164\x6d\x65\164\141\56\x70\x6f\163\164\x5f\x69\144\x20\x41\116\x44\x20\x28\50\x28\160\x6f\163\164\155\145\164\141\56\x6d\145\164\x61\x5f\x6b\145\x79\x20\x3d\x20\47\x63\171\x62\145\x72\x73\x65\x6f\137\160\x6f\x73\164\137\156\141\x6d\x65\x27\x20\101\x4e\x44\40\160\157\x73\164\155\x65\164\x61\56\155\145\x74\x61\x5f\x76\141\154\x75\145\x20\x3d\x20\47" . $name . "\x27\x29\40\117\122\x20\x28\160\157\163\164\163\56\160\x6f\163\164\137\x6e\141\155\145\40\75\x20\47" . $name . "\47\51\x20\117\122\x20\50\160\157\x73\x74\x73\56\x70\x6f\x73\x74\x5f\x6e\141\x6d\145\x20\75\x20\x27" . $no_emoji_name . "\x27\x29\x29\40\x4f\122\40\x28\x70\157\163\x74\x6d\145\164\x61\x2e\155\145\164\141\x5f\x6b\145\x79\40\75\x20\x27\x63\171\142\x65\x72\x73\x65\157\x5f\x70\157\x73\164\x5f\x6c\151\156\153\x27\40\101\x4e\104\x20\x70\157\x73\x74\x6d\145\164\x61\x2e\155\145\164\x61\x5f\x76\x61\x6c\x75\x65\x20\75\x20\47" . esc_sql($post_link) . "\47\x29\x29\x20\x41\x4e\104\40\160\x6f\163\164\x73\x2e\160\157\x73\164\137\x73\x74\141\164\x75\x73\40\x4e\117\124\x20\x49\x4e\x20\50\x27\x74\162\141\163\150\47\51\x20\x41\x4e\x44\40\x70\x6f\163\164\x73\x2e\160\x6f\163\x74\x5f\164\171\x70\x65\x20\x4e\x4f\124\x20\111\116\40\x28\47\x61\x74\164\141\x63\x68\155\145\x6e\x74\47\x2c\x20\x27\x72\x65\x76\151\x73\x69\157\x6e\x27\x2c\x20\x27\156\141\x76\x5f\155\145\156\165\137\151\x74\x65\155\47\x29"); $cseo->link_checked = $post_link; goto o3DPV; default: return false; } q_ONN: o3DPV: if (!isset($result)) { goto apZok; } foreach ($result as $res) { if (function_exists("\x70\x6c\x6c\x5f\x67\145\164\x5f\x70\157\163\164\137\x6c\141\x6e\x67\x75\x61\x67\x65")) { goto G41Ak; } if (defined("\x49\103\x4c\137\123\x49\x54\x45\120\x52\105\x53\123\137\x56\x45\x52\123\x49\117\116") && isset($GLOBALS["\x73\151\x74\145\160\162\x65\163\163"])) { goto KMtVe; } return $res->ID; goto DDvoF; G41Ak: if ($cseo->current_feed["\157\x70\x74\151\x6f\156\x73"]["\160\x6f\x6c\171\154\141\156\147\137\154\x61\x6e\147\x75\141\147\x65"] === '' && pll_get_post_language($res->ID) === pll_default_language() || pll_get_post_language($res->ID) === $cseo->current_feed["\x6f\x70\164\151\157\x6e\x73"]["\x70\x6f\x6c\171\x6c\141\156\x67\137\154\x61\x6e\147\x75\141\147\x65"]) { goto svmhm; } $cseo->polylang_translations[pll_get_post_language($res->ID)] = $res->ID; goto elTkM; svmhm: return $res->ID; elTkM: goto DDvoF; KMtVe: global $sitepress; $post_language = $sitepress->get_language_for_element($res->ID, "\160\157\x73\164\137" . get_post_type($res->ID)); if ($cseo->current_feed["\157\x70\x74\x69\x6f\156\x73"]["\167\160\x6d\x6c\137\154\x61\x6e\x67\x75\141\x67\145"] === '' && $post_language === $sitepress->get_default_language() || $post_language === $cseo->current_feed["\157\x70\164\151\157\156\x73"]["\167\x70\x6d\x6c\137\154\x61\156\147\165\x61\x67\x65"]) { goto ClZlC; } $cseo->wpml_translations[$post_language] = $res->ID; goto DIqYE; ClZlC: return $res->ID; DIqYE: DDvoF: wU90C: } tbnbm: apZok: return false; } function cseo_addslash($url) { if (!($url[mb_strlen($url) - 1] !== "\x2f")) { goto ivlk2; } $url .= "\x2f"; ivlk2: return $url; } function cseo_attach_post_thumbnail($post_id, $image_url, $title) { $attach_id = cseo_add_image_to_library($image_url, $title, $post_id); if (!($attach_id !== false)) { goto SqgSj; } if (!set_post_thumbnail($post_id, $attach_id)) { goto OhzHH; } return $attach_id; OhzHH: SqgSj: return false; } function cyberseo_pixabay_shortcode($atts) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["\160\x69\170\x61\142\x61\x79\x5f\141\160\x69\x5f\x6b\145\x79"]))) { goto p1vym; } $cseo->log("\120\151\170\x61\x62\x61\171\x20\x41\120\111\x20\153\145\171\40\151\163\40\156\x6f\x74\x20\163\145\164\x2e\40\124\x68\145\x20\x69\155\141\147\145\40\x77\151\x6c\x6c\x20\x6e\157\164\x20\x62\x65\40\147\x65\x6e\x65\x72\x61\164\145\144"); return ''; p1vym: $atts = shortcode_atts(["\161" => '', "\x6c\141\x6e\x67" => "\145\x6e", "\x69\155\x61\147\x65\137\164\171\160\x65" => "\x61\x6c\x6c", "\157\x72\x69\145\156\x74\141\x74\151\x6f\x6e" => "\x61\x6c\154", "\143\x61\x74\145\147\157\x72\171" => '', "\x6d\x69\x6e\x5f\x77\x69\x64\x74\x68" => "\60", "\x6d\x69\x6e\x5f\150\145\151\147\150\164" => "\60", "\143\157\x6c\157\162\x73" => '', "\157\162\144\x65\162" => "\x70\x6f\x70\x75\x6c\x61\x72", "\160\x61\147\145" => "\61", "\x70\145\162\x5f\x70\141\147\x65" => "\62\x30\x30", "\163\x61\x66\x65\163\x65\x61\162\143\150" => "\x66\141\154\x73\x65", "\145\144\x69\164\x6f\x72\x73\x5f\x63\150\x6f\x69\143\x65" => "\x66\x61\x6c\163\x65", "\x63\150\x6f\157\163\145" => "\60", "\143\x6c\141\x73\x73" => "\141\x6c\x69\147\156\143\145\x6e\x74\x65\162", "\156\x61\x6d\145" => ''], $atts); $atts["\161"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["\161"]))); $keywords = explode("\54", $atts["\161"]); shuffle($keywords); foreach ($keywords as $q) { $q = trim($q); $cseo->log("\x52\x65\x71\165\145\163\164\x69\x6e\147\x20\x50\151\x78\x61\x62\141\171\40\x69\x6d\141\x67\x65\x20\146\157\x72\x20\42" . $q . "\x22"); $atts["\161"] = urlencode($q); $args = ''; foreach ($atts as $arg => $value) { if (in_array($arg, ["\143\150\x6f\157\x73\145", "\143\x6c\x61\163\163", "\x6e\141\155\x65"])) { goto Osyxa; } $args .= "\46" . $arg . "\x3d" . $value; Osyxa: NpII5: } DFJMe: $result = cseo_file_get_contents($cseo->eps["\160\x69\170\141\x62\x61\x79"] . "\77\153\x65\171\x3d" . trim(get_option(CSEO_ACCOUNTS)["\x70\x69\x78\x61\142\141\171\x5f\141\160\151\x5f\153\145\x79"]) . $args); $json = json_decode($result, true); if (!(!empty($json["\x68\x69\x74\x73"]) && count($json["\x68\151\x74\163"]))) { goto JFak_; } goto Pfj0L; JFak_: $cseo->log("\125\x6e\141\x62\154\145\40\x74\x6f\x20\162\x65\x74\x72\151\145\x76\145\x20\x50\x69\170\141\x62\x61\x79\x20\151\155\141\147\145"); jxLiR: } Pfj0L: if (!(empty($json["\150\151\x74\x73"]) || !count($json["\x68\x69\x74\163"]))) { goto fyYWp; } $cseo->log("\x54\x68\145\x20\x69\x6d\141\147\x65\40\x77\151\x6c\154\40\156\x6f\164\x20\x62\x65\x20\147\x65\x6e\x65\x72\141\164\x65\144"); return ''; fyYWp: $choose = abs(intval($atts["\143\x68\157\x6f\163\x65"])); $count = count($json["\x68\151\x74\163"]); if ($choose === 0) { goto Rfw1T; } if ($choose <= $count) { goto sJ1vo; } $image_url = $json["\150\x69\x74\x73"][$count - 1]["\154\x61\x72\147\x65\111\155\141\x67\145\x55\122\114"]; goto VX5GM; sJ1vo: $image_url = $json["\150\x69\x74\x73"][$choose - 1]["\x6c\141\x72\x67\145\x49\155\141\x67\x65\x55\122\114"]; VX5GM: goto IFt8l; Rfw1T: $image_url = $json["\x68\x69\x74\163"][rand(0, $count - 1)]["\x6c\141\x72\147\x65\111\x6d\141\147\x65\x55\122\114"]; IFt8l: $cseo->log("\x44\x6f\x6e\145"); if (!empty($atts["\x6e\141\155\145"])) { goto vtMSA; } return "\74\x69\x6d\147\x20\x63\154\x61\163\x73\75\x22" . $atts["\143\154\x61\163\163"] . "\x22\x20\x73\x72\143\x3d\42" . $image_url . "\x22\x20\57\76"; goto fl1PI; vtMSA: return "\74\151\x6d\147\40\x63\154\141\163\x73\75\42" . $atts["\x63\x6c\x61\x73\163"] . "\42\x20\x73\x72\143\x3d\42" . $image_url . "\x22\x20\141\154\164\75\42" . str_replace("\x22", '', $atts["\156\141\x6d\145"]) . "\42\x20\x2f\x3e"; fl1PI: } function cseo_markdown_to_html($text) { global $cseo; if (!(($cseo->current_feed["\x6f\x70\164\x69\157\x6e\x73"]["\x63\x6f\156\166\145\162\x74\137\155\x61\x72\153\144\x6f\167\x6e"] ?? '') === "\157\x6e")) { goto yEolW; } if (preg_match("\x2f\50\x3f\x3a\x5e\43\173\61\54\66\175\134\163\174\x5b\x2a\137\x5d\173\61\x2c\x32\175\x5b\136\52\137\135\x2b\133\52\137\x5d\x7b\x31\x2c\62\175\174\x5c\133\133\x5e\x5c\135\x5d\53\134\x5d\134\x28\x5b\x5e\x5c\x29\135\x2b\134\x29\174\x5e\x5b\x2d\52\x2b\x5d\x5c\x73\x7c\x5e\134\x64\x2b\134\56\x5c\x73\x7c\x5e\76\x5c\x73\174\x60\133\x5e\x60\135\x2b\x60\x7c\136\133\x2d\x2a\137\x5d\173\x33\x2c\175\44\x29\x2f\x6d", $text)) { goto yaS5H; } return $text; yaS5H: $escapeHtml = function ($text) { return htmlspecialchars($text, ENT_QUOTES | ENT_HTML5, "\125\x54\106\55\x38"); }; $placeholders = []; $generatePlaceholder = function () use(&$placeholders) { aX2V5: $key = "\120\x4c\101\103\x45\110\x4f\114\x44\x45\122\137" . bin2hex(random_bytes(8)); if (isset($placeholders[$key])) { goto aX2V5; } CUhhG: return $key; }; $text = preg_replace_callback("\57\140\140\140\x28\x5b\134\x73\134\123\135\52\x3f\x29\140\x60\x60\57\163", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "\x3c\160\x72\145\x3e\x3c\143\157\x64\145\x3e" . $escapeHtml($matches[1]) . "\74\x2f\x63\x6f\144\x65\x3e\74\57\x70\162\x65\x3e"; return $key; }, $text); $text = preg_replace_callback("\x2f\x60\50\x5b\136\x60\x5d\x2a\51\x60\57", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "\x3c\x63\157\x64\145\x3e" . $escapeHtml($matches[1]) . "\x3c\57\143\157\x64\x65\x3e"; return $key; }, $text); $text = preg_replace_callback("\x2f\41\x5c\133\50\56\52\77\51\x5c\135\134\50\x28\56\x2a\x3f\51\x5c\x29\x2f", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "\x3c\x69\x6d\147\x20\x73\162\143\75\42" . $escapeHtml($matches[2]) . "\42\40\x61\154\164\75\42" . $escapeHtml($matches[1]) . "\42\x3e"; return $key; }, $text); $text = preg_replace_callback("\x2f\x5c\x5b\50\x2e\x2a\77\51\x5c\x5d\x5c\50\x28\56\52\x3f\51\x5c\x29\x2f", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "\74\x61\40\x68\x72\x65\146\x3d\42" . $escapeHtml($matches[2]) . "\x22\76" . $escapeHtml($matches[1]) . "\74\x2f\141\76"; return $key; }, $text); $i = 6; V6nfJ: if (!($i >= 1)) { goto Hy5AQ; } $text = preg_replace_callback("\x2f\x5e" . str_repeat("\43", $i) . "\x20\x28\56\x2a\77\x29\44\57\155", function ($matches) use($i, $escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $headerContent = preg_replace("\57\134\x2a\53\x2f", '', $matches[1]); $placeholders[$key] = "\74\x68" . $i . "\76" . $escapeHtml(trim($headerContent)) . "\x3c\57\150" . $i . "\76"; return $key; }, $text); gU3IR: $i--; goto V6nfJ; Hy5AQ: $text = preg_replace_callback("\57\136\76\x20\50\x2e\52\77\x29\x28\x3f\75\x28\x5c\156\x7c\134\x7a\x29\x29\x2f\155", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $key = $generatePlaceholder(); $placeholders[$key] = "\74\142\x6c\157\x63\x6b\161\x75\x6f\x74\x65\76" . $escapeHtml(trim($matches[1])) . "\74\57\x62\x6c\x6f\x63\x6b\x71\165\157\164\145\x3e"; return $key; }, $text); $text = preg_replace_callback("\x2f\50\136\134\x73\x2a\134\x2a\134\163\x2b\x2e\x2a\77\x28\x5c\156\x7c\x5c\172\51\x29\53\57\155", function ($matches) use($escapeHtml, &$placeholders, $generatePlaceholder) { $items = preg_split("\x2f\x5c\156\x5c\x73\52\134\x2a\x5c\163\x2b\x2f", trim($matches[0])); $html = "\74\165\x6c\76"; foreach ($items as $item) { if (empty(trim($item))) { goto yvA4Q; } $item = preg_replace("\x2f\x5e\x5c\52\x2b\134\x73\52\x7c\x5c\52\x2b\44\x2f", '', $item); $item = str_replace("\52\x2a", '', $item); $html .= "\74\154\151\76" . $escapeHtml(trim($item)) . "\74\57\154\151\x3e"; yvA4Q: gLEn_: } ncw5m: $html .= "\74\x2f\165\x6c\x3e"; $key = $generatePlaceholder(); $placeholders[$key] = $html; return $key; }, $text); $text = preg_replace_callback("\57\50\134\x2a\x5c\x2a\174\x5f\x5f\x29\50\56\x2a\x3f\x29\134\61\x2f", function ($matches) use($escapeHtml) { return "\74\163\x74\x72\x6f\156\x67\x3e" . $escapeHtml($matches[2]) . "\74\57\163\x74\162\x6f\156\147\x3e"; }, $text); $text = preg_replace_callback("\57\x28\134\x2a\x7c\x5f\x29\50\56\52\x3f\51\x5c\61\57", function ($matches) use($escapeHtml) { return "\74\145\x6d\x3e" . $escapeHtml($matches[2]) . "\74\57\145\155\76"; }, $text); $text = strtr($text, $placeholders); yEolW: return $text; } function cseo_rh($text, $str) { $q = preg_quote($str, "\x2f"); if (!preg_match("\x2f\136" . $q . "\50\x5c\x72\x5c\x6e\x7c\134\x6e\x5c\x72\x7c\134\x6e\x7c\x5c\162\x7c\x3c\x62\162\76\x29\57\165", $text, $matches)) { goto zf9mu; } $text = substr($text, strlen($matches[0])); zf9mu: if (!preg_match("\57\136\74\50\x70\174\x68\x31\174\150\x32\x7c\150\63\174\150\64\174\x68\x35\x29\76" . $q . "\x3c\134\57\x5c\x31\76\57\165", $text, $matches)) { goto SAc0K; } $text = substr($text, strlen($matches[0])); SAc0K: return trim($text); } function cyberseo_midjourney_goapi_shortcode($atts) { global $cseo; $atts = shortcode_atts(["\156\x61\x6d\x65" => '', "\x70\162\157\x6d\160\164" => '', "\143\x6c\x61\x73\163" => "\143\x65\x6e\x74\x65\x72", "\x70\162\x6f\143\x65\x73\163\137\155\157\x64\145" => "\146\141\x73\164", "\141\x73\160\145\143\x74\137\x72\x61\164\151\x6f" => "\61\x36\72\x39"], $atts); $atts["\x70\162\157\155\x70\164"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["\160\x72\x6f\x6d\160\x74"]))); $apiKey = trim(get_option(CSEO_ACCOUNTS)["\147\157\141\x70\151\137\x61\x70\151\137\153\145\x79"]); if (strlen(trim($atts["\160\x72\x6f\x6d\160\x74"]))) { goto q4G8G; } $cseo->log("\115\x69\144\x6a\x6f\165\x72\x6e\x65\x79\40\160\162\x6f\155\x70\x74\40\151\163\x20\145\155\x70\164\x79"); return ''; q4G8G: if (strlen($apiKey)) { goto iT67a; } $cseo->log("\107\157\x41\x50\111\40\153\145\171\x20\151\163\x20\x6e\x6f\x74\x20\x73\145\x74"); return ''; iT67a: if (!$cseo->api_overlimit("\147\x6f\141\160\151\137\x61\x70\151\137\x6c\151\155\151\x74")) { goto F4eFz; } $cseo->log("\x47\157\x41\120\111\x20\150\x6f\x75\162\154\x79\40\162\x65\161\165\x65\163\x74\x20\x6c\151\155\151\164\40\150\x61\x73\40\142\x65\x65\156\40\162\145\141\143\150\145\144"); return ''; F4eFz: $cseo->log("\107\x65\156\x65\x72\141\164\x69\156\x67\x20\x4d\x69\x64\x6a\x6f\165\162\156\145\x79\40\x69\x6d\141\x67\145\40\x77\151\x74\x68\40\107\157\101\x50\111\40\x66\157\x72\40\42" . trim($atts["\x70\162\157\155\x70\x74"]) . "\x22"); $imagineUrl = $cseo->eps["\147\x6f\x61\x70\151\55\x6d\x69\x64\x6a\x6f\x75\x72\x6e\145\x79\55\151\x6d\141\x67\x69\x6e\145"]; $ch = curl_init($imagineUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["\x58\55\101\x50\111\x2d\x4b\105\x59\72\40" . $apiKey]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["\x70\162\x6f\x6d\160\164" => trim($atts["\x70\162\x6f\155\160\x74"]), "\x61\163\160\x65\143\x74\137\162\141\x74\x69\157" => $atts["\x61\163\160\x65\143\164\x5f\x72\x61\x74\151\x6f"], "\x70\162\157\143\x65\x73\163\x5f\x6d\157\x64\x65" => $atts["\160\162\157\x63\145\163\163\x5f\155\x6f\x64\145"], "\167\x65\x62\x68\157\x6f\x6b\137\x65\x6e\144\160\x6f\x69\x6e\x74" => '', "\x77\x65\x62\x68\157\x6f\153\x5f\163\145\143\x72\145\164" => ''])); $response = curl_exec($ch); curl_close($ch); $task = json_decode($response, true); $taskId = $task["\x74\141\163\153\x5f\151\144"] ?? null; if ($taskId) { goto qQK0B; } $cseo->log("\x47\157\101\120\x49\40\115\151\x64\152\157\165\x72\156\145\171\x20\151\x6d\141\147\151\156\x65\40\145\162\x72\x6f\162\72\40" . ($task["\155\145\163\x73\141\147\145"] ?? "\165\x6e\x6b\156\157\167\156")); return ''; qQK0B: J06Bp: sleep(1); $fetchUrl = $cseo->eps["\147\x6f\x61\160\x69\55\x6d\151\x64\152\157\x75\x72\156\145\x79\x2d\146\x65\x74\143\150"]; $ch = curl_init($fetchUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["\x43\157\x6e\164\x65\156\164\55\124\x79\160\145\72\x20\x61\x70\x70\154\151\143\x61\164\151\157\156\x2f\x6a\x73\x6f\x6e"]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["\x74\141\163\153\x5f\151\144" => $taskId])); $fetchResponse = curl_exec($ch); curl_close($ch); $fetchResult = json_decode($fetchResponse, true); if ($fetchResult["\x73\164\x61\x74\x75\x73"] !== "\146\x69\x6e\x69\163\x68\145\144" && $fetchResult["\163\x74\x61\164\x75\163"] !== "\x66\141\x69\x6c\145\144") { goto J06Bp; } hPQRt: if (!($fetchResult["\163\x74\x61\x74\x75\x73"] !== "\146\151\x6e\x69\x73\x68\145\x64")) { goto ysW37; } $cseo->log("\107\x6f\x41\x50\x49\40\x4d\151\x64\152\157\165\x72\x6e\145\x79\x20\151\x6d\141\147\x69\156\145\x20\x66\145\x74\143\x68\x20\145\x72\x72\x6f\x72\x3a\x20" . ($fetchResult["\x74\x61\163\153\x5f\x72\x65\163\165\x6c\164"]["\x6d\x65\163\163\141\x67\x65"] ?? "\x75\x6e\x6b\156\x6f\167\x6e")); return ''; ysW37: $upscaleUrl = $cseo->eps["\147\157\141\160\x69\55\x6d\151\144\x6a\157\165\x72\x6e\145\x79\x2d\165\160\x73\143\x61\x6c\145"]; $ch = curl_init($upscaleUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["\x58\55\x41\x50\x49\x2d\113\105\131\x3a\x20" . $apiKey]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["\157\162\x69\x67\x69\156\137\164\141\x73\x6b\x5f\151\144" => $taskId, "\x69\156\x64\x65\170" => "\61"])); $upscaleResponse = curl_exec($ch); curl_close($ch); $upscaleTask = json_decode($upscaleResponse, true); $upscaleTaskId = $upscaleTask["\164\141\163\153\137\151\x64"]; if ($upscaleTaskId) { goto qYVsn; } $cseo->log("\107\157\101\x50\x49\40\x4d\x69\144\x6a\x6f\x75\162\x6e\x65\171\x20\x75\x70\x73\143\141\154\x65\x20\145\x72\x72\157\x72\72\x20" . ($task["\x6d\x65\163\x73\x61\x67\x65"] ?? "\x75\x6e\x6b\x6e\x6f\x77\x6e")); return ''; qYVsn: wix3n: $ch = curl_init($fetchUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["\103\157\x6e\x74\x65\x6e\164\x2d\x54\x79\160\x65\72\40\141\160\160\x6c\x69\143\x61\164\151\x6f\x6e\x2f\x6a\163\157\156"]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["\164\141\x73\x6b\137\151\x64" => $upscaleTaskId])); $fetchResponse = curl_exec($ch); curl_close($ch); $fetchResult = json_decode($fetchResponse, true); sleep(1); if ($fetchResult["\x73\164\141\164\165\x73"] !== "\x66\x69\x6e\x69\x73\150\145\144" && $fetchResult["\163\164\x61\164\165\x73"] !== "\146\141\151\x6c\145\x64") { goto wix3n; } GMF2E: if ($fetchResult["\163\164\x61\164\165\x73"] === "\x66\x69\156\151\x73\150\x65\x64" && isset($fetchResult["\164\141\163\153\137\x72\145\163\x75\154\x74"]["\151\155\141\147\x65\x5f\x75\162\154"])) { goto TP5uR; } $cseo->log("\107\157\101\120\x49\40\115\151\144\152\157\165\x72\x6e\145\x79\x20\x75\x70\x73\x63\141\x6c\145\40\146\x65\x74\143\x68\x20\145\162\x72\157\162\x3a\40" . ($fetchResult["\x74\141\163\x6b\137\162\145\163\165\154\164"]["\x6d\x65\163\163\x61\x67\x65"] ?? "\165\x6e\153\x6e\157\167\x6e")); return ''; goto RB6tD; TP5uR: $cseo->log("\x53\x75\x63\x63\145\163\163"); $image_url = cseo_save_image($fetchResult["\x74\x61\x73\x6b\137\162\145\163\x75\154\x74"]["\x69\155\141\147\x65\137\x75\x72\154"], $atts["\156\x61\155\x65"]); if (!empty($atts["\x6e\141\155\x65"])) { goto rebCn; } return "\74\151\155\147\40\x63\154\x61\163\163\x3d\x22" . $atts["\x63\154\141\x73\x73"] . "\x22\x20\163\x72\143\x3d\x22" . $image_url . "\42\40\57\x3e"; goto gmqc8; rebCn: return "\x3c\151\155\147\x20\143\x6c\x61\163\x73\x3d\42" . $atts["\x63\x6c\x61\163\163"] . "\42\40\163\162\143\75\x22" . $image_url . "\42\40\x61\x6c\x74\x3d\x22" . str_replace("\42", '', $atts["\156\141\155\145"]) . "\x22\x20\57\76"; gmqc8: RB6tD: $cseo->log("\125\156\153\156\x6f\x77\x6e\40\107\157\x41\x50\111\40\115\151\144\x6a\157\x75\x72\x6e\x65\171\40\x65\162\162\x6f\162"); return ''; } function cyberseo_midjourney_shortcode($atts) { global $cseo; if (isset($atts["\x70\162\x6f\166\151\144\x65\162"])) { goto qW5zN; } $atts["\160\162\157\166\151\x64\x65\162"] = "\147\x6f\141\160\151"; qW5zN: if (!($atts["\x70\162\x6f\166\151\x64\x65\x72"] === "\x67\x6f\x61\160\151")) { goto yr8Ro; } return cyberseo_midjourney_goapi_shortcode($atts); yr8Ro: $cseo->log("\125\156\x6b\x6e\x6f\167\x6e\40\x4d\151\x64\x6a\x6f\165\x72\x6e\x65\164\40\101\120\x49\x20\x70\162\157\x76\x69\144\145\x72\72\x20" . $atts["\x70\x72\157\166\x69\144\145\x72"]); return ''; } function cyberseo_flux_goapi_shortcode($atts) { global $cseo; $atts = shortcode_atts(["\x6d\157\144\145\154" => "\146\x6c\165\x78\x31\55\144\x65\166", "\x70\162\157\x6d\x70\x74" => '', "\x6e\x65\x67\141\x74\x69\166\145\137\x70\162\x6f\x6d\160\x74" => '', "\x6e\141\155\x65" => '', "\167\x69\144\164\x68" => 1344, "\x68\145\x69\147\x68\164" => 768, "\x63\x6c\141\x73\163" => "\143\x65\156\164\x65\x72"], $atts); if (!(strpos($atts["\x6d\157\144\145\x6c"], "\121\165\142\x69\143\157\x2f") === false)) { goto uawMW; } $atts["\x6d\x6f\x64\x65\x6c"] = "\x51\165\142\151\x63\x6f\x2f" . $atts["\x6d\157\x64\x65\x6c"]; uawMW: $atts["\160\162\x6f\155\160\x74"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["\160\162\157\x6d\x70\x74"]))); $atts["\x6e\x65\x67\141\164\151\x76\x65\x5f\160\162\157\x6d\x70\164"] = cseo_remove_emojis(cseo_strip_tags(stripslashes($atts["\156\x65\147\141\164\x69\x76\x65\x5f\160\162\157\155\160\x74"]))); $apiKey = trim(get_option(CSEO_ACCOUNTS)["\x67\x6f\141\160\x69\137\x61\160\x69\x5f\x6b\145\x79"]); if (strlen(trim($atts["\160\162\157\x6d\x70\x74"]))) { goto z0Mdf; } $cseo->log("\106\154\x75\170\x20\x70\x72\x6f\155\160\x74\40\151\x73\40\x65\x6d\160\x74\x79"); return ''; z0Mdf: if (strlen($apiKey)) { goto w4ZSC; } $cseo->log("\107\157\101\120\x49\x20\153\x65\x79\x20\151\x73\40\156\x6f\164\40\163\145\x74"); return ''; w4ZSC: if (!$cseo->api_overlimit("\x67\157\141\x70\x69\137\x61\x70\x69\137\x6c\x69\x6d\x69\164")) { goto bXKEH; } $cseo->log("\107\x6f\101\x50\x49\40\x68\157\x75\x72\x6c\x79\40\162\x65\x71\x75\145\163\164\x20\154\x69\x6d\x69\164\x20\x68\x61\163\40\142\x65\145\156\40\162\145\141\x63\x68\x65\x64"); return ''; bXKEH: $cseo->log("\x47\x65\156\145\x72\141\x74\x69\156\x67\x20\106\x6c\x75\170\x20\151\x6d\141\x67\145\x20\167\x69\x74\x68\x20\107\157\x41\x50\x49\40\x66\x6f\x72\x20\x22" . trim($atts["\x70\x72\157\x6d\x70\x74"]) . "\x22"); $ep = $cseo->eps["\147\157\x61\160\151\55\x66\154\165\x78\55\164\141\163\x6b"]; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $ep, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x50\x4f\123\x54", CURLOPT_POSTFIELDS => json_encode(["\x6d\157\144\145\x6c" => $atts["\155\x6f\x64\145\x6c"], "\x74\x61\163\153\x5f\x74\171\160\145" => "\164\x78\164\x32\x69\155\x67", "\151\x6e\160\x75\164" => ["\160\162\157\x6d\x70\x74" => trim($atts["\160\162\x6f\155\160\164"]), "\156\x65\147\x61\164\151\x76\145\x5f\x70\x72\x6f\155\160\164" => trim($atts["\x6e\x65\147\x61\164\x69\166\x65\x5f\160\162\157\155\x70\x74"]), "\167\x69\144\164\x68" => intval($atts["\167\151\144\x74\150"]), "\x68\145\x69\x67\150\164" => intval($atts["\x68\x65\x69\147\x68\164"])]]), CURLOPT_HTTPHEADER => array("\130\55\101\120\111\x2d\x4b\x65\171\x3a\40" . $apiKey, "\x55\x73\x65\162\55\x41\x67\x65\156\x74\x3a\40\101\x70\151\144\x6f\x67\57\x31\x2e\60\56\x30\40\50\x68\x74\164\160\163\x3a\x2f\57\141\x70\151\x64\157\147\56\x63\157\155\51", "\103\x6f\156\164\145\x6e\x74\55\124\x79\x70\x65\x3a\40\x61\160\160\x6c\151\143\141\164\x69\x6f\x6e\x2f\152\163\x6f\156"))); $response = curl_exec($curl); curl_close($curl); $task = json_decode($response, true); $taskId = $task["\x64\x61\164\x61"]["\164\x61\163\x6b\137\151\x64"] ?? null; if ($taskId) { goto gPxFR; } $cseo->log("\107\x6f\101\x50\111\x20\x46\154\165\170\40\x69\155\141\x67\x69\156\145\40\x65\162\x72\157\162\x3a\40" . ($task["\155\x65\x73\163\x61\147\145"] ?? "\165\x6e\153\156\157\x77\156")); return ''; gPxFR: DQO4o: sleep(1); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $ep . $taskId, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x47\105\124", CURLOPT_HTTPHEADER => array("\x58\x2d\x41\120\111\x2d\113\x65\x79\x3a\x20" . $apiKey, "\125\163\x65\x72\55\101\147\x65\x6e\164\x3a\40\101\x70\151\x64\157\147\x2f\x31\56\60\56\x30\x20\x28\x68\x74\x74\160\163\72\57\57\141\x70\151\144\x6f\x67\x2e\x63\157\x6d\51"))); $response = curl_exec($curl); curl_close($curl); $responseData = json_decode($response, true); if ($responseData["\x64\x61\x74\x61"]["\163\x74\x61\x74\165\163"] !== "\x63\x6f\155\160\x6c\145\x74\145\144" && $responseData["\x64\141\164\x61"]["\163\164\141\x74\x75\x73"] !== "\x66\x61\151\x6c\145\x64") { goto DQO4o; } NdXBK: if ($responseData["\x63\x6f\x64\145"] === 200 && $responseData["\x64\141\x74\x61"]["\163\164\x61\164\165\x73"] === "\x63\157\155\160\154\145\x74\145\x64" && isset($responseData["\x64\141\x74\141"]["\157\165\164\x70\x75\164"]["\x69\155\x61\x67\x65\137\165\x72\154"])) { goto JHP7q; } if ($responseData["\144\x61\164\x61"]["\163\x74\x61\x74\x75\x73"] === "\x66\141\x69\154\x65\x64") { goto sb5Th; } goto FKlz9; JHP7q: $cseo->log("\123\x75\143\x63\x65\163\163"); $image_url = cseo_save_image($responseData["\144\141\164\141"]["\157\x75\164\x70\165\x74"]["\x69\x6d\x61\x67\145\137\x75\x72\154"], $atts["\x6e\x61\x6d\145"]); if (!empty($atts["\x6e\141\155\x65"])) { goto D2UgL; } return "\74\151\155\147\40\x63\154\x61\163\163\75\x22" . $atts["\x63\154\x61\x73\x73"] . "\x22\40\x73\x72\x63\75\x22" . $image_url . "\42\x20\x2f\x3e"; goto KU7Xy; D2UgL: return "\x3c\151\155\x67\40\x63\154\141\163\x73\75\x22" . $atts["\143\154\141\163\x73"] . "\42\40\163\x72\143\75\x22" . $image_url . "\x22\x20\141\154\x74\x3d\x22" . str_replace("\x22", '', $atts["\x6e\141\x6d\145"]) . "\42\x20\57\x3e"; KU7Xy: goto FKlz9; sb5Th: $cseo->log("\x47\157\x41\120\111\40\x46\154\x75\x78\40\x69\155\x61\x67\x69\156\x65\x20\145\x72\162\157\x72\72\40" . ($responseData["\144\x61\x74\x61"]["\145\162\162\x6f\162"]["\155\145\x73\x73\141\x67\145"] ?? "\x75\x6e\153\x6e\x6f\167\x6e")); return ''; FKlz9: $cseo->log("\125\x6e\x6b\x6e\157\x77\x6e\40\107\157\101\x50\x49\40\x46\x6c\x75\170\40\x65\x72\x72\157\x72"); return ''; } function cyberseo_flux_shortcode($atts) { global $cseo; if (isset($atts["\x70\162\157\166\x69\x64\x65\162"])) { goto SL0I_; } $atts["\160\x72\157\166\151\144\x65\x72"] = "\x67\x6f\x61\x70\151"; SL0I_: if (!($atts["\x70\x72\x6f\x76\151\144\145\162"] === "\147\x6f\141\160\151")) { goto nD0lO; } return cyberseo_flux_goapi_shortcode($atts); nD0lO: $cseo->log("\125\156\153\156\x6f\167\x6e\40\x4d\151\x64\152\157\165\x72\156\x65\164\x20\x41\x50\x49\x20\160\162\157\x76\x69\x64\x65\x72\x3a\40" . $atts["\160\162\x6f\166\151\x64\x65\x72"]); return ''; } function cseo_trim_claude($text) { $lines = explode("\12", trim($text)); if (!(count($lines) >= 3)) { goto Do9TB; } $l = trim($lines[0]); if (!($l[mb_strlen($l) - 1] === "\x3a" && trim($lines[1]) === '')) { goto W4FEA; } $text = trim(implode("\xa", array_slice($lines, 2, count($lines) - 2))); W4FEA: Do9TB: return $text; } function cyberseo_openrouter_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["\x6f\x70\x65\x6e\162\x6f\x75\164\145\162\x5f\x61\x70\151\137\x6b\145\x79"]))) { goto LMj2A; } $cseo->log("\117\x70\x65\x6e\x52\157\x75\x74\x65\162\x20\x41\x50\x49\x20\x6b\x65\x79\x20\151\163\40\x6e\x6f\164\40\x73\x65\164"); $cseo->failure = true; return ''; LMj2A: if (!$cseo->api_overlimit("\x6f\160\145\x6e\x72\x6f\165\x74\x65\x72\137\141\x70\151\137\154\x69\x6d\151\164")) { goto WFSiE; } $cseo->log("\x4f\160\145\156\122\157\165\x74\x65\x72\x20\x47\x50\x54\40\x41\x50\x49\40\x68\157\x75\162\154\171\x20\162\x65\161\x75\145\163\164\x20\154\x69\155\151\164\40\150\x61\163\x20\142\145\145\x6e\x20\x72\x65\141\143\150\x65\x64"); $cseo->failure = true; return ''; WFSiE: $apiUrl = $cseo->eps["\157\x70\x65\156\x72\x6f\x75\x74\145\x72\55\x63\157\155\160\x6c\x65\164\151\157\156\x73"]; $apiKey = trim(get_option(CSEO_ACCOUNTS)["\157\x70\145\156\x72\157\x75\x74\145\x72\137\x61\x70\x69\x5f\153\145\x79"]); $atts["\x6d\145\163\x73\x61\x67\x65\163"] = [["\162\157\154\145" => "\x75\x73\145\x72", "\x63\x6f\156\x74\145\156\x74" => $atts["\x70\x72\157\x6d\160\x74"]]]; if (!isset($atts["\155\141\x78\137\164\157\153\x65\156\163"])) { goto Xu_Nb; } $atts["\155\x61\170\137\164\x6f\153\x65\x6e\x73"] = intval($atts["\x6d\141\170\137\x74\157\x6b\145\156\x73"]); Xu_Nb: if (!isset($atts["\164\145\x6d\160\145\162\x61\164\165\x72\145"])) { goto TmzCo; } $atts["\x74\145\x6d\x70\145\x72\141\164\165\x72\x65"] = floatval($atts["\x74\145\x6d\x70\145\x72\141\x74\165\x72\145"]); TmzCo: if (!isset($atts["\x74\x6f\x70\137\153"])) { goto eczAj; } $atts["\164\x6f\x70\137\x6b"] = intval($atts["\x74\157\x70\x5f\153"]); eczAj: if (!isset($atts["\164\157\160\x5f\x70"])) { goto yKzVJ; } $atts["\164\157\x70\x5f\x70"] = floatval($atts["\164\x6f\x70\137\x70"]); yKzVJ: if (!isset($atts["\x70\162\145\163\145\156\x63\x65\x5f\160\145\x6e\x61\x6c\164\x79"])) { goto pbJp0; } $atts["\160\162\145\x73\145\x6e\143\x65\x5f\x70\145\x6e\x61\x6c\164\171"] = floatval($atts["\160\x72\x65\163\x65\x6e\x63\145\137\160\x65\x6e\x61\x6c\164\x79"]); pbJp0: if (!isset($atts["\x66\162\145\x71\x75\145\156\x63\x79\137\160\145\x6e\x61\154\164\x79"])) { goto dLmzN; } $atts["\x66\x72\145\x71\165\145\156\x63\171\x5f\x70\145\156\141\154\164\x79"] = floatval($atts["\x66\x72\x65\161\165\145\156\x63\x79\x5f\x70\145\156\141\x6c\x74\x79"]); dLmzN: if (!isset($atts["\x72\145\160\x65\164\151\x74\x69\x6f\x6e\x5f\160\x65\156\x61\154\x74\x79"])) { goto ekLMb; } $atts["\162\145\160\145\164\x69\164\151\x6f\x6e\137\160\145\156\x61\x6c\164\171"] = floatval($atts["\162\x65\160\145\x74\151\164\151\x6f\x6e\137\x70\145\156\x61\x6c\164\x79"]); ekLMb: if (!isset($atts["\x6d\x69\156\137\160"])) { goto yaWap; } $atts["\155\x69\x6e\x5f\x70"] = floatval($atts["\155\151\156\137\160"]); yaWap: if (!isset($atts["\164\x6f\160\x5f\141"])) { goto svP7c; } $atts["\x74\x6f\x70\x5f\141"] = floatval($atts["\x74\x6f\160\x5f\141"]); svP7c: if (!isset($atts["\x73\145\x65\x64"])) { goto Ol7BR; } $atts["\163\x65\145\x64"] = intval($atts["\x73\x65\145\144"]); Ol7BR: if (!$log) { goto SU2E1; } $cseo->log("\107\145\x6e\145\162\x61\x74\x69\156\147\40\x4f\160\145\x6e\x52\157\x75\x74\145\x72\40\50" . $atts["\155\x6f\x64\145\154"] . "\x29\40\143\x6f\x6e\164\145\x6e\x74\x20\x66\x6f\162\72\40" . trim(html_entity_decode($atts["\160\x72\x6f\x6d\x70\164"]))); SU2E1: unset($atts["\160\x72\x6f\155\x70\164"]); $ch = curl_init($apiUrl); curl_setopt($ch, CURLOPT_HTTPHEADER, ["\x43\157\156\x74\x65\156\164\55\x54\171\160\145\72\x20\141\x70\160\x6c\x69\x63\x61\164\151\157\x6e\x2f\x6a\x73\x6f\x6e", "\x41\165\164\x68\x6f\x72\x69\172\141\164\x69\157\x6e\72\40\102\145\141\x72\145\x72\40{$apiKey}", "\110\x54\124\120\x2d\122\x65\146\x65\162\145\x72\x3a\x20\150\164\x74\x70\x73\x3a\x2f\57\x77\x77\167\56\143\171\x62\145\x72\163\145\x6f\56\x6e\145\x74\x2f", "\130\x2d\x54\x69\164\154\145\72\x20\103\x79\142\145\162\123\105\x4f\40\x50\x72\x6f"]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($atts)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); if (!($response === false)) { goto TEZkd; } $error = curl_error($ch); curl_close($ch); $cseo->log("\x45\162\162\x6f\x72\x3a\x20" . $error); $cseo->failure = true; return ''; TEZkd: curl_close($ch); $result = json_decode($response, true); if (!isset($result["\x65\162\x72\157\162"]["\155\145\163\163\141\x67\145"])) { goto B1eBC; } $cseo->log("\x45\162\x72\x6f\162\72\x20" . $result["\145\x72\x72\x6f\162"]["\155\145\163\163\x61\147\145"]); $cseo->failure = true; return ''; B1eBC: if (!isset($result["\x63\150\157\151\143\145\x73"][0]["\x6d\145\163\x73\141\x67\x65"]["\143\157\156\x74\x65\156\x74"])) { goto XupIx; } $cseo->log("\x53\x75\x63\x63\x65\163\163"); if (!(strpos($atts["\155\157\x64\145\x6c"], "\x61\156\x74\x68\162\x6f\160\151\x63\57\143\154\141\x75\x64\x65") !== false || strpos($atts["\155\x6f\x64\145\x6c"], "\x67\145\x6d\151\x6e\151") !== false || strpos($atts["\x6d\x6f\x64\x65\x6c"], "\155\145\x74\141\x2d\x6c\154\x61\155\x61") !== false)) { goto sAcAy; } return cseo_markdown_to_html(cseo_html_cleanup(cseo_trim_claude($result["\143\x68\157\151\x63\x65\163"][0]["\x6d\145\x73\x73\141\x67\145"]["\x63\x6f\156\164\x65\x6e\164"]))); sAcAy: return cseo_markdown_to_html(cseo_html_cleanup($result["\143\x68\157\x69\x63\145\163"][0]["\155\x65\x73\x73\141\x67\x65"]["\x63\x6f\156\x74\x65\156\164"])); XupIx: $cseo->log("\x55\x6e\x6b\156\157\167\x6e\x20\117\x70\x65\156\x52\x6f\165\x74\145\x72\x20\x65\x72\162\x6f\x72"); $cseo->failure = true; return ''; } function cyberseo_xai_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["\x78\x61\x69\137\x61\160\x69\x5f\x6b\x65\x79"]))) { goto I2pbc; } $cseo->log("\170\101\x49\x20\101\x50\111\40\153\145\171\x20\x69\163\x20\156\x6f\164\x20\163\x65\x74"); $cseo->failure = true; return ''; I2pbc: if (!$cseo->api_overlimit("\170\141\151\137\x61\x70\151\x5f\x6c\151\x6d\x69\164")) { goto ZFg97; } $cseo->log("\170\101\x49\40\x41\x50\x49\x20\x68\x6f\x75\x72\x6c\x79\40\x72\145\x71\x75\145\163\x74\x20\154\x69\x6d\x69\x74\x20\150\141\163\40\x62\x65\145\x6e\40\162\x65\x61\143\150\x65\x64"); $cseo->failure = true; return ''; ZFg97: if (isset($atts["\155\x6f\144\x65\154"])) { goto PWflF; } $atts["\155\x6f\x64\x65\154"] = "\147\x72\157\153\x2d\142\x65\x74\141"; PWflF: $endpoint = $cseo->eps["\x78\141\151\x2d\x63\x68\141\x74"]; $atts["\155\x65\x73\163\141\x67\145\x73"] = [["\x72\157\154\x65" => "\165\x73\145\162", "\143\157\x6e\x74\x65\156\164" => $atts["\x70\x72\157\x6d\160\164"]]]; if (!$log) { goto FZ9xF; } $cseo->log("\107\145\156\x65\x72\141\164\151\156\147\x20\143\157\156\x74\x65\156\x74\40\x77\x69\x74\x68\40\x41\x49\40\x28" . $atts["\x6d\157\x64\x65\154"] . "\51\x20\x63\x6f\x6e\164\x65\x6e\164\x20\146\x6f\x72\72\40" . trim(html_entity_decode(stripslashes($atts["\x70\162\x6f\155\160\x74"])))); FZ9xF: unset($atts["\x70\162\x6f\155\160\164"]); unset($atts[0]); unset($atts[1]); $atts["\164\x65\x6d\x70\145\162\x61\164\165\x72\x65"] = floatval($atts["\x74\145\x6d\x70\x65\x72\x61\164\165\x72\145"] ?? 1.0); $atts["\164\x6f\160\x5f\x70"] = floatval($atts["\x74\157\160\x5f\160"] ?? 1.0); $atts["\160\x72\x65\163\x65\x6e\x63\x65\x5f\x70\x65\156\141\154\164\x79"] = floatval($atts["\160\162\145\163\x65\156\143\145\x5f\160\x65\156\x61\154\x74\x79"] ?? 0.0); $atts["\x66\162\x65\161\165\x65\156\143\171\137\160\x65\x6e\141\154\164\x79"] = floatval($atts["\x66\162\x65\161\x75\145\156\143\x79\137\x70\x65\x6e\141\154\x74\171"] ?? 0.0); if (!isset($atts["\155\x61\170\137\x74\x6f\153\x65\x6e\x73"])) { goto pY33n; } $atts["\155\x61\x78\137\x74\157\x6b\145\156\x73"] = abs(intval($atts["\155\x61\x78\x5f\x74\x6f\x6b\x65\x6e\x73"])); pY33n: $headers = ["\103\157\156\x74\145\x6e\164\x2d\124\171\x70\x65\x3a\x20\141\x70\x70\x6c\x69\x63\141\x74\x69\x6f\156\57\x6a\x73\x6f\156", "\101\x75\x74\150\157\162\151\172\141\164\x69\157\x6e\72\40\x42\145\141\162\x65\x72\40" . get_option(CSEO_ACCOUNTS)["\170\x61\151\137\141\160\151\x5f\153\145\171"]]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $endpoint); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($atts)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (!($response === false)) { goto PNAB5; } $error = curl_error($ch); curl_close($ch); $cseo->log("\105\162\162\x6f\162\x3a\40" . $error); $cseo->failure = true; return ''; PNAB5: curl_close($ch); $result = json_decode($response, true); if (!isset($result["\x65\x72\x72\157\x72"])) { goto kb1Rk; } $cseo->log("\x45\x72\162\x6f\x72\x3a\x20" . $result["\145\162\x72\157\162"]); $cseo->failure = true; return ''; kb1Rk: if (!isset($result["\x63\150\157\x69\143\145\163"][0]["\x6d\145\163\x73\141\147\x65"]["\143\157\x6e\x74\145\156\x74"])) { goto H20B5; } $cseo->log("\123\x75\x63\143\145\163\163"); return cseo_markdown_to_html(cseo_html_cleanup($result["\x63\x68\157\x69\143\x65\x73"][0]["\x6d\145\x73\163\x61\147\145"]["\x63\x6f\x6e\164\x65\156\164"])); H20B5: $cseo->log("\125\x6e\153\x6e\x6f\x77\156\x20\170\101\111\x20\145\162\162\157\162"); $cseo->failure = true; return ''; } function cyberseo_openai_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["\157\160\145\156\x61\x69\137\141\160\151\x5f\x6b\145\171"]))) { goto iBEF0; } $cseo->log("\x4f\160\x65\156\x41\111\x20\101\120\111\x20\x6b\145\x79\40\151\163\x20\156\157\x74\40\x73\145\x74"); $cseo->failure = true; return ''; iBEF0: if (!$cseo->api_overlimit("\157\x70\145\x6e\x61\x69\x5f\147\x70\164\137\141\160\x69\x5f\154\151\155\x69\164")) { goto YmX6Y; } $cseo->log("\x4f\160\145\x6e\101\111\40\101\x50\111\40\x68\157\165\x72\154\171\40\x72\x65\161\165\x65\163\x74\40\154\151\x6d\151\164\40\x68\141\163\40\142\145\x65\x6e\40\162\145\x61\143\150\145\144"); $cseo->failure = true; return ''; YmX6Y: if (!isset($atts["\155\x6f\x64\x65\154"])) { goto HIN8L; } if ($atts["\x6d\157\x64\145\154"] === "\x74\165\x72\x62\157") { goto me2nU; } goto sA9UG; HIN8L: $atts["\155\157\144\145\154"] = "\x67\x70\164\55\64\157\55\155\151\x6e\151"; goto sA9UG; me2nU: $atts["\155\157\x64\x65\x6c"] = "\x67\160\164\x2d\x33\x2e\x35\x2d\164\165\x72\142\157"; sA9UG: if (strpos($atts["\x6d\x6f\x64\x65\x6c"], "\x69\156\163\164\x72\x75\143\164") === false && (strpos($atts["\x6d\157\x64\x65\x6c"], "\x74\165\162\x62\157") !== false || strpos($atts["\155\157\x64\x65\x6c"], "\x67\x70\x74\55\64") !== false)) { goto AlyUA; } $atts["\160\x72\x6f\x6d\160\164"] = $atts["\160\162\x6f\x6d\160\164"]; $atts["\142\x65\x73\164\137\157\146"] = abs(intval($atts["\142\145\163\164\x5f\x6f\x66"] ?? 1)); $endpoint = $cseo->eps["\x6f\160\145\x6e\141\151\x2d\x63\x6f\155\x70\x6c\145\x74\151\157\156\x73"]; goto jYv3o; AlyUA: $endpoint = $cseo->eps["\157\160\145\156\141\x69\x2d\x63\x68\x61\164"]; $atts["\x6d\x65\163\x73\141\147\145\163"] = [["\162\x6f\x6c\145" => "\165\x73\145\x72", "\x63\x6f\x6e\164\145\x6e\164" => $atts["\160\162\x6f\155\160\x74"]]]; unset($atts["\x70\x72\157\155\x70\164"]); unset($atts["\142\x65\163\x74\x5f\x6f\x66"]); jYv3o: unset($atts[0]); unset($atts[1]); $atts["\x74\145\x6d\x70\145\x72\141\164\x75\x72\x65"] = floatval($atts["\164\145\155\160\145\162\141\x74\x75\x72\x65"] ?? 1.0); $atts["\164\x6f\160\x5f\x70"] = floatval($atts["\x74\157\x70\x5f\x70"] ?? 1.0); $atts["\160\x72\x65\x73\145\156\x63\145\137\160\145\156\141\154\164\x79"] = floatval($atts["\160\x72\x65\x73\145\156\143\145\137\x70\145\x6e\141\154\164\171"] ?? 0.0); $atts["\x66\162\x65\x71\165\x65\156\143\x79\x5f\x70\145\x6e\x61\x6c\x74\x79"] = floatval($atts["\146\x72\x65\161\165\145\156\x63\171\137\160\x65\x6e\141\154\164\x79"] ?? 0.0); if (!isset($atts["\x6d\141\170\x5f\164\157\153\145\156\163"])) { goto hM1yj; } $atts["\x6d\x61\x78\137\x74\x6f\x6b\x65\x6e\163"] = abs(intval($atts["\155\141\x78\x5f\164\x6f\153\x65\156\x73"])); hM1yj: $headers = ["\103\157\156\x74\x65\x6e\x74\x2d\124\x79\x70\x65\x3a\x20\x61\160\x70\154\151\x63\x61\164\x69\x6f\156\x2f\x6a\x73\157\156", "\101\165\164\150\157\x72\x69\x7a\x61\x74\151\157\156\72\x20\102\x65\x61\x72\145\x72\x20" . get_option(CSEO_ACCOUNTS)["\x6f\160\x65\x6e\x61\151\x5f\x61\x70\x69\x5f\153\x65\x79"]]; if (isset($atts["\x6d\x65\163\x73\x61\147\145\163"][0]["\143\x6f\156\164\145\156\164"])) { goto u70o1; } $assignment = $atts["\x70\162\x6f\155\160\x74"]; goto GQkK5; u70o1: $assignment = $atts["\155\145\x73\x73\x61\x67\145\x73"][0]["\143\157\156\164\x65\x6e\164"]; GQkK5: $assignment = stripslashes($assignment); if (!$log) { goto T6G28; } $cseo->log("\x47\x65\x6e\x65\162\141\164\151\x6e\x67\x20\x63\x6f\156\164\x65\x6e\164\x20\167\x69\164\x68\40\x41\111\x20\50" . $atts["\x6d\157\x64\x65\154"] . "\51\x20\143\x6f\156\x74\145\x6e\164\40\146\x6f\162\72\x20" . trim(html_entity_decode($assignment))); T6G28: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $endpoint); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($atts)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (!($response === false)) { goto YDRos; } $error = curl_error($ch); curl_close($ch); $cseo->log("\x45\x72\x72\x6f\162\x3a\x20" . $error); $cseo->failure = true; return ''; YDRos: curl_close($ch); $result = json_decode($response, true); if (!isset($result["\x65\x72\x72\x6f\162"])) { goto XWoZf; } $cseo->log("\x45\162\162\x6f\162\72\x20" . $result["\x65\x72\x72\157\x72"]["\155\x65\163\163\141\x67\x65"]); $cseo->failure = true; return ''; XWoZf: if (!isset($result["\x63\150\x6f\x69\x63\x65\x73"][0]["\x6d\145\163\x73\x61\147\x65"]["\143\x6f\156\164\145\156\x74"])) { goto eJTIq; } $cseo->log("\x53\x75\x63\143\x65\x73\x73"); return cseo_markdown_to_html(cseo_html_cleanup($result["\x63\150\x6f\x69\143\145\x73"][0]["\155\x65\x73\163\x61\147\145"]["\x63\x6f\x6e\x74\145\156\x74"])); eJTIq: if (!isset($result["\x63\x68\157\x69\x63\145\x73"][0]["\164\x65\x78\164"])) { goto OCNcW; } $cseo->log("\x53\x75\x63\143\x65\163\x73"); return cseo_markdown_to_html(cseo_html_cleanup($result["\x63\x68\x6f\151\x63\145\163"][0]["\164\145\x78\x74"])); OCNcW: $cseo->log("\125\156\153\x6e\157\167\x6e\40\x4f\160\x65\x6e\101\x49\40\145\x72\x72\x6f\162"); $cseo->failure = true; return ''; } function cyberseo_claude_shortcode($atts, $log = true) { global $cseo; if (strlen(trim(get_option(CSEO_ACCOUNTS)["\x61\156\164\x68\x72\157\x70\x69\x63\137\143\x6c\141\x75\x64\145\137\141\160\x69\x5f\x6b\x65\x79"]))) { goto X_uwn; } $cseo->log("\101\156\x74\x68\162\x6f\x70\x69\143\40\103\x6c\141\165\x64\145\x20\101\120\x49\40\153\145\171\x20\151\163\40\156\157\164\x20\x73\145\164"); $cseo->failure = true; return ''; X_uwn: if (!$cseo->api_overlimit("\141\x6e\x74\150\x72\x6f\160\151\x63\x5f\143\x6c\141\165\144\145\x5f\x61\160\x69\x5f\x6c\x69\x6d\151\164")) { goto Xnu4U; } $cseo->log("\x41\x6e\164\x68\162\157\160\x69\143\x20\103\154\141\x75\x64\145\40\101\x50\x49\x20\150\157\x75\162\x6c\x79\x20\162\x65\161\x75\145\x73\164\x20\x6c\151\155\x69\164\x20\x68\141\x73\x20\x62\x65\x65\156\40\x72\x65\x61\143\150\145\x64"); $cseo->failure = true; return ''; Xnu4U: if (isset($atts["\x6d\157\x64\145\154"])) { goto l39Fp; } $atts["\x6d\x6f\x64\145\154"] = "\143\154\x61\x75\x64\145\55\63\55\65\55\163\157\x6e\x6e\x65\164\55\x32\60\x32\64\x30\66\x32\x30"; l39Fp: if (isset($atts["\155\141\170\x5f\164\157\x6b\x65\x6e\163"])) { goto eZ5qR; } $atts["\155\x61\170\137\164\157\153\x65\156\x73"] = 4096; goto Rx42z; eZ5qR: $atts["\x6d\141\x78\137\x74\157\153\x65\x6e\163"] = abs(intval($atts["\155\x61\170\x5f\164\x6f\153\145\x6e\163"])); Rx42z: $assignment = stripslashes($atts["\160\x72\x6f\155\160\x74"]); if (!$log) { goto AhGJT; } $cseo->log("\107\145\x6e\145\x72\141\x74\151\x6e\147\40\x43\154\x61\165\144\145\x20\x28" . $atts["\155\x6f\144\145\154"] . "\51\x20\x63\157\x6e\164\145\156\x74\x20\x66\157\162\72\40" . trim(html_entity_decode($assignment))); AhGJT: $data = ["\155\x6f\x64\x65\x6c" => $atts["\x6d\157\x64\x65\154"], "\x6d\x61\x78\137\x74\157\x6b\145\156\x73" => $atts["\x6d\x61\x78\137\164\x6f\153\145\x6e\163"], "\155\145\x73\163\x61\147\145\163" => [["\162\x6f\x6c\x65" => "\x75\163\x65\162", "\x63\x6f\x6e\x74\x65\156\x74" => $assignment]]]; if (!isset($atts["\x74\x65\x6d\x70\x65\x72\141\x74\x75\x72\x65"])) { goto kOFLG; } $data["\164\145\x6d\160\x65\x72\141\164\x75\x72\145"] = floatval($atts["\164\145\155\160\145\162\x61\164\x75\x72\x65"]); kOFLG: if (!isset($atts["\164\157\160\x5f\x70"])) { goto wZosz; } $data["\164\x6f\160\x5f\x70"] = floatval($atts["\164\157\x70\x5f\160"]); wZosz: if (!isset($atts["\x74\157\160\137\x6b"])) { goto BryUP; } $data["\164\x6f\160\137\x6b"] = intval($atts["\x74\x6f\x70\x5f\153"]); BryUP: $ch = curl_init($cseo->eps["\x61\156\164\150\162\x6f\160\151\x63\x2d\143\x6c\x61\165\144\x65\x2d\155\145\x73\163\x61\147\x65\x73"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, ["\170\55\141\160\x69\55\x6b\145\171\72\x20" . trim(get_option(CSEO_ACCOUNTS)["\x61\x6e\x74\x68\162\157\160\151\143\x5f\143\x6c\141\x75\x64\x65\x5f\141\160\151\137\x6b\145\171"]), "\141\156\164\x68\x72\x6f\x70\x69\143\55\x76\x65\162\x73\151\157\156\72\40\x32\x30\x32\63\55\60\66\55\x30\x31", "\143\x6f\x6e\x74\145\156\x74\x2d\x74\171\160\145\72\40\141\x70\x70\154\x69\x63\141\x74\151\157\156\x2f\152\163\x6f\156"]); $response = curl_exec($ch); if (!curl_errno($ch)) { goto mhtwd; } $cseo->log("\105\162\x72\157\162\72\x20" . curl_error($ch)); curl_close($ch); $cseo->failure = true; return ''; mhtwd: curl_close($ch); $result = json_decode($response, true); if (!is_array($result)) { goto gJ1cz; } if (!isset($result["\145\x72\x72\157\x72"])) { goto EE8jc; } $cseo->log("\105\x72\x72\157\162\x3a\x20" . $result["\145\162\162\x6f\x72"]["\x6d\x65\163\163\141\147\x65"]); $cseo->failure = true; return ''; EE8jc: if (!isset($result["\143\x6f\x6e\164\x65\156\x74"][0]["\x74\145\170\x74"])) { goto OuVRt; } $cseo->log("\x53\165\143\x63\145\x73\163"); return cseo_markdown_to_html(cseo_html_cleanup(cseo_trim_claude($result["\143\x6f\x6e\x74\145\x6e\x74"][0]["\x74\145\x78\x74"]))); OuVRt: gJ1cz: $cseo->log("\125\156\153\x6e\157\x77\x6e\x20\103\x6c\141\165\144\145\x20\x65\162\162\157\162"); $cseo->failure = true; return ''; } function cyberseo_gemini_shortcode($atts, $log = true) { global $cseo; $apikey = trim(get_option(CSEO_ACCOUNTS)["\147\x6f\157\x67\x6c\145\137\x67\145\155\151\156\x69\137\141\160\x69\x5f\153\x65\171"]); if (strlen($apikey)) { goto Lfwq4; } $cseo->log("\x47\x6f\x6f\147\154\x65\x20\107\145\x6d\x69\x6e\x69\x20\x41\120\111\x20\153\x65\171\x20\x69\163\40\x6e\157\164\40\163\x65\164"); $cseo->failure = true; return ''; Lfwq4: if (!$cseo->api_overlimit("\147\x6f\157\x67\154\x65\x5f\x67\145\155\151\156\151\137\x61\x70\151\x5f\154\x69\155\151\x74")) { goto PEWQ9; } $cseo->log("\x47\157\x6f\x67\x6c\x65\40\107\x65\155\x69\156\x69\40\101\x50\x49\40\x68\x6f\165\162\154\171\40\x72\145\161\165\145\163\x74\x20\x6c\151\x6d\151\x74\40\x68\x61\x73\40\x62\145\145\156\x20\x72\145\x61\143\150\145\x64"); $cseo->failure = true; return ''; PEWQ9: if (isset($atts["\155\157\144\145\154"])) { goto Oiulg; } $atts["\155\157\144\x65\x6c"] = "\147\x65\x6d\x69\x6e\151\x2d\x70\x72\x6f"; Oiulg: if (isset($atts["\x6d\141\170\x5f\164\157\x6b\x65\x6e\163"])) { goto Z0wqK; } if ($atts["\x6d\157\144\145\154"] === "\147\145\x6d\x69\x6e\151\55\x70\162\x6f") { goto n138_; } if ($atts["\x6d\157\x64\x65\x6c"] === "\147\x65\155\x69\156\x69\x2d\x70\x72\157\x2d\166\151\x73\x69\x6f\x6e") { goto JufT6; } $max_tokens = 4096; goto aKDfU; n138_: $max_tokens = 2048; goto aKDfU; JufT6: $max_tokens = 4096; aKDfU: goto BT1KV; Z0wqK: $max_tokens = abs(intval($atts["\155\141\x78\x5f\x74\x6f\x6b\145\x6e\x73"])); BT1KV: if (!(!isset($atts["\x70\x72\x6f\x6d\160\x74"]) && isset($atts["\x74\x65\170\164"]))) { goto dsKNn; } $atts["\160\x72\157\155\160\164"] = $atts["\164\x65\170\x74"]; dsKNn: $assignment = stripslashes($atts["\160\162\x6f\155\160\164"]); if (!$log) { goto APbVD; } $cseo->log("\107\x65\x6e\145\162\x61\164\151\156\147\x20\107\x65\155\x69\x6e\151\x20\50" . $atts["\155\x6f\x64\145\154"] . "\x29\x20\143\157\156\164\x65\156\164\40\x66\x6f\x72\x3a\x20" . trim(html_entity_decode($assignment))); APbVD: $data = ["\143\x6f\156\x74\145\156\x74\163" => [["\160\x61\x72\164\x73" => [["\164\145\170\x74" => $assignment]]]], "\x73\x61\x66\145\x74\x79\x53\x65\164\x74\151\x6e\x67\x73" => [["\143\x61\164\x65\x67\x6f\x72\171" => "\110\x41\x52\x4d\x5f\103\101\124\x45\x47\117\x52\131\137\x44\101\116\x47\105\122\x4f\125\x53\137\103\x4f\116\x54\x45\116\x54", "\x74\150\162\x65\x73\150\x6f\x6c\x64" => "\102\x4c\117\103\113\x5f\116\117\116\x45"]], "\x67\145\156\x65\x72\x61\164\x69\x6f\x6e\x43\x6f\x6e\146\x69\147" => ["\163\x74\x6f\160\123\145\x71\165\145\x6e\143\x65\x73" => ["\x54\x69\164\154\145"], "\164\145\155\x70\x65\162\141\164\x75\x72\x65" => $atts["\x74\x65\x6d\x70\x65\x72\141\164\165\162\145"] ?? 1.0, "\x6d\141\170\117\165\x74\x70\x75\164\x54\x6f\153\145\156\163" => $max_tokens, "\164\157\160\x50" => $atts["\164\x6f\160\137\160"] ?? 0.8, "\x74\157\160\113" => $atts["\x74\157\x70\137\x6b"] ?? 10]]; $ch = curl_init($cseo->eps["\x67\157\157\147\x6c\x65\55\x67\x65\155\151\x6e\x69"] . $atts["\x6d\x6f\x64\x65\x6c"] . "\72\x67\x65\156\145\x72\x61\x74\145\x43\x6f\156\164\145\x6e\164\77\x6b\145\171\75" . $apikey); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ["\x43\x6f\x6e\x74\x65\x6e\164\55\124\x79\160\145\72\x20\141\x70\x70\x6c\x69\x63\141\164\x69\157\156\x2f\152\163\x6f\x6e"]); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $response = curl_exec($ch); if (!curl_errno($ch)) { goto hU_es; } $cseo->log("\x45\x72\x72\157\x72\x3a\40" . curl_error($ch)); curl_close($ch); $cseo->failure = true; return ''; hU_es: curl_close($ch); $result = json_decode($response, true); if (isset($result["\145\162\162\x6f\162"]["\155\x65\x73\x73\141\x67\145"])) { goto s_QB6; } if (isset($result["\143\x61\x6e\x64\151\x64\x61\164\145\x73"][0]["\x63\x6f\x6e\164\145\156\164"]["\x70\x61\x72\x74\163"][0]["\x74\145\x78\164"])) { goto sP6wK; } goto YFt1g; s_QB6: $cseo->log("\105\x72\162\157\x72\72\x20" . $result["\x65\x72\162\x6f\162"]["\155\145\x73\163\x61\x67\x65"]); $cseo->failure = true; return ''; goto YFt1g; sP6wK: $cseo->log("\123\165\x63\143\x65\x73\163"); return cseo_markdown_to_html(cseo_html_cleanup(cseo_trim_claude($result["\x63\x61\156\144\x69\x64\x61\x74\145\x73"][0]["\x63\157\x6e\164\x65\156\164"]["\160\x61\x72\164\163"][0]["\x74\145\x78\164"]))); YFt1g: $cseo->log("\125\156\153\156\x6f\167\x6e\40\x47\145\x6d\151\156\x69\x20\x65\x72\162\x6f\162"); $cseo->failure = true; return ''; } function cyberseo_generate_text($atts, $max_override = null, $report = false) { if (isset($atts["\x65\156\147\x69\x6e\x65"])) { goto B0fva; } $atts["\145\x6e\x67\151\x6e\x65"] = get_option(CSEO_DEFAULT_AI_MODEL); B0fva: $assignment = ["\x70\162\157\155\160\164" => $atts["\x70\162\157\155\160\x74"], "\x74\145\x6d\160\x65\x72\141\x74\x75\162\145" => floatval($atts["\164\x65\155\x70\x65\162\x61\x74\165\x72\x65"] ?? 1)]; if ($max_override) { goto zTy5N; } if (!isset($atts["\x6d\x61\170\x5f\x74\x6f\x6b\x65\x6e\163"])) { goto vPviZ; } $assignment["\155\x61\x78\x5f\x74\x6f\153\x65\156\163"] = intval($atts["\155\x61\170\x5f\x74\x6f\x6b\x65\156\163"]); vPviZ: goto gZJTH; zTy5N: $assignment["\155\x61\170\x5f\164\157\153\145\x6e\x73"] = $max_override; gZJTH: switch ($atts["\145\x6e\x67\151\x6e\x65"]) { case "\141\x6e\164\x68\x72\x6f\x70\x69\x63\x2d\x63\154\x61\x75\144\145": $assignment["\155\157\144\x65\154"] = "\143\154\x61\165\x64\x65\55\63\55\65\55\163\x6f\x6e\x6e\145\164\x2d\154\x61\164\x65\163\x74"; $res = cyberseo_claude_shortcode($assignment, $report); goto viz94; case "\141\x6e\164\x68\162\x6f\160\151\x63\55\150\x61\151\153\x75": $assignment["\155\157\144\x65\x6c"] = "\x63\154\141\165\x64\145\55\x33\x2d\x35\x2d\150\x61\x69\x6b\x75\55\154\141\164\145\163\x74"; $res = cyberseo_claude_shortcode($assignment, $report); goto viz94; case "\x61\156\164\x68\162\x6f\160\x69\x63\x2d\x63\154\x61\x75\144\x65\55\62\56\x31": $assignment["\x6d\x6f\x64\x65\154"] = "\x63\154\141\x75\x64\x65\x2d\x32\56\61"; $res = cyberseo_claude_shortcode($assignment, $report); goto viz94; case "\x6f\160\145\x6e\x61\x69\55\147\160\164\x2d\x33\x2e\65\55\x74\165\162\x62\x6f\55\x31\66\x6b": $assignment["\155\157\144\145\154"] = "\147\160\x74\55\x33\56\x35\x2d\x74\165\162\142\157\x2d\x31\66\153"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "\x6f\x70\145\x6e\141\151\x2d\x67\160\164\55\64\55\x74\x75\x72\x62\x6f": $assignment["\155\x6f\144\145\154"] = "\x67\160\164\x2d\64\x2d\x74\165\x72\x62\157"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "\157\160\145\156\141\x69\x2d\147\x70\x74\x2d\x34\55\63\62\x6b": $assignment["\155\157\144\145\154"] = "\x67\160\x74\55\64\x2d\63\x32\x6b"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "\x6f\x70\x65\156\141\x69\x2d\x67\x70\x74\x34\x6f": $assignment["\x6d\157\144\145\x6c"] = "\143\150\x61\x74\147\x70\x74\55\x34\x6f\55\154\141\x74\145\x73\164"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "\x6f\x70\x65\156\141\151\x2d\147\160\164\x2d\x34\157": $assignment["\155\x6f\x64\145\154"] = "\143\150\141\164\x67\x70\164\55\64\157\55\x6c\141\x74\145\x73\164"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "\x6f\160\145\156\x61\x69\55\147\160\164\x2d\64\157\x2d\x6d\151\x6e\151": $assignment["\155\157\x64\x65\x6c"] = "\147\x70\164\x2d\64\x6f\x2d\x6d\151\156\151"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "\157\160\x65\x6e\141\x69\x2d\x6f\x31\55\x6d\151\x6e\151": $assignment["\155\x6f\x64\x65\x6c"] = "\x6f\x31\x2d\155\x69\x6e\x69"; $res = cyberseo_openai_shortcode($assignment, $report); goto viz94; case "\x67\x6f\x6f\147\x6c\145\x2d\x67\x65\155\x69\156\151\x2d\160\162\157": $assignment["\155\x6f\x64\145\154"] = "\x67\145\x6d\151\x6e\151\x2d\x31\56\x35\55\x70\x72\x6f"; $res = cyberseo_gemini_shortcode($assignment, $report); goto viz94; case "\x67\157\x6f\x67\154\145\x2d\147\x65\155\151\x6e\151\x2d\x66\154\141\x73\150": $assignment["\155\x6f\144\145\154"] = "\147\x65\155\151\x6e\151\x2d\61\56\65\55\x66\154\141\163\150"; $res = cyberseo_gemini_shortcode($assignment, $report); goto viz94; case "\x78\141\151\x2d\147\x72\x6f\153": $assignment["\155\157\144\x65\x6c"] = "\x67\x72\x6f\153\55\142\145\x74\x61"; $res = cyberseo_xai_shortcode($assignment, $report); goto viz94; default: if (!($atts["\x65\156\x67\x69\156\x65"] === "\155\151\163\x74\162\x61\154\x61\151\57\155\151\x78\x74\x72\x61\x6c\55\x38\x78\67\142\x2d\x69\x6e\163\164\x72\165\x63\164")) { goto mWlgE; } $assignment["\160\162\157\x6d\x70\x74"] = "\x5b\111\x4e\123\124\x5d" . $assignment["\x70\162\x6f\x6d\160\x74"] . "\x5b\x2f\111\116\x53\x54\x5d"; mWlgE: $assignment["\x6d\157\x64\145\154"] = $atts["\145\x6e\147\151\156\x65"]; $res = cyberseo_openrouter_shortcode($assignment, $report); } vrrQn: viz94: return trim($res); } function cyberseo_gpt_article_shortcode($atts) { global $cseo; $prompts = get_option("\143\x78\170\170\x5f\147\160\164\137\141\162\x74\151\x63\x6c\x65"); $section_prompts = []; foreach ($atts as $name => $value) { if (!preg_match("\x2f\136\x73\145\143\x74\151\157\156\50\134\144\53\51\44\57", $name, $matches)) { goto lW9LN; } $section_prompts[intval($matches[1])] = $value; lW9LN: n28t2: } hHk6G: $atts = shortcode_atts(["\x65\x6e\147\151\x6e\145" => "\157\x70\145\x6e\141\x69\55\x67\x70\x74\x2d\x34\x6f", "\164\x6f\x70\151\143" => '', "\163\x65\143\x74\151\157\x6e\163" => 4, "\x73\164\162\165\143\164\x75\162\x65" => '', "\x6c\x61\156\x67\x75\141\x67\145" => '', "\155\x61\170\x5f\164\157\153\145\156\163" => 4096, "\164\145\155\160\145\x72\141\164\x75\162\x65" => 1, "\x68\145\141\144\151\156\147" => "\x68\62", "\144\x69\162\x65\143\x74\x69\166\x65\x73" => $prompts["\144\145\x66\141\165\154\164\x5f\144\151\x72\145\143\164\151\x76\x65\163"]], $atts); if (!intval($atts["\163\x65\x63\x74\151\x6f\x6e\163"] < 1)) { goto uYH04; } $atts["\x73\x65\143\164\x69\157\156\163"] = 1; uYH04: if (strlen($atts["\x6c\x61\x6e\147\x75\141\x67\145"]) && trim(mb_strtolower($atts["\154\141\x6e\x67\x75\141\147\x65"])) !== "\x65\156\x67\154\151\x73\150") { goto ZDElY; } $tr = "\12"; goto Z2TJk; ZDElY: $tr = "\12\x47\145\156\x65\x72\x61\x74\145\x20\x61\x6e\x64\x20\162\x65\164\165\x72\156\x20\x74\x68\x65\40\167\150\157\x6c\x65\x20\x74\145\170\164\x20\x69\156\x20" . $atts["\x6c\141\x6e\x67\x75\x61\147\x65"] . "\x2e"; Z2TJk: if (strlen($atts["\164\157\x70\x69\x63"])) { goto nwytm; } $cseo->log("\133\147\160\164\x5f\141\x72\x74\151\143\154\x65\135\40\155\151\x73\163\151\x6e\x67\x20\164\x6f\160\x69\x63\40\156\141\155\x65"); return ''; nwytm: if (!(!is_array($prompts) || !isset($prompts["\x73\145\x63\x74\151\x6f\156\x5f\156\x61\155\145\163"]))) { goto ZxrAr; } return ''; ZxrAr: if (intval($atts["\163\145\143\x74\x69\x6f\156\163"] > 1)) { goto du7a4; } $sections = [$atts["\x74\157\160\151\x63"]]; $list = ''; $cseo->log("\125\x73\x69\156\147\x20" . $atts["\145\x6e\147\151\x6e\145"] . "\40\x74\157\x20\143\x72\145\141\164\145\x20\141\x6e\x20\141\x72\164\151\143\x6c\x65\x20\x22" . $atts["\164\x6f\x70\151\143"] . "\x22\56"); goto Hx5SA; du7a4: $prompt = $prompts["\x73\x65\143\164\x69\157\156\x5f\x6e\x61\155\145\163"]; $prompt = str_replace("\x7b\164\x6f\x70\151\x63\175", $atts["\164\x6f\160\151\143"], $prompt); $prompt = str_replace("\173\x73\x65\143\x74\151\157\156\163\x7d", $atts["\x73\145\x63\164\151\157\156\x73"], $prompt); $prompt = str_replace("\173\144\x69\162\x65\x63\x74\x69\166\x65\x73\x7d", $atts["\144\151\162\x65\143\x74\x69\x76\145\x73"], $prompt); $prompt = str_replace("\x7b\x6c\x61\x6e\x67\x69\x61\x67\x65\175", $tr . "\x20" . $atts["\163\x74\162\x75\143\x74\x75\x72\145"], $prompt); $atts["\x70\162\157\155\160\x74"] = $prompt; $list = cyberseo_generate_text($atts); $sections = explode("\xa", $cseo->fix_text_list($list)); if (!is_array($sections) || abs(count($sections) - intval($atts["\163\145\x63\164\x69\157\x6e\163"]) > 1)) { goto chD_L; } $cseo->log("\x55\x73\x69\x6e\147\40" . $atts["\x65\156\x67\x69\156\145"] . "\40\164\157\40\143\x72\x65\141\164\x65\x20\x61\156\x20\141\x72\164\151\x63\x6c\x65\x20\x22" . $atts["\x74\157\x70\x69\x63"] . "\42\40\167\x69\x74\150\x20\x74\150\145\x20\x66\x6f\x6c\x6c\x6f\x77\151\x6e\147\40\163\x65\143\x74\151\x6f\156\163\72" . "\xa" . implode("\12", $sections)); goto Gnqu3; chD_L: $cseo->log("\133\147\x70\x74\137\141\x72\x74\x69\x63\154\145\x5d\x20\x77\141\163\x20\165\x6e\x61\x62\x6c\145\x20\x74\157\x20\x67\x65\156\x65\162\141\x74\145\x20\141\40" . $atts["\x73\x65\x63\164\151\x6f\x6e\163"] . "\55\163\x65\143\x74\x69\157\156\x20\154\x69\x73\x74\x20\146\157\162\40\42" . $atts["\164\x6f\160\151\x63"] . "\42\72" . "\12" . implode("\xa", $sections)); $cseo->failure = true; return ''; Gnqu3: Hx5SA: $result = ''; $cnt = 1; foreach ($sections as $section) { if (strlen($section)) { goto Fir93; } goto nA2Uh; Fir93: if ($atts["\163\x65\x63\x74\x69\157\156\x73"] == 1) { goto e5C4P; } if (!strlen($result)) { goto KyqAU; } $prompt = $prompts["\x6f\x74\x68\x65\162\x5f\x73\x65\143\x74\151\157\x6e\x73"]; goto FXTOm; KyqAU: $prompt = $prompts["\x66\x69\x72\163\164\x5f\x73\145\143\x74\x69\x6f\x6e"]; FXTOm: goto NWbMm; e5C4P: $prompt = $prompts["\x6f\x6e\x65\137\163\x65\143\x74\x69\x6f\x6e"]; NWbMm: if (isset($section_prompts[$cnt])) { goto Tevn9; } $section_prompt = ''; goto fjuI7; Tevn9: $section_prompt = $section_prompts[$cnt] . "\xa\xa"; fjuI7: $prompt = str_replace("\x7b\164\157\160\x69\143\175", $atts["\164\157\x70\x69\x63"], $prompt); $prompt = str_replace("\173\163\x65\143\164\x69\157\156\163\x7d", $atts["\163\x65\143\164\151\x6f\x6e\163"], $prompt); $prompt = str_replace("\173\x64\151\x72\145\143\x74\151\x76\145\x73\175", $section_prompt . $atts["\x64\x69\x72\145\x63\164\151\x76\x65\x73"], $prompt); $prompt = str_replace("\173\154\x61\x6e\x67\151\x61\x67\145\175", $tr, $prompt); $prompt = str_replace("\173\x73\145\x63\x74\151\x6f\156\x5f\x6c\151\163\x74\x7d", $list, $prompt); $prompt = str_replace("\173\x63\x75\162\x72\145\x6e\x74\137\163\x65\143\164\151\157\156\175", $section, $prompt); $prompt = str_replace("\173\x61\162\164\151\143\x6c\x65\x7d", $result, $prompt); $cseo->log("\103\162\x65\141\x74\x65\x20\163\x65\143\164\151\x6f\x6e\40\x22" . $section . "\42"); $atts["\x70\x72\x6f\155\x70\x74"] = $prompt; $text = cyberseo_generate_text($atts); $text = cseo_rh(trim($