-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathan-testimonials.php
More file actions
67 lines (50 loc) · 2.01 KB
/
an-testimonials.php
File metadata and controls
67 lines (50 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/*
Plugin Name: Testimonials
Plugin Uri: https://github.com/alnever/testimonials
Description: The plugin provides functions to manage and display testimonials using a custom post type and a specific widget
Version: 1.0
Author: Alex Neverov
Author URI: http://alneverov.ru
Testimonials is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
any later version.
Testimonialsis distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Testimonials If not, see http://www.gnu.org/licenses/gpl.html.
*/
//
class An_Testimonials_Start {
public function __construct() {
// if the file is calles directly - abort
if (!defined('WPINC')) {
die;
}
register_activation_hook(__FILE__, array(self::class, 'activate_plugin'));
register_deactivation_hook(__FILE__, array(self::class, 'deactivate_plugin'));
register_uninstall_hook(__FILE__, array(self::class, 'uninstall_plugin'));
}
public static function activate_plugin() {
require_once plugin_dir_path(__FILE__) . "includes/an-testimonials-activator.php";
An_Testimonials_Activator::activate();
}
public static function dectivate_plugin() {
require_once plugin_dir_path(__FILE__) . "includes/an-testimonials-deactivator.php";
An_Testimonials_Deactivator::deactivate();
}
public static function uninstall_plugin() {
require_once plugin_dir_path(__FILE__) . "includes/an-testimonials-uninstaller.php";
An_Testimonials_Uninstaller::uninstall();
}
public function run() {
require_once plugin_dir_path(__FILE__) . "includes/an-testimonials.php";
$plugin = new An_Testimonials();
$plugin->run();
}
}
(new An_Testimonials_Start())->run();
?>