beans_register_fields

Register fields.

This function should only be invoked through the ‘admin_init’ action.

beans_register_fields( $fields, $context, $section )

Source

function beans_register_fields( array $fields, $context, $section ) {

	if ( empty( $fields ) ) {
		return false;
	}

	// Load the class only if this function is called to prevent unnecessary memory usage.
	require_once( BEANS_API_PATH . 'fields/class.php' );

	$class = new _Beans_Fields();
	$class->register( $fields, $context, $section );

	return true;

}