File: /home/dermova/www/india/wp-content/plugins/rit-core/inc/meta-box/meta-boxes.php
<?php
if (!class_exists('RIT_Meta_Boxes')) {
class RIT_Meta_Boxes
{
public $meta_boxes;
public function __construct()
{
$this->add_meta_box_options();
add_action('admin_init', array($this, 'register'));
}
public static function &getInstance()
{
static $instance;
if (!isset($instance)) {
$instance = new RIT_Meta_Boxes();
}
return $instance;
}
public function add_meta_box_options()
{
$meta_boxes = array();
/* Page Options */
$meta_boxes[] = array(
'id' => 'page_option',
'title' => __( 'Page Options', RIT_TEXT_DOMAIN ),
'pages' => array( 'page' ), // Post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
'fields' => array(
array(
'name' => __( 'Show Breadcrumb', RIT_TEXT_DOMAIN ),
'id' => 'rit_show_breadcrumb',
'type' => 'checkbox',
'std' => 1,
),
array(
'name' => __( 'Show Title', RIT_TEXT_DOMAIN ),
'id' => 'rit_show_title',
'type' => 'checkbox',
'std' => 1,
),
array(
'name' => __( 'Header Style', RIT_TEXT_DOMAIN ),
'id' => 'layout_header',
'type' => 'select',
'options' => array(
'global' => __( 'Use Global', RIT_TEXT_DOMAIN ),
'1' => __( 'Header 1', RIT_TEXT_DOMAIN ),
'2' => __( 'Header 2', RIT_TEXT_DOMAIN ),
'3' => __( 'Header 3', RIT_TEXT_DOMAIN ),
'4' => __( 'Header 4', RIT_TEXT_DOMAIN ),
'5' => __( 'Header 5', RIT_TEXT_DOMAIN ),
'full' => __( 'Header Full', RIT_TEXT_DOMAIN ),
),
'std' => 'global',
),
array(
'name' => __( 'Menu config', RIT_TEXT_DOMAIN ),
'id' => 'menu_config',
'desc' => __( 'Menu full width', RIT_TEXT_DOMAIN ),
'type' => 'checkbox',
'std' => '0',
),
array(
'name' => __( 'Enable Menu Keep', RIT_TEXT_DOMAIN ),
'id' => 'menu_keep',
'desc' => __( 'Menu keep', RIT_TEXT_DOMAIN ),
'type' => 'checkbox',
'std' => '0',
),
array(
'name' => __( 'Transparent Menu ', RIT_TEXT_DOMAIN ),
'id' => 'menu_transparent',
'desc' => __( 'Transparent Menu', RIT_TEXT_DOMAIN ),
'type' => 'checkbox',
'std' => '0',
),
array(
'name' => __( 'Enable Top Bar', RIT_TEXT_DOMAIN ),
'id' => 'menu_topbar',
'desc' => __( 'Enable Top Bar', RIT_TEXT_DOMAIN ),
'type' => 'checkbox',
'std' => '1',
),
array(
'name' => __( 'Transparent Menu Logo ', RIT_TEXT_DOMAIN ),
'id' => 'menu_transparent_logo',
'desc' => __( 'Transparent Menu Logo', RIT_TEXT_DOMAIN ),
'type' => 'image_advanced',
),
array(
'name' => __( 'Skins', RIT_TEXT_DOMAIN ),
'id' => 'page_skins',
'type' => 'select',
'options' => array(
'global' => __( 'Use Global', RIT_TEXT_DOMAIN ),
'style-default' => __('Default', RIT_TEXT_DOMAIN),
'style-white' => __('White', RIT_TEXT_DOMAIN),
'style-gold' => __('gold', RIT_TEXT_DOMAIN),
'style-black' => __('Black', RIT_TEXT_DOMAIN),
'style-red' => __('Red', RIT_TEXT_DOMAIN),
'style-aqua' => __('Aqua', RIT_TEXT_DOMAIN),
'style-green' => __('Green', RIT_TEXT_DOMAIN),
'style-brown' => __('Brown', RIT_TEXT_DOMAIN),
),
'std' => 'global',
),
array(
'name' => __( 'Footer Style', RIT_TEXT_DOMAIN ),
'id' => 'layout_footer',
'type' => 'select',
'options' => array(
'global' => __( 'Use Global', RIT_TEXT_DOMAIN ),
'1' => __( 'Footer 1', RIT_TEXT_DOMAIN ),
'2' => __( 'Footer 2', RIT_TEXT_DOMAIN ),
'4' => __( 'Footer 3', RIT_TEXT_DOMAIN ),
'3' => __( 'Hidden Footer', RIT_TEXT_DOMAIN ),
),
'std' => 'global',
),
)
);
/* Layout Box */
$meta_boxes[] = array(
'id' => 'layout',
'title' => __( 'Layout Options', RIT_TEXT_DOMAIN ),
'pages' => array( 'page','post' ), // Post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
'fields' =>array(
array(
'id' => 'layout_sidebar',
'name' => __( 'Layout', RIT_TEXT_DOMAIN ),
'type' => 'image_select',
// Array of 'value' => 'Image Source' pairs
'options' => array(
'full' => RIT_PLUGIN_URL.'inc/meta-box/meta-box-master/img/full.png',
'left' => RIT_PLUGIN_URL.'inc/meta-box/meta-box-master/img/left.png',
'right' => RIT_PLUGIN_URL.'inc/meta-box/meta-box-master/img/right.png',
'both' => RIT_PLUGIN_URL.'inc/meta-box/meta-box-master/img/both.png'
),
'std' => ''
// Allow to select multiple values? Default is false
// 'multiple' => true,
),
array (
'name' => __('Left Sidebar', RIT_TEXT_DOMAIN),
'id' => "post_left_sidebar",
'type' => 'sidebars',
'params' => array(
'default' => ''
)
),
array (
'name' => __('Right Sidebar', RIT_TEXT_DOMAIN),
'id' => "post_right_sidebar",
'type' => 'sidebars',
'params' => array(
'default' => ''
)
),
)
);
/* Banner Meta Box */
$meta_boxes[] = array(
'id' => 'banner_meta_box',
'title' => __('Banner Options', RIT_TEXT_DOMAIN),
'pages' => array('banner'),
'context' => 'normal',
'fields' => array(
array(
'name' => __('Banner Url', RIT_TEXT_DOMAIN),
'desc' => __('When click into banner, it will be redirect to this url', RIT_TEXT_DOMAIN),
'id' => "rit_banner_url",
'type' => 'text'
),
array(
'name' => __('Banner class', RIT_TEXT_DOMAIN),
'desc' => __('', RIT_TEXT_DOMAIN),
'id' => "rit_banner_class",
'type' => 'text'
),
)
);
/* Testimonial Meta Box */
$meta_boxes[] = array(
'id' => 'testimonial_meta_box',
'title' => __('Testimonial Options', RIT_TEXT_DOMAIN),
'pages' => array('testimonial'),
'context' => 'normal',
'fields' => array(
array(
'name' => __('Image User', RIT_TEXT_DOMAIN),
'id' => "rit_testimonial_image",
'type' => 'image_advanced'
),
array(
'name' => __('Position', RIT_TEXT_DOMAIN),
'desc' => __('', RIT_TEXT_DOMAIN),
'id' => "rit_testimonial_position",
'type' => 'text'
),
)
);
$this->meta_boxes = $meta_boxes;
}
public function register()
{
if (class_exists('RW_Meta_Box')) {
foreach ($this->meta_boxes as $meta_box) {
new RW_Meta_Box($meta_box);
}
}
}
}
}
RIT_Meta_Boxes::getInstance();