beans_do_register_term_meta

Add Beans term meta.

beans_do_register_term_meta( )

Return: (void)

Source

function beans_do_register_term_meta() {

	// Get layout option without default for the count.
	$options = beans_get_layouts_for_options();

	// Stop here if there is less than two layouts options.
	if ( count( $options ) < 2 ) {
		return;
	}

	$fields = array(
		array(
			'id'      => 'beans_layout',
			'label'   => _x( 'Layout', 'term meta', 'tm-beans' ),
			'type'    => 'radio',
			'default' => 'default_fallback',
			'options' => beans_get_layouts_for_options( true ),
		),
	);

	beans_register_term_meta( $fields, array( 'category', 'post_tag' ), 'tm-beans' );

}