Skip to content

Commit

Permalink
2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
webmandesign committed Sep 30, 2018
1 parent a5e5aef commit 944a32e
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 59 deletions.
11 changes: 11 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Modern Changelog

## 2.2.2

* **Fix**: Theme options sanitization

### Files changed:

changelog.md
style.css
includes/customize/class-customize.php


## 2.2.1

* **Fix**: Blog page excerpt display
Expand Down
116 changes: 58 additions & 58 deletions includes/customize/class-customize.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 2.0.0
* @version 2.2.0
* @version 2.2.2
*
* Contents:
*
Expand Down Expand Up @@ -252,7 +252,7 @@ public static function option_pointer_texts_intro( $title ) {
* Set theme options array
*
* @since 2.0.0
* @version 2.2.0
* @version 2.2.2
*
* @param array $options
*/
Expand Down Expand Up @@ -293,18 +293,18 @@ public static function options( $options = array() ) {
),

'0' . 10 . 'logo' . 20 => array(
'section' => 'title_tagline',
'priority' => 102,
'type' => 'text',
'id' => 'custom_logo_height',
'label' => esc_html__( 'Max logo image height (px)', 'modern' ),
'default' => 100,
'validate' => 'absint',
'input_attrs' => array(
'section' => 'title_tagline',
'priority' => 102,
'type' => 'text',
'id' => 'custom_logo_height',
'label' => esc_html__( 'Max logo image height (px)', 'modern' ),
'default' => 100,
'sanitize_callback' => 'absint',
'input_attrs' => array(
'size' => 5,
'maxwidth' => 3,
),
'preview_js' => array(
'preview_js' => array(
'custom' => "jQuery( '.custom-logo' ).css( 'max-height', to + 'px' );",
),
),
Expand Down Expand Up @@ -791,26 +791,26 @@ public static function options( $options = array() ) {
),

800 . 'texts' . 100 => array(
'type' => 'textarea',
'id' => 'texts_intro',
'label' => esc_html__( 'Default blog intro text', 'modern' ),
'description' => esc_html__( 'This text will be displayed in intro section of your website front page only if latest posts are displayed there.', 'modern' ),
'default' => esc_html__( 'Welcome to our site!', 'modern' ),
'validate' => 'wp_kses_post',
'preview_js' => array(
'type' => 'textarea',
'id' => 'texts_intro',
'label' => esc_html__( 'Default blog intro text', 'modern' ),
'description' => esc_html__( 'This text will be displayed in intro section of your website front page only if latest posts are displayed there.', 'modern' ),
'default' => esc_html__( 'Welcome to our site!', 'modern' ),
'sanitize_callback' => 'wp_kses_post',
'preview_js' => array(
'custom' => "jQuery( '.home.blog .intro-title' ).html( '<small class=\"option-pointer\"></small>' + to ); if ( '' === to ) { jQuery( '.home.blog .intro-title' ).hide(); } else { jQuery( '.home.blog .intro-title:hidden' ).show(); }",
),
'active_callback' => __CLASS__ . '::is_blog_front_page',
'active_callback' => __CLASS__ . '::is_blog_front_page',
),

800 . 'texts' . 500 => array(
'type' => 'textarea',
'id' => 'texts_site_info',
'label' => esc_html__( 'Footer credits (copyright)', 'modern' ),
'description' => sprintf( esc_html__( 'Set %s to disable this area.', 'modern' ), '<code>-</code>' ) . ' ' . esc_html__( 'Leaving the field empty will fall back to default theme setting.', 'modern' ) . ' ' . sprintf( esc_html__( 'You can use %s to display dynamic, always current year.', 'modern' ), '<code>[year]</code>' ),
'default' => '',
'validate' => 'wp_kses_post',
'preview_js' => array(
'type' => 'textarea',
'id' => 'texts_site_info',
'label' => esc_html__( 'Footer credits (copyright)', 'modern' ),
'description' => sprintf( esc_html__( 'Set %s to disable this area.', 'modern' ), '<code>-</code>' ) . ' ' . esc_html__( 'Leaving the field empty will fall back to default theme setting.', 'modern' ) . ' ' . sprintf( esc_html__( 'You can use %s to display dynamic, always current year.', 'modern' ), '<code>[year]</code>' ),
'default' => '',
'sanitize_callback' => 'wp_kses_post',
'preview_js' => array(
'custom' => "jQuery( '.site-info' ).html( to ); if ( '-' === to ) { jQuery( '.footer-area-site-info' ).hide(); } else { jQuery( '.footer-area-site-info:hidden' ).show(); }",
),
),
Expand All @@ -828,17 +828,17 @@ public static function options( $options = array() ) {
),

900 . 'typography' . 100 => array(
'type' => 'range',
'id' => 'typography_size_html',
'label' => esc_html__( 'Basic font size in px', 'modern' ),
'description' => esc_html__( 'All other font sizes are calculated automatically from this basic font size.', 'modern' ),
'default' => 16,
'min' => 12,
'max' => 24,
'step' => 1,
'suffix' => 'px',
'validate' => 'absint',
'preview_js' => array(
'type' => 'range',
'id' => 'typography_size_html',
'label' => esc_html__( 'Basic font size in px', 'modern' ),
'description' => esc_html__( 'All other font sizes are calculated automatically from this basic font size.', 'modern' ),
'default' => 16,
'min' => 12,
'max' => 24,
'step' => 1,
'suffix' => 'px',
'sanitize_callback' => 'absint',
'preview_js' => array(
'css' => array(

'html' => array(
Expand Down Expand Up @@ -875,39 +875,39 @@ public static function options( $options = array() ) {
),

900 . 'typography' . 220 => array(
'type' => 'text',
'id' => 'typography_fonts_text',
'label' => esc_html__( 'General text font', 'modern' ),
'default' => "'Fira Sans', sans-serif",
'input_attrs' => array(
'type' => 'text',
'id' => 'typography_fonts_text',
'label' => esc_html__( 'General text font', 'modern' ),
'default' => "'Fira Sans', sans-serif",
'input_attrs' => array(
'placeholder' => "'Fira Sans', sans-serif",
),
'active_callback' => __CLASS__ . '::is_typography_custom_fonts',
'validate' => 'Modern_Library_Sanitize::fonts',
'active_callback' => __CLASS__ . '::is_typography_custom_fonts',
'sanitize_callback' => 'Modern_Library_Sanitize::fonts',
),

900 . 'typography' . 230 => array(
'type' => 'text',
'id' => 'typography_fonts_headings',
'label' => esc_html__( 'Headings font', 'modern' ),
'default' => "'Fira Sans', sans-serif",
'input_attrs' => array(
'type' => 'text',
'id' => 'typography_fonts_headings',
'label' => esc_html__( 'Headings font', 'modern' ),
'default' => "'Fira Sans', sans-serif",
'input_attrs' => array(
'placeholder' => "'Fira Sans', sans-serif",
),
'active_callback' => __CLASS__ . '::is_typography_custom_fonts',
'validate' => 'Modern_Library_Sanitize::fonts',
'active_callback' => __CLASS__ . '::is_typography_custom_fonts',
'sanitize_callback' => 'Modern_Library_Sanitize::fonts',
),

900 . 'typography' . 240 => array(
'type' => 'text',
'id' => 'typography_fonts_logo',
'label' => esc_html__( 'Logo font', 'modern' ),
'default' => "'Fira Sans', sans-serif",
'input_attrs' => array(
'type' => 'text',
'id' => 'typography_fonts_logo',
'label' => esc_html__( 'Logo font', 'modern' ),
'default' => "'Fira Sans', sans-serif",
'input_attrs' => array(
'placeholder' => "'Fira Sans', sans-serif",
),
'active_callback' => __CLASS__ . '::is_typography_custom_fonts',
'validate' => 'Modern_Library_Sanitize::fonts',
'active_callback' => __CLASS__ . '::is_typography_custom_fonts',
'sanitize_callback' => 'Modern_Library_Sanitize::fonts',
),

900 . 'typography' . 290 => array(
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: Modern
Theme URI: https://www.webmandesign.eu/portfolio/modern-wordpress-theme/
Author: WebMan Design
Author URI: https://www.webmandesign.eu/
Version: 2.2.1
Version: 2.2.2
Text Domain: modern
Domain Path: /languages
License: GNU General Public License v3
Expand Down

0 comments on commit 944a32e

Please sign in to comment.