function inti_mce_text_sizes($initArray)
 {
     $fontsizes_array = inti_get_typography_font_sizes();
     $fontsizes_string = "";
     foreach ($fontsizes_array as $key => $value) {
         $fontsizes_string .= $key . " ";
     }
     $initArray['fontsize_formats'] = trim($fontsizes_string);
     return $initArray;
 }
Exemplo n.º 2
0
 // Posts & Pages
 $theme_layouts = inti_get_theme_layouts(false);
 $wp_customize->add_section('inti_customizer_posts', array('title' => __('Page Options', 'inti'), 'priority' => 20));
 $wp_customize->add_setting('inti_customizer_options[site_layout]', array('default' => '2c-l', 'type' => 'option', 'capability' => 'manage_options'));
 $wp_customize->add_control('inti_customizer_options[site_layout]', array('label' => __('Default Layout', 'inti'), 'description' => __('Default layout for all pages, posts, archives and custom types throughout the site if not individually changed or overwritten below', 'inti'), 'section' => 'inti_customizer_posts', 'type' => 'select', 'choices' => $theme_layouts, 'priority' => 4));
 $wp_customize->add_setting('inti_customizer_options[page_layout]', array('default' => '2c-l', 'type' => 'option', 'capability' => 'manage_options'));
 $wp_customize->add_control('inti_customizer_options[page_layout]', array('label' => __('Page Layout', 'inti'), 'description' => __('Default layout for static pages', 'inti'), 'section' => 'inti_customizer_posts', 'type' => 'select', 'choices' => $theme_layouts, 'priority' => 5));
 $wp_customize->add_setting('inti_customizer_options[post_layout]', array('default' => '2c-l', 'type' => 'option', 'capability' => 'manage_options'));
 $wp_customize->add_control('inti_customizer_options[post_layout]', array('label' => __('Single Post Layout', 'inti'), 'description' => __('Default layout for blog posts', 'inti'), 'section' => 'inti_customizer_posts', 'type' => 'select', 'choices' => $theme_layouts, 'priority' => 6));
 $wp_customize->add_setting('inti_customizer_options[archive_layout]', array('default' => '2c-l', 'type' => 'option', 'capability' => 'manage_options'));
 $wp_customize->add_control('inti_customizer_options[archive_layout]', array('label' => __('Post Archive Layout', 'inti'), 'description' => __('Default layout for blog post archives and index', 'inti'), 'section' => 'inti_customizer_posts', 'type' => 'select', 'choices' => $theme_layouts, 'priority' => 6));
 $wp_customize->add_setting('inti_customizer_options[sticky_sidebars]', array('default' => 'static', 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-sticky-sidebars'));
 $wp_customize->add_control('inti_customizer_options[sticky_sidebars]', array('label' => __('Sticky Sidebars', 'inti'), 'description' => __('Keep sidebar widgets in view as you scroll down the page.', 'inti'), 'section' => 'inti_customizer_posts', 'type' => 'select', 'choices' => array('static' => __('Static', 'inti'), 'sticky' => __('Sticky', 'inti')), 'priority' => 7));
 // Fonts
 $font_faces = array_merge(inti_get_typography_os_fonts(), inti_get_typography_google_fonts());
 $font_sizes = inti_get_typography_font_sizes();
 $wp_customize->add_section('inti_customizer_main_styles', array('title' => __('Main Styles', 'inti'), 'priority' => 30, 'theme_supports' => 'inti-fonts'));
 $wp_customize->add_setting('inti_customizer_options[title_font]', array('default' => "'Helvetica Neue', Helvetica, Arial, sans-serif", 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-fonts'));
 $wp_customize->add_control('inti_customizer_options[title_font]', array('label' => __('Page & Post Titles Font', 'inti'), 'section' => 'inti_customizer_main_styles', 'type' => 'select', 'choices' => $font_faces));
 $wp_customize->add_setting('inti_customizer_options[title_color]', array('default' => '', 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-fonts', 'sanitize_callback' => 'maybe_hash_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'inti_title_color', array('label' => __('Page & Post Titles Color', 'inti'), 'section' => 'inti_customizer_main_styles', 'settings' => 'inti_customizer_options[title_color]')));
 $wp_customize->add_setting('inti_customizer_options[link_color]', array('default' => '', 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-fonts', 'sanitize_callback' => 'maybe_hash_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'inti_link_color', array('label' => __('General Link Color', 'inti'), 'section' => 'inti_customizer_main_styles', 'settings' => 'inti_customizer_options[link_color]')));
 $wp_customize->add_setting('inti_customizer_options[link_hover_color]', array('default' => '', 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-fonts', 'sanitize_callback' => 'maybe_hash_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
 $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'inti_link_hover_color', array('label' => __('General Link Hover Color', 'inti'), 'section' => 'inti_customizer_main_styles', 'settings' => 'inti_customizer_options[link_hover_color]')));
 $wp_customize->add_section('inti_customizer_content_styles', array('title' => __('Content Styles', 'inti'), 'priority' => 55, 'theme_supports' => 'inti-fonts'));
 $wp_customize->add_setting('inti_customizer_options[paragraph_font]', array('default' => "'Open Sans', sans-serif", 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-fonts'));
 $wp_customize->add_control('inti_customizer_options[paragraph_font]', array('label' => __('Paragraph Font', 'inti'), 'section' => 'inti_customizer_content_styles', 'type' => 'select', 'choices' => $font_faces));
 $wp_customize->add_setting('inti_customizer_options[paragraph_size]', array('default' => "", 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-fonts'));
 $wp_customize->add_control('inti_customizer_options[paragraph_size]', array('label' => __('Paragraph Size', 'inti'), 'section' => 'inti_customizer_content_styles', 'type' => 'select', 'choices' => $font_sizes));
 $wp_customize->add_setting('inti_customizer_options[paragraph_color]', array('default' => '', 'type' => 'option', 'capability' => 'manage_options', 'theme_supports' => 'inti-fonts', 'sanitize_callback' => 'maybe_hash_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));