PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.9
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.9
1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 0.8.6 All 33 releases
desktop-mode / includes / framework / app / wordpress / class-auth.php

class-auth.php in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 1.1.9, at includes/framework/app/wordpress/class-auth.php

34 lines 623 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * OpenStation App Framework — WordPress Auth adapter.
4 *
5 * @package OpenStation
6 */
7
8 namespace OpenStation\App\WordPress;
9
10 use OpenStation\App\Contracts\Auth as AuthContract;
11
12 defined( 'ABSPATH' ) || exit;
13
14 /**
15 * The current WordPress user.
16 */
17 final class Auth implements AuthContract {
18
19 /** {@inheritDoc} */
20 public function user_id() {
21 return (int) get_current_user_id();
22 }
23
24 /** {@inheritDoc} */
25 public function is_logged_in() {
26 return is_user_logged_in();
27 }
28
29 /** {@inheritDoc} */
30 public function can( $capability, ...$args ) {
31 return current_user_can( (string) $capability, ...$args );
32 }
33 }
34