Here I am going to give you introduction of WordPress plugins. As you all knows that WordPress is very popular and powerful CMS today which is written in Php (Hypertext pre processor language). The main reason for popularity of WordPress is “customization”. Imagine anything and you can implement your imagination into WordPress.
What is WordPress Plugins?
A plugin is a php script that extends or change the core functionality of wordpress. Simple, a plugin is a file which is installed in wordpress to create a new feature or change the existing feature of wordpress. Plugin can range in complexity from simple social bookmarking plugin to an extremely elaborate e-commerce package. There is no end to what plugin can do in WordPress; because of this you can find thousand of plugins available.
With the help of plugins, you do not need to modify the core functionality of wordpress. Because if you modify the core functionality and if new version of wordpress will release then it will erase your all changes. This is best practice to create your own code via plugin rather than changing the core functions.
How plugins communicate with WordPress?
WordPress has many different ways to communicate with plugins and these ways known as wordpress APIs. Each API has different way to interact with wordpress. Here is list of APIs in wordpress and their function:
- Hooks: There are mainly two types of hooks: Action and Filter hooks. Action hook enables you to trigger custom plugin code at specific point during execution. Filter helps you to edit content before or after getting data from database.
- Shortcode: A Shortcode is simple hook that wrap your all plugin code into [Shortcode]. And then you can use your shorcode into post.
- Settings: The main reason of using setting API is security. You can insert settings or create setting section of your plugin in wordpress.
- Options: You can store or retrieve option in your plugins. With the help of this API you can perform crud functionality.
- Rewrite: With the help of this API you can create your custom rewrite rules in wordpress.
- Dashboard Widgets: This API helps you to create dashboard widget which is appearing on dashboard. Dashboard widgets contain all the functionality like drag and drop, minimize etc.
- Database: You can access the wordpress data with the help of this API. This includes creating, updating, deleting, and retrieving database records for use in your plugins.
WordPress also features pluggable functions. These functions help you to override the core function of wordpress. These functions are available in “
/wp-includes/pluggable.php” file in wordpress.
There are thousands of plugins available for wordpress the internet but every time searching on internet is not good idea. We have way for this. You can see the following URL; here you will get all the plugin related to specific tasks. This is official plugin directory of wordpress.
This is just overview of plugin that what is plugin how this is work. If you want to read more detail about wordpress plugins then you can follow this link.