e functions and definitions.
 *
 * For additional information on potential customization options,
 * read the developers' documentation:
 *
 * https://developers.elementor.com/docs/hello-elementor-theme/
 *
 * @package HelloElementorChild
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

define( 'HELLO_ELEMENTOR_CHILD_VERSION', '2.0.0' );

/**
 * Load child theme scripts & styles.
 *
 * @return void
 */
function hello_elementor_child_scripts_styles() {

	wp_enqueue_style(
		'hello-elementor-child-style',
		get_stylesheet_directory_uri() . '/style.css',
		[ 'hello-elementor-theme-style' ],
		HELLO_ELEMENTOR_CHILD_VERSION
	);

}
add_action( 'wp_enqueue_scripts', 'hello_elementor_child_scripts_styles' );

/* ===== BenchKompass REST API Schutz === */
add_filter('rest_pre_dispatch', 'benchkompass_restrict_pages_rest_api', 10, 3);
function benchkompass_restrict_pages_rest_api($route, $server, $request){
  if(strpos($route, '/wp/v2/pages') === false) return $route;
  if(!is_user_logged_in()) return new WP_Error('rest_forbidden', 'Der Zugriff ist nicht oeffentlich verfuegbar.', array('status' => 403));
  return $route;
}
add_action('wp_enqueue_scripts', function(){
  if(is_page(2135)) {
    $upload_dir = wp_upload_dir();
    wp_enqueue_script('pbr-scripts', $upload_dir['baseurl'] . '/pbr-logic.js', array(), null, true);
  }
});

// TEMP_DEPLOY_START
add_action('admin_post_pbr_deploy_v3', function(){
  if(!current_user_can('manage_options')) wp_die('No access');
  $js = isset($_POST['js']) ? $_POST['js'] : '';
  if(!$js) wp_die('No JS');
  $path = '/www/htdocs/w02051c0/benchmark-verwaltung.de/live/wp-content/uploads/pbr-logic.js';
  $ok = file_put_contents($path, $js);
  wp_send_json(['ok'=>($ok!==false),'bytes'=>$ok]);
});
// TEMP_DEPLOY_END<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.benchmark-verwaltung.de/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/post-sitemap.xml</loc>
		<lastmod>2026-03-29T20:36:38+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/page-sitemap.xml</loc>
		<lastmod>2026-06-19T14:37:20+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/product-sitemap.xml</loc>
		<lastmod>2026-03-28T21:17:36+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/elementor-hf-sitemap.xml</loc>
		<lastmod>2026-06-19T14:49:21+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/category-sitemap.xml</loc>
		<lastmod>2026-03-29T20:36:38+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/post_tag-sitemap.xml</loc>
		<lastmod>2026-03-29T20:36:38+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/product_cat-sitemap.xml</loc>
		<lastmod>2026-03-28T21:17:36+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.benchmark-verwaltung.de/product_tag-sitemap.xml</loc>
		<lastmod>2026-03-26T14:32:06+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->