官术网_书友最值得收藏!

How plugins work

WordPress has designated areas that developers can leverage within their plugin; these areas are rightfully named Hooks. Currently, the two types of hooks available are Actions and Filters.

An Action is a hook that's triggered during common blogging events such as creating a post or deleting a comment. For example, the publish_post action is triggered whenever a post is finally published. Similarly, the wp_insert_comment is fired each time a website visitor leaves a comment.

A Filter, like an Action, is a hook that plugin developers use to modify various types of data before it's added to your database or displaying it to the end user. For example, the the_content filter is applied whenever your blog renders a "Posts" content. The content_save_pre filter is applied right before a blog post's body content is saved to a database.

You can learn more about Actions, Filters, and WordPress Plugins in general at:

主站蜘蛛池模板: 玛曲县| 伽师县| 霸州市| 濮阳市| 顺平县| 略阳县| 嘉定区| 临沧市| 汉阴县| 平阴县| 六枝特区| 尚志市| 沙坪坝区| 虎林市| 信丰县| 从化市| 深水埗区| 丹阳市| 包头市| 商都县| 周至县| 凯里市| 玉门市| 涪陵区| 太湖县| 石首市| 高唐县| 古田县| 凌源市| 额敏县| 柳州市| 额济纳旗| 博白县| 伊春市| 富顺县| 无锡市| 黔西县| 泗水县| 保定市| 庄浪县| 龙山县|