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

/***** ブロックエディタへようこそ非表示・フルスクリーンモード解除 *****/
/* https://www.micski.dk/2020/12/11/how-to-disable-welcome-to-block-editor-in-wordpress/ */
/* https://wordpress.org/plugins/disable-welcome-messages-and-tips/ */
function haup_hide_popovers() {
echo "
	<style>
		.wp-admin .components-popover.nux-dot-tip {
			display: none !important;
		}
	</style>

	<script>
		jQuery(window).load( function(){
			wp.data && wp.data.select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
			wp.data && wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' );
		});
	</script>
";
}
add_action('admin_head', 'haup_hide_popovers');