"inherit", "Yanone Kaffeesatz", "Wire One", "Ubuntu", "Rokkitt", "Righteous", "Raleway", "Quattrocento Sans", "PT Sans", "Open Sans","Nixie One", "News Cycle", "Acme","Coustard", "Alfa Slab One", "Abel", "Brawler", "Droid Sans", "Crushed","Cabin Condensed", "Federo", "Arimo", "Contrail One", "Anton", "Days One","Droid Serif", "Abril Fatface", "Allan","Amatic SC", "Anonymous Pro", "Bangers","Baumans", "Boogaloo", "Bree Serif","Buda", "Cuprum", "Damion","Dorsa", "Francois One", "Just Another Hand","Gruppo", "Jockey One", "Maiden Orange", "Josefin Slab", "Lobster", "Lobster Two", "Marvel", "Andika", "Arial","Verdana", "Tahoma", "Trebuchet MS" ); $fontfamily_options=array_combine($fontfamily_options,$fontfamily_options); /** * options for any font family * */ return apply_filters( 'Shock_fontfamily_schemes', $fontfamily_options ); } function Shock_logoeffect_schemes() { $logo_effect_option= array("Normal", "Alpha", "Embossed", "Shadow", "3D", "Neon", "Anaglyphs", "Retro", "Vintage","Glow","3Dshadow"); $logo_effect_option=array_combine($logo_effect_option,$logo_effect_option); /** * options for logo effects * */ return apply_filters( 'Shock_logoeffect_schemes', $logo_effect_option ); } function BillyDroid_view_post_schemes(){ $post_display=array('List','Grid'); $post_display=array_combine($post_display,$post_display); /* * options post display options mode */ return apply_filters( 'BillyDroid_view_post_schemes', $post_display ); } function BillyDroid_grid_size_schemes(){ $gird_size=array('Small','Normal'); $gird_size=array_combine($gird_size,$gird_size); /* * options post display in grid mode */ return apply_filters( 'BillyDroid_grid_size_schemes', $gird_size ); } function BillyDroid_box_design_schemes(){ $box_design=array('boxcss_default'=>'Default Box'); foreach (range(0, 23) as $widget_number){ $box_design['boxcss_'.$widget_number]= ($widget_number != 0)?'Box Style'.$widget_number:'No Box'; } /* * options for post display options */ return apply_filters( 'BillyDroid_box_design_schemes', $box_design ); } function BillyDroid_get_default_theme_options() { $default_theme_options = array(); /*Body Setttings */ $default_theme_options['body_fontfamily']='inherit'; $default_theme_options['body_fontsize']='inherit'; $default_theme_options['body_color']='#000'; /*Heading settings*/ $default_theme_options['Headings_fontfamily']='inherit'; $default_theme_options['H1_fontsize']='inherit'; $default_theme_options['H1_color']='#000'; $default_theme_options['H2_fontsize']='inherit'; $default_theme_options['H2_color']='#000'; $default_theme_options['H3_fontsize']='inherit'; $default_theme_options['H3_color']='#000'; $default_theme_options['H4_fontsize']='inherit'; $default_theme_options['H4_color']='#000'; $default_theme_options['H5_fontsize']='inherit'; $default_theme_options['H5_color']='#000'; $default_theme_options['H6_fontsize']='inherit'; $default_theme_options['H6_color']='#000'; /*Global settings*/ $default_theme_options['menu_show']=true; $default_theme_options['topbar_show']=true; $default_theme_options['search_show']=true; $default_theme_options['responsive']=true; /*Post Display options*/ $default_theme_options['post_display']='List'; $default_theme_options['post_size']='Normal'; $default_theme_options['post_style']='boxcss_default'; /*Widget style options*/ $default_theme_options['widget_style'] = 'boxcss_default'; /*Icon post*/ $default_theme_options['iconpost_author']=true; $default_theme_options['iconpost_date']=true; $default_theme_options['iconpost_category']=true; $default_theme_options['iconpost_tags']=true; $default_theme_options['iconpost_comments']=true; $default_theme_options['iconpost_comments2']=true; /*Logo settings*/ $default_theme_options['logo_mode']='image'; $default_theme_options['logo_img'] = IMG_URI.'logo/logo.png'; $default_theme_options['logo_text']='My company'; $default_theme_options['logo_fontsize']='50px'; $default_theme_options['logo_effect']='Normal'; $default_theme_options['logo_fontfamily']='inherit'; $default_theme_options['logo_footer']=true; $default_theme_options['footer_info']=''; //Slider theme settings id attachments order /*$default_theme_options[ 'slider_type' ] = 'Nivo-Slider'; $default_theme_options[ 'slider_opt' ] = array ( 'anim_speed' => '500', 'effects' => 0 );*/ $default_theme_options[ 'slider_images' ] = ''; /** * Filter the Shock default options * * @param array $default_theme_options An array of default theme options. */ return apply_filters( 'BillyDroid_default_theme_options', $default_theme_options ); } /* Get the main setting for the theme */ function BillyDroid_get_theme_options() { $mod_theme = get_theme_mod( 'BillyDroid_theme_options' ); $sidebar_info = get_theme_mod ( 'BillyDroid_sidebar' ); $layout_info = get_theme_mod ( 'BillyDroid_layout_options' ); $slider_info = get_theme_mod ( 'BillyDroid_slider_options' ); $slides = get_theme_mod ( 'slides' ); $resp_slider = get_theme_mod ( 'BillyDroid_feat_responsiveness_slider', 'no' ); $titl_slider = get_theme_mod ( 'BillyDroid_feat_caption_field_title_slider', 'yes' ); $date_slider = get_theme_mod ( 'BillyDroid_feat_caption_field_date_slider', 'yes' ); $text_slider = get_theme_mod ( 'BillyDroid_feat_caption_field_text_slider', 'yes' ); $auth_slider = get_theme_mod ( 'BillyDroid_feat_caption_field_author_slider', 'yes' ); $thum_slider = get_theme_mod ( 'BillyDroid_feat_thumb_position_slider', 'none' ); $type_slider = get_theme_mod ( 'BillyDroid_slider_type', 'Nivo-Slider'); if ( $sidebar_info === false ) $sidebar_info = update_sidebar(); if ( $layout_info === false ) $layout_info = update_layout(); if ( $slider_info === false ) $slider_info = update_slider(); $slider_info = array_merge( $slider_info, compact( 'resp_slider', 'titl_slider', 'date_slider', 'text_slider', 'auth_slider', 'thum_slider', 'type_slider' ) ); //get default settings for the dashboard $defaults = BillyDroid_get_default_theme_options(); //Determine setting in case value not exists foreach ($defaults as $key => $value){ if ( empty($mod_theme[$key]) && !isset($mod_theme[$key]) ){ $mod_theme[$key]=$value; } } $mod_theme=array_merge( $mod_theme, compact( 'sidebar_info', 'layout_info', 'slider_info', 'slides')); return apply_filters ( 'BillyDroid_get_theme_options', $mod_theme ); } function BillyDroid_customize_register( $wp_customize ) { ///Custom contol image store upload like background require('customizer_image_reloaded.php'); //Custom_control for textarea require('customizer_textarea.php'); $options = BillyDroid_get_theme_options(); /* Body paragraphs*/ $fonts = Shock_fontfamily_schemes(); require('body_settings.php'); /* Heading titles*/ require('heading_settings.php'); /*global settings*/ require ('global_settings.php'); /*iconpost settings*/ require('iconpost_settings.php'); /*postdisplay settings*/ $post_display_mode=BillyDroid_view_post_schemes(); $grid_size=BillyDroid_grid_size_schemes(); $box_style=BillyDroid_box_design_schemes(); require('postdisplay_settings.php'); /*Logo effect*/ $effect_logos=Shock_logoeffect_schemes(); require ('logo_settings.php'); /* Footer info*/ require ('footer_settings.php'); } add_action( 'customize_register', 'BillyDroid_customize_register' ); /** * [Shock_add_image_slider add image into slider settings] * @param [type] $post_id [ $id ] */ function Shock_image_slider ( $html , $attachment_id ) { ///verifiy if this uploader correspond to theme-options parse_str ( wp_get_referer() , $get_request ); if ( !empty( $get_request['option'] ) && $get_request['option'] == 'BillyDroid'){ $html = wp_get_attachment_image( $attachment_id, array(32,32), true, array ( 'data-id' => $attachment_id, 'class' => 'icon' ) ) ; $html .= wp_get_attachment_image( $attachment_id, 'thumbnail', false, array ( 'class' => 'thumb') ); } return $html; } add_filter('image_send_to_editor', 'Shock_image_slider', 10, 3); /** * [BillyDroid_customize_preview_js include the scripts libraries for customizer.php] */ function BillyDroid_customize_preview_js() { wp_enqueue_script ( 'underscore' ); wp_enqueue_script ( 'BillyDroid-customizer', CONFIG_URI.'inc/theme-customizer.js', array( 'jquery','customize-preview' ), '20131702', true ); } add_action( 'customize_preview_init', 'BillyDroid_customize_preview_js' ); ?>