<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Filter &#8211; WordPress Memo</title>
	<atom:link href="https://blog.riverforest-wp.info/category/filter/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.riverforest-wp.info</link>
	<description>WordPress に関する覚え書き</description>
	<lastBuildDate>Fri, 14 Nov 2025 00:34:25 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.riverforest-wp.info/wp-content/uploads/2018/05/cropped-icon-256x256-1-32x32.png</url>
	<title>Filter &#8211; WordPress Memo</title>
	<link>https://blog.riverforest-wp.info</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Plugin Check の WordPress のフック名に関するエラーについて</title>
		<link>https://blog.riverforest-wp.info/nonprefixedhooknamefound/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Thu, 13 Nov 2025 00:14:15 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[フック]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=4122</guid>

					<description><![CDATA[はじめに 久しぶりに、Plugin Check でプラグインをチェックしていたら、 などというエラーが出てきました。 フック名は、プラグインのプレフィクス（接頭辞）が最初になければならない。 という事です。このような事は [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">はじめに</h3>



<p>久しぶりに、<strong><a href="https://ja.wordpress.org/plugins/plugin-check/" target="_blank" rel="noreferrer noopener">Plugin Check</a></strong> でプラグインをチェックしていたら、</p>



<pre class="prism line-numbers"><code class="language-php language-html">Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "****_****". </code></pre>



<p>などというエラーが出てきました。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>フック名は、プラグインのプレフィクス（接頭辞）が最初になければならない。</p>
</blockquote>



<p>という事です。このような事は知らなかったので、いろいろ調べてみました。</p>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/plugin-check/assets/icon.svg?rev=3166100" alt="Plugin Check (PCP) のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://github.com/WordPress/plugin-check" class="pluginstatsview-astyle">Plugin Check (PCP)</a></div>
			<div class="pluginstatsview-small">Plugin Check は WordPress.org のツールで、プラグインがディレクトリの要件を満たし、様々なベストプラク&#8230;</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/wordpressdotorg/">WordPress.org</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://github.com/WordPress/plugin-check#reviews" title="4.4(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-half"></span>
			</span>
	</a>(32)</span>
		<span class="pluginstatsview-card-right">最終更新: 2週間 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">8,000以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 7.0</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/plugin-check.1.9.0.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2011-09-04</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:30 時点の統計	</div>
</div>



<h3 class="wp-block-heading">プラグインハンドブック</h3>



<p>ハンドブックを調べたら、以下の様な記述がありました。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>命名衝突</p>



<p>命名衝突（「衝突」）は、2人の開発者が全く異なる目的で同じフック名を使用した場合に発生します。これにより、発見が困難なバグが生じます。そのため、他のプラグインとのフック名衝突を避けるために、フック名に一意の文字列をプレフィックスとして付けることが重要です。</p>



<p>例えば、email_body という名前のフィルターは汎用性が高いため、複数の開発者が異なるプラグインで異なる目的で使用する可能性があります。これを避けるため、プレフィックスを追加します。例えば、このハンドブックで例として使用されている関数では、wporg_ をプレフィックスとして使用しています。</p>



<p>プレフィックスを選択する際には、会社名、WPハンドル、プラグイン名など、好きなものを使用できます。目的は一意性を確保することですので、慎重に選択してください。</p>
<cite><a href="https://developer.wordpress.org/plugins/hooks/custom-hooks/" target="_blank" rel="noreferrer noopener">https://developer.wordpress.org/plugins/hooks/custom-hooks/</a></cite></blockquote>



<p>特に、言及されていません。記事の更新は、2025年3月20日となっていました。</p>



<style>
.simpleblogcard_img_block42dee13aec6883bfd1c924070468528d {
  float: right;
  padding: 10px;
}
.simpleblogcard_border42dee13aec6883bfd1c924070468528d {
  border-left: solid 8px #cd162c;
  padding: 0.25em 0.25em;
  background: transparent;
}
.simpleblogcard_title42dee13aec6883bfd1c924070468528d {
  line-height: 155%;
  font-weight: bold;
  display: block;
}
.simpleblogcard_description42dee13aec6883bfd1c924070468528d {
  line-height: 155%;
  color: #333;
}
</style>
<div class="simpleblogcard_wrap">
			<a style="text-decoration: none;" href=https://developer.wordpress.org/plugins/hooks/custom-hooks/ target="_blank" rel="noopener">
				<figure class="simpleblogcard_img_block42dee13aec6883bfd1c924070468528d">
			<img decoding="async" style="border-radius: 5px; width: 100px; height: 52px;" src="https://developer.wordpress.org/wp-content/themes/wporg-developer-2023/images/opengraph-image.png" alt="Custom Hooks – Plugin Handbook | Developer.WordPress.org" />
		</figure>
		<div class="simpleblogcard_inner">
		<div class="simpleblogcard_border42dee13aec6883bfd1c924070468528d">
			developer.wordpress.org			<div class="simpleblogcard_title42dee13aec6883bfd1c924070468528d">
				Custom Hooks – Plugin Handbook | Developer.WordPress.org			</div>
							<div class="simpleblogcard_description42dee13aec6883bfd1c924070468528d">
					An important, but often overlooked practice is using custom hooks in your plugin so that o&#8230;				</div>
					</div>
	</div>
	<div style="clear: both;"></div>
	</a>
</div>



<h3 class="wp-block-heading">代表的なプラグインの状況</h3>



<p><strong><a href="https://ja.wordpress.org/plugins/akismet/" target="_blank" rel="noreferrer noopener">Akismet</a></strong> と、<strong><a href="https://ja.wordpress.org/plugins/jetpack/" target="_blank" rel="noreferrer noopener">Jetpack</a></strong> を調べてみました。</p>



<pre class="prism line-numbers"><code class="language-php language-html">wp plugin check wordpress/wp-content/plugins/akismet | grep "NonPrefixedHooknameFound"

728     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "delete_comment".
739     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "deleted_comment".
579     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "comment_remove_author_url".
592     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "comment_add_author_url".

wp plugin check wordpress/wp-content/plugins/jetpack | grep "NonPrefixedHooknameFound"
1631    24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "updating_jetpack_version".
1768    42      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "all_plugins".
1951    24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "updating_jetpack_version".
1979    20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "updating_jetpack_version".
2740    24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "updating_jetpack_version".
4750    28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "updating_jetpack_version".
1503    51      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "is_jetpack_site".
1731    41      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_thumbnail_sizes".
1745    62      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_thumbnail_size_urls".
2066    37      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "restapi_theme_action_copy_dirs".
2083    20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "restapi_theme_after_setup_theme".
2098    20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "restapi_theme_init".
2249    41      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_allowed_post_types".
2567    57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_clients_allowed_video_uploads".
2584    39      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "video_upload_filetypes".
554     40      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "get_attachment".
743     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
985     41      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_thumbnail_sizes".
122     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_title".
332     50      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_xmlrpc_server_class".
820     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_login_failed".
842     32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_login_failed".
926     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_login".
978     32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "login_redirect".
997     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_login_failed".
1188    47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "login_redirect".
257     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_allowed_post_types".
278     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_allowed_public_metadata".
454     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "all_plugins".
272     17      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "failed_jetpack_search_query".
314     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "did_jetpack_search_query".
778     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "active_plugins".
1774    31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_subject".
710     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_akismet".
1049    17      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_akismet".
1067    17      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_akismet".
1681    32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_content".
2149    31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_is_spam_akismet".
550     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_akismet".
1124    24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_akismet".
1134    24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_akismet".
1188    43      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_subject".
1493    28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_akismet".
1954    49      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_to".
2018    35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_subject".
2240    35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "contact_form_message".
107     50      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "password_checker_common_passwords".
116     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "password_checker_minimum_password_length".
125     54      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "password_checker_minimum_entropy_bits".
267     33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "password_checker_tests".
545     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jpp_log_failed_attempt".
801     29      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jpp_allow_login".
867     55      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jpp_use_captcha_when_blocked".
902     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jpp_kill_login".
140     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "all_plugins".
226     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "all_plugins".
65      46      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "excerpt_length".
69      44      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "excerpt_more".
237     36      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "featured_content_post_ids".
252     39      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "featured_content_post_ids".
277     39      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "featured_content_post_ids".
287     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "featured_content_post_ids".
685     17      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "featured_content_default_settings".
179     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "classic_theme_helper_should_display_portfolios".
1082    17      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "portfolio-project-post-class".
178     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "classic_theme_helper_should_display_testimonials".
903     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "testimonial-entry-post-class".
93      31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_api_url".
270     32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "connection_disconnected".
610     48      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_should_publicize_published_post".
725     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_should_publicize_published_post".
105     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "pre_admin_screen_sharing".
484     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_classic_editor_form_before".
494     33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_form".
502     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_classic_editor_form_after".
185     32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpas_default_message".
201     32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpas_default_prefix".
216     32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpas_default_suffix".
894     39      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpas_submit_post?".
935     43      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_checkbox_default".
952     47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_checkbox_global_default".
1342    47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpas_submit_post?".
1385    28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "publicize_save_meta".
178     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "import_post_meta".
67      52      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_get_max_batch_size".
409     49      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "'jitm_' . $envelope-&gt;CTA-&gt;hook".
415     53      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "'jitm_' . $envelope-&gt;content-&gt;hook".
252     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "myjetpack_enqueue_scripts".
148     43      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "akismet_get_api_key".
50      27      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "deprecated_function_trigger_error".
92      27      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "deprecated_file_trigger_error".
767     45      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "subscribe_field_id".
1022    17      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "earn_track_paywalled_post_view".
1098    20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpsc_add_cookie".
477     13      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_sharing_email_send_post_subject".
3106    29      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "ai_seo_enhancer_enabled".
206     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_loaded".
236     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "enqueue_block_assets".
237     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "enqueue_block_editor_assets".
127     52      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "react_connection_errors_initial_state".
238     111     ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "active_plugins".
156     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_enabled".
158     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_authentication_errors".
120     53      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "better_password_min_length".
190     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "ical_get_current_time".
128     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "a8c_wpcom_masterbar_enqueue_rtl_notification_styles".
314     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "tiled_gallery_content_width".
509     50      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "subscribe_field_id".
353     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "easy_markdown_support_url".
571     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "content_save_pre".
578     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "content_save_pre".
870     43      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "comment_cookie_lifetime".
363     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "pre_admin_screen_sharing".
726     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "post_admin_screen_sharing".
76      16      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "start_sharing_meta_box_content".
98      16      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "end_sharing_meta_box_content".
1067    13      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_sharing_email_send_post_subject".
852     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "custom_ajax_infinite_scroll".
1834    52      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "mejs_settings".
844     32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "video_flash_params".
712     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "widget_conditions_save".
722     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "widget_conditions_delete".
489     53      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
515     53      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
67      46      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "excerpt_length".
69      44      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "excerpt_more".
1412    32      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_title".
2035    38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_allowed_post_types".
323     55      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "comment_cookie_lifetime".
178     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "post_password_expires".
143     48      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "gallery_widget_content_width".
114     45      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "widget_text".
123     53      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_widths".
175     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_maybe_disable".
195     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_maybe_disable_single_images".
216     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_load_for_images_linked_to_file".
238     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_asset_version".
289     30      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_force_enable".
312     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_thumbnails_shown".
411     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_add_data_to_container".
500     83      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_permalink".
542     48      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_localize_strings".
564     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_enqueue_assets".
1033    42      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_add_data_to_container".
1101    20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_check_blog_user_privileges".
1247    20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_check_blog_user_privileges".
1328    20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "jp_carousel_post_attachment_comment".
229     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "post_gallery".
261     59      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_title".
454     36      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "crowdsignal_shortcode_before".
478     36      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "crowdsignal_shortcode_before".
414     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "video_embed_html".
517     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "youtube_width".
528     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "youtube_height".
587     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "oembed_result".
1385    35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_content".
1388    35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_content_feed".
1410    61      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_title_rss".
1511    63      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_title_rss".
46      24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "post_flair_disable".
61      33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "likes_meta_box_title".
91      20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "start_likes_meta_box_content".
112     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "end_likes_meta_box_content".
131     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
234     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "pre_admin_screen_sharing".
433     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_likes_visible".
456     13      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_single_{$post_type}_disabled".
502     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_get_options".
521     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_index_disabled".
540     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_single_page_disabled".
559     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_attachment_disabled".
643     38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_reblogging_enabled_sitewide".
253     39      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "comment_like_button".
104     47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "is_jetpack_site".
280     69      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
595     40      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "get_attachment".
222     33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "list_pages".
680     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
922     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_inserted_post".
319     43      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "site_settings_site_format".
568     56      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "site_settings_endpoint_get".
785     33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_update_site_settings".
1063    70      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_site_icon_cleared".
1335    49      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "'site_settings_endpoint_update_' . $key".
597     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
848     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_inserted_post".
355     45      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "all_plugins".
375     34      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "show_network_active_plugins".
676     57      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
918     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_inserted_post".
1056    24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "delete_term_relationships".
1071    28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "deleted_term_relationships".
428     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "did_jetpack_search_query".
34      45      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_allowed_public_metadata".
759     41      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_allowed_post_types".
1244    38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wpl_is_enabled_sitewide".
37      31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "pre_jetpack_is_mobile".
341     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "'pre_update_jetpack_option_' . $name".
133     64      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "identity_crisis_container_id".
187     43      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "https_local_ssl_verify".
311     47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "https_local_ssl_verify".
412     44      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "plugin_action_links".
418     44      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "plugin_action_links_{$plugin_file}".
562     59      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_content".
563     59      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_excerpt".
293     24      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_remove_order_item_ids".
263     39      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_cart_item_product".
550     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_is_cart".
664     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_is_checkout".
28      31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_analytics_experimental_proxy_tracking_enabled".
46      31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_analytics_clickhouse_enabled".
65      20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_analytics_init".
128     33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "intermediate_image_sizes_advanced".
1244    31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "photon_validate_image_url".
101     13      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "classic_theme_helper_theme_compat_files".
46      41      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_content".
56      47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "tonesque_image_url".
308     46      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "video_embed_html".
159     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "the_content".
81      33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "breve_enabled".
85      33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "ai_seo_enhancer_enabled".
99      28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "list_to_table_transform_enabled".
113     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "ai_response_feedback_enabled".
130     41      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "earn_get_user_subscriptions_for_site_id".
231     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "earn_user_has_access".
124     45      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "earn_get_user_subscriptions_for_site_id".
85      36      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "option_jetpack_active_modules".
97      36      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "option_jetpack_active_modules".
409     44      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "get_the_excerpt".
58      47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "tonesque_image_url".
63      72      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "active_plugins".
230     39      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_cart_item_product".
163     27      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "woocommerce_is_checkout".
270     34      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_video_embed_handler".
154     35      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "vimeo_width".
165     36      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "vimeo_height".
256     28      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "video_embed_html".
82      38      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "brightcove_dimensions".
38      27      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "pre_jetpack_get_google_fonts_data".
112     31      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_localize_response".
408     54      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "sites_site_format".
483     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "pre_render_site_response_key".
541     47      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "sites_site_options_format".
666     20      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "post_render_site_response_key".
84      33      ERROR   WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound   Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rest_api_localize_response".</code></pre>



<p><strong>Akismet</strong> は４件ですが、<strong>Jetpack</strong> は200件以上エラーが出てきました。</p>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/akismet/assets/icon-256x256.png?rev=2818463" alt="Akismet Anti-spam: Spam Protection のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://akismet.com/" class="pluginstatsview-astyle">Akismet Anti-spam: Spam Protection</a></div>
			<div class="pluginstatsview-small">スパムのコメントやスパムをコンタクトフォームでブロックするための最善のスパム対策保護。WordPress と WooCommer&#8230;</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/automattic/">Automattic</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://akismet.com/#reviews" title="4.7(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-half"></span>
			</span>
	</a>(1174)</span>
		<span class="pluginstatsview-card-right">最終更新: 5か月 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">600万以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 6.9.4</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/akismet.5.6.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2005-10-20</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:30 時点の統計	</div>
</div>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/jetpack/assets/icon.svg?rev=2819237" alt="Jetpack &#8211; WP セキュリティ、バックアップ、高速化、成長 のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://jetpack.com" class="pluginstatsview-astyle">Jetpack &#8211; WP セキュリティ、バックアップ、高速化、成長</a></div>
			<div class="pluginstatsview-small">バックアップ、WAF、マルウェアスキャンなどの強力なワンクリックツールで、WP のセキュリティを向上させます。 統計情報、CDN&#8230;</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/automattic/">Automattic</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://jetpack.com#reviews" title="3.8(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-empty"></span>
			</span>
	</a>(2382)</span>
		<span class="pluginstatsview-card-right">最終更新: 4週間 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">300万以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 6.9.4</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/jetpack.15.6.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2011-01-20</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:30 時点の統計	</div>
</div>



<h3 class="wp-block-heading">Plugin Check を調べてみる</h3>



<p>readme.txt を、hook や name で検索してもそれらしい追加履歴は見つかりませんでした。唯一、name で似たようなものは以下でした。これはクラス名に関するプレフィクス（接頭辞）に関するものです。</p>



<pre class="prism line-numbers"><code class="language-php language-html">変更履歴
1.7.0
・Enhancement – Add prefixing check to ensure proper function and class name prefixing</code></pre>



<style>
.simpleblogcard_img_block849ebd98d1783ae95570281e9f1b77d0 {
  float: right;
  padding: 10px;
}
.simpleblogcard_border849ebd98d1783ae95570281e9f1b77d0 {
  border-left: solid 8px #cd162c;
  padding: 0.25em 0.25em;
  background: transparent;
}
.simpleblogcard_title849ebd98d1783ae95570281e9f1b77d0 {
  line-height: 155%;
  font-weight: bold;
  display: block;
}
.simpleblogcard_description849ebd98d1783ae95570281e9f1b77d0 {
  line-height: 155%;
  color: #333;
}
</style>
<div class="simpleblogcard_wrap">
			<a style="text-decoration: none;" href=https://ja.wordpress.org/plugins/plugin-check/#developers target="_blank" rel="noopener">
				<figure class="simpleblogcard_img_block849ebd98d1783ae95570281e9f1b77d0">
			<img decoding="async" style="border-radius: 5px; width: 100px; height: 32px;" src="https://ps.w.org/plugin-check/assets/banner-772x250.png?rev=3166100" alt="Plugin Check (PCP) – WordPress プラグイン | WordPress.org 日本語" />
		</figure>
		<div class="simpleblogcard_inner">
		<div class="simpleblogcard_border849ebd98d1783ae95570281e9f1b77d0">
			ja.wordpress.org			<div class="simpleblogcard_title849ebd98d1783ae95570281e9f1b77d0">
				Plugin Check (PCP) – WordPress プラグイン | WordPress.org 日本語			</div>
							<div class="simpleblogcard_description849ebd98d1783ae95570281e9f1b77d0">
					Plugin Check は WordPress.org のツールで、プラグインがディレクトリの要件を満たし、様々なベストプラクティスに従うためのチェックを提供します。				</div>
					</div>
	</div>
	<div style="clear: both;"></div>
	</a>
</div>



<h3 class="wp-block-heading">対応方法</h3>



<p>現在のフック名を生かしながら、新しいフック名を設定し移行を促すという方法があります。<code class="language-php language-html">do_action_deprecated</code> フックを利用します。</p>



<pre class="prism line-numbers"><code class="language-php language-html">/* プラグインのスラッグを myplugin とする */
function myplugin_trigger_save_hooks( $post_id ) {
    /* 新フック */
    do_action( 'myplugin_save_post_data', $post_id );

    /* 旧フックも呼び出す（互換性維持）*/
    do_action_deprecated(
        'mp_save_post', /* 旧フック */
        array( $post_id ),
        '5.0.0', /* フックを非推奨にした WordPress のバージョン */
        'myplugin_save_post_data',/* 旧フックを代替えする新フック */
        'Please use myplugin_save_post_data instead.' /* 新フックへの乗り換えを促すメッセージ */
    );
}</code></pre>



<style>
.simpleblogcard_img_block47c67276d7df08bd10b3888d5b71d67b {
  float: right;
  padding: 10px;
}
.simpleblogcard_border47c67276d7df08bd10b3888d5b71d67b {
  border-left: solid 8px #cd162c;
  padding: 0.25em 0.25em;
  background: transparent;
}
.simpleblogcard_title47c67276d7df08bd10b3888d5b71d67b {
  line-height: 155%;
  font-weight: bold;
  display: block;
}
.simpleblogcard_description47c67276d7df08bd10b3888d5b71d67b {
  line-height: 155%;
  color: #333;
}
</style>
<div class="simpleblogcard_wrap">
			<a style="text-decoration: none;" href=https://developer.wordpress.org/reference/functions/do_action_deprecated/ target="_blank" rel="noopener">
				<figure class="simpleblogcard_img_block47c67276d7df08bd10b3888d5b71d67b">
			<img decoding="async" style="border-radius: 5px; width: 100px; height: 52px;" src="https://developer.wordpress.org/wp-content/themes/wporg-developer-2023/images/opengraph-image.png" alt="do_action_deprecated() – Function | Developer.WordPress.org" />
		</figure>
		<div class="simpleblogcard_inner">
		<div class="simpleblogcard_border47c67276d7df08bd10b3888d5b71d67b">
			developer.wordpress.org			<div class="simpleblogcard_title47c67276d7df08bd10b3888d5b71d67b">
				do_action_deprecated() – Function | Developer.WordPress.org			</div>
							<div class="simpleblogcard_description47c67276d7df08bd10b3888d5b71d67b">
					Fires functions attached to a deprecated action hook.				</div>
					</div>
	</div>
	<div style="clear: both;"></div>
	</a>
</div>



<p>上記の様にすると、<code class="language-php language-html">WP_DEBUG = true</code> のとき、以下の様なメッセージが出ます。</p>



<pre class="prism line-numbers"><code class="language-php language-html">The 'mp_save_post' hook is deprecated since version 5.0.0! 
Use 'myplugin_save_post_data' instead.</code></pre>



<p>しかし、こんなメッセージをマメにチェックする人なんていませんね。</p>



<h3 class="wp-block-heading">終わりに</h3>



<p>このエラーに関しては、WordPress プラグインチームが、「新規にプラグインを作成する場合に、プラグイン名をフックのプレフィクス（接頭辞）にしてください。」との推奨事項なのではないかと推測します。世界中のプラグインがこのエラーに従ってフック名を修正し始めたら大変な事になりますので、この先に必須となるルールにはならないと思います。</p>



<p>無視して良いエラーなのではないかと思います。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Snippet for &#8220;Exif Details&#8221;</title>
		<link>https://blog.riverforest-wp.info/exif-details-snippet/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Fri, 08 May 2020 22:10:27 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[Caption]]></category>
		<category><![CDATA[Exif]]></category>
		<category><![CDATA[Exif Details]]></category>
		<category><![CDATA[Google Map]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Media Library]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=2301</guid>

					<description><![CDATA[Introduction Exif Details plugin has been released. Here is a snippet that uses it. How it works Snippet]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">Introduction</h3>



<p>Exif Details plugin has been released. Here is a snippet that uses it.</p>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/exif-details/assets/icon-256x256.png?rev=2298875" alt="Exif Details のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://wordpress.org/plugins/exif-details/" class="pluginstatsview-astyle">Exif Details</a></div>
			<div class="pluginstatsview-small">メディアファイルの詳細な EXIF 情報を取得します。</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/katsushi-kawamori/">Katsushi Kawamori</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://wordpress.org/plugins/exif-details/#reviews" title="5.0(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>
			</span>
	</a>(1)</span>
		<span class="pluginstatsview-card-right">最終更新: 2日 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">300以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 7.0</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/exif-details.1.11.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2020-05-05</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:29 時点の統計	</div>
</div>



<h3 class="wp-block-heading">How it works</h3>



<figure class="wp-block-video aligncenter"><video height="720" style="aspect-ratio: 1280 / 720;" width="1280" autoplay controls loop muted src="https://blog.riverforest-wp.info/wp-content/uploads/20200508/exif-details-snippet.mp4"></video></figure>



<h3 class="wp-block-heading">Snippet</h3>



<pre class="prism line-numbers"><code class="language-php language-html">/**  ==================================================
 * The original filter hook('exif_details_data'),
 * which changes the display when retrieving an Exif and storing it in metadata.
 * The following changes the display of the shooting date and time.
 *
 * @param array $exifdatas  exifdatas.
 * @param int   $id  id.
 */
function exif_details_change( $exifdatas, $id ) {
	if ( array_key_exists( 'DateTimeOriginal', $exifdatas ) ) {
		$shooting_date = str_replace( ':', '-', substr( $exifdatas&#91;'DateTimeOriginal'], 0, 10 ) );
		$shooting_time = substr( $exifdatas&#91;'DateTimeOriginal'], 10 );
		$exifdatas&#91;'DateTimeOriginal'] = $shooting_date . $shooting_time;
	}
	return $exifdatas;
}
add_filter( 'exif_details_data', 'exif_details_change', 10, 2 );

/**  ==================================================
 * When adding new media, insert the processed data into the caption.
 * Use the original action hook ('exif_details_update') with function.
 *
 * @param array $metadata  metadata.
 * @param int   $id  id.
 */
function media_caption( $metadata, $id ) {
	$mime_type = get_post_mime_type( $id );
	if ( in_array( $mime_type, array( 'image/jpeg', 'image/tiff' ) ) ) {
		do_action( 'exif_details_update', $id );
		$exifdatas = get_post_meta( $id, '_exif_details', true );
		if ( ! empty( $exifdatas ) ) {
			$camera = null;
			$f_number = null;
			$s_speed = null;
			$iso = null;
			$date = null;
			$googlemap = null;
			if ( array_key_exists( 'Model', $exifdatas ) ) {
				$camera = 'Camera:' . $exifdatas&#91;'Model'];
			}
			if ( array_key_exists( 'ApertureFNumber', $exifdatas ) ) {
				$f_number = 'F-number:' . $exifdatas&#91;'ApertureFNumber'];
			}
			if ( array_key_exists( 'ExposureTime', $exifdatas ) ) {
				$s_speed = 'Shutter speed:' . $exifdatas&#91;'ExposureTime'];
			}
			if ( array_key_exists( 'ISOSpeedRatings', $exifdatas ) ) {
				$isodata = json_decode( $exifdatas&#91;'ISOSpeedRatings'] );
				if ( is_array( $isodata ) ) {
					$iso = 'ISO:' . $isodata&#91;0];
				} else {
					$iso = 'ISO:' . $isodata;
				}
			}
			if ( array_key_exists( 'DateTimeOriginal', $exifdatas ) ) {
				$date = 'Date:' . $exifdatas&#91;'DateTimeOriginal'];
			}
			if ( array_key_exists( 'latitude_dd', $exifdatas ) &amp;&amp; array_key_exists( 'longtitude_dd', $exifdatas ) ) {
				$googlemap = '&lt;a href="https://www.google.com/maps?q=' . $exifdatas&#91;'latitude_dd'] . ',' . $exifdatas&#91;'longtitude_dd'] . '">Google Map&lt;/a>';
			}
			$caption = sprintf( '%1$s %2$s %3$s %4$s %5$s %6$s', $camera, $f_number, $s_speed, $iso, $date, $googlemap );
			$caption = rtrim( $caption );
			$caption = preg_replace( '/\s(?=\s)/', '', $caption );
			$media_post = array(
				'ID'           => $id,
				'post_excerpt' => $caption,
			);
			wp_update_post( $media_post );
		}
	}
	return $metadata;
}
add_filter( 'wp_generate_attachment_metadata', 'media_caption', 10, 2 );</code></pre>
]]></content:encoded>
					
		
		<enclosure url="https://blog.riverforest-wp.info/wp-content/uploads/20200508/exif-details-snippet.mp4" length="26924506" type="video/mp4" />

			</item>
		<item>
		<title>Exif Details の応用</title>
		<link>https://blog.riverforest-wp.info/exif-details-caption/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Fri, 08 May 2020 12:12:49 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[EIXF]]></category>
		<category><![CDATA[Google Map]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[キャプション]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=2293</guid>

					<description><![CDATA[はじめに プラグイン Exif Details を公開しましたが、その応用を記します。 撮影日時をフィルター 投稿時にメディアライブラリのキャプションに撮影データ挿入 撮影データ内に、Google Map へのリンクを入 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">はじめに</h3>



<p>プラグイン <strong>Exif Details</strong> を公開しましたが、その応用を記します。</p>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/exif-details/assets/icon-256x256.png?rev=2298875" alt="Exif Details のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://wordpress.org/plugins/exif-details/" class="pluginstatsview-astyle">Exif Details</a></div>
			<div class="pluginstatsview-small">メディアファイルの詳細な EXIF 情報を取得します。</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/katsushi-kawamori/">Katsushi Kawamori</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://wordpress.org/plugins/exif-details/#reviews" title="5.0(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>
			</span>
	</a>(1)</span>
		<span class="pluginstatsview-card-right">最終更新: 2日 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">300以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 7.0</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/exif-details.1.11.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2020-05-05</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:29 時点の統計	</div>
</div>



<ul class="wp-block-list"><li>撮影日時をフィルター</li><li>投稿時にメディアライブラリのキャプションに撮影データ挿入</li><li>撮影データ内に、Google Map へのリンクを入力</li></ul>



<h3 class="wp-block-heading">動作</h3>



<p>まずは、どのようになるか以下の動画をご覧ください。</p>



<figure class="wp-block-video"><video height="720" style="aspect-ratio: 1280 / 720;" width="1280" autoplay controls loop muted src="https://blog.riverforest-wp.info/wp-content/uploads/20200508/exif-details-caption.mp4"></video></figure>



<h3 class="wp-block-heading">コード</h3>



<pre class="prism line-numbers"><code class="language-php language-html">/**  ==================================================
 * オリジナルフィルターフック('exif_details_data'),
 * EXIF を取得してメタデータに保存する際の表示を変更する。
 * 以下は、撮影日時の表示を変更します。
 *
 * @param array $exifdatas  exifdatas.
 * @param int   $id  id.
 */
function exif_details_change( $exifdatas, $id ) {
	if ( array_key_exists( 'DateTimeOriginal', $exifdatas ) ) {
		$shooting_date = str_replace( ':', '-', substr( $exifdatas&#91;'DateTimeOriginal'], 0, 10 ) );
		$shooting_time = substr( $exifdatas&#91;'DateTimeOriginal'], 10 );
		$exifdatas&#91;'DateTimeOriginal'] = $shooting_date . $shooting_time;
	}
	return $exifdatas;
}
add_filter( 'exif_details_data', 'exif_details_change', 10, 2 );

/**  ==================================================
 * メディア新規追加時に、キャプションに加工したデータを挿入します。
 * 関数内でオリジナルアクションフック('exif_details_update')を使用します。
 *
 * @param array $metadata  metadata.
 * @param int   $id  id.
 */
function media_caption( $metadata, $id ) {
	$mime_type = get_post_mime_type( $id );
	if ( in_array( $mime_type, array( 'image/jpeg', 'image/tiff' ) ) ) {
		do_action( 'exif_details_update', $id );
		$exifdatas = get_post_meta( $id, '_exif_details', true );
		if ( ! empty( $exifdatas ) ) {
			$camera = null;
			$f_number = null;
			$s_speed = null;
			$iso = null;
			$date = null;
			$googlemap = null;
			if ( array_key_exists( 'Model', $exifdatas ) ) {
				$camera = 'カメラ:' . $exifdatas&#91;'Model'];
			}
			if ( array_key_exists( 'ApertureFNumber', $exifdatas ) ) {
				$f_number = 'F値:' . $exifdatas&#91;'ApertureFNumber'];
			}
			if ( array_key_exists( 'ExposureTime', $exifdatas ) ) {
				$s_speed = 'シャッタースピード:' . $exifdatas&#91;'ExposureTime'];
			}
			if ( array_key_exists( 'ISOSpeedRatings', $exifdatas ) ) {
				$isodata = json_decode( $exifdatas&#91;'ISOSpeedRatings'] );
				if ( is_array( $isodata ) ) {
					$iso = 'ISO:' . $isodata&#91;0];
				} else {
					$iso = 'ISO:' . $isodata;
				}
			}
			if ( array_key_exists( 'DateTimeOriginal', $exifdatas ) ) {
				$date = '撮影日時:' . $exifdatas&#91;'DateTimeOriginal'];
			}
			if ( array_key_exists( 'latitude_dd', $exifdatas ) &amp;&amp; array_key_exists( 'longtitude_dd', $exifdatas ) ) {
				$googlemap = '&lt;a href="https://www.google.com/maps?q=' . $exifdatas&#91;'latitude_dd'] . ',' . $exifdatas&#91;'longtitude_dd'] . '">Google Map&lt;/a>';
			}
			$caption = sprintf( '%1$s %2$s %3$s %4$s %5$s %6$s', $camera, $f_number, $s_speed, $iso, $date, $googlemap );
			$caption = rtrim( $caption );
			$caption = preg_replace( '/\s(?=\s)/', '', $caption );
			$media_post = array(
				'ID'           => $id,
				'post_excerpt' => $caption,
			);
			wp_update_post( $media_post );
		}
	}
	return $metadata;
}
add_filter( 'wp_generate_attachment_metadata', 'media_caption', 10, 2 );</code></pre>



<p></p>
]]></content:encoded>
					
		
		<enclosure url="https://blog.riverforest-wp.info/wp-content/uploads/20200508/exif-details-caption.mp4" length="29178837" type="video/mp4" />

			</item>
		<item>
		<title>WordPress 5.3 で導入される日時の関数とフィルター</title>
		<link>https://blog.riverforest-wp.info/wp5-3-datetime-function-filter/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Wed, 25 Sep 2019 15:17:37 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[data_i18n]]></category>
		<category><![CDATA[フィルターフック]]></category>
		<category><![CDATA[日時]]></category>
		<category><![CDATA[関数]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=1663</guid>

					<description><![CDATA[はじめに WordPress 5.3 は１１月にリリース予定ですが、以下の様な記事を見つけました。 新しい日時の関数とフィルターが導入されるという事で、日時の関数とフィルターを多数使用している自分のプラグイン Warek [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">はじめに</h3>



<p><strong>WordPress 5.3</strong> は１１月にリリース予定ですが、以下の様な記事を見つけました。</p>



<figure class="wp-block-embed is-type-rich is-provider-wp-oembed-blog-card wp-block-embed-wp-oembed-blog-card"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="8aYw9W3vQE"><a href="https://make.wordpress.org/core/2019/09/23/date-time-improvements-wp-5-3/">Date/Time component improvements in WordPress 5.3</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Date/Time component improvements in WordPress 5.3&#8221; &#8212; Make WordPress Core" src="https://make.wordpress.org/core/2019/09/23/date-time-improvements-wp-5-3/embed/#?secret=JOD72wi6JV#?secret=8aYw9W3vQE" data-secret="8aYw9W3vQE" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<p>新しい日時の関数とフィルターが導入されるという事で、日時の関数とフィルターを多数使用している自分のプラグイン <strong>Wareki</strong> をベータ版でテストした所、動作しない箇所があったので修正しました。その際に、いろいろテストしたので一部の関数とフィルターを以下に紹介します。</p>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/wareki/assets/icon-256x256.png?rev=2061943" alt="Wareki のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://wordpress.org/plugins/wareki/" class="pluginstatsview-astyle">Wareki</a></div>
			<div class="pluginstatsview-small">日付のフォーマット、投稿、コメント、アーカイブ、カレンダーに元号を含む日本の暦を追加します。</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/katsushi-kawamori/">Katsushi Kawamori</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://wordpress.org/plugins/wareki/#reviews" title="5.0(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>
			</span>
	</a>(3)</span>
		<span class="pluginstatsview-card-right">最終更新: 2日 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">200以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 7.0</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/wareki.2.03.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2019-04-02</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:30 時点の統計	</div>
</div>



<h3 class="wp-block-heading">関数</h3>



<pre class="prism line-numbers"><code class="language-php language-html">wp_date( $format, $timestamp = null, $timezone = null )</code></pre>



<p> <strong>date_i18n</strong> 関数の後継だと思います。 </p>



<ul class="wp-block-list">
<li>第１引数 PHP の日時のフォーマット</li>



<li>第２引数 Unix タイムスタンプ</li>



<li>第３引数 タイムゾーン</li>



<li>返り値 書式化された日時の文字列もしくは False</li>
</ul>



<p>第３引数がポイントでデフォルトではサイトで設定したタイムゾーンが入ってきます。使い方は以下の様に書きます。現在の日時を出すだけなら、第２引数・第３引数は省略します。</p>



<pre class="prism line-numbers"><code class="language-php language-html">$date_ux = 1569422086;
$date = wp_date( 'Y-m-d H:i:s', $date_ux, new DateTimeZone( 'UTC' ) );</code></pre>



<p>
以前 <strong>data_i18n</strong> 関数では、前後のコード次第で９時間ずれたりして苦労した事があったのですが、この関数ではそのような事はなくなりました。

</p>



<figure class="wp-block-embed is-type-rich is-provider-wp-oembed-blog-card"><div class="wp-block-embed__wrapper">
https://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/date_i18n
</div></figure>



<hr class="wp-block-separator has-css-opacity"/>



<pre class="prism line-numbers"><code class="language-php language-html">current_datetime()</code></pre>



<p>以下の様な日時のオブジェクトを返します。</p>



<pre class="prism line-numbers"><code class="language-php language-html">DateTimeImmutable Object ( &#91;date] =&gt; 2019-09-25 23:34:46.584458 &#91;timezone_type] =&gt; 3 &#91;timezone] =&gt; Asia/Tokyo ) </code></pre>



<h3 class="wp-block-heading">フィルター</h3>



<pre class="prism line-numbers"><code class="language-php language-html">apply_filters( 'wp_date', $date, $format, $timestamp, $timezone )</code></pre>



<ul class="wp-block-list">
<li>第１引数 書式化された日時の文字列</li>



<li>第２引数 PHP の日時のフォーマット</li>



<li>第３引数 Unix タイムスタンプ</li>



<li>第４引数 タイムゾーン返り値 日時の文字列もしくは False </li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>data_i18nフィルターとdate_formatsフィルターを使用して新しい日付のフォーマットを作成</title>
		<link>https://blog.riverforest-wp.info/data-i18n-date-formats-filter/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Wed, 10 Apr 2019 10:44:00 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[data_i18n]]></category>
		<category><![CDATA[date_formats]]></category>
		<category><![CDATA[フィルターフック]]></category>
		<category><![CDATA[日付のフォーマット]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=1139</guid>

					<description><![CDATA[はじめに 新元号が「令和」に決まりました。「令和」がとても気に入ってしまったのと、ちょうど桜の花が綺麗で気分が高揚した勢いで「Wareki」という日付を和暦にするプラグインを作成してしまいました。 初めは、get_the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">はじめに</h3>



<p>新元号が「<strong>令和</strong>」に決まりました。「<strong>令和</strong>」がとても気に入ってしまったのと、ちょうど桜の花が綺麗で気分が高揚した勢いで「<strong>Wareki</strong>」という日付を和暦にするプラグインを作成してしまいました。</p>



<div class="pluginstatsview-card-wrap">
	<div>
		<img decoding="async" src="https://ps.w.org/wareki/assets/icon-256x256.png?rev=2061943" alt="Wareki のアイコン" class="pluginstatsview-card-icon" />
		<div class="pluginstatsview-after-icon">
			<div class="pluginstatsview-bold"><a href="https://wordpress.org/plugins/wareki/" class="pluginstatsview-astyle">Wareki</a></div>
			<div class="pluginstatsview-small">日付のフォーマット、投稿、コメント、アーカイブ、カレンダーに元号を含む日本の暦を追加します。</div>
			<div class="pluginstatsview-small">作者: <a href="https://profiles.wordpress.org/katsushi-kawamori/">Katsushi Kawamori</a></div>
			<div style="clear: both;"></div>
		</div>
	</div>
	<div style="clear: both;"></div>

	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left"><a href="https://wordpress.org/plugins/wareki/#reviews" title="5.0(5点満点中)" class="pluginstatsview-astyle">	<span class="pluginstatsview-stars">
					<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>
			</span>
	</a>(3)</span>
		<span class="pluginstatsview-card-right">最終更新: 2日 前</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">200以上サイトで有効化中</span>
		<span class="pluginstatsview-card-right">検証済み: 7.0</span>
	</div>
	<div class="pluginstatsview-small">
		<span class="pluginstatsview-card-left">ダウンロード: <a href="https://downloads.wordpress.org/plugin/wareki.2.03.zip" class="dashicons dashicons-download pluginstatsview-download"></a></span>
		<span class="pluginstatsview-card-right">リリース: 2019-04-02</span>
	</div>
	<div class="pluginstatsview-small pluginstatsview-card-center">
		2026-03-31 09:30 時点の統計	</div>
</div>



<p>初めは、<strong>get_the_date</strong>、<strong>get_the_modified_date</strong>、<strong>get_the_comment_date</strong>、フィルターを利用して、日付を書き換えていたのですが、テーマによっては、これらのフィルターが使えずに、 <strong>get_the_time</strong>、<strong>get_the_modified_time</strong>、フィルターを利用する事になりました。フィルターが多くなり過ぎて、面倒になり、<strong>設定-&gt;一般-&gt;日付のフォーマット</strong>に和暦のフォーマットを追加する事を思いつきました。<strong>functions.php</strong> の <strong>date_i18n</strong>関数 を見たらフィルターを提供しているようなので使用してみました。</p>



<h3 class="wp-block-heading">コード</h3>



<pre class="prism line-numbers"><code class="language-php language-html">/* ==================================================
 * Construct
 * @since	1.00
 */
public function __construct() {

	// 日付のフォーマット
	add_filter( 'date_formats', array( $this, 'wareki_date_formats' ), 10, 1 );
	// 時刻フォーマット
	add_filter( 'time_formats', array( $this, 'wareki_time_formats' ), 10, 1 );
	// date_i18n フィルター
	add_filter( 'date_i18n', array( $this, 'wareki_date_i18n' ), 10, 4 );

}

/* ==================================================
 * Date Format Hook
 * @param	array	$date_array
 * @since	1.10
 */
public function wareki_date_formats( $date_array ) {

	// 元号を K とし、元号の略号を k とする
	$add_array = array( "K年n月j日", "k年n月j日" );

 	return array_merge($date_array, $add_array);

}

/* ==================================================
 * Time Format Hook
 * @param	array	$time_array
 * @since	1.10
 */
public function wareki_time_formats( $time_array ) {

	// 午前午後を E とする
	$add_array = array( "Eg時i分" );

 	return array_merge($time_array, $add_array);

}

/* ==================================================
 * Wareki date_i18n Hook
 * @param	string	$j
 * @param	string	$req_format
 * @param	int	$i
 * @param	bool	$gmt
 * @return	string	$j
 * @since	1.10
 */
public function wareki_date_i18n( $j, $req_format, $i, $gmt ) {

	// それぞれのフォーマット文字が見つかったら、
	// タイムスタンプ $i、文字 $j などを関数に送り、
	// 変更した文字を返す。
	if ( strpos($req_format, 'K') !== false ) {
		$j = $this-&gt;gengo_date_i18n( $i, $j, 'K' );
	}

	if ( strpos($req_format, 'k') !== false ) {
		$j = $this-&gt;gengo_date_i18n( $i, $j, 'k' );
	}

	if ( strpos($req_format, 'E') !== false ) {
		$j = $this-&gt;ampm_date_i18n( $i, $j);
	}

	return $j;

}

/* ==================================================
 * Gengo date_i18n
 * @param	int	$timestamp
 * @param	string	$j
 * @param	string	$k
 * @return	string	$j
 * @since	1.10
 */
private function gengo_date_i18n( $timestamp, $j, $k ) {

	// タイムスタンプを受け取り判断
	// とりあえず令和と平成のみ

	$reiwa = 1556636400;
	$year = intval(date_i18n('Y', $timestamp));

	if ( $reiwa &lt;= $timestamp ) {
		$y = $year - 2019 + 1;
		if ( $y == 1 ) $y = "元";
		if ( $k == 'K' ) {
			$gengo = "令和";
		} else if ( $k == 'k' ) {
			$gengo = "R";
		}
		$j = str_replace($k, $gengo.$y, $j);
	} else {
		$y = $year - 1989 + 1;
		if ( $y == 1 ) $y = "元";
		if ( $k == 'K' ) {
			$gengo = "平成";
		} else if ( $k == 'k' ) {
			$gengo = "H";
		}
		$j = str_replace($k, $gengo.$y, $j);
	}

	return $j;

}

/* ==================================================
 * AM PM date_i18n
 * @param	int	$timestamp
 * @param	string	$j
 * @return	string	$j
 * @since	1.10
 */
private function ampm_date_i18n( $timestamp, $j) {

	// タイムスタンプを受け取り判断
	// 午前か午後を返す

	$ampm = date_i18n('a', $timestamp);
	if ( $ampm == 'am') {
		$e = "午前";
	} else {
		$e = "午後";
	}

	$j = str_replace("E", $e, $j);

	return $j;

}</code></pre>



<h3 class="wp-block-heading">各種画面</h3>



<p class="has-text-align-center"><strong>設定</strong></p>



<figure class="wp-block-image aligncenter"><img fetchpriority="high" loading="eager" decoding="async" width="1024" height="604" src="https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-1-1024x604.png" alt="" class="wp-image-1147" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-1-1024x604.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-1-300x177.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-1-768x453.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-1-100x59.png 100w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-1.png 1360w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="has-text-align-center"><strong>投稿</strong></p>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="1024" height="608" src="https://blog.riverforest-wp.info/wp-content/uploads/20190403/screenshot-2-1024x608.png" alt="" class="wp-image-1092" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190403/screenshot-2-1024x608.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190403/screenshot-2-300x178.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190403/screenshot-2-768x456.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190403/screenshot-2-100x59.png 100w, https://blog.riverforest-wp.info/wp-content/uploads/20190403/screenshot-2.png 1261w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="has-text-align-center"><strong>プラグイン（</strong><a href="https://ja.wordpress.org/plugins/legacy-google-calendar-events/"><strong>Legacy Google Calendar Events 2.4</strong></a><strong> ）のイベント画面</strong></p>



<figure class="wp-block-image aligncenter"><img loading="lazy" decoding="async" width="1024" height="546" src="https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-2-1024x546.png" alt="" class="wp-image-1148" srcset="https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-2-1024x546.png 1024w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-2-300x160.png 300w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-2-768x409.png 768w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-2-100x53.png 100w, https://blog.riverforest-wp.info/wp-content/uploads/20190410/screenshot-2.png 1663w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">おわりに</h3>



<p><strong>get_the_date</strong>、<strong>get_the_modified_date</strong>、<strong>get_the_comment_date</strong>、<strong>get_the_time</strong>、<strong>get_the_modified_time</strong> フィルターが不要になりました。</p>



<p>なお、年別、月別、日別、アーカイブとウィジェットにはこの方法は使用できません。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WordPress で新規ユーザー登録通知メールをカスタマイズするフィルター</title>
		<link>https://blog.riverforest-wp.info/wp_new_user_notification_email/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Thu, 11 Oct 2018 01:29:34 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[フィルター]]></category>
		<category><![CDATA[ユーザー登録]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=512</guid>

					<description><![CDATA[はじめに 新規ユーザー登録時の通知メールのカスタマイズは、WordPress 4.9.0 以前では、wp_new_user_notification という pluggable 関数を用いて可能でしたが、pluggabl [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">はじめに</h2>



<p>新規ユーザー登録時の通知メールのカスタマイズは、WordPress 4.9.0 以前では、wp_new_user_notification という pluggable 関数を用いて可能でしたが、pluggable 関数の性質上制約があり、一工夫が必要でした。WordPress 4.9.0 から、フィルターが導入され使いやすくなりました。記事としてはどこにも紹介されていなようなので、書きます。</p>



<figure class="wp-block-embed is-type-rich is-provider-wp-oembed-blog-card-handler"><div class="wp-block-embed__wrapper">
http://wpdocs.osdn.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/wp_new_user_notification
</div></figure>



<h2 class="wp-block-heading">wp_new_user_notification_email フィルター</h2>



<p>以下の様な使い方をします。第１引数は登録されたユーザーのメール情報を配列[to（メールアドレス）、subject（題名）、message（本文）、headers（ヘッダー）の４つ]、第2引数はユーザーオブジェクト、第３引数はサイトのタイトルを返します。<br>
</p>



<pre class="prism line-numbers"><code class="language-php language-html">add_filter( 'wp_new_user_notification_email', 'regist_user_notify_mail', 10, 3 );
function regist_user_notify_mail( $wp_mail, $user, $blogname ) {

// ユーザー情報を取得
$user_info = get_userdata( $user-&gt;ID );
$unm = $user_info-&gt;user_login;
$pswd = $user_info-&gt;user_pass;

// 題名
$title = sprintf( __('[%s] Your username and password'), $blogname　);

// 本文
$message  = __('Hi there,') . "\r\n\r\n";
$message .= sprintf( __("Welcome to %s! Here's how to log in:"), $blogname　) . "\r\n\r\n";
$message .= wp_login_url() . "\r\n";
$message .= sprintf( __('Username: %s'), $unm ) . "\r\n";
$message .= sprintf( __('If you have any problems, please contact me at %s.'), get_option('admin_email') ) . "\r\n\r\n"

// 配列に格納
$wp_mail['subject'] = $title;
$wp_mail['message'] = $message;

return $wp_mail;

}</code></pre>



<h2 class="wp-block-heading">その他</h2>



<p>管理者あての通知メールの場合は、wp_new_user_notification_email_admin フィルターを使います。使用方法は、上記と同じです。</p>



<h2 class="wp-block-heading">参考</h2>



<figure class="wp-block-embed is-type-rich is-provider-wp-oembed-blog-card-handler"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="jLs1krmzOJ"><a href="https://developer.wordpress.org/reference/hooks/wp_new_user_notification_email/">wp_new_user_notification_email</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;wp_new_user_notification_email&#8221; &#8212; WordPress Developer Resources" src="https://developer.wordpress.org/reference/hooks/wp_new_user_notification_email/embed/#?secret=BraTcMSoDZ#?secret=jLs1krmzOJ" data-secret="jLs1krmzOJ" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<p></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ユーザー登録を制限するフィルター</title>
		<link>https://blog.riverforest-wp.info/option_users_can_register/</link>
		
		<dc:creator><![CDATA[Katsushi Kawamori]]></dc:creator>
		<pubDate>Mon, 08 Oct 2018 15:09:19 +0000</pubDate>
				<category><![CDATA[Filter]]></category>
		<category><![CDATA[ユーザー登録]]></category>
		<guid isPermaLink="false">https://blog.riverforest-wp.info/?p=501</guid>

					<description><![CDATA[はじめに 現在、WordPress で Webサービスを構築中です。６日間の期限付き使用で、その際に、サーバーを１人のユーザが登録したら占有させたいと思い、option_users_can_register というフィル [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">はじめに</h2>



<p>現在、WordPress で Webサービスを構築中です。６日間の期限付き使用で、その際に、サーバーを１人のユーザが登録したら占有させたいと思い、option_users_can_register というフィルターを使いました。日本語で検索しても出てこないので、入用な方もいるかもしれないと思い書きます。</p>



<h2 class="wp-block-heading">使い方</h2>



<p>投稿者権限で、登録されたメタ情報を探して、それがあれば制限するという事をしています。</p>



<pre class="prism line-numbers"><code class="language-php language-html">add_filter( 'option_users_can_register', 'limit_capa_users' );
function limit_capa_users( $option ) {

if ( FALSE === $option ) return $option;

global $wpdb;
$wp_capa = 'wp_capabilities';
$author = '%%author%%';
$user_id = $wpdb-&gt;get_var($wpdb-&gt;prepare("SELECT user_id
FROM $wpdb-&gt;usermeta
WHERE meta_key = %s
AND meta_value LIKE %s"
, $wp_capa, $author));

if ( $user_id ) return FALSE;

return $option;

}</code></pre>



<h2 class="wp-block-heading">その他</h2>



<p>ユーザー数を登録数で制限させるような事もできます。以下の例ですと１００名以上のユーザー登録で制限されます。</p>



<pre class="prism line-numbers"><code class="language-php language-html">add_filter( 'option_users_can_register', 'limit_capa_user_count' );
function limit_capa_user_count( $option ) {

if ( FALSE === $option ) return $option;

global $wpdb;
$user_count = $wpdb-&gt;get_var("SELECT COUNT(ID) FROM $wpdb-&gt;users");

$limit = 100;
if ( $user_count &gt; $limit ) return FALSE;

return $option;

}</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
