AnonSec Shell
Server IP : 172.67.157.199  /  Your IP : 3.15.208.242   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/plugins/wordpress-seo/admin/capabilities/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/plugins/wordpress-seo/admin/capabilities/class-capability-manager-vip.php
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Capabilities
 */

/**
 * VIP implementation of the Capability Manager.
 */
final class WPSEO_Capability_Manager_VIP extends WPSEO_Abstract_Capability_Manager {

	/**
	 * Adds the registered capabilities to the system.
	 *
	 * @return void
	 */
	public function add() {
		$role_capabilities = [];
		foreach ( $this->capabilities as $capability => $roles ) {
			$role_capabilities = $this->get_role_capabilities( $role_capabilities, $capability, $roles );
		}

		foreach ( $role_capabilities as $role => $capabilities ) {
			wpcom_vip_add_role_caps( $role, $capabilities );
		}
	}

	/**
	 * Removes the registered capabilities from the system
	 *
	 * @return void
	 */
	public function remove() {
		// Remove from any role it has been added to.
		$roles = wp_roles()->get_names();
		$roles = array_keys( $roles );

		$role_capabilities = [];
		foreach ( array_keys( $this->capabilities ) as $capability ) {
			// Allow filtering of roles.
			$role_capabilities = $this->get_role_capabilities( $role_capabilities, $capability, $roles );
		}

		foreach ( $role_capabilities as $role => $capabilities ) {
			wpcom_vip_remove_role_caps( $role, $capabilities );
		}
	}

	/**
	 * Returns the roles which the capability is registered on.
	 *
	 * @param array  $role_capabilities List of all roles with their capabilities.
	 * @param string $capability        Capability to filter roles for.
	 * @param array  $roles             List of default roles.
	 *
	 * @return array List of capabilities.
	 */
	protected function get_role_capabilities( $role_capabilities, $capability, $roles ) {
		// Allow filtering of roles.
		$filtered_roles = $this->filter_roles( $capability, $roles );

		foreach ( $filtered_roles as $role ) {
			if ( ! isset( $add_role_caps[ $role ] ) ) {
				$role_capabilities[ $role ] = [];
			}

			$role_capabilities[ $role ][] = $capability;
		}

		return $role_capabilities;
	}
}

Anon7 - 2022
AnonSec Team