Ik ben sinds kort bezig een plugin in Wordpress te maken. Ik moet mezelf ook nog veel eigen maken. Maar als ik hiermee start, heb ik denk ik wel een geode start. Ik heb een PHP bestand in een eigen directory staan. Daaronder heb ik de map /includes/ In die map wil ik activate.php, deactivate.php en uninstall.php plaatsen.
Ik wil een plugin met één of meer database tabellen maken.
Als ik een plugin activeer, installeer ik één of meer database tabellen. Als ik die plugin deactiveer wil ik de tabellen en de data behouden blijven. zodat als ik hem weer activeer, dat ik niets kwijt ben. Pas als ik voor verwijderen van de plugin kies, wil ik dat ook de tabellen (en dus ook de data) kwijt ben.
Wie kan mij hier een tip op geven.
Met vriendelijke groet, Frits van Leeuwen
English Translation
I have recently started making a plugin in Wordpress. I also have a lot to master. But if I start with this, I think I have a good start. I have a PHP file in its own directory. Below that I have the folder / includes / In that folder I want to put activate.php, deactivate.php and uninstall.php.
I want to create a plugin with one or more database tables.
When I activate a plugin, I install one or more database tables. When I deactivate that plugin I want to keep the tables and data. so that when I reactivate it, I don't lose anything. Only when I choose to remove the plugin do I want the tables (and therefore also the data) to be lost.
Who can give me a tip on this.
Kind regards, Frits van Leeuwen