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

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:

主站蜘蛛池模板: 囊谦县| 土默特右旗| 锡林郭勒盟| 关岭| 云浮市| 永春县| 军事| 徐汇区| 清丰县| 孝义市| 江永县| 东乌珠穆沁旗| 图木舒克市| 垦利县| 巩义市| 平南县| 淮阳县| 阳西县| 鄂州市| 宁阳县| 咸丰县| 东乌珠穆沁旗| 许昌市| 河津市| 大渡口区| 汽车| 长岛县| 志丹县| 五寨县| 高州市| 东丽区| 永定县| 涪陵区| 嘉义县| 莱州市| 定远县| 石棉县| 蓬安县| 新丰县| 安西县| 营山县|