Skip to Content
WordPress® All-in-One For Dummies®
book

WordPress® All-in-One For Dummies®

by Lisa Sabin-Wilson, Cory Miller, Kevin Palmer, Andrea Rennick, Michael Torbert
April 2011
Beginner to intermediate content levelBeginner to intermediate
908 pages
22h 37m
English
For Dummies
Content preview from WordPress® All-in-One For Dummies®

Identifying Functionality and Output

Actions and filters hook our functions to WordPress plugin API commands. By now, you should have an understanding of how this works and how it looks in a plugin file. In generic terms, WordPress plugins have two distinct purposes:

  • Functions: Defined within the plugin code through a combination of actions and hooks; essentially, functions define what the plugin does.
  • Output: What is displayed on your site as a result of the plugin function(s). For example, if the plugin function(s) makes calls to the database to retrieve a certain type of post (for instance, from a certain category or tag) from your content, the output is how those posts then get displayed on your site for your readers to see. Plugins can also use HTML markup and CSS to provide basic styling for the output.

Members of the WordPress community eager to learn more often ask how to go about dissecting a WordPress plugin, possibly to modify its internal functionality or even its output. In Book VII, Chapter 5, we discuss providing an API specific to your plugin. You can determine a plugin function, as well as how it outputs the result of the functions on your Web site by taking a look at the source code of the plugin.

When digging into an existing plugin that you'd like to alter, you want figure out what action and filter hooks it's using. Some plugins make this easy by putting most or all of the calls to hooks at the bottom of a file (often the primary plugin file). We use a plugin ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

WordPress® 24-Hour Trainer

WordPress® 24-Hour Trainer

George Plumley
Gaming Hacks

Gaming Hacks

Simon Carless

Publisher Resources

ISBN: 9780470877012Purchase book