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

/* ブロック追加画面を1列表示にする */
function haup_admin_editor_add_block_1column(){
//スタイルコードをまとめる
$custom_css_pre = hau_sanitize_css('
.components-button.block-editor-block-types-list__item {
    display: flex;
    flex-direction: unset;
    width: 100%;
    font-size: 1em;
    color: #1e1e1e;
    padding: 0px;
    align-items: unset;
    justify-content: unset;
    cursor: pointer;
    background: transparent;
    word-break: break-word;
    border-radius: 2px;
    transition: all .05s ease-in-out;
    position: relative;
    height: auto;
}

.block-editor-block-types-list__list-item {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
}

.block-editor-block-types-list__item-icon {
    padding: 0px 20px;
    border-radius: 2px;
    color: #1e1e1e;
    transition: all .05s ease-in-out;
}

.block-editor-block-types-list__item-title {
    padding: 0px 2px 8px;
    font-size: 1em;
	text-align: left;
}
');

//タブを除去
$custom_css_deltab = preg_replace('/\t+/', '', $custom_css_pre);
//改行を除去
$custom_css = str_replace(PHP_EOL, '', $custom_css_deltab);

//インラインで出力
	wp_add_inline_style( 'wp-edit-blocks', $custom_css );

}
add_action('init','haup_admin_editor_add_block_1column');