- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
プラグイン API/アクションフック一覧/wp footer
このページ「プラグイン API/アクションフック一覧/wp footer」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
説明
The wp_footer action is triggered near the </body> tag of the user's template by the wp_footer() function. Although this is theme-dependent, it is one of the most essential theme hooks, so it is fairly widely supported.
This hook provides no parameters. You use this hook by having your function echo output to the browser, or by having it perform background tasks. Your functions shouldn't return, and shouldn't take any parameters.
This hook is theme-dependant which means that it is up to the author of each WordPress theme to include it. It may not be available on all themes, so you should take this into account when using it.
This hook is an action which means that it primarily acts as an event trigger, instead of a content filter. This is a semantic difference, but it will help you to remember what this hook does if you use it like this:
<?php add_action('wp_footer', 'your_function'); function your_function() { $content = '<p>This is inserted at the bottom</p>'; echo $content; } ?>
関連資料
最新英語版: WordPress Codex » Plugin API/Action Reference/wp_footer (最新版との差分)