default ); } /** * Sanitize Blog Cards Hover Animation * * @param string $choice Defines blog card hover animation. * * @return string */ function aino_sanitize_blogcards_animation( $choice ) { $valid = array( 'cardhover_zoom', 'cardhover_moveup', 'cardhover_none', ); if ( in_array( $choice, $valid, true ) ) { return $choice; } return 'cardhover_zoom'; } /** * Sanitize Border Radius * * @param string $choice Defines border radius. * * @return string */ function aino_sanitize_borderradius( $choice ) { $valid = array( 'border-radius-none', 'border-radius-xxs', 'border-radius-xs', 'border-radius-s', 'border-radius-m', 'border-radius-l', 'border-radius-xl', 'border-radius-xxl', 'border-radius-xxxl', 'border-radius-xxxxl', ); if ( in_array( $choice, $valid, true ) ) { return $choice; } return 'radius-none'; } /** * Sanitize Shadows * * @param string $choice Defines the shadow options. * * @return string */ function aino_sanitize_shadow( $choice ) { $valid = array( 'shadow-none', 'shadow-a', 'shadow-b', 'shadow-c', 'shadow-d', ); if ( in_array( $choice, $valid, true ) ) { return $choice; } return 'shadow-a'; } /** * Bind JS handlers to instantly live-preview changes. */ function aino_customize_preview_js() { wp_enqueue_script( 'aino_customizer', get_theme_file_uri( '/assets/js/customizer.js' ), array( 'customize-preview' ), '1.0', true ); } add_action( 'customize_preview_init', 'aino_customize_preview_js' );