Home » Knowledge Base

Introduction to Wordpress Filters

18 November 2009 No Comment

Introduction to Wordpress Filters

What is a Filter?

Filters are functions that WordPress passes data through, at certain points in execution, just before taking some action with the data (such as adding it to the database or sending it to the browser screen).

Filters passed data between database and browser. Most inputs and outputs in wordpress need to pass through at least one filter.

You can add your own filter to a plugin or theme for special purpose.

The basic steps to add your own filters to WordPress (described in more detail below) are:

  1. Create the PHP function tha? filters the data.
  2. Hook to the filter in WordPress, by calling add_filter()
  3. Put your PHP function in a plugin file, and activate it.

We will have more look on how to create a filter in next articles.

No related posts.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.