PATH:
home
/
bnathsfovv
/
marcopaolini.info
/
wp-includes
<?php /** * User API: WP_Role class * * @package WordPress * @subpackage Users * @since 4.4.0 */ /** * Core class used to extend the user roles API. * * @since 2.0.0 */ #[AllowDynamicProperties] class WP_Role { /** * Role name. * * @since 2.0.0 * @var string */ public $name; /** * List of capabilities the role contains. * * @since 2.0.0 * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values * represent whether the role has that capability. */ public $capabilities; /** * Constructor - Set up object properties. * * The list of capabilities must have the key as the name of the capability * and the value a boolean of whether it is granted to the role. * * @since 2.0.0 * * @param string $role Role name. * @param bool[] $capabilities Array of key/value pairs where keys represent a capability name and boolean values * represent whether the role has that capability. */ public function __construct( $role, $capabilities ) { $this->name = $role; $this->capabilities = $capabilities; } /** * Assign role a capability. * * @since 2.0.0 * * @param string $cap Capability name. * @param bool $grant Whether role has capability privilege. */ public function add_cap( $cap, $grant = true ) { $this->capabilities[ $cap ] = $grant; wp_roles()->add_cap( $this->name, $cap, $grant ); } /** * Removes a capability from a role. * * @since 2.0.0 * * @param string $cap Capability name. */ public function remove_cap( $cap ) { unset( $this->capabilities[ $cap ] ); wp_roles()->remove_cap( $this->name, $cap ); } /** * Determines whether the role has the given capability. * * @since 2.0.0 * * @param string $cap Capability name. * @return bool Whether the role has the given capability. */ public function has_cap( $cap ) { /** * Filters which capabilities a role has. * * @since 2.0.0 * * @param bool[] $capabilities Array of key/value pairs where keys represent a capability name and boolean values * represent whether the role has that capability. * @param string $cap Capability name. * @param string $name Role name. */ $capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name ); if ( ! empty( $capabilities[ $cap ] ) ) { return $capabilities[ $cap ]; } else { return false; } } }
[+]
..
[-] class-wp-admin-bar.php
[edit]
[+]
fonts
[-] fonts.php
[edit]
[+]
ID3
[-] class-wp-theme.php
[edit]
[-] class-wp-block-patterns-registry.php
[edit]
[+]
blocks
[-] class-wp-recovery-mode-email-service.php
[edit]
[-] class-requests.php
[edit]
[-] class-wp-http-ixr-client.php
[edit]
[-] block-template-utils.php
[edit]
[-] class-wp-phpmailer.php
[edit]
[-] class-IXR.php
[edit]
[-] functions.wp-styles.php
[edit]
[+]
Text
[-] theme.json
[edit]
[-] theme-i18n.json
[edit]
[+]
build
[-] class-wp-hook.php
[edit]
[-] abilities-api.php
[edit]
[+]
Requests
[-] class-wp-text-diff-renderer-table.php
[edit]
[-] robots-template.php
[edit]
[-] revision.php
[edit]
[-] class-wp-list-util.php
[edit]
[+]
sodium_compat
[-] class-walker-nav-menu.php
[edit]
[-] class-wp-recovery-mode.php
[edit]
[-] cache.php
[edit]
[+]
block-supports
[-] class-walker-page.php
[edit]
[-] block-template.php
[edit]
[-] embed.php
[edit]
[-] capabilities.php
[edit]
[+]
rest-api
[-] view-transitions.php
[edit]
[+]
customize
[-] shortcodes.php
[edit]
[-] class-wp.php
[edit]
[-] meta.php
[edit]
[-] class-wp-block-metadata-registry.php
[edit]
[+]
theme-compat
[-] class-wp-customize-manager.php
[edit]
[+]
php-compat
[-] utf8.php
[edit]
[-] class.wp-styles.php
[edit]
[-] ms-site.php
[edit]
[-] class-wp-http-cookie.php
[edit]
[-] bookmark.php
[edit]
[-] post-thumbnail-template.php
[edit]
[-] class-wp-exception.php
[edit]
[-] theme-templates.php
[edit]
[-] deprecated.php
[edit]
[-] class-wp-text-diff-renderer-inline.php
[edit]
[-] theme.php
[edit]
[-] class-wp-roles.php
[edit]
[-] class-wp-block-bindings-registry.php
[edit]
[-] class-wp-block-parser-block.php
[edit]
[-] class-wp-widget.php
[edit]
[-] class-pop3.php
[edit]
[-] locale.php
[edit]
[-] query.php
[edit]
[-] class-wp-block-list.php
[edit]
[+]
IXR
[-] class-wp-http-requests-hooks.php
[edit]
[+]
images
[-] plugin.php
[edit]
[-] registration.php
[edit]
[-] class-snoopy.php
[edit]
[-] class-wp-block-template.php
[edit]
[+]
abilities-api
[+]
SimplePie
[-] class-wp-comment.php
[edit]
[-] l10n.php
[edit]
[-] class-phpass.php
[edit]
[-] class-wp-fatal-error-handler.php
[edit]
[-] general-template.php
[edit]
[+]
PHPMailer
[-] embed-template.php
[edit]
[-] functions.php
[edit]
[-] ms-blogs.php
[edit]
[-] class-wp-recovery-mode-cookie-service.php
[edit]
[-] class-wp-walker.php
[edit]
[-] feed-rss2.php
[edit]
[-] cron.php
[edit]
[+]
css
[-] connectors.php
[edit]
[-] class-wp-block-type.php
[edit]
[-] compat-utf8.php
[edit]
[-] block-patterns.php
[edit]
[+]
html-api
[+]
widgets
[-] formatting.php
[edit]
[-] class-wp-http-proxy.php
[edit]
[-] class-wp-paused-extensions-storage.php
[edit]
[-] nav-menu-template.php
[edit]
[-] class-walker-category-dropdown.php
[edit]
[-] admin-bar.php
[edit]
[-] class-json.php
[edit]
[-] class-wpdb.php
[edit]
[-] feed-rss2-comments.php
[edit]
[-] template-loader.php
[edit]
[+]
style-engine
[-] post-formats.php
[edit]
[-] class-wp-customize-nav-menus.php
[edit]
[-] abilities.php
[edit]
[-] class-wp-connector-registry.php
[edit]
[-] feed-rdf.php
[edit]
[-] option.php
[edit]
[-] feed-rss.php
[edit]
[-] class-wp-http-requests-response.php
[edit]
[+]
sitemaps
[-] class-wp-taxonomy.php
[edit]
[-] class-wp-widget-factory.php
[edit]
[-] class-wp-block-pattern-categories-registry.php
[edit]
[+]
block-bindings
[-] class-wp-recovery-mode-key-service.php
[edit]
[-] class-wp-icons-registry.php
[edit]
[-] class-wp-image-editor-imagick.php
[edit]
[+]
certificates
[-] registration-functions.php
[edit]
[-] class-wp-block-editor-context.php
[edit]
[-] spl-autoload-compat.php
[edit]
[-] media.php
[edit]
[-] class-wp-user-meta-session-tokens.php
[edit]
[-] class-wp-role.php
[edit]
[-] canonical.php
[edit]
[-] class-oembed.php
[edit]
[+]
interactivity-api
[-] class-wp-http-curl.php
[edit]
[-] class-wp-http-streams.php
[edit]
[-] class-wp-term.php
[edit]
[-] sitemaps.php
[edit]
[-] class-wp-block-supports.php
[edit]
[-] category-template.php
[edit]
[+]
assets
[-] class-wp-application-passwords.php
[edit]
[-] post.php
[edit]
[-] class-wp-user.php
[edit]
[-] class-wp-simplepie-sanitize-kses.php
[edit]
[-] ms-functions.php
[edit]
[-] style-engine.php
[edit]
[-] class-wp-session-tokens.php
[edit]
[-] default-widgets.php
[edit]
[-] class-wp-classic-to-block-menu-converter.php
[edit]
[-] date.php
[edit]
[-] class-walker-category.php
[edit]
[-] class-wp-dependency.php
[edit]
[-] ms-deprecated.php
[edit]
[-] http.php
[edit]
[-] cache-compat.php
[edit]
[-] class-wp-locale.php
[edit]
[-] class-wp-block-type-registry.php
[edit]
[-] bookmark-template.php
[edit]
[-] taxonomy.php
[edit]
[+]
php-ai-client
[+]
ai-client
[-] class-wp-block-templates-registry.php
[edit]
[-] ms-default-filters.php
[edit]
[-] class-http.php
[edit]
[-] compat.php
[edit]
[-] block-i18n.json
[edit]
[-] class-wp-theme-json-resolver.php
[edit]
[+]
block-patterns
[-] class-walker-comment.php
[edit]
[-] class.wp-dependencies.php
[edit]
[+]
js
[-] vars.php
[edit]
[-] theme-previews.php
[edit]
[-] rewrite.php
[edit]
[-] feed-rss2-lazyloader.php
[edit]
[-] class-wp-feed-cache-transient.php
[edit]
[-] class-walker-page-dropdown.php
[edit]
[+]
pomo
[-] template.php
[edit]
[-] class-wp-feed-cache.php
[edit]
[-] class-wp-recovery-mode-link-service.php
[edit]
[-] class-wp-metadata-lazyloader.php
[edit]
[-] default-filters.php
[edit]
[-] rest-api.php
[edit]
[-] kses.php
[edit]
[-] class-avif-info.php
[edit]
[-] rss.php
[edit]
[-] class-wp-block-styles-registry.php
[edit]
[-] template-canvas.php
[edit]
[-] ai-client.php
[edit]
[-] class-wp-post-type.php
[edit]
[+]
l10n
[-] ms-files.php
[edit]
[-] class-wp-locale-switcher.php
[edit]
[-] global-styles-and-settings.php
[edit]
[-] blocks.php
[edit]
[-] nav-menu.php
[edit]