-
Notifications
You must be signed in to change notification settings - Fork 3
/
sunrisesunset.php
49 lines (39 loc) · 1.73 KB
/
sunrisesunset.php
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
<?php
/*
* Plugin Name: Sunrise/Sunset
* Plugin URI: http://www.github.com/bengreeley/sunrisesunset
* Description: A WordPress plugin to display sunrise and sunset times for a given latitude and longitude.
* Version: 0.5
* Author: Ben Greeley
* Author URI: http://www.bengreeley.com
*/
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Activation code for plugin to create necessary fields, etc.
function activate_sunrisesunset() {
require_once plugin_dir_path( __FILE__ ) . 'inc/class-sunrisesunset-activator.php';
SunriseSunset_Activator::activate();
}
register_activation_hook( __FILE__, 'activate_sunrisesunset' );
// The code that runs during plugin deactivation.
function deactivate_sunrisesunset() {
require_once plugin_dir_path( __FILE__ ) . 'inc/class-sunrisesunset-deactivator.php';
SunriseSunset_Deactivator::deactivate('sunrisesunset');
}
register_deactivation_hook( __FILE__, 'deactivate_sunrisesunset' );
require plugin_dir_path( __FILE__) . 'inc/class-sunrisesunset.php';
new SunriseSunset();