DEFAULT // //*****************// // Menu $page_default_settings[] = array( 'title' => __('Menu', 'adena'), 'icon' => 'dashicons dashicons-menu', 'fields' => array( // Menu Location array( 'id' => 'm_page_menu_loc', 'type' => 'select', 'title' => esc_html__('Menu Location', 'adena'), 'options' => array( 'inherit' => esc_html__('Main Location', 'adena'), 'onepage' => esc_html__('Onepage Location', 'adena'), ), 'default' => 'inherit', ), // Style array( 'id' => 'm_page_menu_style', 'type' => 'select', 'title' => esc_html__('Style', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'white' => esc_html__('White BG', 'adena'), 'black' => esc_html__('Black BG', 'adena'), 'trasp-w' => esc_html__('Trasparent BG + White Text', 'adena'), 'trasp-b' => esc_html__('Trasparent BG + Black Text', 'adena'), ), 'default' => 'inherit', ), // Sticky array( 'id' => 'm_page_menu_sticky', 'type' => 'button_set', 'title' => esc_html__('Sticky', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'on' => esc_html__('ON', 'adena'), 'off' => esc_html__('OFF', 'adena'), ), 'default' => 'inherit', ), ), ); // Heading $page_default_settings[] = array( 'title' => __('Heading', 'adena'), 'icon' => 'dashicons dashicons-tablet', 'fields' => array( // Settings array( 'id' => 'm_page_head_settings', 'type' => 'button_set', 'title' => esc_html__('Settings', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'inherit', ), // Text Color array( 'id' => 'm_page_head_col', 'type' => 'color', 'title' => __('Text Color', 'adena'), 'default' => '#222222', 'validate' => 'color', 'required' => array('m_page_head_settings', '=', 'custom'), ), // BG array( 'id' => 'm_page_head_bg', 'type' => 'background', 'title' => esc_html__('Background', 'adena'), 'default' => array( 'background-color' => '#eeeeee', ), 'required' => array('m_page_head_settings', '=', 'custom'), ), // Height array( 'id' => 'm_page_head_height', 'type' => 'slider', 'title' => esc_html__('Height (px)', 'adena'), 'default' => 400, 'min' => 100, 'step' => 1, 'max' => 1000, 'display_value' => 'text', 'required' => array('m_page_head_settings', '=', 'custom'), ), // Full Height array( 'id' => 'm_page_head_fullheight', 'type' => 'switch', 'title' => esc_html__('Full Height', 'adena'), 'subtitle' => esc_html__('This option will override the previous value', 'adena'), 'default' => false, 'required' => array('m_page_head_height', '>=', '500'), ), // Title array( 'id' => 'm_page_head_title', 'type' => 'button_set', 'title' => esc_html__('Title', 'adena'), 'options' => array( 'title' => esc_html__('Page Title', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'title', 'required' => array('m_page_head_settings', '=', 'custom'), ), // Title -> Custom array( 'id' => 'm_page_head_title_custom', 'type' => 'text', 'title' => esc_html__('Custom Title', 'adena'), 'required' => array( array('m_page_head_settings', '=', 'custom'), array('m_page_head_title', '=', 'custom'), ), ), // SubTitle array( 'id' => 'm_page_head_subtitle', 'type' => 'button_set', 'title' => esc_html__('Subtitle', 'adena'), 'options' => array( 'off' => esc_html__('OFF', 'adena'), 'excerpt' => esc_html__('Page Excerpt', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'excerpt', 'required' => array('m_page_head_settings', '=', 'custom'), ), // SubTitle -> Custom array( 'id' => 'm_page_head_subtitle_custom', 'type' => 'text', 'title' => esc_html__('Custom Subtitle', 'adena'), 'required' => array( array('m_page_head_settings', '=', 'custom'), array('m_page_head_subtitle', '=', 'custom'), ), ), // Button array( 'id' => 'm_page_head_button', 'type' => 'switch', 'title' => esc_html__('Bottom Arrow', 'adena'), 'default' => false, 'required' => array('m_page_head_settings', '=', 'custom'), ), ), ); // Layout $page_default_settings[] = array( 'title' => __('Layout', 'adena'), 'icon' => 'dashicons dashicons-align-left', 'fields' => array( // Settings array( 'id' => 'm_page_layout_settings', 'type' => 'button_set', 'title' => esc_html__('Settings', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'inherit', ), // Layout array( 'id' => 'm_page_layout', 'type' => 'image_select', 'title' => esc_html__('Content Layout', 'adena'), 'options' => array( 'full_big' => array( 'alt' => esc_html__('Fullwidth', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_content_big.png' ), 'full_small' => array( 'alt' => esc_html__('Fullwidth Small', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_content_small.png' ), 'side_R' => array( 'alt' => esc_html__('Right Sidebar', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_sideR.png' ), 'side_L' => array( 'alt' => esc_html__('Left Sidebar', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_sideL.png' ), ), 'default' => 'full_big', 'required' => array('m_page_layout_settings', '=', 'custom'), ), // Sidebar array( 'id' => 'm_page_sidebar', 'type' => 'select', 'title' => esc_html__('Sidebar', 'adena'), 'data' => 'sidebars', 'default' => 'un-page-sidebar', 'required' => array( array('m_page_layout_settings', '=', 'custom'), array('m_page_layout','contains','side_'), ), ), ), ); // Footer $page_default_settings[] = array( 'title' => __('Footer', 'adena'), 'icon' => 'dashicons dashicons-welcome-widgets-menus', 'fields' => array( // Area 1 array( 'id' => 'm_page_footer_area1', 'type' => 'button_set', 'title' => esc_html__('Area 1', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'off' => esc_html__('OFF', 'adena'), ), 'default' => 'inherit', ), // Area 2 array( 'id' => 'm_page_footer_area2', 'type' => 'button_set', 'title' => esc_html__('Area 2', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'off' => esc_html__('OFF', 'adena'), ), 'default' => 'inherit', ), ), ); $metaboxes[] = array( 'id' => 'page_default_settings', 'title' => esc_html__( 'Page Settings', 'adena'), 'post_types' => array( 'page' ), 'page_template' => array( 'default' ), 'position' => 'normal', 'priority' => 'normal', 'sidebar' => false, 'sections' => $page_default_settings, ); //******// // POST // //******// // Menu $post_settings[] = array( 'title' => __('Menu', 'adena'), 'icon' => 'dashicons dashicons-menu', 'fields' => array( // Style array( 'id' => 'm_post_menu_style', 'type' => 'select', 'title' => esc_html__('Style', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'white' => esc_html__('White BG', 'adena'), 'black' => esc_html__('Black BG', 'adena'), 'trasp-w' => esc_html__('Trasparent BG + White Text', 'adena'), 'trasp-b' => esc_html__('Trasparent BG + Black Text', 'adena'), ), 'default' => 'inherit', ), // Sticky array( 'id' => 'm_post_menu_sticky', 'type' => 'button_set', 'title' => esc_html__('Sticky', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'on' => esc_html__('ON', 'adena'), 'off' => esc_html__('OFF', 'adena'), ), 'default' => 'inherit', ), ), ); // Heading $post_settings[] = array( 'title' => __('Heading', 'adena'), 'icon' => 'dashicons dashicons-tablet', 'fields' => array( // Settings array( 'id' => 'm_post_head_settings', 'type' => 'button_set', 'title' => esc_html__('Settings', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'inherit', ), // Text Color array( 'id' => 'm_post_head_col', 'type' => 'color', 'title' => esc_html__('Text Color', 'adena'), 'default' => '#222222', 'validate' => 'color', 'required' => array('m_post_head_settings', '=', 'custom'), ), // BG array( 'id' => 'm_post_head_bg', 'type' => 'background', 'title' => esc_html__('Background', 'adena'), 'default' => array( 'background-color' => '#eeeeee', ), 'required' => array('m_post_head_settings', '=', 'custom'), ), // Height array( 'id' => 'm_post_head_height', 'type' => 'slider', 'title' => esc_html__('Height (px)', 'adena'), 'default' => 400, 'min' => 100, 'step' => 1, 'max' => 1000, 'display_value' => 'text', 'required' => array('m_post_head_settings', '=', 'custom'), ), // Full Height array( 'id' => 'm_post_head_fullheight', 'type' => 'switch', 'title' => esc_html__('Full Height', 'adena'), 'subtitle' => esc_html__('This option will override the previous value', 'adena'), 'default' => false, 'required' => array('m_post_head_height', '>=', '500'), ), // Title array( 'id' => 'm_post_head_title', 'type' => 'button_set', 'title' => esc_html__('Title', 'adena'), 'options' => array( 'title' => esc_html__('Post Title', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'title', 'required' => array('m_post_head_settings', '=', 'custom'), ), // Title -> Custom array( 'id' => 'm_post_head_title_custom', 'type' => 'text', 'title' => esc_html__('Custom Title', 'adena'), 'required' => array( array('m_post_head_settings', '=', 'custom'), array('m_post_head_title', '=', 'custom'), ), ), // SubTitle array( 'id' => 'm_post_head_subtitle', 'type' => 'button_set', 'title' => esc_html__('Subtitle', 'adena'), 'options' => array( 'off' => esc_html__('OFF', 'adena'), 'excerpt' => esc_html__('Post Excerpt', 'adena'), 'meta' => esc_html__('Post Meta', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'excerpt', 'required' => array('m_post_head_settings', '=', 'custom'), ), // Subtitle -> Meta array( 'id' => 'm_post_head_subtitle_meta', 'type' => 'select', 'multi' => true, 'sortable' => true, 'title' => esc_html__('Metas', 'adena'), 'subtitle' => esc_html__('Add and order the metas to display in your subtitle', 'adena'), 'options' => array( 'category' => esc_html__('Main Category', 'adena'), 'categories' => esc_html__('Up to 3 Categories', 'adena'), 'format' => esc_html__('Format', 'adena'), 'date' => esc_html__('Date', 'adena'), 'author' => esc_html__('Author', 'adena'), 'comments' => esc_html__('Comments Count', 'adena'), ), 'required' => array( array('m_post_head_settings', '=', 'custom'), array('m_post_head_subtitle', '=', 'meta'), ), ), // SubTitle -> Custom array( 'id' => 'm_post_head_subtitle_custom', 'type' => 'text', 'title' => esc_html__('Custom Subtitle', 'adena'), 'required' => array( array('m_post_head_settings', '=', 'custom'), array('m_post_head_subtitle', '=', 'custom'), ), ), // Button array( 'id' => 'm_post_head_button', 'type' => 'switch', 'title' => esc_html__('Bottom Arrow', 'adena'), 'default' => false, 'required' => array('m_post_head_settings', '=', 'custom'), ), ), ); // Layout $post_settings[] = array( 'title' => __('Layout', 'adena'), 'icon' => 'dashicons dashicons-align-left', 'fields' => array( // Settings array( 'id' => 'm_post_layout_settings', 'type' => 'button_set', 'title' => esc_html__('Settings', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'custom' => esc_html__('Custom', 'adena'), ), 'default' => 'inherit', ), // Layout array( 'id' => 'm_post_layout', 'type' => 'image_select', 'title' => esc_html__('Content Layout', 'adena'), 'options' => array( 'full_big' => array( 'alt' => esc_html__('Fullwidth', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_content_big.png' ), 'full_small' => array( 'alt' => esc_html__('Fullwidth Small', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_content_small.png' ), 'side_R' => array( 'alt' => esc_html__('Right Sidebar', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_sideR.png' ), 'side_L' => array( 'alt' => esc_html__('Left Sidebar', 'adena'), 'img' => UN_THEME_URI.'assets/img/layout_sideL.png' ), ), 'default' => 'full_big', 'required' => array('m_post_layout_settings', '=', 'custom'), ), // Sidebar array( 'id' => 'm_post_sidebar', 'type' => 'select', 'title' => esc_html__('Sidebar', 'adena'), 'data' => 'sidebars', 'default' => 'un-blog-sidebar', 'required' => array( array('m_post_layout_settings', '=', 'custom'), array('m_post_layout','contains','side_'), ), ), ), ); // Footer $post_settings[] = array( 'title' => __('Footer', 'adena'), 'icon' => 'dashicons dashicons-welcome-widgets-menus', 'fields' => array( // Area 1 array( 'id' => 'm_post_footer_area1', 'type' => 'button_set', 'title' => esc_html__('Area 1', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'off' => esc_html__('OFF', 'adena'), ), 'default' => 'inherit', ), // Area 2 array( 'id' => 'm_post_footer_area2', 'type' => 'button_set', 'title' => esc_html__('Area 2', 'adena'), 'options' => array( 'inherit' => esc_html__('Inherit', 'adena'), 'off' => esc_html__('OFF', 'adena'), ), 'default' => 'inherit', ), ), ); $metaboxes[] = array( 'id' => 'post_default_settings', 'title' => esc_html__( 'Post Settings', 'adena'), 'post_types' => array( 'post' ), 'position' => 'normal', 'priority' => 'normal', 'sidebar' => false, 'sections' => $post_settings, ); //****************// // POST - GALLERY // //****************// $post_gallery[] = array( 'fields' => array( // Type array( 'id' => 'm_post_gallery_type', 'type' => 'button_set', 'title' => esc_html__('Type', 'adena'), 'options' => array( 'gallery' => esc_html__('Gallery', 'adena'), 'slider' => esc_html__('Slider', 'adena'), ), 'default' => 'gallery', ), // Images array( 'id' => 'm_post_gallery', 'type' => 'gallery', 'title' => esc_html__('Create your Gallery', 'adena'), ), ), ); $metaboxes[] = array( 'id' => 'format_gallery_settings', 'title' => esc_html__( 'Format Settings', 'adena'), 'post_types' => array( 'post' ), 'post_format' => array( 'gallery' ), 'position' => 'normal', 'priority' => 'hight', 'sidebar' => false, 'sections' => $post_gallery, ); //**************// // POST - VIDEO // //**************// $post_video[] = array( 'fields' => array( // Source array( 'id' => 'm_post_video_source', 'type' => 'button_set', 'title' => esc_html__('Source', 'adena'), 'options' => array( 'url' => esc_html__('Url', 'adena'), 'embed' => esc_html__('Embed Code', 'adena'), 'upload' => esc_html__('Upload', 'adena'), ), 'default' => 'url', ), // Url array( 'id' => 'm_post_video_url', 'type' => 'text', 'title' => esc_html__('Video Url', 'adena'), 'subtitle' => esc_html__('Allowed sources: blip.tv, Bunkr, DailyMotion, Flickr, Hulu, Qik, Revision3, SlideShare, Viddler, Vimeo, WordPress.tv, YouTube.', 'adena'), 'required' => array( array('m_post_video_source','=','url'), ), ), // Embed array( 'id'=>'m_post_video_embed', 'type' => 'textarea', 'title' => esc_html__('Video Embed Code', 'adena'), 'required' => array( array('m_post_video_source','=','embed'), ), ), // Upload array( 'id' => 'm_post_video_upload', 'type' => 'media', 'library_filter' => array('mp4', 'm4v', 'webm', 'ogv', 'wmv', 'flv'), 'url' => true, 'title' => esc_html__('Video File', 'adena'), 'subtitle' => esc_html__('You can only use the HTML5\'s formats for your video (.mp4, .m4v, .webm, .ogv, .wmv, .flv)', 'adena'), 'required' => array( array('m_post_video_source','=','upload'), ), ), ), ); $metaboxes[] = array( 'id' => 'format_video_settings', 'title' => esc_html__( 'Format Settings', 'adena'), 'post_types' => array( 'post' ), 'post_format' => array( 'video' ), 'position' => 'normal', 'priority' => 'hight', 'sidebar' => false, 'sections' => $post_video, ); //**************// // POST - AUDIO // //**************// $post_audio[] = array( 'fields' => array( // Source Type array( 'id' => 'm_post_audio_source', 'type' => 'button_set', 'title' => esc_html__('Audio Source', 'adena'), 'options' => array( 'url' => esc_html__('Url', 'adena'), 'embed' => esc_html__('Embed Code', 'adena'), 'upload' => esc_html__('Upload', 'adena'), ), 'default' => 'url', ), // Audio URL array( 'id'=>'m_post_audio_url', 'type' => 'text', 'title' => esc_html__('Audio URL', 'adena'), 'description' => esc_html__('Allowed sources: SoundCloud, Spotify, etc', 'adena'), 'required' => array('m_post_audio_source', '=', 'url'), ), // Embed array( 'id'=>'m_post_audio_embed', 'type' => 'textarea', 'title' => esc_html__('Audio Embed Code', 'adena'), 'required' => array( array('m_post_audio_source','=','embed'), ), ), // Audio Upload array( 'id' => 'm_post_audio_upload', 'type' => 'media', 'library_filter' => array('mp3', 'm4a', 'ogg', 'wav', 'wma'), 'url' => true, 'title' => esc_html__('Audio File', 'adena'), 'description' => esc_html__('You can only use some specific formats for your audio (.mp3, .m4a, .ogg, .wav, .wav)', 'adena'), 'required' => array('m_post_audio_source', '=', 'upload'), ), ), ); $metaboxes[] = array( 'id' => 'post_audio', 'title' => esc_html__( 'Format Settings', 'adena'), 'post_types' => array( 'post' ), 'post_format' => array( 'audio' ), 'position' => 'normal', 'priority' => 'high', 'sidebar' => false, 'sections' => $post_audio, ); // RETURN METAS return $metaboxes; } add_action( 'redux/metaboxes/' . UN . '/boxes', 'un_metaboxes' ); }