Creating New Plugins
-
According to this page codex.www.ads-software.com/Creating_Tables_with_Plugins, this is the code you should use when creating tables with plugins. This is for when you create your table. This should prevent the action from being performed all the time, just when the plugin is activated.
if (isset($_GET['activate']) && $_GET['activate'] == 'true') {
add_action('init', 'jal_install');
}
However, this action gets performed everytime a plugin is activated. Which isn’t correct at all.
On the plugin activation page, though, it attaches the plugin name to the $_GET, but it gets removed as it goes through the wp-admin/plugins.php file for processing.
So, how do I know that only my plugin was activated?
- The topic ‘Creating New Plugins’ is closed to new replies.