WordPress at a glance
function is not described

WP_User::get_caps_data() private WP 4.9.0

Gets the available user capabilities data.

{} It's a method of the class: WP_User{}

No Hooks.

Return

true|false[]. List of capabilities keyed by the capability name, e.g. array( 'edit_posts' => true, 'delete_posts' => false ).

Usage

// private - for code of main (parent) class only
$result = $this->get_caps_data();

Changelog

Since 4.9.0 Introduced.

Code of WP_User::get_caps_data() WP 5.7.1

<?php
private function get_caps_data() {
	$caps = get_user_meta( $this->ID, $this->cap_key, true );

	if ( ! is_array( $caps ) ) {
		return array();
	}

	return $caps;
}