PurabTech is technical blog for Programmer and Coders
wordpress plugin create table on activation
WordPress plugin tutorial, wordpress plugin create table on activation, If you are making plugin and in plugin many times we need to create new tables. In this article I will show you how easily we can create the wordpress plugin.
wordpress plugin create table on activation
wordpress plugin create table on activation
Using following code you can create the table in wordpress database.
Now that we have the initialization function defined, we want to make sure that WordPress calls this function when the plugin is activated by a WordPress administrator. To do that, we will use the activate_ action hook. If your plugin file is wp-content/plugins/plugindir/pluginfile.php, you’ll add the following line to the main body of your plugin: