WordPress.org

Make WordPress Themes

Changes from f2/2.2.2 at r82994 to f2/2.2.3 at r82994


Ignore:
Location:
f2/2.2.3
Files:
41 edited

Legend:

Unmodified
Added
Removed
  • f2/2.2.3/changelog.txt

    r82994 r82994  
    11Change Log 
    22========== 
     3 
     42.2.3 (2015-05-01) 
     5------------------ 
     6 
     7* Proper sanitization of customizer settings 
     8 
    39 
    4102.2.2 (2015-04-30) 
     
    915* Dropped hgroup element in favour of div.site-branding 
    1016* Removed the title tag from header.php and added theme support for 'title-tag' 
    11 * Screenshot updated to 880x600px image 
     17* Screenshot updated to 880x660px image 
    1218* Added styles for .screen-reader-text 
    1319* Other minor changes, fixes and improvements 
  • f2/2.2.3/inc/theme-options/theme-options.php

    r82994 r82994  
    535535 
    536536/** 
     537 * Sanitize color scheme value 
     538 * 
     539 * @since F2 2.2.3 
     540 */ 
     541function f2_sanitize_color_scheme( $value ) { 
     542    if( array_key_exists( $value, f2_color_scheme_options() ) ) { 
     543        return $value; 
     544    } else { 
     545        return null; 
     546    } 
     547} 
     548 
     549 
     550/** 
     551 * Sanitize layout value 
     552 * 
     553 * @since F2 2.2.3 
     554 */ 
     555function f2_sanitize_layout( $value ) { 
     556    if( array_key_exists( $value, f2_layout_options() ) ) { 
     557        return $value; 
     558    } else { 
     559        return null; 
     560    } 
     561} 
     562 
     563 
     564/** 
     565 * Sanitize sidebar width value 
     566 * 
     567 * @since F2 2.2.3 
     568 */ 
     569function f2_sanitize_sidebar_width( $value ) { 
     570    if( array_key_exists( $value, f2_sidebar_width_options() ) ) { 
     571        return $value; 
     572    } else { 
     573        return null; 
     574    } 
     575} 
     576 
     577 
     578/** 
     579 * Sanitize font size value 
     580 * 
     581 * @since F2 2.2.3 
     582 */ 
     583function f2_sanitize_font_size( $value ) { 
     584    if( array_key_exists( $value, f2_font_size_options() ) ) { 
     585        return $value; 
     586    } else { 
     587        return null; 
     588    } 
     589} 
     590 
     591 
     592/** 
    537593 * Sanitize and validate form input. Accepts an array, return a sanitized array. 
    538594 * 
     
    549605 
    550606    // The color scheme value must be in our array of color scheme options 
    551     if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], f2_color_scheme_options() ) ) 
    552         $output['color_scheme'] = $input['color_scheme']; 
    553  
     607    if ( isset( $input['color_scheme'] ) ) { 
     608        $output['color_scheme'] = f2_sanitize_color_scheme( $input['color_scheme'] ); 
     609    } 
    554610 
    555611    // The site logo url must be safe text with no HTML tags 
    556612    if ( isset( $input['logo_image'] ) && ! empty( $input['logo_image'] ) ) 
    557         $output['logo_image'] = esc_url( $input['logo_image'] ); 
     613        $output['logo_image'] = esc_url_raw( $input['logo_image'] ); 
    558614 
    559615 
    560616    // The header image url must be safe text with no HTML tags 
    561617    if ( isset( $input['header_image'] ) && ! empty( $input['header_image'] ) ) 
    562         $output['header_image'] = esc_url( $input['header_image'] ); 
     618        $output['header_image'] = esc_url_raw( $input['header_image'] ); 
    563619 
    564620    // Checkboxes will only be present if checked. 
     
    567623 
    568624    // The layout value must be in our array of layout option values 
    569     if ( isset( $input['layout'] ) && array_key_exists( $input['layout'], f2_layout_options() ) ) 
    570         $output['layout'] = $input['layout']; 
     625    if ( isset( $input['layout'] ) ) 
     626        $output['layout'] = f2_sanitize_layout( $input['layout'] ); 
    571627 
    572628    // The sidebar width value must be in our array of sidebar width values 
    573     if ( isset( $input['sidebar_width'] ) && array_key_exists( $input['sidebar_width'], f2_sidebar_width_options() ) ) 
    574         $output['sidebar_width'] = $input['sidebar_width']; 
     629    if ( isset( $input['sidebar_width'] ) ) 
     630        $output['sidebar_width'] = f2_sanitize_sidebar_width( $input['sidebar_width'] ); 
    575631 
    576632 
    577633    // The sidebar_font_size value must be in our array of sidebar_font_size option values 
    578     if ( isset( $input['sidebar_font_size'] ) && array_key_exists( $input['sidebar_font_size'], f2_font_size_options() ) ) 
    579         $output['sidebar_font_size'] = $input['sidebar_font_size']; 
     634    if ( isset( $input['sidebar_font_size'] ) ) 
     635        $output['sidebar_font_size'] = f2_sanitize_font_size( $input['sidebar_font_size'] ); 
    580636 
    581637    // The sidebar_font_size value must be in our array of content_font_size option values 
    582     if ( isset( $input['content_font_size'] ) && array_key_exists( $input['content_font_size'], f2_font_size_options() ) ) 
    583         $output['content_font_size'] = $input['content_font_size']; 
     638    if ( isset( $input['content_font_size'] ) ) 
     639        $output['content_font_size'] = f2_sanitize_font_size( $input['content_font_size'] ); 
    584640 
    585641    // Checkboxes will only be present if checked. 
     
    663719        'capability'        => 'edit_theme_options', 
    664720        'transport'         => 'postMessage', 
    665         'sanitize_callback' => 'esc_attr', 
     721        'sanitize_callback' => 'f2_sanitize_color_scheme', 
    666722    ) ); 
    667723 
     
    716772        'type'           => 'option', 
    717773        'capability'     => 'edit_theme_options', 
    718         'sanitize_callback' => 'esc_attr', 
     774        'sanitize_callback' => 'f2_sanitize_layout', 
    719775    ) ); 
    720776 
     
    734790        'capability'     => 'edit_theme_options', 
    735791        'transport'      => 'postMessage', 
    736         'sanitize_callback' => 'esc_attr', 
     792        'sanitize_callback' => 'f2_sanitize_sidebar_width', 
    737793    ) ); 
    738794 
     
    754810        'capability'     => 'edit_theme_options', 
    755811        'transport'      => 'postMessage', 
    756         'sanitize_callback' => 'esc_attr', 
     812        'sanitize_callback' => 'f2_sanitize_font_size', 
    757813    ) ); 
    758814 
     
    773829        'capability'     => 'edit_theme_options', 
    774830        'transport'      => 'postMessage', 
    775         'sanitize_callback' => 'esc_attr', 
     831        'sanitize_callback' => 'f2_sanitize_font_size', 
    776832    ) ); 
    777833 
  • f2/2.2.3/scss/style.scss

    r82994 r82994  
    55Author URI: http://srinig.com/ 
    66Description: A clean looking responsive theme for WordPress. Widgetized sidebar, optional additional sidebar, four color schemes to choose from, and many other options. 
    7 Version: 2.2.2 
     7Version: 2.2.3 
    88License: GNU General Public License 
    99License URI: https://wordpress.org/about/gpl/ 
  • f2/2.2.3/style.css

    r82994 r82994  
    55Author URI: http://srinig.com/ 
    66Description: A clean looking responsive theme for WordPress. Widgetized sidebar, optional additional sidebar, four color schemes to choose from, and many other options. 
    7 Version: 2.2.2 
     7Version: 2.2.3 
    88License: GNU General Public License 
    99License URI: https://wordpress.org/about/gpl/ 
Note: See TracChangeset for help on using the changeset viewer.