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

function haup_top_home_scroll_js_init(){
	if(!wp_is_mobile()){
		wp_enqueue_script('haup-tophome-scroll-js');
	}
}
add_action( 'wp_enqueue_scripts', 'haup_top_home_scroll_js_init' );

/*** ページ先頭へDiv ID「#hau-page-head」を出力 ***/
/* auto-page-top-linkと関数共通 */
/* https://developer.wordpress.org/reference/functions/wp_body_open/ */
function haup_add_hau_page_head_id_insert_to_body() {
	echo '<div id="hau-page-head"></div>';
}
add_action( 'wp_body_open', 'haup_add_hau_page_head_id_insert_to_body' );

/* コンテンツをフッターへ出力 */
function haup_home_top_scroll_button_content_init(){
$home_url = get_home_url( '/' );

if(!haup_is_mobile()){
	echo '<div class="side-button-wrapper is_flow">';
	echo '<ul class="back-home-content">';
	echo '<li>';
	echo '<a href="#hau-page-head" aria-label="Move To Page Head"><span class="icon-hauicon-arrow06 home-top-icon"></span></a>';
	echo '</li>';
	echo '<li>';
	echo '<a href="';
	echo esc_url($home_url);
	echo '" aria-label="Move To Home Page"><span class="icon-hauicon-building03 home-top-icon"></span></a>';
	echo '</li>';
	echo '</ul>';
	echo '</div>';
}

}
add_action('wp_footer','haup_home_top_scroll_button_content_init');