Skip to main content

Home/ Web Design tuts/ Group items tagged guide

Rss Feed Group items tagged

Alex Muraro

The Beginner's Guide to WordPress Actions and Filters - Tuts+ Code Article - 0 views

  • Actions are events in the WordPress page lifecycle when certain things have occurred - certain resources are loaded, certain facilities are available, and, depending on how early the action has occurred, some things have yet to load.
  • Filters are functions that WordPress passes data through during certain points of the page lifecycle. They are primarily responsible for intercepting, managing, and returning data
  • For example, say you wanted to append a short sentence about the author at the end of the content. To do this, you'd register a custom function with the_content filter and append your sentence to the content.
  • ...2 more annotations...
  • Use actions when you want to add something to the existing page such as stylesheets, JavaScript dependencies, or send an email when an event has happened.
  • Use filters when you want to manipulate data coming out of the database
  •  
    "Actions are events in the WordPress page lifecycle when certain things have occurred - certain resources are loaded, certain facilities are available, and, depending on how early the action has occurred, some things have yet to load."
1 - 4 of 4
Showing 20 items per page