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

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!

主站蜘蛛池模板: 芷江| 泰安市| 盐边县| 顺平县| 葵青区| 永平县| 信阳市| 葵青区| 那曲县| 苍溪县| 京山县| 安达市| 兴仁县| 潜山县| 宁晋县| 怀化市| 阿合奇县| 锦屏县| 龙泉市| 万州区| 徐水县| 嘉定区| 恭城| 内乡县| 华池县| 崇明县| 兴国县| 西峡县| 耒阳市| 西吉县| 博野县| 武乡县| 石门县| 皋兰县| 彭阳县| 揭阳市| 甘洛县| 准格尔旗| 乡宁县| 承德市| 太保市|