<?php
/**
 * Register block styles.
 * Theme: SugarTaste
 */
function sugartaste_register_block_styles() {
	$blocks = array( 'image', 'post-featured-image' );

	foreach( $blocks as $block ) {

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-grayscale',
				'label'        => __( 'Grayscale', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-grayscale{ filter: grayscale(100%); }',
			)
		);
	
		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-blur',
				'label'        => __( 'Blur', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-blur{ filter: blur(5px); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-brightness',
				'label'        => __( 'Brightness', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-brightness{ filter: brightness(200%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-contrast',
				'label'        => __( 'Contrast', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-contrast{ filter: contrast(200%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-hue-90',
				'label'        => __( 'Hue-90', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-hue-90{ filter: hue-rotate(90deg); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-hue-180',
				'label'        => __( 'Hue-180', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-hue-180{ filter: hue-rotate(180deg); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-hue-270',
				'label'        => __( 'Hue-270', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-hue-270{ filter: hue-rotate(270deg); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-invert',
				'label'        => __( 'Invert', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-invert{ filter: invert(100%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-opacity',
				'label'        => __( 'Opacity', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-opacity{ filter: opacity(30%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-saturate',
				'label'        => __( 'Saturate', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-saturate{ filter: saturate(8); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-sepia',
				'label'        => __( 'Sepia', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-sepia{ filter: sepia(100%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromgray',
				'label'        => __( 'Gray →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromgray { filter: grayscale(100%); } .is-style-sugartaste-fromgray:hover { filter: grayscale(0%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-togray',
				'label'        => __( '→ Gray', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-togray:hover { filter: grayscale(100%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromblur',
				'label'        => __( 'Blur →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromblur { filter: blur(5px); } .is-style-sugartaste-fromblur:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-toblur',
				'label'        => __( '→ Blur', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-toblur:hover { filter: blur(5px); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-frombrightness',
				'label'        => __( 'Brightness →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-frombrightness { filter: brightness(200%); } .is-style-sugartaste-frombrightness:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-tobrightness',
				'label'        => __( '→ Brightness', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-tobrightness:hover { filter: brightness(200%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromcontrast',
				'label'        => __( 'Contrast →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromcontrast { filter: contrast(200%); } .is-style-sugartaste-fromcontrast:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-tocontrast',
				'label'        => __( '→ Contrast', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-tocontrast:hover { filter: contrast(200%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromhue90',
				'label'        => __( 'Hue90 →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromhue90 { filter: hue-rotate(90deg); } .is-style-sugartaste-fromhue90:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-tohue90',
				'label'        => __( '→ Hue90', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-tohue90:hover { filter: hue-rotate(90deg); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromhue180',
				'label'        => __( 'Hue180 →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromhue180 { filter: hue-rotate(180deg); } .is-style-sugartaste-fromhue180:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-tohue180',
				'label'        => __( '→ Hue180', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-tohue180:hover { filter: hue-rotate(180deg); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromhue270',
				'label'        => __( 'Hue270 →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromhue270 { filter: hue-rotate(270deg); } .is-style-sugartaste-fromhue270:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-tohue270',
				'label'        => __( '→ Hue270', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-tohue270:hover { filter: hue-rotate(270deg); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-frominvert',
				'label'        => __( 'Invert →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-frominvert { filter: invert(100%); } .is-style-sugartaste-frominvert:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-toinvert',
				'label'        => __( '→ Invert', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-toinvert:hover { filter: invert(100%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromopacity',
				'label'        => __( 'Opacity →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromopacity { filter: opacity(30%); } .is-style-sugartaste-fromopacity:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-toopacity',
				'label'        => __( '→ Opacity', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-toopacity:hover { filter: opacity(30%); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromsaturate',
				'label'        => __( 'Saturate →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromsaturate { filter: saturate(8); } .is-style-sugartaste-fromsaturate:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-tosaturate',
				'label'        => __( '→ Saturate', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-tosaturate:hover { filter: saturate(8); }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-fromsepia',
				'label'        => __( 'Sepia →', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-fromsepia { filter: sepia(100%); } .is-style-sugartaste-fromsepia:hover { filter: none; }',
			)
		);

		register_block_style(
			'core/' . $block,
			array(
				'name'         => 'sugartaste-tosepia',
				'label'        => __( '→ Sepia', 'sugartaste' ),
				'inline_style' => '.is-style-sugartaste-tosepia:hover { filter: sepia(100%); }',
			)
		);

	}
}

add_action( 'init', 'sugartaste_register_block_styles' );

function sugartaste_wp_custom_welcome_page() {
	
	 include(get_template_directory() .'/assets/benvenuto/benvenuto.php');

}

function sugartaste_wp_custom_welcome_menu() {
    add_menu_page(
        __( 'Welcome', 'sugartaste' ),
        __( 'Welcome', 'sugartaste' ),
        'edit_posts', /* min Author role */
        'custom-welcome',
        'sugartaste_wp_custom_welcome_page',
        'dashicons-welcome-learn-more',
        3
    );
}
add_action( 'admin_menu', 'sugartaste_wp_custom_welcome_menu' );
