PluginProbe
Notibar – Notification Bar for WordPress / 3.1.0
Notibar – Notification Bar for WordPress v3.1.0
3.2.2 3.2.1.1 3.2.1 3.1.5 3.1.4 3.1.1 3.1.0 trunk 1.9.2 1.9.3 2.0 2.1.1 2.1.4 2.1.5 2.1.6 2.1.8 2.1.9
notibar / includes / Plugin.php

Plugin.php in Notibar – Notification Bar for WordPress 3.1.0, at includes/Plugin.php

43 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace NjtNotificationBar;
3
4 defined('ABSPATH') || exit;
5 /**
6 * Plugin activate/deactivate logic
7 */
8 class Plugin {
9 protected static $instance = null;
10
11 public static function getInstance() {
12 if (null == self::$instance) {
13 self::$instance = new self;
14 }
15
16 return self::$instance;
17 }
18
19 private function __construct() {
20 add_action('plugins_loaded', array($this, 'loadPluginCross'));
21 }
22
23 public function loadPluginCross() {
24 \FileBirdCross::get_instance('filebird', 'filebird+ninjateam', NJT_NOFI_PLUGIN_URL, array('filebird/filebird.php', 'filebird-pro/filebird.php'));
25 }
26
27 /** Plugin activated hook */
28 public static function activate() {
29
30 $first_time_active = get_option('njt_nofi_first_time_active');
31 $njt_nofi_review = get_option('njt_nofi_review');
32
33 if ($first_time_active === false) {
34 update_option('njt_nofi_first_time_active', 1);
35 if ($njt_nofi_review !== false) return;
36 update_option('njt_nofi_review', time() + 3*60*60*24); //After 3 days show
37 }
38 }
39
40 /** Plugin deactivate hook */
41 public static function deactivate() {
42 }
43 }