function section_persistent(){ /* Create Custom Post Type */ $args = array( 'label' => __('Home Slider', 'epanel'), 'singular_label' => __('Slide', 'epanel'), 'description' => 'Creates Slides for the homepage', 'menu_icon' => CORE_IMAGES.'/admin/images-stack.png', 'supports' => array('title','editor','thumbnail','page-attributes'/*,'author','excerpt'*/), ); $taxonomies = array( ); $columns = array( "cb" => "<input type=\"checkbox\" />", "title" => "Title", "bdescription" => "Slide Content or Caption", "bmedia" => "Media" //"slide-sets" => "Box Sets" ); $column_value_function = 'slide_column_display'; $this->post_type = new EPANEL_WPPostType($this->id, $args, $taxonomies, $columns, $column_value_function); /* Set default posts if none are present */ $this->post_type->set_default_posts('epanel_default_slides'); /* Meta Options */ /* Create meta fields for the post type */ $type_meta_array = array( 'nivo_url' => array( 'type' => 'text', 'title' => 'Slide Url', 'label' => 'Enter Slide Link url if needed', 'desc' => 'You can add an url to this slide, if you don\' need an url leave this field blank. <strong>Note : this setting affects only Nivo Slider</strong>' ), 'nivo_caption' => array( 'type' => 'text', 'title' => 'Nivo Caption', 'label' => 'Enter Slide Caption if needed', 'desc' => 'You can add a caption to this slide, if you don\' need a caption leave this field blank. <strong>Note : this setting affects only Nivo Slider</strong>' ), ); $post_types = array($this->id); $type_metapanel_settings = array( 'id' => 'slides-metapanel', 'name' => THEMENAME." Slides Options", 'posttype' => $post_types, ); global $slides_meta_panel; $slides_meta_panel = new EPANEL_WPMetaPanel( $type_metapanel_settings ); $type_metatab_settings = array( 'id' => 'slides-type-metatab', 'name' => "Nivo Slider Slides Settings", 'icon' => $this->icon, ); $slides_meta_panel->register_tab( $type_metatab_settings, $type_meta_array ); /* Build Ind. Page and Post Options */ $metatab_array = array( // Not required ); $metatab_settings = array( 'id' => 'fslides_meta', 'name' => "Boxes Section", 'icon' => $this->icon ); //register_metatab($metatab_settings, $metatab_array); }
function section_persistent(){ /* Create Custom Post Type */ $args = array( 'label' => __('Home Scroller', 'epanel'), 'singular_label' => __('Item', 'epanel'), 'description' => 'Creates items for the homepage scroller', 'menu_icon' => CORE_IMAGES.'/admin/scroller.png', 'supports' => array('title','thumbnail','page-attributes'/*,'author','excerpt'*/), ); $taxonomies = array( ); $columns = array( "cb" => "<input type=\"checkbox\" />", "title" => "Item Title", "scroller-desc" => "Scroller Item Redirection", "scroller-media" => "Item Thumbnail" //"slide-sets" => "Box Sets" ); $column_value_function = 'scroller_column_display'; $this->post_type = new EPANEL_WPPostType($this->id, $args, $taxonomies, $columns, $column_value_function); /* Set default posts if none are present */ $this->post_type->set_default_posts('epanel_default_scrolls'); /* Meta Options */ /* Create meta fields for the post type */ $type_meta_array = array( 'item_url' => array( 'type' => 'text', 'title' => 'Scroller Item Url', 'label' => 'Enter scroller item url if needed', 'desc' => 'You can add an url to this scroll item, if you don\' need an url leave this field blank.' ), ); $post_types = array($this->id); $type_metapanel_settings = array( 'id' => 'scroller-metapanel', 'name' => "Homepage Scroller Settings", 'posttype' => $post_types, ); global $slides_meta_panel; $slides_meta_panel = new EPANEL_WPMetaPanel( $type_metapanel_settings ); $type_metatab_settings = array( 'id' => 'scroller-type-metatab', 'name' => "Homepage Scroller Settings", 'icon' => $this->icon, ); $slides_meta_panel->register_tab( $type_metatab_settings, $type_meta_array ); /* Build Ind. Page and Post Options */ $metatab_array = array( // Not required ); $metatab_settings = array( 'id' => 'scroller_meta', 'name' => "Scroller Section", 'icon' => $this->icon ); //register_metatab($metatab_settings, $metatab_array); }