diff --git a/functions.php b/functions.php index 8e69e3f..00ea6eb 100644 --- a/functions.php +++ b/functions.php @@ -84,7 +84,7 @@ function oblique_setup() { 'default-color' => '1c1c1c', ) ) ); - require_once( get_template_directory() . '/inc/customizer-info/class/class-singleton-customizer-info-section.php' ); + require_once( trailingslashit( get_template_directory() ) . 'inc/class/class-customizer-theme-info-control/class-customizer-theme-info-root.php' ); } endif; // oblique_setup add_action( 'after_setup_theme', 'oblique_setup' ); diff --git a/inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php b/inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php new file mode 100644 index 0000000..8d38e31 --- /dev/null +++ b/inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php @@ -0,0 +1,113 @@ +button_text; + $manager->register_control_type( 'Oblique_Control_Upsell_Theme_Info' ); + parent::__construct( $manager, $id, $args ); + + } + /** + * Enqueue resources for the control + */ + public function enqueue() { + wp_enqueue_style( 'themeisle-upsell-style', get_template_directory_uri() . '/inc/class/class-customizer-theme-info-control/css/style.css', '1.0.0' ); + } + + /** + * Json conversion + */ + public function to_json() { + parent::to_json(); + $this->json['button_text'] = $this->button_text; + $this->json['button_url'] = $this->button_url; + $this->json['options'] = $this->options; + $this->json['explained_features'] = $this->explained_features; + } + + /** + * Control content + */ + public function content_template() { + ?> +
+ <# if ( data.options ) { #> + + <# } #> + + <# if ( data.button_text && data.button_url ) { #> + {{ + data.button_text }} + <# } #> + + <# if ( data.explained_features.length > 0 ) { #> +
+ + + <# } #> +
+ setup_actions(); + } + + return $instance; + } + + /** + * Constructor method. + * + * @since 1.0.0 + * @access private + * @return void + */ + private function __construct() {} + + /** + * Sets up initial actions. + * + * @since 1.0.0 + * @access private + * @return void + */ + private function setup_actions() { + + // Register panels, sections, settings, controls, and partials. + add_action( 'customize_register', array( $this, 'sections' ) ); + + // Register scripts and styles for the controls. + add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 ); + } + + /** + * Sets up the customizer sections. + * + * @since 1.0.0 + * @access public + * @param object $manager Customizer manager. + * @return void + */ + public function sections( $manager ) { + + // Load custom sections. + require_once( trailingslashit( get_template_directory() ) . 'inc/class/class-customizer-theme-info-control/class-oblique-customize-theme-info-main.php' ); + + // Register custom section types. + $manager->register_section_type( 'Oblique_Customizer_Theme_Info_Main' ); + + // Main Documentation Link In Customizer Root. + $manager->add_section( new Oblique_Customizer_Theme_Info_Main( $manager, 'oblique-theme-info', array( + 'theme_info_title' => __( 'Oblique', 'oblique' ), + 'label_url' => esc_url( 'http://docs.themeisle.com/article/294-oblique-documentation' ), + 'label_text' => __( 'Documentation', 'oblique' ), + ) ) ); + } + + /** + * Loads theme customizer CSS. + * + * @since 1.0.0 + * @access public + * @return void + */ + public function enqueue_control_scripts() { + + wp_enqueue_script( 'oblique-upsell-js', trailingslashit( get_template_directory_uri() ) . 'inc/class/class-customizer-theme-info-control/js/oblique-upsell-customize-controls.js', array( 'customize-controls' ) ); + + wp_enqueue_style( 'oblique-theme-info-style', trailingslashit( get_template_directory_uri() ) . 'inc/class/class-customizer-theme-info-control/css/style.css' ); + + } +} + +Oblique_Customizer_Upsell::get_instance(); diff --git a/inc/class/class-customizer-theme-info-control/class-oblique-customize-theme-info-main.php b/inc/class/class-customizer-theme-info-control/class-oblique-customize-theme-info-main.php new file mode 100644 index 0000000..e976ff7 --- /dev/null +++ b/inc/class/class-customizer-theme-info-control/class-oblique-customize-theme-info-main.php @@ -0,0 +1,94 @@ +theme_info_title; + $json['label_text'] = $this->label_text; + $json['label_url'] = esc_url( $this->label_url ); + + return $json; + } + + /** + * Outputs the Underscore.js template. + * + * @since 1.0.0 + * @access public + * @return void + */ + protected function render_template() { + ?> + +
  • +

    + {{data.theme_info_title}} + <# if ( data.label_text && data.label_url ) { #> + + {{data.label_text}} + + <# } #> +

    +
  • + __( 'View Documentation','oblique' ), - 'link' => esc_url( 'http://docs.themeisle.com/article/294-oblique-documentation' ), - ), - array( - 'name' => __( 'Demo','oblique' ), - 'link' => esc_url( 'http://themeisle.com/demo/?theme=Oblique' ), - ), - array( - 'name' => __( 'Free VS Pro','oblique' ), - 'link' => esc_url( 'http://docs.themeisle.com/article/478-what-is-the-difference-between-oblique-and-oblique-pro' ), - ), - array( - 'name' => __( 'View PRO version','oblique' ), - 'link' => esc_url( 'http://themeisle.com/themes/oblique-pro/' ), - ), - array( - 'name' => __( 'Leave a review','oblique' ), - 'link' => esc_url( 'https://wordpress.org/support/theme/oblique/reviews/' ), - ), - ); ?> - - -
    - - -
    - -
    - -
    -

    - %s', __( 'View PRO version', 'oblique' ) ); ?> - -

    -
    - section_text; - $json['section_title'] = $this->section_title; - $json['section_url'] = $this->section_url; - return $json; - } - - /** - * Outputs the Underscore.js template. - * - * @since 1.0.0 - * @access public - * @return void - */ - protected function render_template() { - ?> - -
  • -

    - <# if ( data.section_url){ #> - <# if ( data.section_title ) { #> - {{{data.section_title}}} - <# } #> - <# if ( data.section_text && data.section_url ) { #> - - {{data.section_text}} - - <# } #> - <# } else { #> - <# if ( data.section_text ) { #> - {{{data.section_text}}} - <# } #> - <# } #> -

    -
  • - setup_actions(); - } - - return $instance; - } - - /** - * Constructor method. - * - * @since 1.0.0 - * @access private - * @return void - */ - private function __construct() {} - - /** - * Sets up initial actions. - * - * @since 1.0.0 - * @access private - * @return void - */ - private function setup_actions() { - - // Register panels, sections, settings, controls, and partials. - add_action( 'customize_register', array( $this, 'sections' ), 1 ); - - // Register scripts and styles for the controls. - add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 ); - } - - /** - * Sets up the customizer sections. - * - * @since 1.0.0 - * @access public - * @param object $manager WordPress customizer object. - * @return void - */ - public function sections( $manager ) { - - // Load custom sections. - require_once( trailingslashit( get_template_directory() ) . 'inc/customizer-info/class/class-customizer-info-section.php' ); - - // Register custom section types. - $manager->register_section_type( 'Customizer_Info' ); - - // Register sections. - $manager->add_section( new Customizer_Info( $manager, 'oblique_pro_featured', array( - 'section_text' => sprintf( '%s', esc_html__( 'View PRO version', 'oblique' ) ) . ' ' . __( 'It adds an extra widget area and the ability to easily add a slider on frontpage.', 'oblique' ), - 'panel' => 'widgets', - 'priority' => 500, - ) ) ); - - $manager->add_section( new Customizer_Info( $manager, 'oblique_view_pro', array( - 'section_title' => __( 'View PRO version', 'oblique' ), - 'section_url' => 'https://themeisle.com/themes/oblique-pro/', - 'section_text' => __( 'Get it', 'oblique' ), - ) ) ); - } - - /** - * Loads theme customizer CSS. - * - * @since 1.0.0 - * @access public - * @return void - */ - public function enqueue_control_scripts() { - - wp_enqueue_script( 'customizer-info-js', trailingslashit( get_template_directory_uri() ) . 'inc/customizer-info/js/customizer-info-controls.js', array( 'customize-controls' ) ); - wp_enqueue_style( 'customizer-info-style', trailingslashit( get_template_directory_uri() ) . 'inc/customizer-info/css/style.css' ); - - } -} - -Customizer_Info_Singleton::get_instance(); diff --git a/inc/customizer-info/css/style.css b/inc/customizer-info/css/style.css deleted file mode 100644 index 5555e30..0000000 --- a/inc/customizer-info/css/style.css +++ /dev/null @@ -1,11 +0,0 @@ -#accordion-section-oblique_pro_featured { - display: block!important; -} - -.oblique-theme-info { - text-align: center; -} - -.oblique-theme-info hr { - margin: 10px auto; -} diff --git a/inc/customizer-info/js/customizer-info-controls.js b/inc/customizer-info/js/customizer-info-controls.js deleted file mode 100644 index 3aee35f..0000000 --- a/inc/customizer-info/js/customizer-info-controls.js +++ /dev/null @@ -1,37 +0,0 @@ -( function( api ) { - 'use strict'; - // Extends our custom "customizer-info" section. - api.sectionConstructor['customizer-info'] = api.Section.extend( { - - // No events for this type of section. - attachEvents: function () {}, - - // Always make the section active. - isContextuallyActive: function () { - return true; - } - } ); - - api.sectionConstructor.oblique_pro_featured = api.Section.extend( { - - // No events for this type of section. - attachEvents: function () {}, - - // Always make the section active. - isContextuallyActive: function () { - return true; - } - } ); - - api.sectionConstructor.oblique_view_pro = api.Section.extend( { - - // No events for this type of section. - attachEvents: function () {}, - - // Always make the section active. - isContextuallyActive: function () { - return true; - } - } ); - -} )( wp.customize ); \ No newline at end of file diff --git a/inc/customizer.php b/inc/customizer.php index 4cfc17d..72c1f4b 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -10,8 +10,8 @@ */ function oblique_customize_register( $wp_customize ) { - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->remove_control( 'header_textcolor' ); $wp_customize->remove_control( 'display_header_text' ); $wp_customize->remove_section( 'background_image' ); @@ -43,9 +43,9 @@ class Oblique_Titles extends WP_Customize_Control { * The render function for the controler */ public function render_content() { - ?> + ?>

    label ); ?>

    - add_section('oblique_theme_info', array( - 'title' => __( 'Theme info', 'oblique' ), + $wp_customize->add_section( 'oblique_theme_info_main_section', array( + 'title' => __( 'View PRO version', 'oblique' ), 'priority' => 0, ) ); - $wp_customize->add_setting('oblique_theme_info', array( - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'oblique_sanitize_text', + + $wp_customize->add_setting( 'oblique_theme_info_main_control', array( + 'sanitize_callback' => 'esc_html', ) ); - $wp_customize->add_control( new Oblique_Info( $wp_customize, 'oblique_theme_info', array( - 'section' => 'oblique_theme_info', - 'priority' => 10, + + // View Pro Version Section Control + $wp_customize->add_control( new Oblique_Control_Upsell_Theme_Info( $wp_customize, 'oblique_theme_info_main_control', array( + 'section' => 'oblique_theme_info_main_section', + 'priority' => 100, + 'options' => array( + esc_html__( 'Jetpack Related Posts', 'oblique' ), + esc_html__( 'Slider', 'oblique' ), + esc_html__( 'Extra Widget Area', 'oblique' ), + esc_html__( 'Alternative Layout', 'oblique' ), + esc_html__( 'Extra Colors', 'oblique' ), + esc_html__( 'Footer Credits', 'oblique' ), + esc_html__( 'Support', 'oblique' ), + ), + 'button_url' => esc_url( 'https://themeisle.com/themes/oblique-pro/' ), + 'button_text' => esc_html__( 'View PRO version', 'oblique' ), ) ) ); /** - * Colors Notice + * Header Section Upsell */ + $wp_customize->add_setting( 'oblique_theme_info_header_section_control', array( + 'sanitize_callback' => 'esc_html', + ) ); - require_once( 'class/class-oblique-notice.php' ); - $wp_customize->add_setting('oblique_color_notice', array( - 'capability' => 'edit_theme_options', - 'sanitize_callback' => 'oblique_sanitize_text', - ) - ); - $wp_customize->add_control( new Oblique_Colors_Notice( $wp_customize, 'oblique_color_notice', array( - 'section' => 'colors', - 'priority' => 100, - ) ) ); + $wp_customize->add_control( new Oblique_Control_Upsell_Theme_Info( $wp_customize, 'oblique_theme_info_header_section_control', array( + 'section' => 'oblique_header', + 'priority' => 500, + 'options' => array( + esc_html__( 'Slider', 'oblique' ), + ), + 'explained_features' => array( + esc_html__( 'Add a shortcode for a slider to replace the header image.', 'oblique' ), + ), + 'button_url' => esc_url( 'https://themeisle.com/themes/oblique-pro/' ), + 'button_text' => esc_html__( 'View PRO version', 'oblique' ), + ) ) ); - // ___General___// - $wp_customize->add_section( - 'oblique_general', - array( - 'title' => __( 'General', 'oblique' ), + // ___General___// + $wp_customize->add_section( + 'oblique_general', + array( + 'title' => __( 'General', 'oblique' ), 'priority' => 9, - ) - ); + ) + ); - // Hide meta - $wp_customize->add_setting( - 'search_toggle', - array( + // Hide meta + $wp_customize->add_setting( + 'search_toggle', + array( 'sanitize_callback' => 'oblique_sanitize_checkbox', - 'default' => 0, - 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - 'search_toggle', - array( - 'type' => 'checkbox', - 'label' => __( 'Toggle a search form in the header?', 'oblique' ), - 'section' => 'oblique_general', + 'default' => 0, + 'transport' => 'postMessage', + ) + ); + $wp_customize->add_control( + 'search_toggle', + array( + 'type' => 'checkbox', + 'label' => __( 'Toggle a search form in the header?', 'oblique' ), + 'section' => 'oblique_general', 'priority' => 11, - ) - ); + ) + ); - // Menu text - $wp_customize->add_setting( - 'menu_text', - array( + // Menu text + $wp_customize->add_setting( + 'menu_text', + array( 'sanitize_callback' => 'oblique_sanitize_text', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - 'menu_text', - array( - 'label' => __( 'Menu toggle text', 'oblique' ), - 'description' => __( 'You can use this to replace the menu toggle button with some text', 'oblique' ), - 'section' => 'oblique_general', - 'type' => 'text', - 'priority' => 11, - ) - ); - // ___Header___// - $wp_customize->add_section( - 'oblique_header', - array( - 'title' => __( 'Header', 'oblique' ), + ) + ); + $wp_customize->add_control( + 'menu_text', + array( + 'label' => __( 'Menu toggle text', 'oblique' ), + 'description' => __( 'You can use this to replace the menu toggle button with some text', 'oblique' ), + 'section' => 'oblique_general', + 'type' => 'text', + 'priority' => 11, + ) + ); + // ___Header___// + $wp_customize->add_section( + 'oblique_header', + array( + 'title' => __( 'Header', 'oblique' ), 'priority' => 10, - ) - ); - // Logo Upload - $wp_customize->add_setting( - 'site_logo', - array( - 'default-image' => '', + ) + ); + // Logo Upload + $wp_customize->add_setting( + 'site_logo', + array( + 'default-image' => '', 'sanitize_callback' => 'esc_url_raw', - ) - ); - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'site_logo', - array( - 'label' => __( 'Upload your logo', 'oblique' ), - 'type' => 'image', - 'section' => 'oblique_header', - 'settings' => 'site_logo', - 'priority' => 11, - ) - ) - ); - // Logo size - $wp_customize->add_setting( - 'logo_size', + ) + ); + $wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'site_logo', array( + 'label' => __( 'Upload your logo', 'oblique' ), + 'type' => 'image', + 'section' => 'oblique_header', + 'settings' => 'site_logo', + 'priority' => 11, + ) + ) + ); + // Logo size + $wp_customize->add_setting( + 'logo_size', + array( 'sanitize_callback' => 'absint', 'default' => '200', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'logo_size', array( - 'type' => 'number', - 'priority' => 12, - 'section' => 'oblique_header', - 'label' => __( 'Logo size', 'oblique' ), - 'description' => __( 'Max-width for the logo. Default 200px', 'oblique' ), - 'input_attrs' => array( - 'min' => 50, - 'max' => 600, - 'step' => 5, - ), - ) ); - // Logo style - $wp_customize->add_setting( - 'logo_style', - array( + ) + ); + $wp_customize->add_control( 'logo_size', array( + 'type' => 'number', + 'priority' => 12, + 'section' => 'oblique_header', + 'label' => __( 'Logo size', 'oblique' ), + 'description' => __( 'Max-width for the logo. Default 200px', 'oblique' ), + 'input_attrs' => array( + 'min' => 50, + 'max' => 600, + 'step' => 5, + ), + ) ); + // Logo style + $wp_customize->add_setting( + 'logo_style', + array( 'default' => 'hide-title', 'sanitize_callback' => 'oblique_sanitize_logo_style', - ) - ); - $wp_customize->add_control( - 'logo_style', - array( - 'type' => 'radio', - 'label' => __( 'Logo style', 'oblique' ), - 'description' => __( 'This option applies only if you are using a logo', 'oblique' ), - 'section' => 'oblique_header', - 'priority' => 13, - 'choices' => array( - 'hide-title' => __( 'Only logo', 'oblique' ), - 'show-title' => __( 'Logo plus site title&description', 'oblique' ), + ) + ); + $wp_customize->add_control( + 'logo_style', + array( + 'type' => 'radio', + 'label' => __( 'Logo style', 'oblique' ), + 'description' => __( 'This option applies only if you are using a logo', 'oblique' ), + 'section' => 'oblique_header', + 'priority' => 13, + 'choices' => array( + 'hide-title' => __( 'Only logo', 'oblique' ), + 'show-title' => __( 'Logo plus site title&description', 'oblique' ), ), - ) - ); - // Padding - $wp_customize->add_setting( - 'branding_padding', - array( + ) + ); + // Padding + $wp_customize->add_setting( + 'branding_padding', + array( 'sanitize_callback' => 'absint', 'default' => '150', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'branding_padding', array( - 'type' => 'number', - 'priority' => 14, - 'section' => 'oblique_header', - 'label' => __( 'Padding', 'oblique' ), - 'description' => __( 'Top&bottom padding for the branding. Default: 150px', 'oblique' ), - 'input_attrs' => array( - 'min' => 20, - 'max' => 350, - 'step' => 5, - ), - ) ); - // Padding - $wp_customize->add_setting( - 'branding_padding_1024', - array( + ) + ); + $wp_customize->add_control( 'branding_padding', array( + 'type' => 'number', + 'priority' => 14, + 'section' => 'oblique_header', + 'label' => __( 'Padding', 'oblique' ), + 'description' => __( 'Top&bottom padding for the branding. Default: 150px', 'oblique' ), + 'input_attrs' => array( + 'min' => 20, + 'max' => 350, + 'step' => 5, + ), + ) ); + // Padding + $wp_customize->add_setting( + 'branding_padding_1024', + array( 'sanitize_callback' => 'absint', 'default' => '100', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'branding_padding_1024', array( - 'type' => 'number', - 'priority' => 15, - 'section' => 'oblique_header', - 'label' => __( 'Padding on screen sizes < 1024px', 'oblique' ), - 'description' => __( 'Top&bottom padding for the branding. Default: 100px', 'oblique' ), - 'input_attrs' => array( - 'min' => 20, - 'max' => 350, - 'step' => 5, - ), - ) ); + ) + ); + $wp_customize->add_control( 'branding_padding_1024', array( + 'type' => 'number', + 'priority' => 15, + 'section' => 'oblique_header', + 'label' => __( 'Padding on screen sizes < 1024px', 'oblique' ), + 'description' => __( 'Top&bottom padding for the branding. Default: 100px', 'oblique' ), + 'input_attrs' => array( + 'min' => 20, + 'max' => 350, + 'step' => 5, + ), + ) ); - // ___Blog options___// - $wp_customize->add_section( - 'blog_options', - array( - 'title' => __( 'Blog options', 'oblique' ), + // ___Blog options___// + $wp_customize->add_section( + 'blog_options', + array( + 'title' => __( 'Blog options', 'oblique' ), 'priority' => 13, - ) - ); - // Excerpt - $wp_customize->add_setting( - 'exc_lenght', - array( + ) + ); + // Excerpt + $wp_customize->add_setting( + 'exc_lenght', + array( 'sanitize_callback' => 'absint', 'default' => '35', - ) - ); - $wp_customize->add_control( 'exc_lenght', array( - 'type' => 'number', - 'priority' => 10, - 'section' => 'blog_options', - 'label' => __( 'Excerpt lenght', 'oblique' ), - 'description' => __( 'Choose your excerpt length. Default: 35 words', 'oblique' ), - 'input_attrs' => array( - 'min' => 0, - 'max' => 200, - 'step' => 5, - ), - ) ); - // Hide meta - $wp_customize->add_setting( - 'meta_index', - array( + ) + ); + $wp_customize->add_control( 'exc_lenght', array( + 'type' => 'number', + 'priority' => 10, + 'section' => 'blog_options', + 'label' => __( 'Excerpt lenght', 'oblique' ), + 'description' => __( 'Choose your excerpt length. Default: 35 words', 'oblique' ), + 'input_attrs' => array( + 'min' => 0, + 'max' => 200, + 'step' => 5, + ), + ) ); + // Hide meta + $wp_customize->add_setting( + 'meta_index', + array( 'sanitize_callback' => 'oblique_sanitize_checkbox', - 'default' => 0, - ) - ); - $wp_customize->add_control( - 'meta_index', - array( - 'type' => 'checkbox', - 'label' => __( 'Hide date/author/archives on index?', 'oblique' ), - 'section' => 'blog_options', + 'default' => 0, + ) + ); + $wp_customize->add_control( + 'meta_index', + array( + 'type' => 'checkbox', + 'label' => __( 'Hide date/author/archives on index?', 'oblique' ), + 'section' => 'blog_options', 'priority' => 11, - ) - ); - $wp_customize->add_setting( - 'meta_singles', - array( + ) + ); + $wp_customize->add_setting( + 'meta_singles', + array( 'sanitize_callback' => 'oblique_sanitize_checkbox', - 'default' => 0, - ) - ); - $wp_customize->add_control( - 'meta_singles', - array( - 'type' => 'checkbox', - 'label' => __( 'Hide date/author/archives on single posts?', 'oblique' ), - 'section' => 'blog_options', + 'default' => 0, + ) + ); + $wp_customize->add_control( + 'meta_singles', + array( + 'type' => 'checkbox', + 'label' => __( 'Hide date/author/archives on single posts?', 'oblique' ), + 'section' => 'blog_options', 'priority' => 12, - ) - ); - $wp_customize->add_setting( - 'read_more', - array( + ) + ); + $wp_customize->add_setting( + 'read_more', + array( 'sanitize_callback' => 'oblique_sanitize_checkbox', - 'default' => 0, - ) - ); - $wp_customize->add_control( - 'read_more', - array( - 'type' => 'checkbox', - 'label' => __( 'Hide the read more button?', 'oblique' ), - 'section' => 'blog_options', + 'default' => 0, + ) + ); + $wp_customize->add_control( + 'read_more', + array( + 'type' => 'checkbox', + 'label' => __( 'Hide the read more button?', 'oblique' ), + 'section' => 'blog_options', 'priority' => 13, - ) - ); - // Index images - $wp_customize->add_setting( - 'index_feat_image', - array( + ) + ); + // Index images + $wp_customize->add_setting( + 'index_feat_image', + array( 'sanitize_callback' => 'oblique_sanitize_checkbox', - ) - ); - $wp_customize->add_control( - 'index_feat_image', - array( - 'type' => 'checkbox', - 'label' => __( 'Hide featured images on index, archives?', 'oblique' ), - 'section' => 'blog_options', + ) + ); + $wp_customize->add_control( + 'index_feat_image', + array( + 'type' => 'checkbox', + 'label' => __( 'Hide featured images on index, archives?', 'oblique' ), + 'section' => 'blog_options', 'priority' => 15, - ) - ); - // Post images - $wp_customize->add_setting( - 'post_feat_image', - array( + ) + ); + // Post images + $wp_customize->add_setting( + 'post_feat_image', + array( 'sanitize_callback' => 'oblique_sanitize_checkbox', - ) - ); - $wp_customize->add_control( - 'post_feat_image', - array( - 'type' => 'checkbox', - 'label' => __( 'Hide featured images on single posts?', 'oblique' ), - 'section' => 'blog_options', + ) + ); + $wp_customize->add_control( + 'post_feat_image', + array( + 'type' => 'checkbox', + 'label' => __( 'Hide featured images on single posts?', 'oblique' ), + 'section' => 'blog_options', 'priority' => 16, - ) - ); + ) + ); - // ___Fonts___// - $wp_customize->add_section( - 'oblique_fonts', - array( - 'title' => __( 'Fonts', 'oblique' ), - 'priority' => 15, + // ___Fonts___// + $wp_customize->add_section( + 'oblique_fonts', + array( + 'title' => __( 'Fonts', 'oblique' ), + 'priority' => 15, 'description' => __( 'You can use any Google Fonts you want for the heading and/or body. See the fonts here: google.com/fonts. See the documentation if you need help with this: docs.themeisle.com/article/294-oblique-documentation', 'oblique' ), - ) - ); - // Body fonts title - $wp_customize->add_setting('oblique_options[titles]', array( - 'type' => 'titles_control', - 'capability' => 'edit_theme_options', + ) + ); + // Body fonts title + $wp_customize->add_setting( 'oblique_options[titles]', array( + 'type' => 'titles_control', + 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr', - ) - ); - $wp_customize->add_control( new Oblique_Titles( $wp_customize, 'body_fonts', array( - 'label' => __( 'Body fonts', 'oblique' ), - 'section' => 'oblique_fonts', - 'settings' => 'oblique_options[titles]', - 'priority' => 10, - ) ) ); - // Body fonts - $wp_customize->add_setting( - 'body_font_name', - array( - 'default' => 'Open+Sans:400italic,600italic,400,600', + ) + ); + $wp_customize->add_control( new Oblique_Titles( $wp_customize, 'body_fonts', array( + 'label' => __( 'Body fonts', 'oblique' ), + 'section' => 'oblique_fonts', + 'settings' => 'oblique_options[titles]', + 'priority' => 10, + ) ) ); + // Body fonts + $wp_customize->add_setting( + 'body_font_name', + array( + 'default' => 'Open+Sans:400italic,600italic,400,600', 'sanitize_callback' => 'oblique_sanitize_text', - ) - ); - $wp_customize->add_control( - 'body_font_name', - array( - 'label' => __( 'Font name/style/sets', 'oblique' ), - 'section' => 'oblique_fonts', - 'type' => 'text', + ) + ); + $wp_customize->add_control( + 'body_font_name', + array( + 'label' => __( 'Font name/style/sets', 'oblique' ), + 'section' => 'oblique_fonts', + 'type' => 'text', 'priority' => 11, - ) - ); - // Body fonts family - $wp_customize->add_setting( - 'body_font_family', - array( - 'default' => '\'Open Sans\', sans-serif', + ) + ); + // Body fonts family + $wp_customize->add_setting( + 'body_font_family', + array( + 'default' => '\'Open Sans\', sans-serif', 'sanitize_callback' => 'oblique_sanitize_text', - ) - ); - $wp_customize->add_control( - 'body_font_family', - array( - 'label' => __( 'Font family', 'oblique' ), - 'section' => 'oblique_fonts', - 'type' => 'text', + ) + ); + $wp_customize->add_control( + 'body_font_family', + array( + 'label' => __( 'Font family', 'oblique' ), + 'section' => 'oblique_fonts', + 'type' => 'text', 'priority' => 12, - ) - ); - // Headings fonts title - $wp_customize->add_setting('oblique_options[titles]', array( - 'type' => 'titles_control', - 'capability' => 'edit_theme_options', + ) + ); + // Headings fonts title + $wp_customize->add_setting( 'oblique_options[titles]', array( + 'type' => 'titles_control', + 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr', - ) - ); - $wp_customize->add_control( new Oblique_Titles( $wp_customize, 'headings_fonts', array( - 'label' => __( 'Headings fonts', 'oblique' ), - 'section' => 'oblique_fonts', - 'settings' => 'oblique_options[titles]', - 'priority' => 13, - ) ) ); - // Headings fonts - $wp_customize->add_setting( - 'headings_font_name', - array( - 'default' => 'Playfair+Display:400,700,400italic,700italic', + ) + ); + $wp_customize->add_control( new Oblique_Titles( $wp_customize, 'headings_fonts', array( + 'label' => __( 'Headings fonts', 'oblique' ), + 'section' => 'oblique_fonts', + 'settings' => 'oblique_options[titles]', + 'priority' => 13, + ) ) ); + // Headings fonts + $wp_customize->add_setting( + 'headings_font_name', + array( + 'default' => 'Playfair+Display:400,700,400italic,700italic', 'sanitize_callback' => 'oblique_sanitize_text', - ) - ); - $wp_customize->add_control( - 'headings_font_name', - array( - 'label' => __( 'Font name/style/sets', 'oblique' ), - 'section' => 'oblique_fonts', - 'type' => 'text', + ) + ); + $wp_customize->add_control( + 'headings_font_name', + array( + 'label' => __( 'Font name/style/sets', 'oblique' ), + 'section' => 'oblique_fonts', + 'type' => 'text', 'priority' => 14, - ) - ); - // Headings fonts family - $wp_customize->add_setting( - 'headings_font_family', - array( - 'default' => '\'Playfair Display\', serif', + ) + ); + // Headings fonts family + $wp_customize->add_setting( + 'headings_font_family', + array( + 'default' => '\'Playfair Display\', serif', 'sanitize_callback' => 'oblique_sanitize_text', - ) - ); - $wp_customize->add_control( - 'headings_font_family', - array( - 'label' => __( 'Font family', 'oblique' ), - 'section' => 'oblique_fonts', - 'type' => 'text', + ) + ); + $wp_customize->add_control( + 'headings_font_family', + array( + 'label' => __( 'Font family', 'oblique' ), + 'section' => 'oblique_fonts', + 'type' => 'text', 'priority' => 15, - ) - ); - // Font sizes title - $wp_customize->add_setting('oblique_options[titles]', array( - 'type' => 'titles_control', - 'capability' => 'edit_theme_options', + ) + ); + // Font sizes title + $wp_customize->add_setting( 'oblique_options[titles]', array( + 'type' => 'titles_control', + 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr', - ) - ); - $wp_customize->add_control( new Oblique_Titles( $wp_customize, 'font_sizes_title', array( - 'label' => __( 'Font sizes', 'oblique' ), - 'section' => 'oblique_fonts', - 'settings' => 'oblique_options[titles]', - 'priority' => 16, - ) ) ); - // Site title - $wp_customize->add_setting( - 'site_title_size', - array( + ) + ); + $wp_customize->add_control( new Oblique_Titles( $wp_customize, 'font_sizes_title', array( + 'label' => __( 'Font sizes', 'oblique' ), + 'section' => 'oblique_fonts', + 'settings' => 'oblique_options[titles]', + 'priority' => 16, + ) ) ); + // Site title + $wp_customize->add_setting( + 'site_title_size', + array( 'sanitize_callback' => 'absint', 'default' => '82', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'site_title_size', array( - 'type' => 'number', - 'priority' => 17, - 'section' => 'oblique_fonts', - 'label' => __( 'Site title', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 90, - 'step' => 1, - ), - ) ); - // Site description - $wp_customize->add_setting( - 'site_desc_size', - array( + ) + ); + $wp_customize->add_control( 'site_title_size', array( + 'type' => 'number', + 'priority' => 17, + 'section' => 'oblique_fonts', + 'label' => __( 'Site title', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 90, + 'step' => 1, + ), + ) ); + // Site description + $wp_customize->add_setting( + 'site_desc_size', + array( 'sanitize_callback' => 'absint', 'default' => '18', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'site_desc_size', array( - 'type' => 'number', - 'priority' => 17, - 'section' => 'oblique_fonts', - 'label' => __( 'Site description', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 50, - 'step' => 1, - ), - ) ); - // H1 size - $wp_customize->add_setting( - 'h1_size', - array( + ) + ); + $wp_customize->add_control( 'site_desc_size', array( + 'type' => 'number', + 'priority' => 17, + 'section' => 'oblique_fonts', + 'label' => __( 'Site description', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 50, + 'step' => 1, + ), + ) ); + // H1 size + $wp_customize->add_setting( + 'h1_size', + array( 'sanitize_callback' => 'absint', 'default' => '36', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'h1_size', array( - 'type' => 'number', - 'priority' => 17, - 'section' => 'oblique_fonts', - 'label' => __( 'H1 font size', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 60, - 'step' => 1, - ), - ) ); - // H2 size - $wp_customize->add_setting( - 'h2_size', - array( + ) + ); + $wp_customize->add_control( 'h1_size', array( + 'type' => 'number', + 'priority' => 17, + 'section' => 'oblique_fonts', + 'label' => __( 'H1 font size', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 60, + 'step' => 1, + ), + ) ); + // H2 size + $wp_customize->add_setting( + 'h2_size', + array( 'sanitize_callback' => 'absint', 'default' => '30', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'h2_size', array( - 'type' => 'number', - 'priority' => 18, - 'section' => 'oblique_fonts', - 'label' => __( 'H2 font size', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 60, - 'step' => 1, - ), - ) ); - // H3 size - $wp_customize->add_setting( - 'h3_size', - array( + ) + ); + $wp_customize->add_control( 'h2_size', array( + 'type' => 'number', + 'priority' => 18, + 'section' => 'oblique_fonts', + 'label' => __( 'H2 font size', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 60, + 'step' => 1, + ), + ) ); + // H3 size + $wp_customize->add_setting( + 'h3_size', + array( 'sanitize_callback' => 'absint', 'default' => '24', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'h3_size', array( - 'type' => 'number', - 'priority' => 19, - 'section' => 'oblique_fonts', - 'label' => __( 'H3 font size', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 60, - 'step' => 1, - ), - ) ); - // H4 size - $wp_customize->add_setting( - 'h4_size', - array( + ) + ); + $wp_customize->add_control( 'h3_size', array( + 'type' => 'number', + 'priority' => 19, + 'section' => 'oblique_fonts', + 'label' => __( 'H3 font size', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 60, + 'step' => 1, + ), + ) ); + // H4 size + $wp_customize->add_setting( + 'h4_size', + array( 'sanitize_callback' => 'absint', 'default' => '18', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'h4_size', array( - 'type' => 'number', - 'priority' => 20, - 'section' => 'oblique_fonts', - 'label' => __( 'H4 font size', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 60, - 'step' => 1, - ), - ) ); - // H5 size - $wp_customize->add_setting( - 'h5_size', - array( + ) + ); + $wp_customize->add_control( 'h4_size', array( + 'type' => 'number', + 'priority' => 20, + 'section' => 'oblique_fonts', + 'label' => __( 'H4 font size', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 60, + 'step' => 1, + ), + ) ); + // H5 size + $wp_customize->add_setting( + 'h5_size', + array( 'sanitize_callback' => 'absint', 'default' => '14', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'h5_size', array( - 'type' => 'number', - 'priority' => 21, - 'section' => 'oblique_fonts', - 'label' => __( 'H5 font size', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 60, - 'step' => 1, - ), - ) ); - // H6 size - $wp_customize->add_setting( - 'h6_size', - array( + ) + ); + $wp_customize->add_control( 'h5_size', array( + 'type' => 'number', + 'priority' => 21, + 'section' => 'oblique_fonts', + 'label' => __( 'H5 font size', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 60, + 'step' => 1, + ), + ) ); + // H6 size + $wp_customize->add_setting( + 'h6_size', + array( 'sanitize_callback' => 'absint', 'default' => '12', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'h6_size', array( - 'type' => 'number', - 'priority' => 22, - 'section' => 'oblique_fonts', - 'label' => __( 'H6 font size', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 60, - 'step' => 1, - ), - ) ); - // Body - $wp_customize->add_setting( - 'body_size', - array( + ) + ); + $wp_customize->add_control( 'h6_size', array( + 'type' => 'number', + 'priority' => 22, + 'section' => 'oblique_fonts', + 'label' => __( 'H6 font size', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 60, + 'step' => 1, + ), + ) ); + // Body + $wp_customize->add_setting( + 'body_size', + array( 'sanitize_callback' => 'absint', 'default' => '16', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( 'body_size', array( - 'type' => 'number', - 'priority' => 23, - 'section' => 'oblique_fonts', - 'label' => __( 'Body font size', 'oblique' ), - 'input_attrs' => array( - 'min' => 10, - 'max' => 24, - 'step' => 1, - ), - ) ); + ) + ); + $wp_customize->add_control( 'body_size', array( + 'type' => 'number', + 'priority' => 23, + 'section' => 'oblique_fonts', + 'label' => __( 'Body font size', 'oblique' ), + 'input_attrs' => array( + 'min' => 10, + 'max' => 24, + 'step' => 1, + ), + ) ); - // ___Colors___// - // Primary color - $wp_customize->add_setting( - 'primary_color', - array( + // ___Colors___// + // Primary color + $wp_customize->add_setting( + 'primary_color', + array( 'default' => '#23B6B6', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'primary_color', - array( - 'label' => __( 'Primary color', 'oblique' ), - 'section' => 'colors', - 'settings' => 'primary_color', - 'priority' => 12, - ) - ) - ); - // Site title - $wp_customize->add_setting( - 'site_title_color', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'primary_color', array( + 'label' => __( 'Primary color', 'oblique' ), + 'section' => 'colors', + 'settings' => 'primary_color', + 'priority' => 12, + ) + ) + ); + // Site title + $wp_customize->add_setting( + 'site_title_color', + array( 'default' => '#f9f9f9', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'site_title_color', - array( - 'label' => __( 'Site title', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'site_title_color', + array( + 'label' => __( 'Site title', 'oblique' ), + 'section' => 'colors', 'settings' => 'site_title_color', 'priority' => 13, - ) ) - ); - // Site desc - $wp_customize->add_setting( - 'site_desc_color', - array( + ) + ); + // Site desc + $wp_customize->add_setting( + 'site_desc_color', + array( 'default' => '#dddddd', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'site_desc_color', - array( - 'label' => __( 'Site description', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'site_desc_color', + array( + 'label' => __( 'Site description', 'oblique' ), + 'section' => 'colors', 'priority' => 14, - ) ) - ); - // Body - $wp_customize->add_setting( - 'body_text_color', - array( + ) + ); + // Body + $wp_customize->add_setting( + 'body_text_color', + array( 'default' => '#50545C', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'body_text_color', - array( - 'label' => __( 'Body text', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'body_text_color', + array( + 'label' => __( 'Body text', 'oblique' ), + 'section' => 'colors', 'settings' => 'body_text_color', 'priority' => 15, - ) ) - ); - // Entry titles - $wp_customize->add_setting( - 'entry_titles', - array( + ) + ); + // Entry titles + $wp_customize->add_setting( + 'entry_titles', + array( 'default' => '#000', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'entry_titles', - array( - 'label' => __( 'Entry titles', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'entry_titles', + array( + 'label' => __( 'Entry titles', 'oblique' ), + 'section' => 'colors', 'priority' => 16, - ) ) - ); - // Entry meta - $wp_customize->add_setting( - 'entry_meta', - array( + ) + ); + // Entry meta + $wp_customize->add_setting( + 'entry_meta', + array( 'default' => '#9d9d9d', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'entry_meta', - array( - 'label' => __( 'Entry meta', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'entry_meta', + array( + 'label' => __( 'Entry meta', 'oblique' ), + 'section' => 'colors', 'priority' => 17, - ) ) - ); - // Sidebar - $wp_customize->add_setting( - 'sidebar_bg', - array( + ) + ); + // Sidebar + $wp_customize->add_setting( + 'sidebar_bg', + array( 'default' => '#17191B', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'sidebar_bg', - array( - 'label' => __( 'Sidebar background', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'sidebar_bg', + array( + 'label' => __( 'Sidebar background', 'oblique' ), + 'section' => 'colors', 'priority' => 18, - ) ) - ); - // Sidebar color - $wp_customize->add_setting( - 'sidebar_color', - array( + ) + ); + // Sidebar color + $wp_customize->add_setting( + 'sidebar_color', + array( 'default' => '#f9f9f9', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'sidebar_color', - array( - 'label' => __( 'Sidebar color', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'sidebar_color', + array( + 'label' => __( 'Sidebar color', 'oblique' ), + 'section' => 'colors', 'priority' => 19, - ) ) - ); - // Footer - $wp_customize->add_setting( - 'footer_background', - array( + ) + ); + // Footer + $wp_customize->add_setting( + 'footer_background', + array( 'default' => '#17191B', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'footer_background', - array( - 'label' => __( 'Footer', 'oblique' ), - 'section' => 'colors', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'footer_background', + array( + 'label' => __( 'Footer', 'oblique' ), + 'section' => 'colors', 'priority' => 20, - ) ) - ); + ) + ); - // Social icons - $wp_customize->add_setting( - 'social_color', - array( + // Social icons + $wp_customize->add_setting( + 'social_color', + array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'social_color', + array( + 'label' => __( 'Social color', 'oblique' ), + 'section' => 'colors', + 'settings' => 'social_color', + 'priority' => 21, ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'social_color', - array( - 'label' => __( 'Social color', 'oblique' ), - 'section' => 'colors', - 'settings' => 'social_color', - 'priority' => 21, - ) - ) - ); + ) + ); - // Menu icon - $wp_customize->add_setting( - 'menu_icon_color', - array( + // Menu icon + $wp_customize->add_setting( + 'menu_icon_color', + array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', - ) - ); - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'menu_icon_color', - array( - 'label' => 'Menu icon/Leave a review color', - 'section' => 'colors', - 'settings' => 'menu_icon_color', - 'priority' => 21, - ) - ) - ); - - // ___Social___// - $wp_customize->add_section( - 'oblique_social', + ) + ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'menu_icon_color', array( - 'title' => __( 'Social', 'oblique' ), - 'priority' => 21, - 'description' => __( 'To create a social profile like in the theme demo, do this:
    1. Go to Appearance > Menus;
    2. Create a new menu and add links to your social networks by using the Custom Links tab;
    3. Assign that newly created menu to the Social position.
    ', 'oblique' ), + 'label' => 'Menu icon/Leave a review color', + 'section' => 'colors', + 'settings' => 'menu_icon_color', + 'priority' => 21, ) - ); - $wp_customize->add_setting('oblique_theme_social', array( + ) + ); + + // ___Social___// + $wp_customize->add_section( + 'oblique_social', + array( + 'title' => __( 'Social', 'oblique' ), + 'priority' => 21, + 'description' => __( 'To create a social profile like in the theme demo, do this:
    1. Go to Appearance > Menus;
    2. Create a new menu and add links to your social networks by using the Custom Links tab;
    3. Assign that newly created menu to the Social position.
    ', 'oblique' ), + ) + ); + $wp_customize->add_setting( 'oblique_theme_social', array( 'type' => 'info_control', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr', - ) - ); - $wp_customize->add_control( new Oblique_Theme_Info( $wp_customize, 'social', array( - 'section' => 'oblique_social', - 'settings' => 'oblique_theme_social', - 'priority' => 10, - ) ) ); + ) + ); + $wp_customize->add_control( new Oblique_Theme_Info( $wp_customize, 'social', array( + 'section' => 'oblique_social', + 'settings' => 'oblique_theme_social', + 'priority' => 10, + ) ) ); } + add_action( 'customize_register', 'oblique_customize_register' ); /** @@ -936,15 +955,16 @@ function oblique_sanitize_text( $input ) { */ function oblique_sanitize_logo_style( $input ) { $valid = array( - 'hide-title' => __( 'Only logo', 'oblique' ), - 'show-title' => __( 'Logo plus site title&description', 'oblique' ), - ); + 'hide-title' => __( 'Only logo', 'oblique' ), + 'show-title' => __( 'Logo plus site title&description', 'oblique' ), + ); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return ''; } } + /** * Checkboxes */ @@ -955,10 +975,12 @@ function oblique_sanitize_checkbox( $input ) { return ''; } } + /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function oblique_customize_preview_js() { wp_enqueue_script( 'oblique_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } + add_action( 'customize_preview_init', 'oblique_customize_preview_js' ); diff --git a/languages/oblique.pot b/languages/oblique.pot index 96a6d6c..0729518 100644 --- a/languages/oblique.pot +++ b/languages/oblique.pot @@ -1,14 +1,14 @@ -# Copyright (C) 2016 Themeisle +# Copyright (C) 2017 Themeisle # This file is distributed under the GNU General Public License v2 or later. msgid "" msgstr "" "Project-Id-Version: Oblique 2.0.2\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/oblique/issues\n" -"POT-Creation-Date: 2016-12-19 09:45:34+00:00\n" +"POT-Creation-Date: 2017-02-15 13:09:30+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n" "Last-Translator: Themeisle Translate Team \n" "Language-Team: Themeisle Translate \n" "X-Generator: grunt-wp-i18n 0.5.4\n" @@ -84,7 +84,7 @@ msgstr "" msgid "Primary Menu" msgstr "" -#: functions.php:55 inc/customizer.php:907 +#: functions.php:55 inc/customizer.php:965 msgid "Social" msgstr "" @@ -219,242 +219,255 @@ msgstr "" msgid "Skip to content" msgstr "" -#: inc/class/class-oblique-info.php:48 -msgid "View Documentation" +#. Theme Name of the plugin/theme +msgid "Oblique" msgstr "" -#: inc/class/class-oblique-info.php:52 -msgid "Demo" +#: inc/class/class-customizer-theme-info-control/class-customizer-theme-info-root.php:80 +msgid "Documentation" msgstr "" -#: inc/class/class-oblique-info.php:56 -msgid "Free VS Pro" +#: inc/customizer.php:79 inc/customizer.php:101 inc/customizer.php:121 +#: inc/customizer.php:141 inc/customizer.php:161 +msgid "View PRO version" msgstr "" -#: inc/class/class-oblique-info.php:60 inc/class/class-oblique-notice.php:30 -#: inc/customizer-info/class/class-singleton-customizer-info-section.php:80 -#: inc/customizer-info/class/class-singleton-customizer-info-section.php:86 -msgid "View PRO version" +#: inc/customizer.php:92 +msgid "Jetpack Related Posts" msgstr "" -#: inc/class/class-oblique-info.php:64 -msgid "Leave a review" +#: inc/customizer.php:93 inc/customizer.php:155 +msgid "Slider" msgstr "" -#: inc/class/class-oblique-notice.php:29 -msgid "Get full color schemes support for your site." +#: inc/customizer.php:94 +msgid "Extra Widget Area" msgstr "" -#: inc/customizer-info/class/class-singleton-customizer-info-section.php:80 -msgid "" -"It adds an extra widget area and the ability to easily add a slider on " -"frontpage." +#: inc/customizer.php:95 inc/customizer.php:135 +msgid "Alternative Layout" +msgstr "" + +#: inc/customizer.php:96 inc/customizer.php:115 +msgid "Extra Colors" +msgstr "" + +#: inc/customizer.php:97 +msgid "Footer Credits" msgstr "" -#: inc/customizer-info/class/class-singleton-customizer-info-section.php:88 -msgid "Get it" +#: inc/customizer.php:98 +msgid "Support" msgstr "" -#: inc/customizer.php:79 -msgid "Theme info" +#: inc/customizer.php:118 +msgid "Get full color schemes support for your site." msgstr "" -#: inc/customizer.php:110 +#: inc/customizer.php:138 +msgid "Choose between 2 styles to display your posts on the front page." +msgstr "" + +#: inc/customizer.php:158 +msgid "Add a shortcode for a slider to replace the header image." +msgstr "" + +#: inc/customizer.php:168 msgid "General" msgstr "" -#: inc/customizer.php:128 +#: inc/customizer.php:186 msgid "Toggle a search form in the header?" msgstr "" -#: inc/customizer.php:145 +#: inc/customizer.php:203 msgid "Menu toggle text" msgstr "" -#: inc/customizer.php:146 +#: inc/customizer.php:204 msgid "You can use this to replace the menu toggle button with some text" msgstr "" -#: inc/customizer.php:156 +#: inc/customizer.php:214 msgid "Header" msgstr "" -#: inc/customizer.php:173 +#: inc/customizer.php:231 msgid "Upload your logo" msgstr "" -#: inc/customizer.php:194 +#: inc/customizer.php:252 msgid "Logo size" msgstr "" -#: inc/customizer.php:195 +#: inc/customizer.php:253 msgid "Max-width for the logo. Default 200px" msgstr "" -#: inc/customizer.php:214 +#: inc/customizer.php:272 msgid "Logo style" msgstr "" -#: inc/customizer.php:215 +#: inc/customizer.php:273 msgid "This option applies only if you are using a logo" msgstr "" -#: inc/customizer.php:219 inc/customizer.php:939 +#: inc/customizer.php:277 inc/customizer.php:998 msgid "Only logo" msgstr "" -#: inc/customizer.php:220 inc/customizer.php:940 +#: inc/customizer.php:278 inc/customizer.php:999 msgid "Logo plus site title&description" msgstr "" -#: inc/customizer.php:237 +#: inc/customizer.php:295 msgid "Padding" msgstr "" -#: inc/customizer.php:238 +#: inc/customizer.php:296 msgid "Top&bottom padding for the branding. Default: 150px" msgstr "" -#: inc/customizer.php:258 +#: inc/customizer.php:316 msgid "Padding on screen sizes < 1024px" msgstr "" -#: inc/customizer.php:259 +#: inc/customizer.php:317 msgid "Top&bottom padding for the branding. Default: 100px" msgstr "" -#: inc/customizer.php:271 +#: inc/customizer.php:329 msgid "Blog options" msgstr "" -#: inc/customizer.php:287 +#: inc/customizer.php:345 msgid "Excerpt lenght" msgstr "" -#: inc/customizer.php:288 +#: inc/customizer.php:346 msgid "Choose your excerpt length. Default: 35 words" msgstr "" -#: inc/customizer.php:307 +#: inc/customizer.php:365 msgid "Hide date/author/archives on index?" msgstr "" -#: inc/customizer.php:323 +#: inc/customizer.php:381 msgid "Hide date/author/archives on single posts?" msgstr "" -#: inc/customizer.php:339 +#: inc/customizer.php:397 msgid "Hide the read more button?" msgstr "" -#: inc/customizer.php:355 +#: inc/customizer.php:413 msgid "Hide featured images on index, archives?" msgstr "" -#: inc/customizer.php:371 +#: inc/customizer.php:429 msgid "Hide featured images on single posts?" msgstr "" -#: inc/customizer.php:381 +#: inc/customizer.php:439 msgid "Fonts" msgstr "" -#: inc/customizer.php:383 +#: inc/customizer.php:441 msgid "" "You can use any Google Fonts you want for the heading and/or body. See the " "fonts here: google.com/fonts. See the documentation if you need help with " "this: docs.themeisle.com/article/294-oblique-documentation" msgstr "" -#: inc/customizer.php:394 +#: inc/customizer.php:452 msgid "Body fonts" msgstr "" -#: inc/customizer.php:410 inc/customizer.php:457 +#: inc/customizer.php:468 inc/customizer.php:515 msgid "Font name/style/sets" msgstr "" -#: inc/customizer.php:427 inc/customizer.php:474 +#: inc/customizer.php:485 inc/customizer.php:532 msgid "Font family" msgstr "" -#: inc/customizer.php:441 +#: inc/customizer.php:499 msgid "Headings fonts" msgstr "" -#: inc/customizer.php:488 +#: inc/customizer.php:546 msgid "Font sizes" msgstr "" -#: inc/customizer.php:506 inc/customizer.php:710 +#: inc/customizer.php:564 inc/customizer.php:768 msgid "Site title" msgstr "" -#: inc/customizer.php:526 inc/customizer.php:731 +#: inc/customizer.php:584 inc/customizer.php:789 msgid "Site description" msgstr "" -#: inc/customizer.php:546 +#: inc/customizer.php:604 msgid "H1 font size" msgstr "" -#: inc/customizer.php:566 +#: inc/customizer.php:624 msgid "H2 font size" msgstr "" -#: inc/customizer.php:586 +#: inc/customizer.php:644 msgid "H3 font size" msgstr "" -#: inc/customizer.php:606 +#: inc/customizer.php:664 msgid "H4 font size" msgstr "" -#: inc/customizer.php:626 +#: inc/customizer.php:684 msgid "H5 font size" msgstr "" -#: inc/customizer.php:646 +#: inc/customizer.php:704 msgid "H6 font size" msgstr "" -#: inc/customizer.php:666 +#: inc/customizer.php:724 msgid "Body font size" msgstr "" -#: inc/customizer.php:689 +#: inc/customizer.php:747 msgid "Primary color" msgstr "" -#: inc/customizer.php:751 +#: inc/customizer.php:809 msgid "Body text" msgstr "" -#: inc/customizer.php:772 +#: inc/customizer.php:830 msgid "Entry titles" msgstr "" -#: inc/customizer.php:792 +#: inc/customizer.php:850 msgid "Entry meta" msgstr "" -#: inc/customizer.php:812 +#: inc/customizer.php:870 msgid "Sidebar background" msgstr "" -#: inc/customizer.php:832 +#: inc/customizer.php:890 msgid "Sidebar color" msgstr "" -#: inc/customizer.php:852 +#: inc/customizer.php:910 msgid "Footer" msgstr "" -#: inc/customizer.php:873 +#: inc/customizer.php:931 msgid "Social color" msgstr "" -#: inc/customizer.php:909 +#: inc/customizer.php:967 msgid "" "To create a social profile like in the theme demo, do this:
    1. Go " "to Appearance > Menus;
    2. Create a new menu and add links to your " @@ -847,10 +860,6 @@ msgstr "" msgid "Installing Plugin %1$s (%2$d/%3$d)" msgstr "" -#. Theme Name of the plugin/theme -msgid "Oblique" -msgstr "" - #. Theme URI of the plugin/theme msgid "http://themeisle.com/themes/oblique" msgstr "" diff --git a/package.json b/package.json index ea5e0b6..439074d 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,6 @@ "devDependencies": { "grunt-theme-fleet": "codeinwp/grunt-theme-fleet", "load-project-config": "~0.2.0" - } + }, + "wraithSlug":["oblique"] } \ No newline at end of file diff --git a/style.css b/style.css index a8b4cc8..f3fda9b 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: http://themeisle.com/themes/oblique Author: Themeisle Author URI: http://themeisle.com/ Description: Oblique is a creative masonry theme that works great for fashion or general bloggers. Amongst the features you will find a a parallax header image, full color control with unlimited color variations, easy access to all Google Fonts, responsive design etc. -Version: 2.0.2 +Version: 2.0.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: oblique