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

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:

主站蜘蛛池模板: 九龙城区| 贵定县| 墨玉县| 板桥市| 黑水县| 武冈市| 中方县| 黄石市| 乌兰浩特市| 宁乡县| 普宁市| 宁波市| 冕宁县| 邵阳市| 锦屏县| 麟游县| 隆安县| 嘉鱼县| 宜兰县| 太康县| 安远县| 德化县| 交城县| 环江| 西华县| 安顺市| 石台县| 枝江市| 重庆市| 镇宁| 乌拉特后旗| 济源市| 福贡县| 吴堡县| 曲周县| 澄迈县| 建阳市| 阿巴嘎旗| 江城| 绥化市| 会同县|