add_section( 'typist_container_width' , array( 'title' => __( 'Width', 'typist' ), 'priority' => 30, )); // Social Accounts $wp_customize->add_section( 'typist_social_section' , array( 'title' => __( 'Social Accounts', 'typist' ), 'description' => __( 'Enter full URL with http://
Leave empty to disable.', 'typist' ), 'priority' => 35, )); // Layout $wp_customize->add_section( 'typist_layout', array( 'title' => __('Layout', 'typist'), 'priority' => 40, )); // Font Options $wp_customize->add_section( 'typist_fonts' , array( 'title' => __( 'Fonts', 'typist' ), 'priority' => 50, )); // Meta Options $wp_customize->add_section( 'typist_meta' , array( 'title' => __( 'Meta Information', 'typist' ), 'priority' => 60, )); // ----------------------------------------------------------------------------- /** * Show/Hide meta for posts */ $wp_customize->add_setting( 'typist_show_meta', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control( 'typist_show_meta', array( 'description' => __( 'Both single and blog views', 'typist' ), 'type' => 'checkbox', 'label' => __( 'HIDE ALL meta info for posts', 'typist' ), 'section' => 'typist_meta', 'std' => '0', )); // ----------------------------------------------------------------------------- /** * Show/Hide meta for pages */ $wp_customize->add_setting( 'typist_show_meta_pages', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control( 'typist_show_meta_pages', array( 'type' => 'checkbox', 'label' => __( 'HIDE ALL meta info for pages', 'typist' ), 'section' => 'typist_meta', 'std' => '0', )); // ----------------------------------------------------------------------------- /** * Show/Hide categories on posts */ $wp_customize->add_setting( 'typist_show_cat', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control( 'typist_show_cat', array( 'type' => 'checkbox', 'label' => __( 'Hide categories in meta info', 'typist' ), 'section' => 'typist_meta', 'std' => '1', )); // ----------------------------------------------------------------------------- /** * Show/Hide date on posts */ $wp_customize->add_setting( 'typist_show_date', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control( 'typist_show_date', array( 'type' => 'checkbox', 'label' => __( 'Hide date in meta info', 'typist' ), 'section' => 'typist_meta', )); // ----------------------------------------------------------------------------- /** * Show/Hide tags on posts */ $wp_customize->add_setting( 'typist_show_tags', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control( 'typist_show_tags', array( 'type' => 'checkbox', 'label' => __( 'Hide tags in meta info', 'typist' ), 'section' => 'typist_meta', )); // ----------------------------------------------------------------------------- /** * Show/Hide comment count on posts */ $wp_customize->add_setting( 'typist_show_comm', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control( 'typist_show_comm', array( 'type' => 'checkbox', 'label' => __( 'Hide comment link in meta info', 'typist' ), 'section' => 'typist_meta', )); // ----------------------------------------------------------------------------- /** * Show/Hide author on posts */ $wp_customize->add_setting( 'typist_autho', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control( 'typist_autho', array( 'type' => 'checkbox', 'label' => __( 'Hide author in meta info', 'typist' ), 'section' => 'typist_meta', )); // ----------------------------------------------------------------------------- /* * Color scheme */ $wp_customize->add_setting('typist_blogscheme', array( 'default' => 'cherry', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_scheme' )); $wp_customize->add_control('typist_blogscheme', array( 'label' => __('Choose color scheme', 'typist'), 'section' => 'colors', 'settings' => 'typist_blogscheme', 'description' => '', 'type' => 'radio', 'choices' => array( 'cherry' => __('Cherry', 'typist'), 'greyscale' => __('Greyscale', 'typist'), 'mono' => __('Monochrome', 'typist'), 'dark' => __('Dark', 'typist'), 'terminal' => __('Terminal', 'typist'), 'beige' => __('Beige', 'typist'), 'gum' => __('Bubblegum', 'typist') ), )); // ----------------------------------------------------------------------------- /* * Blog Layout */ $wp_customize->add_setting('typist_bloglayout', array( 'default' => 'left', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_layout', )); $wp_customize->add_control('typist_option_bloglayout', array( 'label' => __('Blog layout', 'typist'), 'section' => 'typist_layout', 'settings' => 'typist_bloglayout', 'description' => '', 'type' => 'radio', 'choices' => array( 'left' => __('Left Sidebar', 'typist'), 'full_width' => __('Full Width / No sidebar', 'typist'), 'right' => __('Right Sidebar', 'typist') ), )); // ----------------------------------------------------------------------------- /* * Post Layout */ $wp_customize->add_setting('typist_postlayout', array( 'default' => 'left', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_layout', )); $wp_customize->add_control('typist_option_postlayout', array( 'label' => __('Single post layout', 'typist'), 'section' => 'typist_layout', 'settings' => 'typist_postlayout', 'description' => '', 'type' => 'radio', 'choices' => array( 'left' => __('Left Sidebar', 'typist'), 'full_width' => __('Full Width / No sidebar', 'typist'), 'right' => __('Right Sidebar', 'typist') ), )); // ----------------------------------------------------------------------------- /* * Page Layout */ $wp_customize->add_setting('typist_pagelayout', array( 'default' => 'left', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_layout', )); $wp_customize->add_control('typist_option_pagelayout', array( 'label' => __('Single page layout', 'typist'), 'section' => 'typist_layout', 'settings' => 'typist_pagelayout', 'description' => '', 'type' => 'radio', 'choices' => array( 'left' => __('Left Sidebar', 'typist'), 'full_width' => __('Full Width / No sidebar', 'typist'), 'right' => __('Right Sidebar', 'typist') ), )); // ----------------------------------------------------------------------------- /** * Site width */ $wp_customize->add_setting('container_width', array( 'default' => '980px', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_width', )); $wp_customize->add_control('typist_option_container_width', array( 'label' => __('Width', 'typist'), 'section' => 'typist_container_width', 'settings' => 'container_width', 'description' => __('Choose max site width (in pixels).', 'typist'), 'type' => 'radio', 'choices' => array( '980px' => __('980', 'typist'), '1280px' => __('1280', 'typist'), '1400px' => __('1400', 'typist'), '1600px' => __('1600', 'typist'), '1920px' => __('1920', 'typist') ), )); // ----------------------------------------------------------------------------- /** Facebook */ $wp_customize->add_setting('typist_social_facebook', array( 'default' => '', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('typist_social_facebook', array( 'label' => __('Facebook', 'typist'), 'section' => 'typist_social_section', 'settings' => 'typist_social_facebook' )); // ----------------------------------------------------------------------------- /** Instagram */ $wp_customize->add_setting('typist_social_instagram', array( 'default' => '', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('typist_social_instagram', array( 'label' => __('Instagram', 'typist'), 'section' => 'typist_social_section', 'settings' => 'typist_social_instagram' )); // ----------------------------------------------------------------------------- /** Twitter */ $wp_customize->add_setting('typist_social_twitter', array( 'default' => '', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('typist_social_twitter', array( 'label' => __('Twitter', 'typist'), 'section' => 'typist_social_section', 'settings' => 'typist_social_twitter' )); // ----------------------------------------------------------------------------- /** * Headings */ $wp_customize->add_setting('typist_headings_font', array( 'default' => 'Fjalla One', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_fontfamily', )); $wp_customize->add_control('typist_headings_font', array( 'label' => __('Headings Font', 'typist'), 'section' => 'typist_fonts', 'settings' => 'typist_headings_font', 'type' => 'select', 'choices' => array( 'Fjalla One' => 'Fjalla One', 'Oswald' => 'Oswald', 'Francois One' => 'Francois One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Roboto Slab' => 'Roboto Slab', 'BenchNine' => 'BenchNine', 'Passion One' => 'Passion One', 'Open Sans' => 'Open Sans', 'Noto Serif' => 'Noto Serif', 'Noto Sans' => 'Noto Sans', 'PT Sans' => 'PT Sans', 'Fira Sans' => 'Fira Sans', 'Arial' => 'Arial', 'Verdana' => 'Verdana', 'Times New Roman' => 'Times New Roman', 'Monospace' => 'Monospace', 'Impact' => 'Impact' ), )); // ----------------------------------------------------------------------------- /** * Body Font */ $wp_customize->add_setting('typist_body_font', array( 'default' => 'Noto Sans', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_fontfamily', )); $wp_customize->add_control('typist_body_font', array( 'label' => __('Body Font', 'typist'), 'section' => 'typist_fonts', 'settings' => 'typist_body_font', 'type' => 'select', 'choices' => array( 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Open Sans' => 'Open Sans', 'PT Sans' => 'PT Sans', 'Roboto Slab' => 'Roboto Slab', 'Fira Sans' => 'Fira Sans', 'Arial' => 'Arial', 'Verdana' => 'Verdana', 'Times New Roman' => 'Times New Roman', 'Monospace' => 'Monospace', 'Impact' => 'Impact' ), )); // ----------------------------------------------------------------------------- /** * Headings */ $wp_customize->add_setting('typist_headings_weight', array( 'default' => '400', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'transport' => 'postMessage', 'sanitize_callback' => 'typist_sanitize_weight', )); $wp_customize->add_control('typist_headings_weight', array( 'label' => __('Headings weight', 'typist'), 'section' => 'typist_fonts', 'settings' => 'typist_headings_weight', 'description' => __('Bold or normal headings?', 'typist'), 'type' => 'select', 'choices' => array( '400' => __('Normal', 'typist'), '800' => __('Bold', 'typist'), ), )); // ----------------------------------------------------------------------------- /** * Headings */ $wp_customize->add_setting( 'typist_upper', array( 'sanitize_callback' => 'typist_sanitize_checkbox', )); $wp_customize->add_control('typist_upper', array( 'type' => 'checkbox', 'label' => __( 'Transform all headings to UPPERCASE', 'typist' ), 'section' => 'typist_fonts', 'std' => '0', )); // ----------------------------------------------------------------------------- /** logo (or title) alignment */ $wp_customize->add_setting('logo_alignment', array( 'default' => 'left', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'typist_sanitize_align', )); $wp_customize->add_control('typist_logo_alignment', array( 'label' => __('Logo/Title alignment', 'typist'), 'section' => 'title_tagline', 'settings' => 'logo_alignment', 'description' => __( 'Where will the logo be?', 'typist' ), 'type' => 'radio', 'choices' => array( 'left' => __( 'Left', 'typist' ), 'center' => __( 'Center', 'typist' ), 'right' => __( 'Right', 'typist' ), ), )); // ----------------------------------------------------------------------------- /** footer copyright text */ $wp_customize->add_setting('footer_copyright', array( 'default' => '', 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('typist_footer_copyright', array( 'label' => __('Footer Copyright', 'typist'), 'section' => 'title_tagline', 'settings' => 'footer_copyright' )); // ----------------------------------------------------------------------------- //Upgrade to PRO Section $wp_customize->add_section( 'typist_pro_add', array( 'priority' => 1001, 'title' => __('Upgrade to Typist Pro', 'typist'), 'description' => __('

Do you like The Typist theme? Get Typist Pro to support the developer and get even more exciting features:

Read More

Support forums

', 'typist'), )); // ----------------------------------------------------------------------------- $wp_customize->add_setting('typist_pro_info', array( 'sanitize_callback' => 'sanitize_text_field', 'type' => 'info_control', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'typist_pro_info_control', array( 'section' => 'typist_pro_add', 'settings' => 'typist_pro_info', 'priority' => 10, 'type' => 'radio', 'style' => 'display: none;', ) ); // ----------------------------------------------------------------------------- // Stuff that uses live preview JS $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'typist_headings_weight' )->transport = 'postMessage'; } /** * This will output the custom WordPress settings to the live theme's WP head. * Used by hook: 'wp_head' */ public static function typist_header_output() { ?>