コード例 #1
0
 function cl_add_codeless_slider_metaboxes($metaboxes)
 {
     $slide_background = array('title' => __('Background', 'codeless-admin'), 'icon_class' => 'icon-large', 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'slide_background_type', 'title' => __('Background Type', 'codeless-admin'), 'desc' => 'Select the type of the background', 'type' => 'select', 'options' => array('image' => 'Image / Color', 'video' => 'Video'), 'default' => 'image'), array('id' => 'slide_background_image', 'type' => 'background', 'title' => __('Background Image / Color', 'codeless-admin'), 'subtitle' => __('Page Header background with image', 'codeless-admin'), 'default' => '', 'required' => array('slide_background_type', '=', 'image')), array('id' => 'slide_mp4_video', 'type' => 'text', 'title' => __('MP4 video Url', 'codeless-admin'), 'default' => '', 'required' => array('slide_background_type', '=', 'video')), array('id' => 'slide_webm_video', 'type' => 'text', 'title' => __('Webm video Url', 'codeless-admin'), 'default' => '', 'required' => array('slide_background_type', '=', 'video')), array('id' => 'slide_ogg_video', 'type' => 'text', 'title' => __('OGG video Url', 'codeless-admin'), 'default' => '', 'required' => array('slide_background_type', '=', 'video')), array('id' => 'slide_mobile_video', 'type' => 'media', 'title' => __('Image to replace video on mobile', 'codeless-admin'), 'default' => '', 'required' => array('slide_background_type', '=', 'video')), array('id' => 'slide_bg_overlay', 'type' => 'color_rgba', 'title' => __('Background Color Overlay', 'codeless-admin'), 'subtitle' => __('Use a bg overlay', 'codeless-admin'), 'default' => array('color' => '', 'alpha' => '1.0'))));
     $slide_content = array('title' => __('Content', 'codeless-admin'), 'icon_class' => 'icon-large', 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'slide_title', 'type' => 'textarea', 'title' => __('Title', 'codeless-admin')), array('id' => 'slide_title_style', 'type' => 'typography', 'title' => __('Title Style', 'codeless-admin'), 'google' => true, 'font-backup' => false, 'font-style' => false, 'text-transform' => true, 'letter-spacing' => true, 'text-align' => true, 'units' => 'px', 'default' => array('color' => '#222', 'font-style' => '700', 'text-align' => 'center', 'font-family' => 'Open Sans', 'google' => true, 'font-size' => '33px', 'line-height' => '40', 'letter-spacing' => '1.8px')), array('id' => 'slide_title_bg', 'type' => 'color_rgba', 'title' => __('Title Background', 'codeless-admin'), 'mode' => 'background-color', 'default' => array('color' => '#000000', 'alpha' => '0'), 'validate' => 'colorrgba'), array('id' => 'slide_title_padding', 'type' => 'spacing', 'mode' => 'padding', 'units' => 'px', 'title' => __('Title Padding', 'codeless-admin'), 'subtitle' => __(' ', 'codeless-admin'), 'desc' => __('Unit: px', 'codeless-admin'), 'default' => array('padding-left' => '0px', 'padding-right' => "0px", 'padding-top' => "0px", 'padding-bottom' => "0px")), array('id' => 'slide_title_animation', 'title' => __('Title animation', 'codeless-admin'), 'desc' => 'Select type of animation', 'type' => 'select', 'options' => codeless_animations(), 'default' => 'fadeInDown'), array('id' => 'slide_description', 'type' => 'textarea', 'title' => __('Description', 'codeless-admin')), array('id' => 'slide_description_style', 'type' => 'typography', 'title' => __('Description Style', 'codeless-admin'), 'google' => true, 'font-backup' => false, 'font-style' => false, 'text-transform' => true, 'text-align' => true, 'units' => 'px', 'default' => array('color' => '#666', 'font-style' => '400', 'text-align' => 'center', 'font-family' => 'Open Sans', 'google' => true, 'font-size' => '20px', 'line-height' => '32')), array('id' => 'slide_description_animation', 'title' => __('Description animation', 'codeless-admin'), 'desc' => 'Select type of animation', 'type' => 'select', 'options' => array('fadeInDown' => 'fadeInDown', 'fadeInUp' => 'fadeInUp'), 'default' => 'fadeInDown'), array('id' => 'slide_image_switch', 'type' => 'switch', 'title' => __('Image On Top', 'codeless-admin'), 'subtitle' => __('Add an image on top of texts', 'codeless-admin'), "default" => 0), array('id' => 'slide_image_top', 'type' => 'media', 'url' => true, 'title' => __('Image Media w/ URL', 'redux-framework-demo'), 'default' => array('url' => ''), 'required' => array('slide_image_switch', 'equals', 1)), array('id' => 'slide_image_alignment', 'title' => __('Image Alignment', 'codeless-admin'), 'desc' => 'Select the position of the image', 'type' => 'select', 'options' => array('center' => 'Center', 'left' => 'Left', 'right' => 'Right'), 'default' => 'center', 'required' => array('slide_image_switch', 'equals', 1)), array('id' => 'slide_image_dimension', 'type' => 'dimensions', 'units' => array('px'), 'title' => __('Image Dimensions (Width/Height)', 'redux-framework-demo'), 'default' => array('Width' => '200', 'Height' => '100'), 'required' => array('slide_image_switch', 'equals', 1)), array('id' => 'slide_button1', 'type' => 'text', 'title' => __('Button Label', 'codeless-admin'), 'subtitle' => __('First Button Label & Link', 'codeless')), array('id' => 'slide_button1_link', 'type' => 'text', 'title' => __('Button Link', 'codeless-admin')), array('id' => 'slide_button1_style', 'title' => __('Button Style', 'codeless-admin'), 'desc' => 'Select type of button', 'type' => 'select', 'options' => array('bordered' => 'Only border', 'colored' => 'Button with bg color'), 'default' => 'bordered'), array('id' => 'slide_button2', 'type' => 'text', 'title' => __('Button Label', 'codeless-admin'), 'subtitle' => __('Second Button Label & Link (Leave Blank if you want to use only one button)', 'codeless')), array('id' => 'slide_button2_link', 'type' => 'text', 'title' => __('Button Link', 'codeless-admin')), array('id' => 'slide_button2_style', 'title' => __('Button Style', 'codeless-admin'), 'desc' => 'Select type of button', 'type' => 'select', 'options' => array('bordered' => 'Only border', 'colored' => 'Button with bg color'), 'default' => 'bordered'), array('id' => 'slide_buttons_colors', 'title' => __('Overall Buttons Colors', 'codeless-admin'), 'desc' => 'Select type of colors', 'type' => 'select', 'options' => array('light' => 'Light, for dark backgrounds', 'dark' => 'Dark, for light backgrounds'), 'default' => 'light')));
     $slide_layout = array('title' => __('Layout', 'codeless-admin'), 'icon_class' => 'icon-large', 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'slide_content_position', 'title' => __('Content Position', 'codeless-admin'), 'desc' => 'Select the position for the content part', 'type' => 'select', 'options' => array('vertical_centered' => 'Vertical Centered', 'horizontal_centered' => 'Horizontal Centered', 'in_middle' => 'In Middle of slide (Horizontal and Vertical)', 'none' => 'Use only absolute position'), 'default' => 'in_middle'), array('id' => 'slide_content_position_absolute', 'type' => 'spacing', 'mode' => 'absolute', 'units' => array('px'), 'units_extended' => 'false', 'title' => __('Content custom absolute position', 'codeless-admin'), 'subtitle' => __('Add absolute positioning', 'codeless-admin'), 'desc' => __('In case you select vertical centered, top and bottom positions are fixed. The same for horizontal centered, left and right are fixed. Them are not considerated. If you want to use only absolute positions (Left, Right, Top, Bottom) select "Use only absolute position" '), 'default' => array('top' => '', 'bottom' => '', 'left' => '', 'right' => '')), array('id' => 'slide_content_width', 'type' => 'text', 'title' => __('Content Width', 'codeless-admin'), 'subtitle' => __('Examples: auto, 100px, 50%', 'codeless'), 'default' => '700px'), array('id' => 'remove_container', 'type' => 'switch', 'title' => __('Remove Site Container from slider', 'codeless-admin'), 'subtitle' => __('By switching this you can remove the slider container and the content should be shown from the left to the right of the screen.', 'codeless-admin'), "default" => 0), array('id' => 'slider_menu_nav_colors', 'type' => 'select', 'title' => __('Menu & Slider Navigation Color', 'codeless-admin'), 'subtitle' => __('Select Light for light colors in header, white logo and light slider nav', 'codeless-admin'), 'options' => array('dark' => 'Light logo, menu, slider navigations', 'light' => 'Dark logo, menu, slider navigations'), 'default' => 'dark')));
     $codeless_slider = array();
     $codeless_slider[] = $slide_background;
     $codeless_slider[] = $slide_content;
     $codeless_slider[] = $slide_layout;
     $metaboxes[] = array('id' => 'codeless-slider', 'title' => __('Codeless Slide Options', 'codeless-admin'), 'post_types' => array('slide'), 'position' => 'normal', 'priority' => 'high', 'sidebar' => false, 'sections' => $codeless_slider);
     return $metaboxes;
 }
コード例 #2
0
 function cl_add_blog_post_metaboxes($metaboxes)
 {
     $blog_options = array();
     $blog_options[] = array('icon_class' => 'icon-large', 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'fullscreen_post_style', 'title' => __('Active Fullscreen Innovative Single Post', 'codeless'), 'desc' => 'Use this option if you active the fullscreen blog', 'type' => 'switch', 'default' => 0), array('id' => 'fullscreen_post_effect', 'title' => __('Fullscreen Post Effect', 'codeless'), 'desc' => 'Use this option if you active the fullscreen blog', 'type' => 'select', 'options' => codeless_animations(), 'default' => 'fadeInLeft'), array('id' => 'fullscreen_post_delay', 'type' => 'text', 'title' => __('Fullscreen Post Effect Delay', 'codeless-admin'), 'default' => '200'), array('id' => 'fullscreen_post_position', 'title' => __('Fullscreen Post Position', 'codeless'), 'desc' => 'Position of the content in the fullscreen section', 'type' => 'select', 'default' => 'left', 'options' => array('left' => 'Left', 'right' => 'Right')), array('id' => 'future_date_events', 'title' => __('Future date for upcoming events', 'codeless'), 'desc' => '', 'type' => 'text', 'placeholder' => 'Click to enter a date')));
     $metaboxes[] = array('id' => 'blog-options', 'title' => __('Blog Options', 'codeless'), 'post_types' => array('post'), 'position' => 'normal', 'priority' => 'low', 'sidebar' => false, 'sections' => $blog_options);
     $post_format = array();
     $post_format[] = array('icon_class' => 'icon-large', 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'media_post_link', 'title' => __('Video / Audio Link or Iframe', 'codeless'), 'desc' => 'Insert here link / Iframe for video or audio', 'type' => 'textarea', 'default' => '')));
     $metaboxes[] = array('id' => 'blog-post-format', 'title' => __('Blog Post Format', 'codeless'), 'post_types' => array('post'), 'post_format' => array('video', 'audio'), 'position' => 'normal', 'priority' => 'high', 'sidebar' => false, 'sections' => $post_format);
     return $metaboxes;
 }
コード例 #3
0
vc_map(array('base' => 'button', 'name' => 'Button', 'icon' => get_template_directory_uri() . '/includes/core/icons/button.png', 'description' => 'Get the styles from theme options.', 'params' => array(array('heading' => 'Title', 'admin_label' => true, 'param_name' => 'title', 'type' => 'textfield', 'value' => ''), array('heading' => 'Link', 'admin_label' => true, 'param_name' => 'link', 'value' => '#', 'type' => 'textfield'), array('heading' => 'Icon', 'admin_label' => true, 'param_name' => 'icon', 'type' => 'iconselect', 'value' => ''), array('heading' => 'Align', 'admin_label' => false, 'param_name' => 'align', 'type' => 'dropdown', 'value' => array('Left' => 'left', 'Right' => 'right', 'Center' => 'center')), array('heading' => 'Second Button ?', 'admin_label' => true, 'description' => '', 'value' => array('No' => 'no', 'Yes' => 'yes'), 'param_name' => 'button_bool', 'type' => 'dropdown'), array('heading' => 'Button 2 Title', 'admin_label' => true, 'description' => '', 'param_name' => 'button_2_title', 'type' => 'textfield', 'value' => '', 'dependency' => array('element' => 'button_bool', 'value' => array(0 => 'yes'))), array('heading' => 'Button 2 Link', 'admin_label' => true, 'description' => '', 'param_name' => 'button_2_link', 'type' => 'textfield', 'value' => '#', 'dependency' => array('element' => 'button_bool', 'value' => array(0 => 'yes')))), 'category' => 'Codeless Elements'));
vc_remove_param("vc_column", "el_class");
vc_add_param("vc_column", array("type" => "checkbox", "class" => "", "heading" => "Do you want animation for this column ?", "value" => array("Enable?" => "true"), "param_name" => "enable_animation", "description" => ""));
vc_add_param("vc_column", array("type" => "dropdown", "class" => "", "heading" => "Select Animation", "param_name" => "animation", "value" => array_flip(codeless_animations()), "dependency" => array('element' => "enable_animation", 'not_empty' => true)));
vc_add_param("vc_column", array("type" => "textfield", "class" => "", "heading" => "Animation Delay", "param_name" => "delay", "admin_label" => false, "description" => "", "dependency" => array('element' => "enable_animation", 'not_empty' => true)));
vc_add_param("vc_column", array("type" => "checkbox", "class" => "", "heading" => "Centered Content", "value" => array("Centered Content Horizontal" => "true"), "param_name" => "centered_cont", "description" => ""));
vc_add_param("vc_column", array("type" => "checkbox", "class" => "", "heading" => "Centered Content Vertical", "value" => array("Centered Content Vertical" => "true"), "param_name" => "centered_cont_vertical", "description" => ""));
vc_add_param("vc_column", array("type" => "textfield", "class" => "", "heading" => "Assign Padding to this column", "param_name" => "column_padding", "value" => '', "description" => "Use this in case you have created a full width content row. For ex: 10%"));
vc_add_param("vc_column", array("type" => "colorpicker", "class" => "", "heading" => "Background Color", "param_name" => "background_color", "value" => "", "description" => ""));
vc_add_param("vc_column", array("type" => "textfield", "class" => "", "heading" => "Background Color Opacity", "param_name" => "background_color_opacity", "value" => '1'));
vc_add_param("vc_column", array("type" => "attach_image", "class" => "", "heading" => "Background Image", "param_name" => "background_image", "value" => "", "description" => ""));
vc_add_param("vc_column", array("type" => "colorpicker", "class" => "", "heading" => "Font Color", "param_name" => "font_color", "value" => "", "description" => ""));
vc_add_param("vc_column", array("type" => "textfield", "class" => "", "heading" => "Extra Class Name", "param_name" => "el_class", "value" => ""));
vc_remove_param("vc_column_inner", "el_class");
vc_add_param("vc_column_inner", array("type" => "checkbox", "class" => "", "heading" => "Do you want animation for this column ?", "value" => array("Enable?" => "true"), "param_name" => "enable_animation", "description" => ""));
vc_add_param("vc_column_inner", array("type" => "dropdown", "class" => "", "heading" => "Select Animation", "param_name" => "animation", "value" => array_flip(codeless_animations()), "dependency" => array('element' => "enable_animation", 'not_empty' => true)));
vc_add_param("vc_column_inner", array("type" => "textfield", "class" => "", "heading" => "Animation Delay", "param_name" => "delay", "admin_label" => false, "description" => "", "dependency" => array('element' => "enable_animation", 'not_empty' => true)));
vc_add_param("vc_column_inner", array("type" => "checkbox", "class" => "", "heading" => "Centered Content Horizontal", "value" => array("Centered Content Horizontal" => "true"), "param_name" => "centered_cont", "description" => ""));
vc_add_param("vc_column_inner", array("type" => "checkbox", "class" => "", "heading" => "Centered Content Vertical", "value" => array("Centered Content Vertical" => "true"), "param_name" => "centered_cont_vertical", "description" => ""));
vc_add_param("vc_column_inner", array("type" => "textfield", "class" => "", "heading" => "Assign Padding to this column", "param_name" => "column_padding", "value" => '', "description" => "Use this in case you have created a full width content row. For ex: 10%"));
vc_add_param("vc_column_inner", array("type" => "colorpicker", "class" => "", "heading" => "Background Color", "param_name" => "background_color", "value" => "", "description" => ""));
vc_add_param("vc_column_inner", array("type" => "textfield", "class" => "", "heading" => "Background Color Opacity", "param_name" => "background_color_opacity", "value" => '1'));
vc_add_param("vc_column_inner", array("type" => "attach_image", "class" => "", "heading" => "Background Image", "param_name" => "background_image", "value" => "", "description" => ""));
vc_add_param("vc_column_inner", array("type" => "colorpicker", "class" => "", "heading" => "Font Color", "param_name" => "font_color", "value" => "", "description" => ""));
vc_add_param("vc_column_inner", array("type" => "textfield", "class" => "", "heading" => "Extra Class Name", "param_name" => "el_class", "value" => ""));
vc_map(array('base' => 'slideshow', 'name' => 'Slideshow', 'icon' => get_template_directory_uri() . '/includes/core/icons/slideshow.png', 'description' => 'Flexslider Slideshow', 'params' => array(array('heading' => 'Select slides', 'admin_label' => true, 'description' => '', 'param_name' => 'slides', 'type' => 'attach_images'), array('heading' => 'Image Size', 'description' => '', 'param_name' => 'image_size', 'type' => 'dropdown', 'value' => $image_sizes_)), 'category' => 'Codeless Elements'));
class WPBakeryShortCode_Plain_Text extends WPBakeryShortCode
{
}
class WPBakeryShortCode_Separator extends WPBakeryShortCode
{