Building WordPress Plugins with Object Oriented Concept

category:  WordPress

When I develop the custom plugin, I prefer to build the custom plugin with Object-Oriented Programming(OOP) to avoid the conflict from other plugins or the themes. Plus my code is cleaner and more organized. Today I will share how to create the report plugin with OOP. Here what the plugin does: The plugin will display the data regarding the criteria. I use the datatable plugin for the data table with search, pagination and column sort features. The datatable plugin has … Read More

How to create the shortcode in the WordPress plugin

category:  WordPress

Create the shortcode is very simple. Only one thing you have to remember is to print out the content from the callback function. You can add the content to the variable and return this variable in the callback function. However, there may be some cases that you don’t want to store everything in one variable and return it. In this case, you can use ob_start() and ob_get_clean(). I will give you these two examples. In my tutorial, I use the class … Read More