dvadf
File manager - Edit - /home/theblueo/www/wp-content/themes/thebos/framework/theme/theme_metaboxed.php
Back
<?php // Custom Meta add_action( 'cmb2_init', 'nimbus_metabox' ); function nimbus_metabox() { $prefix = '_nimbus_'; $blog_layout = nimbus_option_data('select_archive_layout') ? nimbus_option_data('select_archive_layout') : 'content-sidebar' ; $sidebar_item = $sidebar_item_alt = array(); $sidebar_item['sidebar'] = 'Default Sidebar'; $sidebar_setting = nimbus_option_data('multi_text_sidebar'); if ($sidebar_setting) { foreach ($sidebar_setting as $sidebar => $name) { if($name) { $sidebar_item[strtolower($name)] = $name; } } } $nb_template = array(); $nb_template['default'] = 'Default Footer'; $nb_templates = get_posts( array( 'post_type' => 'nb_templates', 'posts_per_page' => -1 ) ); if ( $nb_templates ) { foreach ($nb_templates as $item) { $nb_template[$item->ID] = $item->post_title; } }; $menu_item = array(); $menu_nav = get_terms( 'nav_menu', array( 'hide_empty' => true ) ); $menu_item['breadcrumbs'] = esc_html__('Breadcrumbs','nimbus'); foreach ($menu_nav as $menu_nav_item) { $menu_item[$menu_nav_item->slug] = $menu_nav_item->name; } // Heading Settings $nimbus_heading_meta = new_cmb2_box( array( 'id' => 'nimbus_heading_settings', 'title' => esc_html__( 'Page Settings', 'nimbus' ), 'object_types' => array( 'post','page' ), // Post type 'context' => 'normal', 'priority' => 'low', 'show_names' => true, ) ); $nimbus_heading_meta->add_field( array( 'name' => 'Header Settings', 'desc' => 'Adjust header settings', 'id' => 'page_heading_4', 'type' => 'title', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Custom Header Information', 'nimbus' ), 'id' => $prefix . 'text_header_information', 'type' => 'textarea_small', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Header Position', 'nimbus' ), 'id' => $prefix . 'radio_header_position', 'type' => 'select', 'options' => array( 'nb-header-default' => esc_html__( 'Default', 'nimbus' ), 'nb-header-ontop' => esc_html__( 'Always on top', 'nimbus' ), ), 'default' => 'nb-header-default', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Header Color', 'nimbus' ), 'id' => $prefix . 'radio_header_color', 'type' => 'select', 'options' => array( 'nb-header-black' => esc_html__( 'Black', 'nimbus' ), 'nb-header-white' => esc_html__( 'White', 'nimbus' ), ), 'default' => 'nb-header-black', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Header Background Color', 'nimbus' ), 'id' => $prefix . 'radio_header_bg_color', 'type' => 'select', 'options' => array( 'nb-header-bg-transparent' => esc_html__( 'Transparent', 'nimbus' ), 'nb-header-bg-white' => esc_html__( 'White', 'nimbus' ), 'nb-header-bg-black' => esc_html__( 'Black', 'nimbus' ), ), 'default' => 'nb-header-bg-transparent', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Header Border', 'nimbus' ), 'id' => $prefix . 'radio_header_border', 'type' => 'select', 'options' => array( 'nb-header-border-transparent' => esc_html__( 'Transparent', 'nimbus' ), 'nb-header-border-white' => esc_html__( 'White', 'nimbus' ), 'nb-header-border-black' => esc_html__( 'Black', 'nimbus' ), ), 'default' => 'nb-header-border-transparent', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Header Style', 'nimbus' ), 'id' => $prefix . 'radio_header_style', 'type' => 'select', 'options' => array( 'top' => 'Center Logo', 'top1' => 'Left Logo & Right Menu', 'top2' => 'Left Logo & Menu', 'top3' => 'Half Menu', 'side' => 'Slide Menu', ), 'default' => 'top', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Header Width', 'nimbus' ), 'id' => $prefix . 'select_header_container', 'type' => 'select', 'options' => array( 'nb-container' => 'Normal', 'nb-container-fluid' => 'Full', ), 'default' => 'nb-container', ) ); $nimbus_heading_meta->add_field( array( 'name' => 'Heading Settings', 'desc' => 'Custom page heading settings.', 'id' => 'page_heading_1', 'type' => 'title', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Disable Page Heading', 'nimbus' ), 'id' => $prefix . 'hidden_heading', 'type' => 'checkbox', 'desc' => 'Check this box to disable page heading area.', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Heading Menu', 'nimbus' ), 'id' => $prefix . 'radio_heading_menu', 'type' => 'select', 'options' => $menu_item, 'default' => 'breadcrumbs', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Heading Title', 'nimbus' ), 'id' => $prefix . 'custom_heading_title', 'type' => 'text', 'desc' => 'Enter in the page heading title', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Heading Description', 'nimbus' ), 'id' => $prefix . 'custom_heading_desc', 'type' => 'text', 'desc' => 'Enter in the page heading description', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Heading background color', 'nimbus' ), 'id' => $prefix . 'custom_heading_bg_color', 'type' => 'rgba_colorpicker', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Heading background color', 'nimbus' ), 'id' => $prefix . 'custom_heading_bg_img', 'type' => 'file', ) ); $nimbus_heading_meta->add_field( array( 'name' => 'Sidebar Settings', 'desc' => 'Configuration for sidebar and widget areas.', 'id' => 'page_heading_2', 'type' => 'title', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Widgets Sidebar', 'nimbus' ), 'id' => $prefix . 'radio_widget_sidebar', 'type' => 'select', 'options' => $sidebar_item, 'default' => 'sidebar' ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Sidebar Layout', 'nimbus' ), 'id' => $prefix . 'radio_sidebar_layout', 'type' => 'select', 'options' => array( 'content-sidebar' => esc_html__( 'Right Sidebar', 'nimbus' ), 'sidebar-content' => esc_html__( 'Left Sidebar', 'nimbus' ), 'fullwidth' => esc_html__( 'Full Page', 'nimbus' ), ), 'default' => nimbus_option_data( 'select_blog_layout' ), ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Full Content', 'nimbus' ), 'id' => $prefix . 'full_content', 'type' => 'checkbox', 'desc' => 'Check this box to user 100% page width.', ) ); $nimbus_heading_meta->add_field( array( 'name' => 'Footer Settings', 'desc' => 'Adjust footer settings', 'id' => 'page_heading_3', 'type' => 'title', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Footer Template', 'nimbus' ), 'id' => $prefix . 'select_footer_templates', 'type' => 'select', 'options' => $nb_template, 'default' => 'default', ) ); $nimbus_heading_meta->add_field( array( 'name' => esc_html__( 'Footer Fixed', 'nimbus' ), 'id' => $prefix . 'select_footer_fixed', 'type' => 'checkbox', ) ); // Portfolio Meta $nimbus_portfolio_meta = new_cmb2_box( array( 'id' => 'nimbus_portfolio_meta_settings', 'title' => esc_html__( 'Portfolio Settings', 'nimbus' ), 'object_types' => array( 'portfolio' ), 'context' => 'normal', 'priority' => 'low', 'show_names' => true, ) ); $nimbus_portfolio_meta->add_field( array( 'name' => esc_html__( 'Project URL', 'nimbus' ), 'id' => $prefix . 'portfolio_url', 'type' => 'text', ) ); $nimbus_portfolio_meta->add_field( array( 'name' => esc_html__( 'Button Title', 'nimbus' ), 'id' => $prefix . 'portfolio_button_title', 'type' => 'text', ) ); // Other Info $nimbus_portfolio_meta->add_field( array( 'name' => esc_html__( 'Media Position', 'nimbus' ), 'id' => $prefix . 'portfolio_media_pos', 'type' => 'radio_inline', 'options' => array( 'content-sidebar' => 'Right', 'sidebar-content' => 'Left', 'fullwidth' => 'Top', ), 'default' => 'fullwidth', ) ); $nimbus_portfolio_meta->add_field( array( 'name' => esc_html__( 'Gallery Settings', 'nimbus' ), 'id' => $prefix . 'portfolio_gallery_col', 'type' => 'radio_inline', 'options' => array( '12' => '1 Columns', '6' => '2 Columns', '4' => '3 Columns', '3' => '4 Columns', '2' => '6 Columns', ), 'default' => '3', ) ); $nimbus_portfolio_meta->add_field( array( 'name' => 'Upload your images', 'desc' => '', 'id' => $prefix . 'portfolio_format_gallery', 'type' => 'file_list', ) ); $nimbus_portfolio_metag_group = $nimbus_portfolio_meta->add_field( array( 'id' => $prefix . 'portfolio_meta_group', 'type' => 'group', 'options' => array( 'group_title' => esc_html__( 'Meta {#}', 'nimbus' ), // {#} gets replaced by row number 'add_button' => esc_html__( 'Add Another Meta', 'nimbus' ), 'remove_button' => esc_html__( 'Remove Meta', 'nimbus' ), 'sortable' => true, ), ) ); $nimbus_portfolio_meta->add_group_field( $nimbus_portfolio_metag_group, array( 'name' => esc_html__( 'Meta Title', 'nimbus' ), 'id' => 'title', 'type' => 'text', ) ); $nimbus_portfolio_meta->add_group_field( $nimbus_portfolio_metag_group, array( 'name' => esc_html__( 'Meta Content', 'nimbus' ), 'id' => 'content', 'type' => 'textarea_small', ) ); }
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.0.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings