PluginProbe
Tracking Code Manager / 1.5
Tracking Code Manager v1.5
2.8.0 2.7.0 trunk 1.11.8 1.11.9 1.12.0 1.12.1 1.12.2 1.12.3 1.4 1.5 2.0.0 2.0.1 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.2.0 All 29 releases
← All changes | includes/install.php +10 -22 2.0.71.5 View file →
@@ -1,30 +1,18 @@
1 1 <?php
2 2
3 -register_activation_hook(TCMP_PLUGIN_FILE, 'tcmp_install');
4 -function tcmp_install($networkwide=NULL) {
5 - global $wpdb, $tcmp;
3 +function tcm_install($networkwide=NULL) {
4 + global $wpdb, $tcm;
6 5
7 - $time=$tcmp->Options->getPluginInstallDate();
6 + $time=$tcm->Options->getPluginInstallDate();
8 7 if($time==0) {
9 - $tcmp->Options->setPluginInstallDate(time());
8 + $tcm->Options->setPluginInstallDate(time());
10 9 }
11 - $tcmp->Options->setPluginUpdateDate(time());
12 - $tcmp->Options->setShowWhatsNew(TRUE);
13 - $tcmp->Options->setPluginFirstInstall(TRUE);
10 + $tcm->Options->setPluginUpdateDate(time());
14 11 }
15 12
16 -add_action('admin_init', 'tcmp_first_redirect');
17 -function tcmp_first_redirect() {
18 - global $tcmp;
19 - $v=$tcmp->Options->getShowWhatsNewSeenVersion();
20 - if($v>=0 && $v!=TCMP_WHATSNEW_VERSION) {
21 - $tcmp->Options->setShowWhatsNewSeenVersion(-1);
22 - tcmp_install();
23 - }
13 +register_activation_hook(TCM_PLUGIN_FILE, 'tcm_install');
24 14
25 - if ($tcmp->Options->isPluginFirstInstall()) {
26 - $tcmp->Options->setPluginFirstInstall(FALSE);
27 - $tcmp->Options->setShowActivationNotice(TRUE);
28 - $tcmp->Utils->redirect(TCMP_PAGE_MANAGER);
29 - }
30 -}
15 +
16 +
17 +
18 +