, , , , , , , , , ', 'brevitas' ), ) ) ); } add_action( 'customize_register', 'brevitas_customize_register' ); /** * Sanitize checkbox options */ function brevitas_sanitize_checkbox( $input ) { if ( $input == 1 ) : return 1; else : return 0; endif; } /** * Sanitize text input */ function brevitas_sanitize_text( $input ) { return strip_tags( stripslashes( $input ) ); } /** * Sanitize text input to allow anchors */ function brevitas_sanitize_link_text( $input ) { return strip_tags( stripslashes( $input ), '' ); } /** * Sanitize textarea */ function brevitas_sanitize_textarea( $input ) { $allowed = array( 's' => array(), 'br' => array(), 'em' => array(), 'i' => array(), 'strong' => array(), 'b' => array(), 'a' => array( 'href' => array(), 'title' => array(), 'class' => array(), 'id' => array(), 'style' => array(), ), 'form' => array( 'id' => array(), 'class' => array(), 'action' => array(), 'method' => array(), 'autocomplete' => array(), 'style' => array(), ), 'input' => array( 'type' => array(), 'name' => array(), 'class' => array(), 'id' => array(), 'value' => array(), 'placeholder' => array(), 'tabindex' => array(), 'style' => array(), ), 'img' => array( 'src' => array(), 'alt' => array(), 'class' => array(), 'id' => array(), 'style' => array(), 'height' => array(), 'width' => array(), ), 'span' => array( 'class' => array(), 'id' => array(), 'style' => array(), ), 'p' => array( 'class' => array(), 'id' => array(), 'style' => array(), ), 'div' => array( 'class' => array(), 'id' => array(), 'style' => array(), ), 'blockquote' => array( 'cite' => array(), 'class' => array(), 'id' => array(), 'style' => array(), ), ); return wp_kses( $input, $allowed ); } /** * sanitize hex colors */ function brevitas_sanitize_hex_color( $color ) { if ( '' === $color ) : return ''; endif; // 3 or 6 hex digits, or the empty string. if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) : return $color; endif; return null; } /** * Add Customizer theme styles to */ function brevitas_customizer_head_styles() { $bg_color = get_option( 'brevitas_background_color' ); $design_color = get_option( 'brevitas_design_color' ); $design_color_text = get_option( 'brevitas_design_color_text' ); ?> only on Customizer page */ function brevitas_customizer_styles() { ?>
, , , , , , , , ', 'brevitas' ), ) ) ); } add_action( 'customize_register', 'brevitas_customize_register' ); /** * Sanitize checkbox options */ function brevitas_sanitize_checkbox( $input ) { if ( $input == 1 ) : return 1; else : return 0; endif; } /** * Sanitize text input */ function brevitas_sanitize_text( $input ) { return strip_tags( stripslashes( $input ) ); } /** * Sanitize text input to allow anchors */ function brevitas_sanitize_link_text( $input ) { return strip_tags( stripslashes( $input ), '' ); } /** * Sanitize textarea */ function brevitas_sanitize_textarea( $input ) { $allowed = array( 's' => array(), 'br' => array(), 'em' => array(), 'i' => array(), 'strong' => array(), 'b' => array(), 'a' => array( 'href' => array(), 'title' => array(), 'class' => array(), 'id' => array(), 'style' => array(), ), 'form' => array( 'id' => array(), 'class' => array(), 'action' => array(), 'method' => array(), 'autocomplete' => array(), 'style' => array(), ), 'input' => array( 'type' => array(), 'name' => array(), 'class' => array(), 'id' => array(), 'value' => array(), 'placeholder' => array(), 'tabindex' => array(), 'style' => array(), ), 'img' => array( 'src' => array(), 'alt' => array(), 'class' => array(), 'id' => array(), 'style' => array(), 'height' => array(), 'width' => array(), ), 'span' => array( 'class' => array(), 'id' => array(), 'style' => array(), ), 'p' => array( 'class' => array(), 'id' => array(), 'style' => array(), ), 'div' => array( 'class' => array(), 'id' => array(), 'style' => array(), ), 'blockquote' => array( 'cite' => array(), 'class' => array(), 'id' => array(), 'style' => array(), ), ); return wp_kses( $input, $allowed ); } /** * sanitize hex colors */ function brevitas_sanitize_hex_color( $color ) { if ( '' === $color ) : return ''; endif; // 3 or 6 hex digits, or the empty string. if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) : return $color; endif; return null; } /** * Add Customizer theme styles to */ function brevitas_customizer_head_styles() { $bg_color = get_option( 'brevitas_background_color' ); $design_color = get_option( 'brevitas_design_color' ); $design_color_text = get_option( 'brevitas_design_color_text' ); ?> only on Customizer page */ function brevitas_customizer_styles() { ?>