Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is hooks and types of hooks in wordpress?

Answer Posted / Lalit Kumar Yadav

Hooks in WordPress are a system that allows developers to interact with the core functionality at specific points during the execution of PHP code. This interaction can be used to customize or extend WordPress's behavior, such as adding new features, modifying existing ones, or enhancing security and performance.

There are two main types of hooks in WordPress: actions and filters.

1. Actions: These hooks allow you to execute custom functionality at various points in the WordPress life cycle (e.g., `init`, `wp_head`, and `save_post`). You can attach your functions to these action hooks using the `add_action()` function.
2. Filters: These hooks enable you to modify or manipulate data before it is saved or outputted by WordPress (e.g., post content, user registration details, and comment text). You can use the `add_filter()` function to attach your functions to filter hooks.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How much is the wordpress business plan?

154


Tell me how do I redirect users back to my blog's main page after they login?

198


Do you know what is the current version of wordpress?

186