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

Chapter 3. Social Bookmarking

Now that we've covered the component parts of a WordPress plugin, it's time to write something more substantial. In this chapter, we will create a plugin that allows visitors to bookmark each of our posts using the social bookmarking service http://www.digg.com. We are going to learn a bit more about the WordPress API and by the time we're done, we will have in our toolbox a simple coding pattern that is applicable to many other plugins we may want to write, such as one that creates a Facebook "Like" button.

In this chapter, you will learn or review the following points:

  • How to plan your plugin architecture and write code in a methodical and testable way
  • How to use several WordPress API functions, such as how to retrieve the title and permalink URL of each post
  • How to use WordPress hooks to execute your plugin code
  • How to check the WordPress version
  • How to include external JavaScript files

We're going to build this slowly and test it as we go so you can see how each component works. Let's get started!

主站蜘蛛池模板: 泰州市| 和田市| 剑阁县| 武宁县| 鄄城县| 永兴县| 怀远县| 大关县| 扶绥县| 桃江县| 青浦区| 金塔县| 定陶县| 乌恰县| 台山市| 鞍山市| 康定县| 邢台市| 临朐县| 泾川县| 安新县| 文昌市| 东光县| 霍城县| 牡丹江市| 黄骅市| 顺平县| 南宫市| 孟村| 山阴县| 西贡区| 桓仁| 南投县| 曲松县| 蓬安县| 克拉玛依市| 东丽区| 茶陵县| 宁远县| 宝山区| 红桥区|