classes/fields/pick.php
public function data_capabilities( $name = null, $value = null, $options = null, $pod = null, $id = null ) {

		$data = array();

		global $wp_roles;

		$default_caps = array(
			'activate_plugins',
			'add_users',
			'create_users',
			'delete_others_pages',
			'delete_others_posts',
			'delete_pages',
			'delete_plugins',
			'delete_posts',
			'delete_private_pages',
			'delete_private_posts',
			'delete_published_pages',
			'delete_published_posts',
			'delete_users',
			'edit_dashboard',
			'edit_files',
			'edit_others_pages',
			'edit_others_posts',
			'edit_pages',
			'edit_plugins',
			'edit_posts',
			'edit_private_pages',
			'edit_private_posts',
			'edit_published_pages',
			'edit_published_posts',
			'edit_theme_options',
			'edit_themes',
			'edit_users',
			'import',
			'install_plugins',
			'install_themes',
			'list_users',
			'manage_categories',
			'manage_links',
			'manage_options',
			'moderate_comments',
			'promote_users',
			'publish_pages',
			'publish_posts',
			'read',
			'read_private_pages',
			'read_private_posts',
			'remove_users',
			'switch_themes',
			'unfiltered_html',
			'unfiltered_upload',
			'update_core',
			'update_plugins',
			'update_themes',
			'upload_files',
		);

		$role_caps = array();

		foreach ( $wp_roles->role_objects as $key => $role ) {
			if ( is_array( $role->capabilities ) ) {
				foreach ( $role->capabilities as $cap => $grant ) {
					$role_caps[ $cap ] = $cap;
				}
			}
		}

		$role_caps = array_unique( $role_caps );

		$capabilities = array_merge( $default_caps, $role_caps );

		// To support Members filters.
		$capabilities = apply_filters( 'members_get_capabilities', $capabilities );

		$capabilities = apply_filters( 'pods_roles_get_capabilities', $capabilities );

		sort( $capabilities );

		$capabilities = array_unique( $capabilities );

		global $wp_roles;

		foreach ( $capabilities as $capability ) {
			$data[ $capability ] = $capability;
		}

		return apply_filters( 'pods_form_ui_field_pick_data_capabilities', $data, $name, $value, $options, $pod, $id );

	}
public function data_capabilities( $name = null, $value = null, $options = null, $pod = null, $id = null ) {

		$data = array();

		global $wp_roles;

		$default_caps = array(
			'activate_plugins',
			'add_users',
			'create_users',
			'delete_others_pages',
			'delete_others_posts',
			'delete_pages',
			'delete_plugins',
			'delete_posts',
			'delete_private_pages',
			'delete_private_posts',
			'delete_published_pages',
			'delete_published_posts',
			'delete_users',
			'edit_dashboard',
			'edit_files',
			'edit_others_pages',
			'edit_others_posts',
			'edit_pages',
			'edit_plugins',
			'edit_posts',
			'edit_private_pages',
			'edit_private_posts',
			'edit_published_pages',
			'edit_published_posts',
			'edit_theme_options',
			'edit_themes',
			'edit_users',
			'import',
			'install_plugins',
			'install_themes',
			'list_users',
			'manage_categories',
			'manage_links',
			'manage_options',
			'moderate_comments',
			'promote_users',
			'publish_pages',
			'publish_posts',
			'read',
			'read_private_pages',
			'read_private_posts',
			'remove_users',
			'switch_themes',
			'unfiltered_html',
			'unfiltered_upload',
			'update_core',
			'update_plugins',
			'update_themes',
			'upload_files',
		);

		$role_caps = array();

		foreach ( $wp_roles->role_objects as $key => $role ) {
			if ( is_array( $role->capabilities ) ) {
				foreach ( $role->capabilities as $cap => $grant ) {
					$role_caps[ $cap ] = $cap;
				}
			}
		}

		$role_caps = array_unique( $role_caps );

		$capabilities = array_merge( $default_caps, $role_caps );

		// To support Members filters.
		$capabilities = apply_filters( 'members_get_capabilities', $capabilities );

		$capabilities = apply_filters( 'pods_roles_get_capabilities', $capabilities );

		sort( $capabilities );

		$capabilities = array_unique( $capabilities );

		global $wp_roles;

		foreach ( $capabilities as $capability ) {
			$data[ $capability ] = $capability;
		}

		return apply_filters( 'pods_form_ui_field_pick_data_capabilities', $data, $name, $value, $options, $pod, $id );

	}
public function data_capabilities ( $ name = null , $ value = null , $ options = null , $ pod = null , $ id = null ) { $ data = array ( ) ; global $ wp_roles ; $ default_caps = array ( 'activate_plugins' , 'add_users' , 'create_users' , 'delete_others_pages' , 'delete_others_posts' , 'delete_pages' , 'delete_plugins' , 'delete_posts' , 'delete_private_pages' , 'delete_private_posts' , 'delete_published_pages' , 'delete_published_posts' , 'delete_users' , 'edit_dashboard' , 'edit_files' , 'edit_others_pages' , 'edit_others_posts' , 'edit_pages' , 'edit_plugins' , 'edit_posts' , 'edit_private_pages' , 'edit_private_posts' , 'edit_published_pages' , 'edit_published_posts' , 'edit_theme_options' , 'edit_themes' , 'edit_users' , 'import' , 'install_plugins' , 'install_themes' , 'list_users' , 'manage_categories' , 'manage_links' , 'manage_options' , 'moderate_comments' , 'promote_users' , 'publish_pages' , 'publish_posts' , 'read' , 'read_private_pages' , 'read_private_posts' , 'remove_users' , 'switch_themes' , 'unfiltered_html' , 'unfiltered_upload' , 'update_core' , 'update_plugins' , 'update_themes' , 'upload_files' , ) ; $ role_caps = array ( ) ; foreach ( $ wp_roles -> role_objects as $ key => $ role ) { if ( is_array ( $ role -> capabilities ) ) { foreach ( $ role -> capabilities as $ cap => $ grant ) { $ role_caps [ $ cap ] = $ cap ; } } } $ role_caps = array_unique ( $ role_caps ) ; $ capabilities = array_merge ( $ default_caps , $ role_caps ) ; // To support Members filters. $ capabilities = apply_filters ( 'members_get_capabilities' , $ capabilities ) ; $ capabilities = apply_filters ( 'pods_roles_get_capabilities' , $ capabilities ) ; sort ( $ capabilities ) ; $ capabilities = array_unique ( $ capabilities ) ; global $ wp_roles ; foreach ( $ capabilities as $ capability ) { $ data [ $ capability ] = $ capability ; } return apply_filters ( 'pods_form_ui_field_pick_data_capabilities' , $ data , $ name , $ value , $ options , $ pod , $ id ) ; }
Data callback for User Capabilities.

@param string|null       $name    The name of the field.
@param string|array|null $value   The value of the field.
@param array|null        $options Field options.
@param array|null        $pod     Pod data.
@param int|null          $id      Item ID.

@return array

@since 2.3.0
Data callback for User Capabilities .