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

function haup_add_old_post_messeage($content){

if(isset( GetOP05_addcontent()['number-of-days-last-moddate'] ) && !empty( GetOP05_addcontent()['number-of-days-last-moddate'] )){
	$oldpost_keikanissuu = GetOP05_addcontent()['number-of-days-last-moddate'];
	}else{
	$oldpost_keikanissuu = 1095;
};

$oldpost_modi_date = get_the_modified_date();
$oldpost_message_b = esc_html(__('Last updated on this page:','hima-art-utility'));
$oldpost_message_a = esc_html(__('  Please note that the information may be out of date.','hima-art-utility'));

$html_before = hau_sanitize_html_tags('<div class="ha-old-moddified" data-nosnippet><p class="is-style-ha-para-notice">');
$html_after = hau_sanitize_html_tags('</p></div>');
if ( gmdate( 'U' ) - get_the_modified_time( 'U' ) > 60 * 60 * 24 * $oldpost_keikanissuu ){
return $html_before.$oldpost_message_b .$oldpost_modi_date .$oldpost_message_a.$html_after.$content;
}else{
return $content;
}
}
add_filter( 'the_content', 'haup_add_old_post_messeage' );