Introduction to WordPress Filters

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.

You may like these articles :

  1. Introduction to WordPress Database: wp_options Introduction to WordPress Database: wp_options Current Version: 2.9.2 Wp_options tables...
  2. Introduction to WordPress Database: wp_users Introduction to WordPress Database: wp_users Current Version : 2.9.2 WordPress...

-

Leave a Reply