diff --git a/src/General/Current_User.php b/src/General/Current_User.php index 8b5bac5..9c7805c 100644 --- a/src/General/Current_User.php +++ b/src/General/Current_User.php @@ -99,4 +99,28 @@ public function create_nonce( string $action ): string { public function verify_nonce( string $nonce, string $action ): bool { return (bool) wp_verify_nonce( $nonce, $action ); } + + /** + * Retrieves the current user's display name. + * + * @since n.e.x.t + * + * @return string The current user's display name. + */ + public function display_name(): string { + return wp_get_current_user()->display_name; + } + + /** + * Checks whether the current user is a super admin. + * + * By default, super admins have access to all capabilities, unless explicitly denied to everyone. + * + * @since n.e.x.t + * + * @return bool True if the user is a super admin, false otherwise. + */ + public function is_super_admin(): bool { + return is_super_admin(); + } }