Пример #1
0
 private function parallax_background()
 {
     if (function_exists('ot_register_meta_box')) {
         $my_meta_box = array('id' => 'coll_parallax_meta_box', 'title' => 'Background Settings', 'desc' => __('Setup the background', 'framework'), 'pages' => array('coll-background'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'coll_bg_type', 'label' => __('Background Type', 'framework'), 'desc' => __('Choose the background type', 'framework'), 'std' => '', 'type' => 'radio', 'class' => '', 'choices' => array(array('value' => 'image', 'label' => __('Image', 'framework')), array('value' => 'pattern', 'label' => __('Pattern', 'framework')), array('value' => 'slider', 'label' => __('Slider', 'framework')), array('value' => 'video', 'label' => __('Video', 'framework')))), array('id' => 'coll_bg_img', 'label' => 'Background Image', 'desc' => 'Select a background image for this section', 'std' => '', 'type' => 'upload', 'class' => 'background-type-image', 'choices' => array()), array('id' => 'coll_bg_pattern', 'label' => 'Background Pattern', 'desc' => 'Select a background pattern for this section', 'std' => '', 'type' => 'upload', 'class' => 'background-type-pattern', 'choices' => array()), array('id' => 'coll_bg_slider_type', 'label' => __('Slider Type', 'framework'), 'desc' => __('Choose the slider type', 'framework'), 'std' => '', 'type' => 'radio', 'class' => 'background-type-slider', 'choices' => array(array('value' => 'flex', 'label' => __('Flex Slider', 'framework')), array('value' => 'layer', 'label' => __('Layer Slider', 'framework')))), array('id' => 'coll_bg_flexslider', 'label' => __('Flex Slider', 'framework'), 'desc' => __('Select a flex slider', 'framework'), 'std' => '', 'type' => 'custom-post-type-select', 'post_type' => 'coll-flexslider', 'class' => 'background-type-slider slider-type-flex', 'choices' => MorpheusUtils::get_flex_sliders()), array('id' => 'coll_bg_layerslider', 'label' => __('Layer Slider', 'framework'), 'desc' => __('Select a layer slider', 'framework'), 'std' => '', 'type' => 'select', 'post_type' => '', 'class' => 'background-type-slider slider-type-layer', 'choices' => MorpheusUtils::get_layer_sliders()), array('id' => 'coll_bg_video', 'label' => 'Background Video', 'desc' => __('Paste your youtube / vimeo iframe embed code here', 'framework'), 'std' => '', 'type' => 'textarea', 'class' => 'background-type-video', 'choices' => array()), array('id' => 'coll_bg_video_mute', 'label' => 'Mute Video', 'desc' => __('Check this if you want the video to be muted', 'framework'), 'std' => '', 'type' => 'checkbox', 'choices' => array(array('label' => 'Yes', 'value' => 'yes')), 'class' => 'background-type-video'), array('id' => 'coll_bg_video_button', 'label' => 'Mute Button', 'desc' => __('Check this if you want to display a mute/unmute button over the video', 'framework'), 'std' => '', 'type' => 'checkbox', 'choices' => array(array('label' => 'Yes', 'value' => 'yes')), 'class' => 'background-type-video'), array('id' => 'coll_bg_video_img', 'label' => __('Image replacement', 'framework'), 'desc' => __('Select an image as a replacement for the video on mobile devices.', 'framework'), 'std' => '', 'type' => 'upload', 'class' => 'background-type-video', 'choices' => array())));
         ot_register_meta_box($my_meta_box);
     }
 }