%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/gachan/www/wp-content/themes/jekas/inc/meta_boxes/
Upload File :
Create Path :
Current File : /home/gachan/www/wp-content/themes/jekas/inc/meta_boxes/meta_box.php

<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 31/07/15
 * Time: 9:38
 */
 
if(!class_exists('RW_Meta_Box')) 
 return;

  add_filter('rwmb_meta_boxes','jekas_register_meta_boxes');

  function jekas_register_meta_boxes($meta_boxes){

       /******************************************* Post types *****************************************/

       // Work Options

       $meta_boxes[] = array(
           'id'          => 'jkmb_work',
           'title'       => esc_html__('Work Information','jekas'),
           'post_types'  => 'work',
           'tabs'        => array(
               'tab_general' => array(
                   'label'=>esc_html__('General Information','jekas'),
                   'icon' => 'fa fa-home',
                   ),
               'tab_image' => array(
                   'label' => esc_html__('Images','jekas'),
                   'icon'  => 'fa fa-photo',
               ),
               'tab_single' => array(
                   'label' => esc_html__('Single Information','jekas'),
                   'icon'  => 'fa fa-bullhorn',
               ),

           ),
           'fields'      => array(
               array(
                   'id'    => 'work_name',
                   'name'  => esc_html__('Name','jekas'),
                   'type'  => 'text',
                   'tab'   => 'tab_general'
               ),
               array(
                   'id'    => 'work_resalt',
                   'name'  => esc_html__('Resalt','jekas'),
                   'type'  => 'text',
                   'tab'   => 'tab_general'
               ),
               array(
                   'id'    => 'work_desc',
                   'name'  => esc_html__('Description','jekas'),
                   'type'  => 'textarea',
                   'tab'   => 'tab_general'
               ),
               array(
                   'id'    => 'work_tags',
                   'name'  => esc_html__('Tags','jekas'),
                   'type'  => 'text',
                   'clone' => true,
                   'tab'   => 'tab_general',
               ),
               array(
                   'id'    => 'work_tag_icon',
                   'name'  => esc_html__('Tags Icon','jekas'),
                   'type'  => 'icon',
                   'tab'   => 'tab_general',
               ),
               array(
                   'id'    =>  'work_btn_text',
                   'name'  => esc_html__('Button text','jekas'),
                   'type'  => 'text',
                   'tab'   => 'tab_general',
                   'std'  => esc_html__('Launch Project','jekas'),
               ),
               array(
                   'id'   => 'work_btn_link',
                   'name' => esc_html__('Button Link','jekas'),
                   'type' => 'text',
                   'tab'  => 'tab_general',
                   'std'  => '#',
               ),
               array(
                   'id'       => 'work_icons',
                   'name'     => esc_html__('Work Icons','jekas'),
                   'type'     => 'icon',
                   'multiple' => true,
                   'tab'   => 'tab_general',
               ),
               array(
                   'id'   => 'work_picture',
                   'name' => esc_html__('Picture','jekas'),
                   'type' => 'image_advanced',
                   'tab'  => 'tab_image',
                   'max_file_uploads' => 1,
               ),
               array(
                   'id'   => 'work_gallery',
                   'name' => esc_html__('Image Gallery','jekas'),
                   'type' => 'image_advanced',
                   'tab'  => 'tab_image',
               ),
               array(
                   'id'     => 'work_header_1',
                   'name'   => esc_html__('Header 1','jekas'),
                   'type'   => 'group',
                   'tab'    => 'tab_single',
                   'fields' => array(
                       array(
                           'id'    => 'header_title',
                           'name'  => esc_html__('Title','jekas'),
                           'type'  => 'text',
                           'std'   => esc_html__('Characteristics and description of the work.','jekas'),
                           ),
                       array(
                           'id'    => 'header_resalt',
                           'name'  => esc_html__('Resalt','jekas'),
                           'type'  => 'text',
                           'std'   => esc_html__('description','jekas'),
                       ),
                       array(
                           'id'   => 'header_icon',
                           'name' => esc_html__('Icon Header','jekas'),
                           'type' => 'icon',
                           'std'  => 'fa fa-html5',
                       ),
                       array(
                           'id'       => 'header_icon_position',
                           'name'     => esc_html__('Icon Position','jekas'),
                           'type'     => 'radio',
                           'options'  => array(
                               'left'   => esc_html__('Left','jekas'),
                               'right'  => esc_html__('Right','jekas')
                           ),
                           'std'      => 'right',
                          ),
                       array(
                           'id'    => 'header_desc',
                           'name'  => esc_html__('Description','jekas'),
                           'type'  => 'textarea',
                       )
                   ),
               ),
               array(
                   'id'     => 'work_header_2',
                   'name'   => esc_html__('Header 2','jekas'),
                   'type'   => 'group',
                   'tab'    => 'tab_single',
                   'fields' => array(
                       array(
                           'id'    => 'header_title',
                           'name'  => esc_html__('Title','jekas'),
                           'type'  => 'text',
                           'std'   => esc_html__('Recent Works with JK.','jekas'),
                       ),
                       array(
                           'id'    => 'header_resalt',
                           'name'  => esc_html__('Resalt','jekas'),
                           'type'  => 'text',
                           'std'   => esc_html__('Works','jekas'),
                       ),
                       array(
                           'id'   => 'header_icon',
                           'name' => esc_html__('Icon Header','jekas'),
                           'type' => 'icon',
                           'std'  => 'fa fa-css3',
                       ),
                       array(
                           'id'       => 'header_icon_position',
                           'name'     => esc_html__('Icon Position','jekas'),
                           'type'     => 'radio',
                           'options'  => array(
                               'left'   => esc_html__('Left','jekas'),
                               'right'  => esc_html__('Right','jekas')
                           ),
                           'std'      => 'left',
                       ),
                       array(
                           'id'    => 'header_desc',
                           'name'  => esc_html__('Description','jekas'),
                           'type'  => 'textarea',
                       )
                   ),
               ),
               array(
                   'id'        =>  'work_selected',
                   'name'      => esc_html__('Select Works','jekas'),
                   'type'      => 'post',
                   'post_type' => 'work',
                   'multiple'  => true,
                   'tab'       => 'tab_single',
               ),
           ),
       );

       // Testimonial Options

       $meta_boxes[] = array(
           'id'          => 'testimonial',
           'title'       => esc_html__('Testimonial Information','jekas'),
           'post_types'  => 'testimonial',
           'fields'      => array(
               array(
                   'id'   => 'ts_author',
                   'name' => esc_html__('Author','jekas'),
                   'type' => 'text',
               ),
               array(
                   'id'    => 'ts_ocupation',
                   'name'  => esc_html__('Ocupation','jekas'),
                   'type'  => 'text',
               ),
               array(
                   'id'   => 'ts_phrase',
                   'name' => esc_html__('Phrase','jekas'),
                   'type' => 'text',
               ),
               array(
                   'id'    => 'ts_picture',
                   'name'  => esc_html__('Picture','jekas'),
                   'type'  => 'image_advanced',
                   'max_file_uploads' => 1,
               ),

           ),
       );

       // Team Member Option

       $meta_boxes[] = array(
           'id'         => 'team_member',
           'title'      => esc_html__('Team Member Information','jekas'),
           'post_types' => 'team_member',
           'tabs'       =>array(
               'tab_personal' => array(
                   'label' => esc_html__('Personal Information', 'jekas'),
                   'icon'  => 'fa fa-user',
               ),
               'tab_skill' => array(
                   'label'  => esc_html__('Ours Skills','jekas'),
                   'icon'   => 'fa fa-group'
               ),
               'tab_works'  => array(
                   'label'  => esc_html__('My Works','jekas'),
                   'icon'   => 'fa fa-cogs',
               ),
           ),
           'fields'     => array(
               array(
                   'id'    => 'tm_name',
                   'name'  => esc_html__('Name','jekas'),
                   'type'  => 'text',
                   'tab'   => 'tab_personal',
               ),
               array(
                   'id'    => 'tm_resalt',
                   'name'  => esc_html__('Resalt','jekas'),
                   'type'  => 'text',
                   'tab'   => 'tab_personal',
               ),
               array(
                   'id'     => 'tm_ocupation',
                   'name'   => esc_html__('Ocupation','jekas'),
                   'type'   => 'text',
                   'tab'   => 'tab_personal',
               ),
               array(
                   'id'    => 'tm_desc',
                   'name'  => esc_html__('About member','jekas'),
                   'type'  => 'wysiwyg',
                   'tab'   => 'tab_personal'
               ),
               array(
                   'id'     => 'tm_phrases',
                   'name'   => esc_html__('Phrases','jekas'),
                   'type'   => 'group',
                   'clone'  => true,
                   'tab'    => 'tab_personal',
                   'fields' => array(
                       array(
                           'id'    => 'phrase',
                           'type'  => 'text',
                           'name'  => esc_html__('Phrase','jekas'),
                       ),
                       array(
                           'id'   => 'phrase_icon',
                           'type' => 'icon',
                           'name' =>esc_html__('Icon','jekas'),
                       ),
                   ),
               ),
               array(
                   'id'     => 'tm_picture',
                   'name'   => esc_html__('Picture','jekas'),
                   'type'   => 'image_advanced',
                   'max_file_uploads' => 1,
                   'tab'   => 'tab_personal',
               ),
               array(
                   'id'     => 'tm_socials',
                   'name'   => esc_html__('Socials Links','jekas'),
                   'type'   => 'group',
                   'tab'    => 'tab_personal',
                   'clone'  => true,
                   'fields' => array(
                       array(
                           'id'    => 'social_link',
                           'name'  => esc_html__('Link','jekas'),
                           'type'  => 'text',
                           'std'   => '#',
                       ),
                       array(
                           'id'    => 'social_icon',
                           'name'  => esc_html__('Icon','jekas'),
                           'type'  => 'icon',
                       ),
                       array(
                           'id'     => 'social_color_over',
                           'name'   => esc_html__('Color over','jekas'),
                           'type'   => 'color_rgba',
                       ),
                   ),
               ),
               array(
                   'id'   => 'tm_gallery',
                   'name' => esc_html__('Images Gallery','jekas'),
                   'type' => 'image_advanced',
                   'tab'  => 'tab_personal',
               ),
               array(
                   'id'   => 'tm_skill_section_title',
                   'name' => esc_html__('Ours skills section title','jekas'),
                   'type' => 'text',
                   'std'  => esc_html__('Who We Are','jekas'),
                   'tab'   => 'tab_skill',
               ),
               array(
                   'id'   => 'tm_team_desc',
                   'name' => esc_html__('Team Description','jekas'),
                   'type' => 'wysiwyg',
                   'tab'   => 'tab_skill',
               ),
               array(
                   'id'     => 'tm_skills',
                   'name'   => esc_html__('Skills','jekas'),
                   'tab'    => 'tab_skill',
                   'type'   => 'group',
                   'clone'  => true,
                   'fields' => array(
                       array(
                           'id'    => 'skill_name',
                           'name'  => esc_html__('Name','jekas'),
                           'type'  => 'text',
                       ),
                       array(
                           'id'      => 'skill_percent',
                           'name'    => esc_html__('Percent','jekas'),
                           'type'    => 'slider',
                           'suffix'  => '%',
                           'js_options' => array(
                               'min'  => 0,
                               'max'  => 100,
                               'step' => 1,
                               ),
                           ),
                   ),
               ),
               array(
                   'id'   => 'tm_my_works_section_title',
                   'name' => esc_html__('My Works section title','jekas'),
                   'type' => 'text',
                   'std' => esc_html__('MY WORK .','jekas'),
                   'tab'  => 'tab_works',
               ),
               array(
                   'id'     => 'tm_resalt_work_title',
                   'name'   => esc_html__('Resalt Work Title','jekas'),
                   'type'   => 'text',
                   'std'    => esc_html__('WORK','jekas'),
                   'tab'  => 'tab_works',
               ),
               array(
                   'id'    => 'tm_work_section_desc',
                   'name'  => esc_html__('Description','jekas'),
                   'type'  => 'wysiwyg',
                   'tab'   => 'tab_works'
               ),
               array(
                   'id'    => 'tm_my_work_section_icon',
                   'name'  => esc_html__('My Works section icon','jekas'),
                   'type'  => 'icon',
                   'std'   => 'fa fa-cogs',
                   'tab'   => 'tab_works',
               ),
               array(
                   'id'        => 'tm_my_works',
                   'name'      => esc_html__('My Works','jekas'),
                   'type'      => 'post',
                   'post_type' => 'work',
                   'multiple'  => true,
                   'tab'       => 'tab_works',
               ),
           ),
       );

       // Footer Option

       $meta_boxes[] = array(
           'id'          => 'footer',
           'title'       => esc_html__('Design Footer','jekas'),
           'post_types'  => 'footer',
           'fields'      => array(
               array(
                   'id'   => 'ft_columns',
                   'name' => '',
                   'type' => 'row_container',
               ),
           ),
       );

       // Post Options

       $meta_boxes[] = array(
           'id'     => 'general_opts',
           'title'  => esc_html__('Custom Options','jekas'),
           'fields' => array(
               array(
                   'id'     => 'post_title_resalt',
                   'name'   => esc_html__('Resalt title','jekas'),
                   'type'   => 'text',
               ),
           ),
       );


       /**************************************************  Post Formats ***********************************************/

       // Video Format

       $meta_boxes[] = array(
           'id'     => 'video',
           'title'  => esc_html__('Video Options','jekas'),
           'show'   =>array(
               'post_format' => array('video'),
           ),
           'fields' => array(
               array(
                   'id'    => 'post_video',
                   'name'  => esc_html__('Video Url','jekas'),
                   'type'  => 'oembed',
               ),
           ),
       );

       // Audio Format

       $meta_boxes[] = array(
           'id'     => 'audio',
           'title'  => esc_html__('Audio Options','jekas'),
           'show'   =>array(
               'post_format' => array('audio'),
           ),
           'fields' => array(
               array(
                   'id'    => 'post_audio',
                   'name'  => esc_html__('Audio Url','jekas'),
                   'type'  => 'oembed',
               ),
           ),
       );

       // Gallery Format

       $meta_boxes[] = array(
           'id'     => 'gallery',
           'title'  => esc_html__('Gallery Options','jekas'),
           'show'   =>array(
               'post_format' => array('gallery'),
           ),
           'fields' => array(
               array(
                   'id'    => 'post_gallery',
                   'name'  => '',
                   'type'  => 'image_advanced',
               ),
           ),
       );

       // Images Format

       $meta_boxes[] = array(
           'id'     => 'post_image',
           'title'  => esc_html__('Image Options','jekas'),
           'show'   =>array(
               'post_format' => array('image'),
           ),
           'fields' => array(
               array(
                   'id'    => 'image_post',
                   'name'  => '',
                   'type'  => 'image_advanced',
                   'max_file_uploads' => 1,
               ),
           ),
       );


       /*********************************************** General Options ************************************************/

       $sliders=array('none'=>'-None-');
       if(class_exists('RevSlider')){
           $slider=new RevSlider();
           foreach($slider->getAllSliderAliases() as $alias)
               $sliders[$alias]=$alias;
       }

       global $jekas_footers;


       $meta_boxes[] = array(
           'id'          => 'page_options',
           'title'       => esc_html__('Page Options','jekas'),
           'post_types'  => array('page','post','work','team_member'),
            'tabs' => array(
                'tab_header' => array(
                    'label' => 'Header Options',
                    'icon'  => 'fa fa-header'
                    ),
                'tab_footer' =>array(
                    'label' => 'Footer Options',
                    'icon'  => 'fa fa-th',
                ),
            ),
           'fields'      => array(
               array(
                   'id'     => 'ph_desc',
                   'name'   => esc_html__('Description','jekas'),
                   'type'   => 'text',
                   'tab'    => 'tab_header',
               ),
               array(
                   'id'      => 'ph_banner_option',
                   'name'    => esc_html__('Banner Option','jekas'),
                   'type'    => 'radio',
                   'options' => array(
                       'default'      => esc_html__('Default','jekas'),
                       'image_color'  => esc_html__('Image, color and opacity','jekas'),
                       'slider'       => esc_html__('Slider','jekas'),
                       'none'         => esc_html__('None','jekas'),
                   ),
                   'std' => 'default',
                   'tab'    => 'tab_header',
               ),
               array(
                   'id'      => 'ph_bg_color',
                   'name'    => esc_html__('Background Color','jekas'),
                   'type'    => 'color_rgba',
                   'visible' => array('ph_banner_option','=','image_color'),
                   'tab'    => 'tab_header',
               ),
               array(
                   'id'    => 'ph_bg_image',
                   'name'  => esc_html__('Background Image','jekas'),
                   'type'  => 'image_advanced',
                   'max_file_uploads' => 1,
                   'visible'   => array(
                       array('ph_banner_option','image_color'),
                       array('ph_bg_color','!match','^#[a-fA-F0-9]+$'),
                   ),
                   'tab'    => 'tab_header',
               ),
               array(
                   'id'      => 'ph_parallax',
                   'name'    => esc_html__('Image with parallax','jekas'),
                   'type'    => 'checkbox',
                   'visible' => array('ph_banner_option','=','image_color'),
                   'tab'    => 'tab_header',
               ),
              array(
                   'id'      => 'ph_slider',
                   'name'    => esc_html__('Slider','jekas'),
                   'type'    => 'select_advanced',
                   'options' => $sliders,
                   'visible' => array('ph_banner_option','=','slider'),
                   'tab'     => 'tab_header',
               ),
               array(
                   'id'      => 'pf_footer_id',
                   'name'    => esc_html__('Footer','jekas'),
                   'type'    => 'select_advanced',
                   'options' => $jekas_footers,
                   'tab' => 'tab_footer',
               ),
               array(
                   'id'    => 'pf_bg_image',
                   'name'  => esc_html__('Background Image','jekas'),
                   'type'  => 'image_advanced',
                   'max_file_uploads' => 1,
                   'tab' => 'tab_footer',
               ),
               array(
                   'id'      => 'pf_bg_color',
                   'name'    => esc_html__('Background Color','jekas'),
                   'type'    => 'color_rgba',
                   'std'     => '#000',
                   'tab' => 'tab_footer',
               ),

           ),
       );

       // Footer options


      /* $meta_boxes[] = array(
           'id'          => 'page_footer',
           'name'        => esc_html__('Footer Options','jekas'),
           'post_types'  => array('page','post','work','team_member'),
           'context'     => 'side',
           'fields'      => array(
                array(
                   'id'    => 'pf_bg_image',
                   'name'  => esc_html__('Background Image','jekas'),
                   'type'  => 'image_advanced',
                   'max_file_uploads' => 1,
               ),
               array(
                   'id'      => 'pf_bg_color',
                   'name'    => esc_html__('Background Color','jekas'),
                   'type'    => 'color_rgba',
                   'std'     => '#000',
               ),
               array(
                   'id'      => 'pf_footer_id',
                   'name'    => esc_html__('Footer','jekas'),
                   'type'    => 'select_advanced',
                   'options' => $jekas_footers,
               ),
           ),
       );*/

       /*************************************** User Options *************************************************/

       $meta_boxes[] = array(
           'id'     => 'user_rwmb',
           'title'  => esc_html__('About author','jekas'),
           'user_screen'  => true,
           'fields' => array(
               array(
                   'id'     => 'user_social_links',
                   'name'   => esc_html__('Social Links','jekas'),
                   'type'   => 'group',
                   'clone'  => true,
                   'fields' => array(
                       array(
                           'id'    => 'link',
                           'name'  => esc_html__('Link','jekas'),
                           'type'  => 'text'
                       ),
                       array(
                           'id'    => 'icon',
                           'name'  => esc_html__('Icon','jekas'),
                           'type'  => 'icon',
                       ),
                       array(
                           'id'    => 'color_over',
                           'name'  => esc_html__('Color Over','jekas'),
                           'type'  => 'color_rgba',
                       ),
                   ),
               ),
               array(
                   'id'    => 'user_picture',
                   'name'  => esc_html__('Picture','jekas'),
                   'type'  => 'image_advanced',
                   'max_file_uploads' => 1,
               ),

           ),
       );


       return $meta_boxes;

   }




Zerion Mini Shell 1.0