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

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!

主站蜘蛛池模板: 博客| 江阴市| 西乡县| 桂东县| 彭水| 日照市| 杭州市| 保定市| 饶河县| 衡山县| 青冈县| 东乡县| 苍南县| 乐业县| 邯郸县| 平和县| 铜山县| 长阳| 安阳县| 津南区| 库车县| 蓝山县| 达孜县| 潍坊市| 内江市| 长治市| 宁强县| 敦煌市| 杭锦后旗| 娄底市| 昌邑市| 象山县| 夏邑县| 阳谷县| 南阳市| 罗山县| 客服| 大荔县| 南城县| 师宗县| 衡水市|