<?php
/**
 * Include and setup custom metaboxes and fields. (make sure you copy this file to outside the CMB2 directory)
 *
 * Be sure to replace all instances of 'yourprefix_' with your project's prefix.
 * http://nacin.com/2010/05/11/in-wordpress-prefix-everything/
 *
 * @category YourThemeOrPlugin
 * @package  Demo_CMB2
 * @license  http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
 * @link     https://github.com/WebDevStudios/CMB2
 */

add_action( 'cmb2_init', 'helium_metaboxes' );
function helium_metaboxes() {

    // Start with an underscore to hide fields from custom fields list
    $prefix = 'helium_met_';

    /* Page Settings ***************************************************************************/
    /* ************************************************************************************/
    // $cmb = new_cmb2_box( array(
    //     'id'            => 'page_heading_settings',
    //     'title'         => esc_html__( 'Show Page Heading', 'helium' ),
    //     'object_types'  => array( 'page'), // Post type
    //     'context'       => 'normal',
    //     'priority'      => 'high',
    //     'show_names'    => true,
        
    // ) );

    //     // Display title of page
    //     $cmb->add_field( array(
    //         'name'       => esc_html__( 'Show title of page', 'helium' ),
    //         'desc'       => esc_html__( 'Allow display title of page', 'helium' ),
    //         'id'         => $prefix . 'page_heading',
    //         'type'             => 'select',
    //         'show_option_none' => false,
    //         'options'          => array(
    //             'show' => esc_html__( 'Show', 'helium' ),
    //             'hide'   => esc_html__('Hide', 'helium' )
    //         ),
    //         'default' => 'show',
            
    //     ) );  
    $cmb = new_cmb2_box( array(
        'id'            => 'layout_settings',
        'title'         => esc_html__( 'General Settings', 'helium' ),
        'object_types'  => array( 'page', 'post', 'schedule'), // Post type
        'context'       => 'normal',
        'priority'      => 'high',
        'show_names'    => true, // Show field names on the left
        ));
    $cmb->add_field( array(
        'name'              => esc_html__( 'Choose theme location to display menu', 'helium' ),
        'id'                => $prefix . 'location_theme',
        'type'              => 'select',
        'show_option_none'  => false,
        'options'           => array(
            'primary'       => esc_html__( 'Primary', 'helium' ),
            'onepage'       => esc_html__('One page', 'helium')
        ),
        'default' => 'primary',
    )); 
}

