function cyberchimps_init_meta_boxes() { // Set image path $directory_uri = get_template_directory_uri(); $image_path = $directory_uri . "/cyberchimps/lib/images/"; $slider_image = $directory_uri . "/elements/lib/images/slider/slide1.jpg"; // Declare variables $carousel_options = array(); $slider_options = array(); $boxes_options = array(); $blog_options = array(); // Call taxonomies for select options $carousel_terms = get_terms('carousel_categories', 'hide_empty=0'); if (!is_wp_error($carousel_terms)) { foreach ($carousel_terms as $term) { $carousel_options[$term->slug] = $term->name; } } $slide_terms = get_terms('slide_categories', 'hide_empty=0'); if (!is_wp_error($slide_terms)) { foreach ($slide_terms as $term) { $slider_options[$term->slug] = $term->name; } } // Get custom categories of boxes element $boxes_terms = get_terms('boxes_categories', 'hide_empty=0'); if (!is_wp_error($boxes_terms)) { foreach ($boxes_terms as $term) { $boxes_options[$term->slug] = $term->name; } } $category_terms = get_terms('category', 'hide_empty=0'); if (!is_wp_error($category_terms)) { $blog_options['all'] = "All"; foreach ($category_terms as $term) { $blog_options[$term->slug] = $term->name; } } // Get all post categories $all_cats = array(); $all_categories = get_terms('category'); if (!is_wp_error($all_categories)) { foreach ($all_categories as $all_cat) { $all_cats[$all_cat->term_id] = $all_cat->name; } } // End taxonomy call $meta_boxes = array(); $mb = new Chimps_Metabox('pages', 'Page Options', array('pages' => array('page'))); $mb->tab("Page Options")->image_select('cyberchimps_page_sidebar', __('Select Page Layout', 'cyberchimps'), '', array('options' => apply_filters('sidebar_layout_options', array('full_width' => $image_path . '1col.png', 'right_sidebar' => $image_path . '2cr.png', 'left_sidebar' => $image_path . '2cl.png', 'left_right_sidebar' => $image_path . '3cr.png', 'content_middle' => $image_path . '3col.png')), 'std' => 'right_sidebar'))->checkbox('cyberchimps_page_title_toggle', __('Page Title', 'cyberchimps'), '', array('std' => '1'))->section_order('cyberchimps_page_section_order', __('Page Elements', 'cyberchimps'), '', array('options' => apply_filters('cyberchimps_elements_draganddrop_page_options', array('boxes' => __('Boxes', 'cyberchimps'), 'page_section' => __('Page', 'cyberchimps'), 'slider_lite' => __('Slider Lite', 'cyberchimps'), 'twitterbar_section' => __('Twitter Bar', 'cyberchimps'))), 'std' => array('page_section')))->pagehelp('', __('Need Help?', 'cyberchimps'), '')->tab("Slider Options")->select('cyberchimps_slider_lite_size', __('Slider Size', 'cyberchimps'), '', array('options' => array('full' => __('Full', 'cyberchimps'), 'half' => __('Half', 'cyberchimps'))))->text('cyberchimps_slider_lite_height', __('Slider Height', 'cyberchimps'), '')->text('cyberchimps_slider_lite_speed', __('Slider Speed', 'cyberchimps'), '', array('std' => 3000))->checkbox('cyberchimps_slider_lite_arrows', __('Slider Arrows', 'cyberchimps'), '', array('std' => '1'))->single_image('cyberchimps_slider_lite_slide_image_1', __('Slide Image 1', 'cyberchimps'), '', array('std' => $slider_image))->text('cyberchimps_slider_lite_slide_url_1', __('Slide Link 1', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_1', __('Slide Caption 1', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_2', __('Slide Image 2', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_2', __('Slide Link 2', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_2', __('Slide Caption 2', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_3', __('Slide Image 3', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_3', __('Slide Link 3', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_3', __('Slide Caption 3', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_4', __('Slide Image 4', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_4', __('Slide Link 4', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_4', __('Slide Caption 4', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_5', __('Slide Image 5', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_5', __('Slide Link 5', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_5', __('Slide Caption 5', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_6', __('Slide Image 6', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_6', __('Slide Link 6', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_6', __('Slide Caption 6', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_7', __('Slide Image 7', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_7', __('Slide Link 7', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_7', __('Slide Caption 7', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_8', __('Slide Image 8', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_8', __('Slide Link 8', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_8', __('Slide Caption 8', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_9', __('Slide Image 9', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_9', __('Slide Link 9', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_9', __('Slide Caption 9', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_10', __('Slide Image 10', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_10', __('Slide Link 10', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_10', __('Slide Caption 10', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_11', __('Slide Image 11', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_11', __('Slide Link 11', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_11', __('Slide Caption 11', 'cyberchimps'), '')->single_image('cyberchimps_slider_lite_slide_image_12', __('Slide Image 12', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_url_12', __('Slide Link 12', 'cyberchimps'), '')->text('cyberchimps_slider_lite_slide_caption_12', __('Slide Caption 12', 'cyberchimps'), '')->tab("Product Options")->select('cyberchimps_product_layout', __('Product Layout', 'cyberchimps'), '', array('options' => array('1' => 'Text Left - Media Right', '2' => 'Text Right - Media Left')))->text('cyberchimps_product_title', __('Product Title', 'cyberchimps'), '', array('std' => __('Product', 'cyberchimps')))->textarea('cyberchimps_product_text', __('Product Text', 'cyberchimps'), '')->select('cyberchimps_product_media_type', __('Media Type', 'cyberchimps'), '', array('options' => array('1' => 'Image', '2' => 'Video')))->single_image('cyberchimps_product_image', __('Product Image', 'cyberchimps'), '', array('std' => $directory_uri . '/images/branding/product.jpg'))->checkbox('cyberchimps_product_image_link_toggle', __('Product Image Link', 'cyberchimps'), '', array('std' => '1'))->text('cyberchimps_product_image_link', __('Link URL', 'cyberchimps'), '', array('std' => home_url()))->textarea('cyberchimps_product_video', __('Video Embed', 'cyberchimps'), '')->tab("Callout Options")->text('callout_title', __('Callout Title', 'cyberchimps'), '', array('std' => sprintf(__('%1$s\'s Call Out Element', 'cyberchimps'), apply_filters('cyberchimps_current_theme_name', 'Cyberchimps'))))->textarea('callout_text', __('Callout Text', 'cyberchimps'), '', array('std' => sprintf(__('Use %1$s\'s Call Out section on any page where you want to deliver an important message to your customer or client.', 'cyberchimps'), apply_filters('cyberchimps_current_theme_name', 'Cyberchimps'))))->checkbox('disable_callout_button', __('Callout Button', 'cyberchimps'), '', array('std' => '1'))->text('callout_button_text', __('Callout Button Text', 'cyberchimps'), '')->text('callout_url', __('Callout Button URL', 'cyberchimps'), '')->checkbox('extra_callout_options', __('Custom Callout Options', 'cyberchimps'), '', array('std' => '0'))->single_image('callout_image', __('Custom Button Image', 'cyberchimps'), '')->color('custom_callout_color', __('Custom Background Color', 'cyberchimps'), '')->color('custom_callout_title_color', __('Custom Title Color', 'cyberchimps'), '')->color('custom_callout_text_color', __('Custom Text Color', 'cyberchimps'), '')->color('custom_callout_button_color', __('Custom Button Color', 'cyberchimps'), '')->color('custom_callout_button_text_color', __('Custom Button Text Color', 'cyberchimps'), '')->pagehelp('', __('Need help?', 'cyberchimps'), '')->tab("HTML Box Options")->textarea('html_box', __('Custom HTML', 'cyberchimps'), __('Enter your custom html here', 'cyberchimps'))->tab("Recent Posts Options")->checkbox('cyberchimps_recent_posts_title_toggle', __('Title', 'cyberchimps'), '', array('std' => '1'))->text('cyberchimps_recent_posts_title', __('Recent Posts Title', 'cyberchimps'), '', array('std' => __('Latest Blog Posts', 'cyberchimps')))->select('cyberchimps_recent_posts_category', __('Post Category', 'cyberchimps'), '', array('options' => $blog_options, __('All', 'cyberchimps')))->checkbox('cyberchimps_recent_posts_images_toggle', __('Images', 'cyberchimps'), '')->tab("Carousel Options")->select('carousel_category', __('Carousel Category', 'cyberchimps'), '', array('options' => $carousel_options ? $carousel_options : array('cc_no_options' => __('You need to create a Category', 'cyberchimps'))))->tab("Twitter Options")->text('cyberchimps_twitter_handle', __('Twitter Handle', 'cyberchimps'), __('Enter your Twitter handle if using the Twitter bar', 'cyberchimps'))->tab("Boxes Options")->select('boxes_category', __('Boxes Category', 'cyberchimps'), '', array('options' => $boxes_options ? $boxes_options : array('cc_no_options' => __('You need to create a Category', 'cyberchimps'))))->end(); foreach ($meta_boxes as $meta_box) { $my_box = new RW_Meta_Box_Taxonomy($meta_box); } }
function initialize_the_meta_boxes() { global $themename, $themeslug, $themenamefull, $options; // call globals. // End taxonomy call $meta_boxes = array(); $mb = new Chimps_Metabox('pages', $themenamefull . ' Page Options', array('pages' => array('page'))); $mb->tab("Page Options")->image_select('page_sidebar', 'Select Page Layout', '', array('options' => array(TEMPLATE_URL . '/images/options/right.png', TEMPLATE_URL . '/images/options/left.png', TEMPLATE_URL . '/images/options/rightleft.png', TEMPLATE_URL . '/images/options/tworight.png', TEMPLATE_URL . '/images/options/none.png')))->checkbox('hide_page_title', 'Page Title', '', array('std' => 'on'))->section_order('page_section_order', 'Page Elements', '', array('options' => array('page_section' => 'Page', 'breadcrumbs' => 'Breadcrumbs', 'page_slider' => 'Slider', 'callout_section' => 'Callout', 'box_section' => 'Boxes'), 'std' => 'page_section,breadcrumbs'))->pagehelp('', 'Need Help?', '')->tab("Slider Options")->single_image('page_slide_one_image', 'Slide One Image', '', array('std' => TEMPLATE_URL . '/images/slide_default_1.jpg'))->text('page_slide_one_url', 'Slide One Link', '', array('std' => 'http://cyberchimps.com'))->single_image('page_slide_two_image', 'Slide Two Image', '', array('std' => TEMPLATE_URL . '/images/slide_default_2.jpg'))->text('page_slide_two_url', 'Slide Two Link', '', array('std' => 'http://pegsoluciones.com/businesspro/'))->single_image('page_slide_three_image', 'Slide Three Image', '', array('std' => TEMPLATE_URL . '/images/slide_default_3.jpg'))->text('page_slide_three_url', 'Slide Three Link', '', array('std' => 'http://cyberchimps.com'))->sliderhelp('', 'Need Help?', '')->tab("Callout Options")->textarea('callout_text', 'Callout Text', '')->pagehelp('', 'Need help?', '')->tab("SEO Options")->text('seo_title', 'SEO Title', '')->textarea('seo_description', 'SEO Description', '')->textarea('seo_keywords', 'SEO Keywords', '')->pagehelp('', 'Need help?', '')->end(); foreach ($meta_boxes as $meta_box) { $my_box = new RW_Meta_Box_Taxonomy($meta_box); } }
function cyberchimps_init_boxes_post_type() { // Register the custom post type "boxes" register_post_type('boxes', array('labels' => array('name' => __('Boxes', 'cyberchimps'), 'singular_name' => __('Boxes', 'cyberchimps')), 'public' => true, 'show_ui' => true, 'supports' => array('title'), 'taxonomies' => array('boxes_categories'), 'has_archive' => true, 'menu_icon' => get_template_directory_uri() . '/cyberchimps/lib/images/custom-types/boxes.png', 'rewrite' => array('slug' => 'boxes'))); // Define lebels to be supplied while registering custom category $labels = array('name' => _x('Boxes Categories', 'taxonomy general name', 'cyberchimps'), 'singular_name' => _x('Boxes Catergory', 'taxonomy singular name', 'cyberchimps'), 'search_items' => __('Search Boxes', 'cyberchimps'), 'all_items' => __('All Boxes', 'cyberchimps'), 'parent_item' => __('Boxes Category', 'cyberchimps'), 'parent_item_colon' => __('Boxes Category:', 'cyberchimps'), 'edit_item' => __('Edit Boxes Category', 'cyberchimps'), 'update_item' => __('Update Boxes Category', 'cyberchimps'), 'add_new_item' => __('Add New Boxes Category', 'cyberchimps'), 'new_item_name' => __('New Boxes Category Name', 'cyberchimps'), 'menu_name' => __('Boxes Category', 'cyberchimps')); // Register category for "boxes" posts register_taxonomy('boxes_categories', array('boxes'), array('public' => true, 'show_in_nav_menus' => false, 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true)); $meta_boxes = array(); $mb = new Chimps_Metabox('boxes', __('Boxes Element', 'cyberchimps'), array('pages' => array('boxes'))); $mb->tab(__('Boxes Element', 'cyberchimps'))->single_image('cyberchimps_box_image', __('Box Image', 'cyberchimps'), '')->text('cyberchimps_box_url', __('Box URL', 'cyberchimps'), '')->textarea('cyberchimps_box_text', __('Box Text', 'cyberchimps'), '')->end(); foreach ($meta_boxes as $meta_box) { $my_box = new RW_Meta_Box_Taxonomy($meta_box); } }
function initialize_the_meta_boxes() { global $themename, $themeslug, $themenamefull, $options; // call globals. // Call taxonomies for select options $terms2 = get_terms('category', 'hide_empty=0'); $blogoptions = array(); $blogoptions['all'] = "All"; foreach ($terms2 as $term) { $blogoptions[$term->slug] = $term->name; } // End taxonomy call $meta_boxes = array(); $mb = new Chimps_Metabox('pages', $themenamefull . ' Page Options', array('pages' => array('page'))); $mb->tab("Page Options")->image_select('page_sidebar', 'Select Page Layout', '', array('options' => array(TEMPLATE_URL . '/images/options/right.png', TEMPLATE_URL . '/images/options/left.png', TEMPLATE_URL . '/images/options/rightleft.png', TEMPLATE_URL . '/images/options/tworight.png', TEMPLATE_URL . '/images/options/none.png')))->checkbox('hide_page_title', 'Page Title', '', array('std' => 'on'))->section_order('page_section_order', 'Page Elements', '', array('options' => array('page_slider' => 'Feature Slider', 'callout_section' => 'Callout', 'page_section' => 'Page', 'breadcrumbs' => 'Breadcrumbs'), 'std' => 'page_section,breadcrumbs'))->pagehelp('', 'Need Help?', '')->tab($themenamefull . " Slider Options")->single_image('page_slide_one_image', 'Slide One Image', '', array('std' => TEMPLATE_URL . '/images/responseslider.jpg'))->text('page_slide_one_url', 'Slide One Link', '', array('std' => 'http://cyberchimps.com'))->single_image('page_slide_two_image', 'Slide Two Image', '', array('std' => TEMPLATE_URL . '/images/responseslider.jpg'))->text('page_slide_two_url', 'Slide Two Link', '', array('std' => 'http://cyberchimps.com'))->single_image('page_slide_three_image', 'Slide Three Image', '', array('std' => TEMPLATE_URL . '/images/responseslider.jpg'))->text('page_slide_three_url', 'Slide Three Link', '', array('std' => 'http://cyberchimps.com'))->sliderhelp('', 'Need Help?', '')->tab("Callout Options")->textarea('callout_text', 'Callout Text', '')->checkbox('extra_callout_options', 'Custom Callout Options', '', array('std' => 'off'))->color('custom_callout_text_color', 'Custom Text Color', '')->pagehelp('', 'Need help?', '')->end(); foreach ($meta_boxes as $meta_box) { $my_box = new RW_Meta_Box_Taxonomy($meta_box); } }