Example #1
0
/**
 * Create the Posts meta boxes
 */
function tb_metabox_posts()
{
    $Folder = get_post_meta(get_the_ID(), 's3bubble_select_folders', true);
    $Files = get_post_meta(get_the_ID(), 's3bubble_select_files', true);
    /* S3Bubble payment box */
    $meta_box = array('id' => 'tb-metabox-s3bubble-payment-posts', 'title' => __('S3Bubble Video Payment', 'tb'), 'description' => __('', 'tb'), 'page' => 'post', 'context' => 'side', 'priority' => 'high', 'fields' => array(array('name' => __('Video State', 'tb'), 'desc' => __('Please set payment state', 'tb'), 'id' => 's3bubble_payment_state', 'type' => 'select', 'std' => __('', 'tb'), 'options' => array('value1' => 'Free', 'value2' => 'Paid')), array('name' => __('Course Price', 'tb'), 'desc' => __('Enter price for course', 'tb'), 'id' => 's3bubble_payment_price', 'type' => 'text', 'std' => __('', 'tb'))));
    //tb_add_meta_box($meta_box);
    /* S3Bubble post meta */
    $meta_box = array('id' => 'tb-metabox-post-s3bubble', 'title' => __('Video Shortcode', 'tb'), 'description' => __('Input your quote.', 'tb'), 'page' => 'post', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Bucket', 'tb'), 'desc' => __('Video bucket or folder', 'tb'), 'id' => '_tb_s3bubble_bucket', 'type' => 'text', 'std' => ''), array('name' => __('Key', 'tb'), 'desc' => __('Video key', 'tb'), 'id' => '_tb_s3bubble_key', 'type' => 'text', 'std' => ''), array('name' => __('Cloudfront', 'tb'), 'desc' => __('Cloudfront ID if using a Cloudfront Distribution', 'tb'), 'id' => '_tb_s3bubble_cloudfront', 'type' => 'text', 'std' => ''), array('name' => __('Video State', 'tb'), 'desc' => __('Streaming Type', 'tb'), 'id' => '_tb_s3bubble_streaming', 'type' => 'text', 'std' => ''), array('name' => __('Live Stream', 'tb'), 'desc' => __('If you would like to enter a live stream', 'tb'), 'id' => '_tb_s3bubble_live_streaming', 'type' => 'text', 'std' => '')));
    tb_add_meta_box($meta_box);
    /* S3Bubble featured slider */
    $meta_box = array('id' => 'tb-metabox-post-s3bubble', 'title' => __('Video Shortcode', 'tb'), 'description' => __('Input your quote.', 'tb'), 'page' => 'featured', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Bucket', 'tb'), 'desc' => __('Video bucket or folder', 'tb'), 'id' => '_tb_s3bubble_bucket', 'type' => 'text', 'std' => ''), array('name' => __('Key', 'tb'), 'desc' => __('Video key', 'tb'), 'id' => '_tb_s3bubble_key', 'type' => 'text', 'std' => ''), array('name' => __('Cloudfront', 'tb'), 'desc' => __('Cloudfront ID if using a Cloudfront Distribution', 'tb'), 'id' => '_tb_s3bubble_cloudfront', 'type' => 'text', 'std' => ''), array('name' => __('Video State', 'tb'), 'desc' => __('Streaming Type', 'tb'), 'id' => '_tb_s3bubble_streaming', 'type' => 'text', 'std' => '')));
    tb_add_meta_box($meta_box);
}
Example #2
0
/**
 * Create the Page meta boxes
 */
function tb_metabox_pages()
{
    /* Create hero metabox */
    $meta_box = array('id' => 'tb-metabox-home-hero', 'title' => __('Hero Area', 'tb'), 'description' => __('', 'tb'), 'page' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Image Left', 'tb'), 'desc' => __('Displays an image in the left column', 'tb'), 'id' => 'tb_home_hero_image_left', 'type' => 'file', 'std' => __('', 'tb')), array('name' => __('Title Left', 'tb'), 'desc' => __('Displays a title in the left column', 'tb'), 'id' => 'tb_home_hero_title_left', 'type' => 'text'), array('name' => __('Link Left', 'tb'), 'desc' => __('Clickable link for the left column', 'tb'), 'id' => 'tb_home_hero_link_left', 'type' => 'text'), array('name' => __('Image Right', 'tb'), 'desc' => __('Displays an image in the right column', 'tb'), 'id' => 'tb_home_hero_image_right', 'type' => 'file', 'std' => __('', 'tb')), array('name' => __('Title Right', 'tb'), 'desc' => __('Displays a title in the right column', 'tb'), 'id' => 'tb_home_hero_title_right', 'type' => 'text'), array('name' => __('Link Right', 'tb'), 'desc' => __('Clickable link for the right column', 'tb'), 'id' => 'tb_home_hero_link_right', 'type' => 'text')));
    //tb_add_meta_box($meta_box);
    /* Create features metabox 1 */
    $meta_box = array('id' => 'tb-metabox-home-features-1', 'title' => __('Features Column 1', 'tb'), 'description' => __('', 'tb'), 'page' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Image', 'tb'), 'desc' => __('Displays an image in the left column', 'tb'), 'id' => 'tb_column_1_image', 'type' => 'file', 'std' => __('', 'tb')), array('name' => __('Title', 'tb'), 'desc' => __('Displays a title in the left column', 'tb'), 'id' => 'tb_column_1_title', 'type' => 'text'), array('name' => __('Content', 'tb'), 'desc' => __('Displays content in the left column', 'tb'), 'id' => 'tb_column_1_content', 'type' => 'textarea')));
    //tb_add_meta_box($meta_box);
    /* Create features metabox 2 */
    $meta_box = array('id' => 'tb-metabox-home-features-2', 'title' => __('Features Column 2', 'tb'), 'description' => __('', 'tb'), 'page' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Image', 'tb'), 'desc' => __('Displays an image in the middle column', 'tb'), 'id' => 'tb_column_2_image', 'type' => 'file', 'std' => __('', 'tb')), array('name' => __('Title', 'tb'), 'desc' => __('Displays a title in the middle column', 'tb'), 'id' => 'tb_column_2_title', 'type' => 'text'), array('name' => __('Content', 'tb'), 'desc' => __('Displays content in the middle column', 'tb'), 'id' => 'tb_column_2_content', 'type' => 'textarea')));
    //tb_add_meta_box($meta_box);
    /* Create features metabox 3 */
    $meta_box = array('id' => 'tb-metabox-home-features-3', 'title' => __('Features Column 3', 'tb'), 'description' => __('', 'tb'), 'page' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Image', 'tb'), 'desc' => __('Displays an image in the right column', 'tb'), 'id' => 'tb_column_3_image', 'type' => 'file', 'std' => __('', 'tb')), array('name' => __('Title', 'tb'), 'desc' => __('Displays a title in the right column', 'tb'), 'id' => 'tb_column_3_title', 'type' => 'text'), array('name' => __('Content', 'tb'), 'desc' => __('Displays content in the right column', 'tb'), 'id' => 'tb_column_3_content', 'type' => 'textarea')));
    //tb_add_meta_box($meta_box);
    /* Create showroom metabox */
    $meta_box = array('id' => 'tb-metabox-home-showroom', 'title' => __('Showroom Area', 'tb'), 'description' => __('', 'tb'), 'page' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Showroom content', 'tb'), 'desc' => __('Displays an image in the left column', 'tb'), 'id' => 'tb_home_showroom_content', 'type' => 'textarea', 'std' => __('', 'tb')), array('name' => __('Image Left', 'tb'), 'desc' => __('Displays an image in the left column', 'tb'), 'id' => 'tb_home_showroom_image_left', 'type' => 'file', 'std' => __('', 'tb')), array('name' => __('Title Left', 'tb'), 'desc' => __('Displays a title in the left column', 'tb'), 'id' => 'tb_home_showroom_title_left', 'type' => 'text'), array('name' => __('Link Left', 'tb'), 'desc' => __('Clickable link for the left column', 'tb'), 'id' => 'tb_home_showroom_link_left', 'type' => 'text'), array('name' => __('Image Right', 'tb'), 'desc' => __('Displays an image in the right column', 'tb'), 'id' => 'tb_home_showroom_image_right', 'type' => 'file', 'std' => __('', 'tb')), array('name' => __('Title Right', 'tb'), 'desc' => __('Displays a title in the right column', 'tb'), 'id' => 'tb_home_showroom_title_right', 'type' => 'text'), array('name' => __('Link Right', 'tb'), 'desc' => __('Clickable link for the right column', 'tb'), 'id' => 'tb_home_showroom_link_right', 'type' => 'text')));
    //tb_add_meta_box($meta_box);
    $Folder = get_post_meta(get_the_ID(), 's3bubble_select_folders', true);
    $Files = get_post_meta(get_the_ID(), 's3bubble_select_files', true);
    /* Create features metabox 1 */
    $meta_box = array('id' => 'tb-metabox-s3bubble-video-pages', 'title' => __('S3Bubble Video Options', 'tb'), 'description' => __('', 'tb'), 'page' => 'page', 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('name' => __('Select Folder', 'tb'), 'desc' => __('Please select a video folder', 'tb'), 'id' => 's3bubble_select_folders', 'type' => 'select', 'std' => __('', 'tb'), 'options' => array('value' => empty($Folder) ? '' : $Folder)), array('name' => __('Select Files', 'tb'), 'desc' => __('Please select a video file', 'tb'), 'id' => 's3bubble_select_files', 'type' => 'select', 'std' => __('', 'tb'), 'options' => array('value' => empty($Files) ? '' : $Files)), array('name' => __('Aspect Ratio', 'tb'), 'desc' => __('Please set aspect ratio', 'tb'), 'id' => 's3bubble_select_asepct', 'type' => 'select', 'std' => __('', 'tb'), 'options' => array('value' => '4:3', 'value' => '16:9'))));
    tb_add_meta_box($meta_box);
}