-
Notifications
You must be signed in to change notification settings - Fork 9
/
dts_controller.php
74 lines (63 loc) · 2.72 KB
/
dts_controller.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/**
* Plugin Name: Device Theme Switcher
* Plugin URI: https://github.com/jamesmehorter/device-theme-switcher/wiki
* Description: Assign separate themes for handheld and tablet devices under Appearance > Device Themes
* Version: 3.0.2
* Author: James Mehorter | [email protected]
* Author URI: http://www.jamesmehorter.com
* License: GPLv2+
* Text Domain: device-theme-switcher
* Domain Path: /languages
*/
/**
* Copyright (c) 2015 James Mehorter (email : [email protected])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 or, at
* your discretion, any later version, 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
*/
// Bail if this file is being accessed directly
defined( 'ABSPATH' ) OR exit;
/**
* DTS_VERSION constant for use anywhere in WordPress
*/
define( 'DTS_VERSION', '3.0.2' );
define( 'DTS_URL', plugin_dir_url( __FILE__ ) );
define( 'DTS_PATH', dirname( __FILE__ ) . '/' );
/**
*
* Load the plugin core routines
*
* This is where Device Theme Switcher hooks into the WordPress (allthethings!)
* Everything from activation, deactivation, unintiall, init,
* and other WordPress hooks to build all the plugin functionality.
*/
// Include the core class
// Make available all the main plugin functionality (we won't run anything quite yet though..)
include_once( 'includes/class-core.php' );
// Activation: Install any initial settings or run any update routines
register_activation_hook( __FILE__, array( 'DTS_Core', 'do_activation' ) );
// Deactivation: Run any special routines on deactivation
register_deactivation_hook( __FILE__, array( 'DTS_Core', 'do_deactivation' ) );
// Uninstall: Remove anything stored in the database
register_uninstall_hook( __FILE__, array( 'DTS_Core', 'do_uninstall' ) );
// Startup
//
// This is where it all starts on each load..
//
// DTS_Core::get_instance() calls init() on itself,
// wherein the main plugin functionality is included,
// hooks into WordPress, and is executed when needed.
add_action( 'plugins_loaded', array( 'DTS_Core', 'get_instance' ) );
// EOF