<?php

if( ! function_exists( 'jenny_layout_option_sanitize' ) ) :
function jenny_layout_option_sanitize( $value ) {

	if( ! in_array( $value, array( 'right-sidebar', 'left-sidebar', 'no-sidebar' ) ) ) {
		$layout = 'right-sidebar';
	}

	return $value;
}
endif;

if( ! function_exists( 'jenny_layout_color_sanitize' ) ) :
function jenny_layout_color_sanitize( $value ) {

	if( ! in_array( $value, array( 'default', 'red', 'grey' ) ) ) {
		$layout = 'default';
	}

	return $value;
}
endif;

if( ! function_exists( 'jenny_checkbox_sanitize' ) ) :
function jenny_checkbox_sanitize( $value ) {

	if( ! in_array( $value, array( 0, 1 ) ) ) {
		$value = 1;
	}

	return $value;
}
endif;