HEX
Server: Apache/2.4.25 (Debian)
System: Linux server17 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: web37 (1062)
PHP: 7.4.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
Upload Files
File: /var/www/web37/htdocs/sexnetzwerk24/wp-content/themes/classipress/includes/security.php
<?php
/**
 * Prevent visitors without permissions to access the WordPress backend.
 *
 * @package ClassiPress\Security
 * @author  AppThemes
 * @since   ClassiPress 3.0
 */


/**
 * Checks permissions to access the WordPress backend.
 *
 * @return void
 */
function cp_security_check() {
	global $cp_options;

	$cp_access_level = $cp_options->admin_security;
	// if there's no value then give everyone access
	if ( empty( $cp_access_level ) ) {
		$cp_access_level = 'read';
	}

	// previous releases had incompatible capability with MU installs
	if ( 'install_themes' == $cp_access_level ) {
		$cp_access_level = 'manage_options';
	}

	$doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
	$doing_admin_post = ( basename( $_SERVER['SCRIPT_FILENAME'] ) === 'admin-post.php' );

	if ( $cp_access_level == 'disable' || current_user_can( $cp_access_level ) || $doing_ajax || $doing_admin_post ) {
		return;
	}

	appthemes_add_notice( 'denied-admin-access', __( 'Site administrator has blocked your access to the back-office.', APP_TD ), 'error' );
	wp_redirect( CP_DASHBOARD_URL );
	exit();
}
add_action( 'admin_init', 'cp_security_check', 1 );