Saturday, December 16, 2017
plugin development

wordpress plugin development


After a long time I got a requirement to wordpress plugin development, you all know one thing I usually work on codeigniter projects, I don’t have knowledge in wordpress plugin development, so I want to share my learning experience with you all.
Let’s start now, before going to develop plugin let’s check mandatory things to know about wordpress.

  • Knowledge on php technology
  • WordPress folder structure.
  • Adding plugins to Wp-content/plugins/your plugins
  • Adding themes to Wp-content/Themes/your themes
  • Installing the wordpress
  • Creating database and linking with your project by updating wp-config.php file in project root folder.
  • Creating admin panel and using admin panel functionality.

After learning above things you will get an idea about wordpress.
Now what we need to create to develop plugin?
Its simple just create a folder under wp-content/plugins/My_demo_plugin
Under this folder create a php file with plugin name as My_demo_plugin.php, we can create php file with different file name, to avoid duplicate names and functions, we use unique filenames and function names.
Now add below details to your plugin file My_demo_plugin.php

Now save the file and open your project and login to your admin panel and check plugins tab in left sidebar, you will see your plugin My Demo Plugin there.

Now check the details you have provided to the plugin like Author, Description etc.Once done! Click on active link under plugin to activate your wordpress plugin.

Hurrah!! We created wordpress plugin, now it’s time to create functionality for our wordpress plugin
To write code functionality for our plugin we need to learn about wordpress hooks , there are two types of hooks let’s check what exactly they do in wordpress plugin.

  • Actions hook
  • Filters hook

Action hook:

Actions are hooks that the wordpress core launches at specific point at execution or when a specific event or action occurs.

Filters hook:

filter are the hooks that wordpress launches to modify the database tables or sending the response to the browser screen.We can create our own filters by using add_filter() functions , but it should contain returning a string that can be filtered .

We need more particle work to done, for this please check wordpress Hooks , you can get better understanding in this hooks topic.

Thanks for reading this article

Tags: ,
I am Saritha Reddy, a Remote codeigniter,Angularjs Developer. I have 4+ years of strong experience in designing, implementing, Programming and delivering advanced XAMPP ( Apache, MySQL and PHP) Web applications development. I am an Indian national and based Andhra Pradesh,Hyderabad. In addition to providing custom programming and design, I also have extensive experience with Open Source technologies to keep costs down and get websites running with as little fuss and wait as possible.

1 Comment

Priya February 12, 2016 at 6:46 am

hi,
Nice Article…
Its very helpful…
Thank you for sharing…

Leave a Comment