what is hook in wordpress

Discussion in 'WordPress' started by bhuppi890109, May 20, 2011.

  1. #1
    i am new in word press and want to know that what is hook in wordprss...and how it works..why we use it
     
    bhuppi890109, May 20, 2011 IP
  2. lelkoun

    lelkoun Active Member

    Messages:
    288
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
  3. skynet88

    skynet88 Well-Known Member

    Messages:
    958
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Hooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion. There are two kinds of hooks:

    Actions: Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API.

    Filters: Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.
     
    skynet88, May 21, 2011 IP