beans_do_register_post_meta

Add Beans post meta.

beans_do_register_post_meta( )

Return: (void)

Source

function beans_do_register_post_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', 'post meta', 'tm-beans' ),
			'type'    => 'radio',
			'default' => 'default_fallback',
			'options' => beans_get_layouts_for_options( true ),
		),
	);

	beans_register_post_meta( $fields, array( 'post', 'page' ), 'tm-beans', array( 'title' => __( 'Post Options', 'tm-beans' ) ) );

}