예제 #1
0
/*
|--------------------------------------------------------------------------
| Ad Spots
|--------------------------------------------------------------------------
*/
Nova::add_section('ad_spots_section', array('title' => esc_attr__('Ad Spots', 'supernova'), 'priority' => 41, 'capability' => 'edit_theme_options'));
$ad_spots = array('header' => esc_attr__('Header', 'supernova'), 'below_nav' => esc_attr__('Below Navigation', 'supernova'), 'above_posts' => esc_attr__('Above Posts', 'supernova'), 'below_posts' => esc_attr__('Below Post', 'supernova'), 'above_single_post' => esc_attr__('Above Single Post', 'supernova'), 'below_single_post' => esc_attr__('Below Single Post', 'supernova'), 'above_footer' => esc_attr__('Above Footer', 'supernova'));
foreach ($ad_spots as $key => $label) {
    Nova::add_field('supernova', array('section' => 'ad_spots_section', 'settings' => "sup_ad_spots[{$key}]", 'label' => $label, 'type' => 'code', 'choices' => array('language' => 'javascript', 'theme' => 'neat')));
}
/*
|--------------------------------------------------------------------------
| Custom CSS
|--------------------------------------------------------------------------
*/
Nova::add_section('custom_css_section', array('title' => esc_attr__('Custom CSS', 'supernova'), 'priority' => 42, 'capability' => 'edit_theme_options'));
Nova::add_field('supernova', array('type' => 'code', 'settings' => 'sup_custom_css', 'label' => esc_attr__('CSS', 'supernova'), 'section' => 'custom_css_section', 'choices' => array('language' => 'css', 'theme' => 'monokai', 'height' => 850)));
/*==============================
			BACKGROUND IMAGE
	===============================*/
//Footer Background Image
Nova::add_field('supernova', array('type' => 'upload', 'settings' => 'sup_footer_background_image', 'label' => esc_attr__('Footer Background Image', 'supernova'), 'section' => 'background_image', 'default' => SUPERNOVA_IMG_URI . '/black.png', 'transport' => 'postMessage', 'output' => array(array('element' => '.sup-site-footer', 'property' => 'background-image'))));
/*==============================
	         	 Colors
	===============================*/
//Color Schemes
Nova::add_field('', array('type' => 'palette', 'settings' => 'sup_theme_skin', 'label' => esc_attr__('Theme Skin', 'supernova'), 'description' => esc_attr__('Change color scheme.', 'supernova'), 'section' => 'colors', 'default' => 'db9f0e', 'choices' => Sup_Customizer_Front::get_palettes()));
//Heading Color
Nova::add_field('supernova', array('type' => 'color', 'settings' => 'sup_heading_color', 'label' => esc_attr__('Heading Color', 'supernova'), 'section' => 'colors', 'default' => '#525252', 'output' => array(array('element' => 'h1, h2, h3, h4, h5, h6', 'property' => 'color')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => 'h1, h2, h3, h4, h5, h6', 'function' => 'css', 'property' => 'color'))));
//Footer Heading Color
Nova::add_field('supernova', array('type' => 'color', 'settings' => 'sup_footer_widget_title', 'label' => esc_attr__('Footer Heading Color', 'supernova'), 'section' => 'colors', 'default' => '#fff', 'output' => array(array('element' => '.widget-title-footer', 'property' => 'color')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '.widget-title-footer', 'function' => 'css', 'property' => 'color'))));