HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/foar/wp-content/plugins/defender-security/src/traits/permission.php
<?php
/**
 * Helper functions for user permissions.
 *
 * @package WP_Defender\Traits
 */

namespace WP_Defender\Traits;

trait Permission {

	/**
	 * Check if the current user have permission for execute an action.
	 *
	 * @return bool
	 */
	public function check_permission() {
		if ( ! is_user_logged_in() ) {
			return false;
		}
		$cap = is_multisite() ? 'manage_network_options' : 'manage_options';

		return current_user_can( $cap );
	}
}