beans_get_fields

Get registered fields.

This function is used to get the previously registered fields in order to display them using beans_field().

beans_get_fields( string $context, string $section = false )

Return: (array|bool) Array of register fields on success, false on failure.

Parameters

NameTypeRequiredDefaultDescription
$contextstringtrue-The context in which the fields are used. 'option' for options/settings pages, 'post_meta' for post fields, 'term_meta' for taxonomies fields and 'wp_customize' for WP customizer fields.
$sectionstringfalsefalseA section id to define a group of fields. This is mostly used for metaboxes and WP Customizer sections.

Source

function beans_get_fields( $context, $section = false ) {

	if ( ! class_exists( '_Beans_Fields' ) ) {
		return;
	}

	$class = new _Beans_Fields();
	return $class->get_fields( $context, $section );

}