csf-metabox.php (3434B)
1 <?php 2 /* 3 * Theme Metabox Options 4 * @package Appside 5 * @since 1.0.0 6 * */ 7 8 if ( !defined('ABSPATH') ){ 9 exit(); // exit if access directly 10 } 11 12 if ( class_exists('CSF') ){ 13 14 $allowed_html = Appside()->kses_allowed_html(array('mark')); 15 16 $prefix = 'appside'; 17 /*------------------------------------- 18 Post Format Options 19 -------------------------------------*/ 20 CSF::createMetabox($prefix.'_post_video_options',array( 21 'title' => esc_html__('Video Post Format Options','aapside'), 22 'post_type' => 'post', 23 'post_formats' => 'video' 24 )); 25 CSF::createSection($prefix.'_post_video_options',array( 26 'fields' => array( 27 array( 28 'id' => 'video_url', 29 'type' => 'text', 30 'title' => esc_html__('Enter Video URL','aapside'), 31 'desc' => wp_kses(__('enter <mark>video url</mark> to show in frontend','aapside'),$allowed_html) 32 ) 33 ) 34 )); 35 CSF::createMetabox($prefix.'_post_gallery_options',array( 36 'title' => esc_html__('Gallery Post Format Options','aapside'), 37 'post_type' => 'post', 38 'post_formats' => 'gallery' 39 )); 40 CSF::createSection($prefix.'_post_gallery_options',array( 41 'fields' => array( 42 array( 43 'id' => 'gallery_images', 44 'type' => 'gallery', 45 'title' => esc_html__('Select Gallery Photos','aapside'), 46 'desc' => wp_kses(__('select <mark>gallery photos</mark> to show in frontend','aapside'),$allowed_html) 47 ) 48 ) 49 )); 50 /*------------------------------------- 51 Page Container Options 52 -------------------------------------*/ 53 CSF::createMetabox($prefix.'_page_container_options',array( 54 'title' => esc_html__('Page Options','aapside'), 55 'post_type' => array('page'), 56 )); 57 CSF::createSection($prefix.'_page_container_options',array( 58 'title' => esc_html__('Layout & Colors','aapside'), 59 'icon' => 'fa fa-columns', 60 'fields' => Appside_Group_Fields::page_layout() 61 )); 62 CSF::createSection($prefix.'_page_container_options',array( 63 'title' => esc_html__('Header & Footer','aapside'), 64 'icon' => 'fa fa-header', 65 'fields' => Appside_Group_Fields::Page_Container_Options('header_options') 66 )); 67 CSF::createSection($prefix.'_page_container_options',array( 68 'title' => esc_html__('Width & Padding','aapside'), 69 'icon' => 'fa fa-file-o', 70 'fields' => Appside_Group_Fields::Page_Container_Options('container_options') 71 )); 72 73 /*------------------------------------- 74 Portfolio Options 75 -------------------------------------*/ 76 CSF::createMetabox($prefix.'_portfolio_options',array( 77 'title' => esc_html__('Portfolio Info Options','aapside'), 78 'post_type' => array('portfolio'), 79 )); 80 CSF::createSection($prefix.'_portfolio_options',array( 81 'fields' => array( 82 array( 83 'id' => 'client', 84 'type' => 'text', 85 'title' => esc_html__('Client Name','aapside'), 86 ), 87 array( 88 'id' => 'company_name', 89 'type' => 'text', 90 'title' => esc_html__('Company Name','aapside'), 91 ), 92 array( 93 'id' => 'website', 94 'type' => 'text', 95 'title' => esc_html__('Website','aapside'), 96 ), 97 array( 98 'id' => 'start', 99 'type' => 'date', 100 'title' => esc_html__('Start Date','aapside'), 101 'settings' => array( 102 'dateFormat' => 'dd/mm/yy' 103 ) 104 ), 105 array( 106 'id' => 'finish', 107 'type' => 'date', 108 'title' => esc_html__('Finish Date','aapside'), 109 'settings' => array( 110 'dateFormat' => 'dd/mm/yy' 111 ) 112 ) 113 ) 114 )); 115 116 117 }//endif