<commit_before><commit_msg>implement wp cap list<commit_after><?php

WP_CLI::add_command( 'cap', 'Capabilities_Command' );

/**
 * Manage capabilities.
 *
 * @package wp-cli
 * @subpackage commands/internals
 */
class Capabilities_Command extends WP_CLI_Command {

	/**
	 * List capabilities for a given role.
	 *
	 * @subcommand list
	 * @synopsis <role>
	 */
	public function _list( $args ) {
		global $wp_roles;

		list( $role ) = $args;

		$role_obj = $wp_roles->get_role( $role );

		if ( !$role_obj )
			WP_CLI::error( "$role does not exist" );

		foreach ( array_keys( $role_obj->capabilities ) as $cap )
			WP_CLI::line( $cap );
	}
}

{'fraction_non_alphanumeric': 0.14953271028037382, 'fraction_numerical': 0.0, 'mean_word_length': 3.798507462686567, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5819324', 'n_tokens_mistral': 248, 'n_tokens_neox': 230, 'n_words': 53}