0 ? $input['show_posts'] : 0 ); // check number for slide show Speed if ( ! is_numeric( $input['slide_slideshowSpeed'] ) ) $input['slide_slideshowSpeed'] = 7000; $output['slide_slideshowSpeed'] = ( $input['slide_slideshowSpeed'] > 0 ? $input['slide_slideshowSpeed'] : 7000 ); // check text for input social foreach ( orbit_get_social_theme_options() as $social => $social_text) { if ( isset( $input[$social] ) ) $output[$social] = wp_kses_data( $input[$social] ); } $resetDefault = ( ! empty( $input['orbit_defaults']) ? true : false ); if ($resetDefault) $output=$defaults; return $output; } /** * Sanitize and validate color_scheme in Customize page * * @since Orbit 1.2.0 */ function orbit_sanitize_color_scheme( $input ) { $valid = orbit_color_scheme(); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return orbit_get_default_theme_options( 'color_scheme' ); } } /** * Sanitize and validate theme_layout in Customize page * * @since Orbit 1.2.0 */ function orbit_sanitize_theme_layout( $input ) { $valid = orbit_layouts(); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return orbit_get_default_theme_options( 'theme_layout' ); } } /** * Sanitize pagination values * * @since Orbit 1.2.0 */ function orbit_sanitize_pagination( $input ) { $valid = orbit_pagination(); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return orbit_get_default_theme_options( 'pagination' ); } } /** * Sanitize orbit_font_title values * * @since Orbit 1.2.0 */ function orbit_sanitize_font_title( $input ) { $valid = orbit_font_all(); if ( in_array( $input, $valid ) ) { return $input; } else { return orbit_get_default_theme_options( 'orbit_font_title' ); } } /** * Sanitize orbit_font_base values * * @since Orbit 1.2.0 */ function orbit_sanitize_font_base( $input ) { $valid = orbit_font_all(); if ( in_array( $input, $valid ) ) { return $input; } else { return orbit_get_default_theme_options( 'orbit_font_base' ); } } /** * Sanitize integers * * @since Orbit 1.2.0 */ function orbit_sanitize_integer( $input ) { return absint( $input ); } /** * Sanitize checkbox values * * @since Orbit 1.2.0 */ function orbit_sanitize_checkbox( $input ) { if ( $input ) { $output = '1'; } else { $output = false; } return $output; } /** * Sanitize slug pages values * * @since Orbit 1.2.0 */ function orbit_sanitize_text( $input ) { return wp_kses_stripslashes( $input ); } /** * Sanitize colors * * @since Orbit 1.2.0 */ function orbit_sanitize_hex_color( $color ) { if ( '' === $color ) return ''; // 3 or 6 hex digits, or the empty string. if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) return $color; return ''; }