<?php if ( !defined( 'ABSPATH' ) ) exit;//PHPの宣言と直接アクセスの拒否

/***** TT3のtheme.jsonスタイル設定を補正 *****/
function haup_change_theme_json_saparator_style_for_tt3( $theme_json ) {
$schema = '';

$new_data = array(
	"$schema"=> "https://schemas.wp.org/trunk/theme.json",
	"version"=> 2,
	"styles"=> array(
		"blocks"=> array(
			"core/separator"=> array(
				"css"=> " &:not(.is-style-wide):not(.is-style-dots):not(.alignwide):not(.alignfull){width: 100px}&:not(.is-style-wide):not(.is-style-dots){height: 2px;}"
			)
		)
	)
);

	return $theme_json->update_with( $new_data );
}
add_filter( 'wp_theme_json_data_theme', 'haup_change_theme_json_saparator_style_for_tt3',9999 );

function haup_register_block_design_styles_hr() {

/* 区切り線 葉1 */
	register_block_style('core/separator', array(
	'name' =>  'leaf-01',
	'label' => __( 'Leaf01','hima-art-utility'),
  ));


/* 区切り線 花1 */
	register_block_style('core/separator', array(
	'name' =>  'flower-01',
	'label' => __( 'Flower01','hima-art-utility'),
  ));

/* 区切り線 花2 */
	register_block_style('core/separator', array(
	'name' =>  'flower-02',
	'label' => __( 'Flower02','hima-art-utility'),
  ));

/* 区切り線 鳥1 */
	register_block_style('core/separator', array(
	'name' =>  'bird-01',
	'label' => __( 'Bird01','hima-art-utility'),
  ));

/* 区切り線 猫1 */
	register_block_style('core/separator', array(
	'name' =>  'cat-01',
	'label' => __( 'Cat01','hima-art-utility'),
  ));

/* 区切り線 猫2 */
	register_block_style('core/separator', array(
	'name' =>  'cat-02',
	'label' => __( 'Cat02','hima-art-utility'),
  ));

/* 区切り線 猫3 */
	register_block_style('core/separator', array(
	'name' =>  'cat-03',
	'label' => __( 'Cat03','hima-art-utility'),
  ));

/* 区切り線 犬1 */
	register_block_style('core/separator', array(
	'name' =>  'dog-01',
	'label' => __( 'Dog01','hima-art-utility'),
  ));

/* 区切り線 犬2 */
	register_block_style('core/separator', array(
	'name' =>  'dog-02',
	'label' => __( 'Dog02','hima-art-utility'),
  ));

/* 区切り線 魚1 */
	register_block_style('core/separator', array(
	'name' =>  'fish-01',
	'label' => __( 'Fish01','hima-art-utility'),
  ));

/* 区切り線 魚2 */
	register_block_style('core/separator', array(
	'name' =>  'fish-02',
	'label' => __( 'Fish02','hima-art-utility'),
  ));

/* 区切り線 天気1 */
	register_block_style('core/separator', array(
	'name' =>  'weather-01',
	'label' => __( 'Weather01','hima-art-utility'),
  ));

/* 区切り線 天気2 */
	register_block_style('core/separator', array(
	'name' =>  'weather-02',
	'label' => __( 'Weather02','hima-art-utility'),
  ));

/* 区切り線 星1 */
	register_block_style('core/separator', array(
	'name' =>  'star-01',
	'label' => __( 'Star01','hima-art-utility'),
  ));

/* 区切り線 星2 */
	register_block_style('core/separator', array(
	'name' =>  'star-02',
	'label' => __( 'Star02','hima-art-utility'),
  ));

/* 区切り線 PC1 */
	register_block_style('core/separator', array(
	'name' =>  'pc-01',
	'label' => __( 'PC01','hima-art-utility'),
  ));

/* 区切り線 MOBILE1 */
	register_block_style('core/separator', array(
	'name' =>  'mobile-01',
	'label' => __( 'Mobile01','hima-art-utility'),
  ));

/* 区切り線 カメラ1 */
	register_block_style('core/separator', array(
	'name' =>  'camera-01',
	'label' => __( 'Camera01','hima-art-utility'),
  ));

/* 区切り線 音符1 */
	register_block_style('core/separator', array(
	'name' =>  'music-01',
	'label' => __( 'Music01','hima-art-utility'),
  ));

/* 区切り線 鍵1 */
	register_block_style('core/separator', array(
	'name' =>  'key-01',
	'label' => __( 'Key01','hima-art-utility'),
  ));

/* 区切り線 鍵2 */
	register_block_style('core/separator', array(
	'name' =>  'key-02',
	'label' => __( 'Key02','hima-art-utility'),
  ));

/* 区切り線 時計1 */
	register_block_style('core/separator', array(
	'name' =>  'clock-01',
	'label' => __( 'Clock01','hima-art-utility'),
  ));

/* 区切り線 ハート1 */
	register_block_style('core/separator', array(
	'name' =>  'heart-01',
	'label' => __( 'Heart01','hima-art-utility'),
  ));

/* 自転車1 */
	register_block_style('core/separator', array(
	'name' =>  'bycicle-01',
	'label' => __( 'Bycicle01','hima-art-utility'),
  ));

/* 自動車1 */
	register_block_style('core/separator', array(
	'name' =>  'car-01',
	'label' => __( 'Car01','hima-art-utility'),
  ));

/*  */
/*
	register_block_style('core/list', array(
	'name' =>  '',
	'label' => __( '','hima-art-utility'),
  ));
*/
}
add_action('init','haup_register_block_design_styles_hr');

