Commit 0d7922c6 authored by Jakob Moser's avatar Jakob Moser
Browse files

Disable users sitemap

parent fb84f489
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ function fscoli_show_embed_privacy_consent_prompt($embed_html) {
    return fscoli_get_consent_prompt($embed_html, $width, $height, $content_name, $provider_url, $provider_domain, $privacy_policy_url);   
}

// To disable the privacy consent prompts (and always show the content directly), just remove this line
// To disable the privacy consent prompts (and always show the content directly), remove the line below
add_filter('embed_handler_html', 'fscoli_show_embed_privacy_consent_prompt');

/**
@@ -173,9 +173,25 @@ function fscoli_require_authentication_for_rest_api($previous_result) {
    }
}

// To not require the authentication for all REST requests, remove this line
// To not require the authentication for all REST requests, remove the line below
add_filter('rest_authentication_errors', 'fscoli_require_authentication_for_rest_api');

/**
 * Disable the sitemap for users.
 * 
 * See all sitemaps here: https://fachschaft.cl.uni-heidelberg.de/wp-sitemap.xml
 */
function fscoli_disable_users_sitemap($provider, $provider_name) {
    if($provider_name === "users") {
        return false;
    } else {
        return $provider;
    }
}

// To re-enable /wp-sitemap-users-1.xml and /en/wp-sitemap-users-1.xml, remove the line below
add_filter('wp_sitemaps_add_provider', 'fscoli_disable_users_sitemap', accepted_args: 2);

wp_enqueue_script('fscoli-utils', get_template_directory_uri() . '/js/utils.js');
wp_enqueue_script('fscoli-pills', get_template_directory_uri() . '/js/pills.js');
?>
+2 −1
Original line number Diff line number Diff line
@@ -7,7 +7,8 @@
 * Author: personads :: Maximilian Müller-Eberstein (ursprüngliche Version und Design); Jakob Moser
 * Author URI: https://personads.me/
 *
 * Version: 2.0.0
 * Version: 2.1.0
 * Requires PHP: 8.0
 *
 * License: GNU General Public License v3.0
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html