<?php
add_action( 'admin_init', 'themesflat_page_options_init' );

function themesflat_page_options_init() {

    new themesflat_meta_boxes(array(
        // Blog
        'id'    => 'blog-options',
        'label' => esc_html__( 'Post settings', 'dirtywash' ),
        'post_types'    => array('post','faq'),
        'context'     => 'normal',
        'priority'    => 'default',
        'sections' => array(
            'blog'   => array( 'title' => esc_html__( 'Post Format', 'dirtywash' ) ),
            ),
        'options' => themesflat_post_options_fields()
    ));   

 //    new themesflat_meta_boxes(array(
 //    	// Portfolio
 //    	'id'	 => 'portfolio-options',
	// 	'label'  => esc_html__( 'Causes Settings', 'dirtywash' ),
	// 	'post_types'  => 'portfolios',
	//     'context'     => 'normal',
 //        'priority'    => 'default',
	// 	'sections' => array(
 //            'general'   => array( 'title' => esc_html__( 'Portfolio', 'dirtywash' ) ),
	// 		),
	// 	'options' => themesflat_portfolio_options_fields()
	// ));	
}

/* Option Blog
===================================*/
function themesflat_post_options_fields() {
    $options['gallery_images_heading'] = array(
        'type' => 'heading',
        'section' => 'blog',
        'title' => esc_html__( 'Post Format: Gallery .', 'dirtywash' ),
        'description' => esc_html__( '', 'dirtywash' )
    );

    $options['gallery_images'] = array(
        'type'    => 'image-control',
        'section' => 'blog',
        'title' => esc_html__( 'Images', 'dirtywash' ),
        'default' => ''
    );

    $options['video_url_heading'] = array(
        'type' => 'heading',
        'section' => 'blog',
        'title' => esc_html__( 'Post Format: Video ( Embeded video from youtube, vimeo ...).', 'dirtywash' ),
        'description' => esc_html__( '', 'dirtywash' )
    );
    $options['video_url'] = array(
        'type'    => 'textarea',
        'section' => 'blog',
        'title' => esc_html__( 'iframe video link', 'dirtywash' ),
        'default' => ''
    );

    $options['audio_url_heading'] = array(
        'type' => 'heading',
        'section' => 'blog',
        'title' => esc_html__( 'Post Format: Audio', 'dirtywash' ),
        'description' => esc_html__( '', 'dirtywash' )
    );
    $options['audio_url'] = array(
        'type'    => 'textarea',
        'section' => 'blog',
        'title' => esc_html__( 'iframe audio link (https://soundcloud.com/)', 'dirtywash' ),
        'default' => ''
    );
    return $options;
}

/* Option Portfolio
===================================*/
// function themesflat_portfolio_options_fields() {
//     $options['portfolio_status'] = array(
//         'section' => 'general',
//         'default' => '',
//         'type'    => 'text',
//         'title'   => esc_html__( 'Status', 'dirtywash' )
//     );

//     $options['portfolio_client'] = array(
//         'section' => 'general',
//         'default' => '',
//         'type'    => 'text',
//         'title'   => esc_html__( 'Name Client', 'dirtywash' )
//     );

//     $options['portfolio_website'] = array(
//         'section' => 'general',
//         'default' => '',
//         'type'    => 'text',
//         'title'   => esc_html__( 'Url Client', 'dirtywash' )
//     );
//     return $options;
// }