Oct 02

WordPress hooks

by admin in website

WordPress hooks
WordPress provides a powerful mechanism for plugin functions to be called at the exact time when we need them. This functionality is accomplished by using the so called hooks.

Every time you call a page from your browser, the WordPress engine goes through every possible function it needs to render the requested page. Somewhere along the way, you can “hook” up your function and use it to affect the end result.

There are two types of WordPress hooks:
Action hooks: These are triggered by WordPress events, for example, when someone creates a post or writes a comment.

Filter hooks: These are used to modify WordPress content on the fly, like title or content of the post as it is being served to the user.

Filter hooks
We learned that filter hooks (also referred to as simply ‘filters’) are functions that process WordPress content, whether it is about to be saved in the database or displayed in the user’s browser. WordPress expects these functions to modify the content they get and return it.

Popularity: unranked [?]

Related posts:

  1. RSS Wordpress 2.8.1-2.8.2 Modify for Timeout issue odify for Timeout issue (RSS) $r['timeout'] = 20; Add this...

Related posts brought to you by Yet Another Related Posts Plugin.

Tags:


You may also be interested in the following product(s)

No Responses to “WordPress hooks”

  1. From directory:

    I have admire your unselfishness in taking the time to make this web site.

    Posted on 10. Nov, 2009 at 11:51 am #

Leave a Reply