This repository has been archived by the owner on Jul 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcgc-exercises.php
executable file
·61 lines (53 loc) · 1.94 KB
/
cgc-exercises.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
<?php
/**
*
* @package CGC_Exercises
* @author Nick Haskins <[email protected]>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
*
* Plugin Name: CGC Exercise and Submissions
* Plugin URI: http://cgcookie.com
* Description: Creates an exercise and submission system.
* Version: 5.5
* GitHub Plugin URI: https://github.com/cgcookie/cgc-exercises
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Set some constants
define('CGC_EXERCISES_VERSION', '5.5');
define('CGC_EXERCISES_DIR', plugin_dir_path( __FILE__ ));
define('CGC_EXERCISES_URL', plugins_url( '', __FILE__ ));
/*----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
require_once( plugin_dir_path( __FILE__ ) . 'public/class-cgc-exercises.php' );
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*
*/
register_activation_hook( __FILE__, array( 'CGC_Exercises', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'CGC_Exercises', 'deactivate' ) );
add_action( 'plugins_loaded', array( 'CGC_Exercises', 'get_instance' ) );
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/*
*
* If you want to include Ajax within the dashboard, change the following
* conditional to:
*
* if ( is_admin() ) {
* ...
* }
*
* The code below is intended to to give the lightest footprint possible.
*/
if ( is_admin() ) {
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-cgc-exercises-admin.php' );
add_action( 'plugins_loaded', array( 'CGC_Exercises_Admin', 'get_instance' ) );
}