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

/***** 存在するカスタム投稿タイプの一覧を表示するコールバック関数 *****/
function haup_exist_custom_post_types_list_callback() {
	//公開となっていて存在する投稿タイプを抽出
	$post_types = get_post_types(['public' => true], 'names');
	//リストから除外する投稿タイプを指定（投稿・固定ページ・メディア・HAUで追加している投稿タイプ）
	$excluded_post_types = ['post', 'page','attachment','haup_popup','ha_protected_content'];
	//除外するものを省いた投稿タイプをまとめる
	$custom_post_types = array_diff($post_types, $excluded_post_types);

	//文字列を変数化
	$text_1 = __('Any custom post types present on your site','hima-art-utility');
	$text_2 = __('This site has the following custom post types:','hima-art-utility');
	$text_3 = __('The list of published post types is extracted mechanically. Please check for yourself whether the post type needs customization.','hima-art-utility');
	$text_4 = __('Slug:','hima-art-utility');
	$text_5 = __('label:','hima-art-utility');
	$text_6 = __('There are no published custom post types','hima-art-utility');

	//存在する投稿タイプの一覧を表示
	if (!empty($custom_post_types)) {
		$content = '<h4>'.esc_html( $text_1 ).'</h4>';
		$content .= '<p>';
		$content .= '<span>'.esc_html( $text_2 ).'</span>';
		$content .= '<br>';
		$content .= '<span style="color:red;font-size:0.8rem;">'.esc_html( $text_3 ).'</span>';
		$content .= '</p>';
		$content .= '<ul>';

		foreach ($custom_post_types as $post_type) {
			$post_type_object = get_post_type_object($post_type);
			if ($post_type_object) {
				$content .= '<li><strong>'.esc_html( $text_4 ).'</strong> <code>' . esc_html($post_type_object->name) . '</code> - <strong>'.esc_html( $text_5 ).'</strong> ' . esc_html($post_type_object->labels->name) . '</li>';
			}
		}
		$content .= '</ul>';
	}else{
		$content = '<p>'.esc_html( $text_6 ).'</p>';
	}

		return $content;
}

/***** haup_is_single_filter *****/
function haup_usage_info_haup_is_single_filter(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('To include custom post types:','hima-art-utility');
//冒頭の説明文
$description = __('This feature only applies to "Posts" by default, but if you want it to work for other post types you can extend it with the code below.','hima-art-utility');
//同時適用の注意文
$notice = __('*This filter is applied collectively to the following functions to make it easier to handle custom post types with this plugin.','hima-art-utility');
$own_change_notice = __('If you want to specify any of the above functions individually, change the user-defined function name in the code introduced above, change the hook name from "haup_is_single_filter" to the one specified below, and add it to functions.php (this will take precedence over "haup_is_single_filter").','hima-art-utility');

$add_posttype =  __('Add post types to add, separated by commas','hima-art-utility');


//コードの内容
$code = "function change_haup_is_single_posttype() {
 \$new_posttype = 'post,".$add_posttype."';

 \$posttypes = \$new_posttype;
 return \$posttypes;
}
add_filter( 'haup_is_single_filter', 'change_haup_is_single_posttype' );";

//同時適用される機能のリスト
$list_1 = __('Shortcode output of content that shows that ads are included and switch on the editing screen','hima-art-utility');
$list_3 = __('Displaying the list of shortcodes at the bottom of the editing screen','hima-art-utility');
$list_4 = __('Calculating the date range for credit display using the footer-credit shortcode','hima-art-utility');
$list_5 = __('Keyword auto-linking function','hima-art-utility');
$list_6 = __('Last updated date control','hima-art-utility');
$list_7 = __('Ability to notify site email address when post is published','hima-art-utility');
$list_8 = __('Ability to hide featured images','hima-art-utility');
$list_9 = __('Function to output SEO meta tags','hima-art-utility');//optimize
$list_10 = __('Automatic tag linking function','hima-art-utility');//utility

$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
'.haup_exist_custom_post_types_list_callback().'
<p>'.esc_html($description).'</p>
<pre>
<code>'.$code.'</code>
</pre>
<div class="haup-admin-bk">
<p>'.esc_html($notice).'</p>
<ol>
<li>'.esc_html($list_1).'</li>
<li>'.esc_html($list_3).'</li>
<li>'.esc_html($list_4).'</li>
<li>'.esc_html($list_5).'</li>
<li>'.esc_html($list_6).'</li>
<li>'.esc_html($list_7).'</li>
<li>'.esc_html($list_8).'</li>
<li>'.esc_html($list_9).'</li>
<li>'.esc_html($list_10).'</li>
</ol>
<p>'.esc_html($own_change_notice).'</p>
<ol>
<li>'.esc_html($list_1).':<span style="color:red;font-weight:700;">haup_is_single_ad_info_filter</span></li>
<li>'.esc_html($list_3).':<span style="color:red;font-weight:700;">haup_is_single_help_box_filter</span></li>
<li>'.esc_html($list_4).':<span style="color:red;font-weight:700;">haup_is_single_footer_credit_filter</span></li>
<li>'.esc_html($list_5).':<span style="color:red;font-weight:700;">haup_is_single_keyword_auto_link_filter</span></li>
<li>'.esc_html($list_6).':<span style="color:red;font-weight:700;">haup_is_single_update_moddate_filter</span></li>
<li>'.esc_html($list_7).':<span style="color:red;font-weight:700;">haup_is_single_pub_send_mail_filter</span></li>
<li>'.esc_html($list_8).':<span style="color:red;font-weight:700;">haup_is_single_hide_fimage_filter</span></li>
<li>'.esc_html($list_9).':<span style="color:red;font-weight:700;">haup_is_single_seo_fields_filter</span></li>
<li>'.esc_html($list_10).':<span style="color:red;font-weight:700;">haup_change_auto_tagger_posttype_filter</span></li>
</ol>
</div>
</div>
</details>
';

return $content;
}

/***** ログイン試行回数制限 *****/
/*** haup_change_max_attemps ***/
/*** haup_change_lockout_time ***/
/*** haup_change_locked_out_message ***/
/*** haup_cleanup_retention_period ***/
function haup_usage_limit_login_attempt_filters(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('How to change setting values using filter hooks','hima-art-utility');
//冒頭の説明文
$description = __('You can change the settings for this function by adding code to the functions/php of the enabled theme.','hima-art-utility');

$h_1 = __('Change the number of login attempts allowed','hima-art-utility');
$h_2 = __('Change the lockout time','hima-art-utility');
$h_3 = __('Change the locked out message','hima-art-utility');
$h_4 = __('Change the retention period for failed login data','hima-art-utility');

$p_1 = __('Set the maximum number of login attempts to something other than "3"','hima-art-utility');
$p_2 = __('Change the time period for which logins are rejected when the login limit is exceeded from "5" minutes.','hima-art-utility');
$p_3 = __('Change the message "Login failed. Are you a spammer?" that appears when a login is denied','hima-art-utility');
$p_4 = __('Set the period for retaining login attempt data to something other than "one week"','hima-art-utility');


//コードの内容
$code_1 = "function change_max_attempts(\$max_attempts){
	\$max_attempts = 3;
	return \$max_attempts;
}
add_filter('haup_change_max_attemps','change_max_attempts');";

$code_2 = "function change_lock_time(\$lock_sec){
	\$lock_sec = 5;
	return \$lock_sec;
}
add_filter('haup_change_lockout_time','change_lock_time');";

$code_3 = "function change_lockout_message(\$message){
	\$message = '';//Changed Message
	return \$message;
}
//add_filter('haup_change_locked_out_message','change_lockout_message');";

$code_4 = "function change_retention(\$period) {

//Example duration values
	// 1days ＝1 DAY
	// 1weeks ＝1 WEEK

	return 'duration values'; //Changed duration values
}
add_filter('haup_cleanup_retention_period', 'change_retention');";

$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<p>'.esc_html($description).'</p>
<h4>'.esc_html($h_1).'</h4>
<p>'.esc_html($p_1).'</p>
<pre>
<code>'.$code_1.'</code>
</pre>
<h4>'.esc_html($h_2).'</h4>
<p>'.esc_html($p_2).'</p>
<pre>
<code>'.$code_2.'</code>
</pre>
<h4>'.esc_html($h_3).'</h4>
<p>'.esc_html($p_3).'</p>
<pre>
<code>'.$code_3.'</code>
</pre>
<h4>'.esc_html($h_4).'</h4>
<p>'.esc_html($p_4).'</p>
<pre>
<code>'.$code_4.'</code>
</pre>
</div>
</details>

';

return $content;
}

/***** 管理画面の一覧を更新日順表示 *****/
function haup_usage_info_haup_admin_postlist_order_filter(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('To include custom post types:','hima-art-utility');
//冒頭の説明文
$description = __('This feature applies to "Posts" and "Pages" by default, but if you want it to work for other post types you can extend it with the code below.','hima-art-utility');

$add_posttype =  __('Add post types to add, separated by commas','hima-art-utility');

//コードの内容
$code = "function my_custom_post_types( \$posttypes) {
	// カスタム投稿タイプを追加（カンマ区切りの文字列）
	\$posttypes = 'post,page,".$add_posttype."';
	return \$posttypes;
}
add_filter( 'haup_admin_postlist_order_filter', 'my_custom_post_types' );";

$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
'.haup_exist_custom_post_types_list_callback().'
<p>'.esc_html($description).'</p>
<pre>
<code>'.$code.'</code>
</pre>
</div>
</details>

';

return $content;
}

/***** [ha-prev-post][ha-next-post]ショートコード用のフィルター *****/
function haup_usage_info_next_prev_shortcode_filter(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('How to extend post types with "ha-prev-post" and "ha-next-post" shortcodes','hima-art-utility');
//冒頭の説明文
$description = __('The ha-prev-post and ha-next-post shortcodes allow you to extend the post types that appear on the previous and next pages using the following filters:','hima-art-utility');

$add_posttype =  __('Add post types to add, separated by commas','hima-art-utility');

//コードの内容
$code = "function next_prev_shortcode_post_types( \$posttypes) {
	\$posttypes = 'post,".$add_posttype."';
	return \$posttypes;
}
add_filter( 'haup_admin_postlist_order_filter', 'next_prev_shortcode_post_types' );";

$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
'.haup_exist_custom_post_types_list_callback().'
<p>'.esc_html($description).'</p>
<pre>
<code>'.$code.'</code>
</pre>
</div>
</details>
';

return $content;
}

/***** パスワード保護ショートコード *****/
/*** haup_pw_form_change_pass_error_message ***/
/*** haup_pw_form_change_heading_text ***/
/*** haup_pw_form_change_message ***/
/*** haup_pw_form_change_pass_text ***/
/*** haup_pw_form_change_submit_text ***/
function haup_usage_info_pass_content_filter(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('Customization for Password Protected Content Shortcode','hima-art-utility');
//冒頭の説明文
$description = __('You can change the settings for this function by adding code to the functions/php of the enabled theme.','hima-art-utility');

$h_1 = __('Change the message when an authentication error occurs','hima-art-utility');//$error_message
$h_2 = __('Change the heading text','hima-art-utility');//$heading_text
$h_3 = __('Change the description string','hima-art-utility');//$message
$h_4 = __('Change the form label','hima-art-utility');//$label_text
$h_5 = __('Change the submit button text','hima-art-utility');//$submit_text

$p_1 = __('Please enter the correct password','hima-art-utility');
$p_2 = __('A password is required to view the content','hima-art-utility');
$p_3 = __('Please enter your password to view the content','hima-art-utility');
$p_4 = __('Password','hima-art-utility');
$p_5 = __('Submit','hima-art-utility');

$default_pre = __('Default : ','hima-art-utility');

//コードの内容
$code_1 = "function change_pass_content_error_text(\$error_message){
	\$error_message = '';
	return \$error_message;
}
add_filter('haup_pw_form_change_pass_error_message','change_pass_content_error_text');";

$code_2 = "ffunction change_pass_content_heading_text(\$heading_text){
	\$heading_text = '';
	return \$heading_text;
}
add_filter('haup_pw_form_change_heading_text','change_pass_content_heading_text');";

$code_3 = "function change_pass_content_message(\$message){
	\$message = '';
	return \$message;
}
add_filter('haup_pw_form_change_message','change_pass_content_message');";

$code_4 = "function change_pass_content_label_text(\$label_text){
	\$label_text = '';
	return \$label_text;
}
add_filter('haup_pw_form_change_pass_text','change_pass_content_label_text');";

$code_5 = "function change_pass_content_submit_text(\$submit_text){
	\$submit_text = '';
	return \$submit_text;
}
add_filter('haup_pw_form_change_submit_text','change_pass_content_submit_text');";

$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<p>'.esc_html($description).'</p>
<h4>'.esc_html($h_1).'</h4>
<p>'.esc_html($default_pre).esc_html($p_1).'</p>
<pre>
<code>'.$code_1.'</code>
</pre>
<h4>'.esc_html($h_2).'</h4>
<p>'.esc_html($default_pre).esc_html($p_2).'</p>
<pre>
<code>'.$code_2.'</code>
</pre>
<h4>'.esc_html($h_3).'</h4>
<p>'.esc_html($default_pre).esc_html($p_3).'</p>
<pre>
<code>'.$code_3.'</code>
</pre>
<h4>'.esc_html($h_4).'</h4>
<p>'.esc_html($default_pre).esc_html($p_4).'</p>
<pre>
<code>'.$code_4.'</code>
</pre>
<h4>'.esc_html($h_5).'</h4>
<p>'.esc_html($default_pre).esc_html($p_5).'</p>
<pre>
<code>'.$code_5.'</code>
</pre>
</div>
</details>

';

return $content;
}

/***** 計算問題 *****/
/*** haup_math_error_mail_subject_filter ***/
/*** haup_math_error_mail_message_filter ***/
function haup_usage_info_login_math_check(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('How to change setting values using filter hooks','hima-art-utility');
//冒頭の説明文
$description = __('You can change the settings for this function by adding code to the functions/php of the enabled theme.','hima-art-utility');

$h_1 = __('Change the subject of the email sent if the answer is incorrect','hima-art-utility');
$h_2 = __('Change the text of the email sent if the answer is incorrect','hima-art-utility');

$default_pre = __('Default : ','hima-art-utility');
$default_sub = __('There may have been an unauthorized login attempt.','hima-art-utility');
$default_content = __('Did you make a mistake in the answer to the calculation question when logging in? If you do not remember this, there may be an unauthorized login.','hima-art-utility');

$change_text = __('Changed string','hima-art-utility');


//コードの内容
$code_1 = "function change_math_failed_mail_subject(\$subject){
	\$subject = '$change_text';
	return \$subject;
}
add_filter('haup_math_error_mail_subject_filter','change_math_failed_mail_subject');";

$code_2 = "function change_math_failed_mail_content(\$message){
	\$message = '$change_text';
	return \$message;
}
add_filter('haup_math_error_mail_message_filter','change_math_failed_mail_content');";


$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<p>'.esc_html($description).'</p>
<h4>'.esc_html($h_1).'</h4>
<p style="color:red;font-weight:500;">'.$default_pre.$default_sub.'</p>
<pre>
<code>'.$code_1.'</code>
</pre>
<h4>'.esc_html($h_2).'</h4>
<p style="color:red;font-weight:500;">'.$default_pre.$default_content.'</p>
<pre>
<code>'.$code_2.'</code>
</pre>
</div>
</details>

';

return $content;
}


/***** セキュリティヘッダー *****/
/*** haup_pagely_frame_ancestors_policy ***/
function haup_usage_info_security_header(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('If you can not get information from other sites','hima-art-utility');
//冒頭の説明文
$description_1 = __('By default, this feature limits the scope of the Content-Security-Policy to your own domain only, so you cannot embed links (cards) on sites from other domains.','hima-art-utility');
$description_2 = __('This is proof that the security headers are working properly, not a bug.','hima-art-utility');
$description_3 = __('If you want to allow unlimited information retrieval from other domains, turn off this function and write the security header information directly in the .htaccess file (you will understand that in this case you will face the same problem with the Content-Security-Policy settings, or you will have no choice but to output an incomplete security header without the Content-Security-Policy settings).','hima-art-utility');
$description_4 = __('To solve this problem, this function allows you to specify the domains from which you are allowed to retrieve information using the following code. Use this function if you manage sites under multiple domains and want to allow each domain to retrieve information from each other.','hima-art-utility');

$info_text = __('Enter the URLs of your sites home page here, one per line.','hima-art-utility');
$info_text_notice = __('*Please be sure to add the top page URL of the site where you install this code.','hima-art-utility');
	
//コードの内容
$code = "function allow_csp_domain_filter(\$policy){

	\$allowed_domains = [
		//$info_text 
		//$info_text_notice
		//例：'https://example.com',

	];

	// 配列を文字列に変換
	\$domains_string = implode(' ', \$allowed_domains);

	// ポリシーを更新
	return \"frame-ancestors 'self' \$domains_string\";
}

add_filter( 'haup_pagely_frame_ancestors_policy', 'allow_csp_domain_filter' );";

$content = '
<details class="accordion">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<p>
<span>'.esc_html($description_1).'</span>
<br>
<span>'.esc_html($description_2).'</span>
<br>
<span>'.esc_html($description_3).'</span>
<br>
<span>'.esc_html($description_4).'</span>
</p>
<pre>
<code>'.$code.'</code>
</pre>
</div>
</details>

';

return $content;
}

/***** 最近更新した投稿ウィジェット *****/
/*** haup_updated_posts_dwidget_posttype_filter ***/
/*** haup_updated_posts_dwidget_num_filter ***/
function haup_usage_info_mod_post_widget(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('How to change setting values using filter hooks','hima-art-utility');
//冒頭の説明文
$description = __('You can change the settings for this function by adding code to the functions/php of the enabled theme.','hima-art-utility');

$h_1 = __('Include Custom Post Types','hima-art-utility');
$h_2 = __('Change the number of items displayed','hima-art-utility');

$default_pre = __('Default : ','hima-art-utility');
$default_posttype = __('post(post)','hima-art-utility');
$default_num = '10';

$change_num = __('Changed num','hima-art-utility');

$add_posttype =  __('Add post types to add, separated by commas','hima-art-utility');

//コードの内容
$code_1 = "function change_mod_list_widget_post_type(\$post_type) {
\$post_type = 'post,.$add_posttype';

return \$post_type;
}
add_filter('haup_updated_posts_dwidget_posttype_filter','change_mod_list_widget_post_type');";

$code_2 = "function change_mod_list_num(\$num) {
\$num = '$change_num';
 return \$num;
}
add_filter('haup_updated_posts_dwidget_num_filter','change_mod_list_num');";


$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
'.haup_exist_custom_post_types_list_callback().'
<p>'.esc_html($description).'</p>
<h4>'.esc_html($h_1).'</h4>
<p style="color:red;font-weight:500;">'.$default_pre.$default_posttype.'</p>
<pre>
<code>'.$code_1.'</code>
</pre>
<h4>'.esc_html($h_2).'</h4>
<p style="color:red;font-weight:500;">'.$default_pre.$default_num.'</p>
<pre>
<code>'.$code_2.'</code>
</pre>
</div>
</details>

';

return $content;
}


/***** 自動タグ付け機能（反応数の変更） *****/
function haup_usage_info_change_post_tag_min_count(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('Change the number of words to match','hima-art-utility');
//冒頭の説明文
$description = __('This function automatically links a registered tag to a tag if the word in the tag appears three or more times in the text. By using this hook, you can set the number of matches to be automatically registered to a number other than three.','hima-art-utility');

$change_text = __('The number you want to change','hima-art-utility');

//コードの内容
$code = "function change_post_tag_min_count() {
	// 変更したい数
	return \$change_text;
}
add_filter( 'haup_admin_postlist_order_filter', 'change_post_tag_min_count' );";


$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<p>'.esc_html($description).'</p>
<pre>
<code>'.$code.'</code>
</pre>
</div>
</details>

';

return $content;
}


/***** 背景画像を無効にする投稿タイプ *****/
function haup_usage_info_disable_editor_bg_image(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('To add a custom post type to disable','hima-art-utility');
//冒頭の説明文
$description = __('You can disable background images on the editing screen for post types other than posts and pages by using the following filter:','hima-art-utility');

$message1 = __('Change news to the actual custom post type slug','hima-art-utility');
$message2 = __('Add as many rows above as you need','hima-art-utility');

//コードの内容
$code = "function haup_add_disable_bg_image_on_editor( \$post_types ){
	\$post_types[] = 'news';//$message1
	//...$message2

	return \$post_types;
}
add_filter('haup_background_disabled_post_types', 'haup_add_disable_bg_image_on_editor');";


$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<p>'.esc_html($description).'</p>
<pre>
<code>'.$code.'</code>
</pre>
</div>
</details>

';

return $content;
}

/***** Adsenseの自動広告機能 *****/
/***** 「管理ユーザーには広告を表示しない」の権限を変更する *****/
function haup_usage_info_change_disable_adsense_auto_tag_cap(){
/***  文字列を変数に格納 ***/
//アコーディオンのタイトル
$title = __('To change user permissions to not display ads:','hima-art-utility');
//冒頭の説明文
$description = __('To set user privileges other than administrator privileges to hide Auto Ads when this feature is enabled, use the following filter:','hima-art-utility');

$message1 = __('Specify the permission or role','hima-art-utility');
$message2 = __('For more information on permissions and roles, see the official WordPress','hima-art-utility');
$message3 = __('Visit the page','hima-art-utility');
$url = 'https://wordpress.org/documentation/article/roles-and-capabilities/';
$link_text = 'Roles and Capabilities';

//コードの内容
$code = "function change_adsense_capability( \$capability ){
	return 'edit_posts';//$message1
}
add_filter('haup_disable_adsense_cap_filter','change_adsense_capability');";


$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<p>'.esc_html($description).'</p>
<pre>
<code>'.$code.'</code>
</pre>
</div>
<p>'.esc_html($message2).'<a href="'.esc_url($url) .'" target="_blank">'.esc_html($link_text).'</a>'.esc_html($message3).'</p>
</details>

';

return $content;
}


/***** 管理画面へのスタイル適用範囲変更 *****/
/***** 「管理ユーザーには広告を表示しない」の権限を変更する *****/
function haup_usage_info_change_login_style_to_admin_panel(){
/***  文字列を変数に格納 ***/
	//アコーディオンのタイトル
	$title = __('Code example to re-specify the screen to which the code applies.','hima-art-utility');

	$panel_name_1 = __('Dashboard','hima-art-utility');
	$panel_name_2 = __('List (Posts, Pages, Custom Post Types, Patterns)','hima-art-utility');
	$panel_name_3 = __('List of comments','hima-art-utility');
	$panel_name_4 = __('Media Library','hima-art-utility');
	$panel_name_5 = __('Add media','hima-art-utility');
	$panel_name_6 = __('User List','hima-art-utility');
	$panel_name_7 = __('User Profile','hima-art-utility');
	$panel_name_8 = __('Edit Profile (Edit another persons profile)','hima-art-utility');
	$panel_name_9 = __('Add User','hima-art-utility');
	$panel_name_10 = __('Plugin List','hima-art-utility');
	$panel_name_11 = __('Theme List','hima-art-utility');
	$panel_name_12 = __('About WordPress','hima-art-utility');
	$panel_name_13 = __('Core update','hima-art-utility');
	$panel_name_14 = __('Editing screen / Media editing','hima-art-utility');
	$panel_name_15 = __('New post screen','hima-art-utility');
	$panel_name_16 = __('Tag/Category List','hima-art-utility');
	$panel_name_17 = __('Tag and category editing screen','hima-art-utility');
	$panel_name_18 = __('Comment editing screen','hima-art-utility');
	$panel_name_19 = __('"Exterior" → "Menu"','hima-art-utility');
	$panel_name_20 = __('Classic Widget Settings','hima-art-utility');
	$panel_name_21 = __('Add a plugin','hima-art-utility');
	$panel_name_22 = __('Available Tools','hima-art-utility');
	$panel_name_23 = __('Import','hima-art-utility');
	$panel_name_24 = __('Export','hima-art-utility');
	$panel_name_25 = __('Site Health','hima-art-utility');
	$panel_name_26 = __('Export personal data','hima-art-utility');
	$panel_name_27 = __('Deletion of personal data','hima-art-utility');
	$panel_name_28 = __('Theme File Editor','hima-art-utility');
	$panel_name_29 = __('Plugin file editor','hima-art-utility');
	$panel_name_30 = __('General settings','hima-art-utility');
	$panel_name_31 = __('Posting Settings','hima-art-utility');
	$panel_name_32 = __('Display settings','hima-art-utility');
	$panel_name_33 = __('Discussion settings','hima-art-utility');
	$panel_name_34 = __('Media Settings','hima-art-utility');
	$panel_name_35 = __('Permalink settings','hima-art-utility');
	$panel_name_36 = __('Privacy settings','hima-art-utility');

	$panel_des_1 = __('These are enabled by default (to disable them, add a comment (//) at the beginning).','hima-art-utility');
	$panel_des_2 = __('These are disabled by default (to apply them, uncomment the page you want to add them to).','hima-art-utility');

	$panel_cat_1 = __('Posts, patterns, media, etc.','hima-art-utility');
	$panel_cat_2 = __('Appearance','hima-art-utility');
	$panel_cat_3 = __('Tool','hima-art-utility');
	$panel_cat_4 = __('Setting','hima-art-utility');

//コードの内容
$code = "function ha_change_admin_style_allowed_hooks( \$allowed_hooks ){
	$hooks = array(
		//$panel_des_1
		'index.php', // $panel_name_1
		'edit.php', // $panel_name_2
		'edit-comments.php', //$panel_name_3
		'upload.php', // $panel_name_4
		'media-new.php', //$panel_name_5
		'users.php', //$panel_name_6
		'profile.php', //$panel_name_7
		'user-edit.php', //$panel_name_8
		'user-new.php', //$panel_name_9
		'plugins.php', //$panel_name_10
		'themes.php', //$panel_name_11

		//$panel_des_2
			//'about.php', //$panel_name_12
			//'update-core.php', //$panel_name_13

		// $panel_cat_1
			//'post.php',  // $panel_name_14
			//'post-new.php', // $panel_name_15
			//'edit-tags.php', //$panel_name_16
			//'term.php', //$panel_name_17

		// $panel_cat_2
			//'comment.php', //$panel_name_18
			//'nav-menus.php', //$panel_name_19
			//'widgets.php', //$panel_name_20
			//'plugin-install.php', //$panel_name_21

		// $panel_cat_3
			//'tools.php', //$panel_name_22
			//'import.php', //$panel_name_23
			//'export.php', //$panel_name_24
			//'site-health.php', //$panel_name_25
			//'export-personal-data.php', //$panel_name_26
			//'erase-personal-data.php', //$panel_name_27
			//'theme-editor.php', //$panel_name_28
			//'plugin-editor.php', //$panel_name_29

		// $panel_cat_4
			//'options-general.php', // $panel_name_30
			//'options-writing.php', //$panel_name_31
			//'options-reading.php', //$panel_name_32
			//'options-discussion.php', //$panel_name_33
			//'options-media.php', //$panel_name_34
			//'options-permalink.php', //$panel_name_35
			//'options-privacy.php', //プライバシー設定$panel_name_36
	);
	
	return \$hooks;
}
add_filter('haup_login_style_with_admin_hooks_override','ha_change_admin_style_allowed_hooks');";


$content = '
<details class="accordion"  style="margin: 5px 0px 0px 0px;overflow: hidden;">
<summary class="accordion__title" style="cursor: pointer;">'.esc_html($title).'</summary>
<div class="accordion__content">
<pre>
<code>'.$code.'</code>
</pre>
</div>
</details>

';

return $content;
}