-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgoogle-glass-comments.php
65 lines (60 loc) · 2.23 KB
/
google-glass-comments.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
<?php
/*
Plugin Name: Google Glass Comments
Plugin URI: http://example.com/
Description: WordPress plugin that delivers notifications to the site owner's Google Glass when a new comment is made on the site.
Version: 1.0
Author: OCWP Developers
Author URI: http://ocwp.org/
*/
/**
* Copyright (c) 2013 OCWP Developers. All rights reserved.
*
* Released under the GPL license
* http://www.opensource.org/licenses/gpl-license.php
*
* This is an add-on for WordPress
* http://wordpress.org/
*
* **********************************************************************
* This program 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
* (at your option) any later version.
*
* 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.
* **********************************************************************
*/
// SET UP PATH CONSTANTS
define( 'GGC', 'google-glass-comments' );
define( 'GGC_VERSION', '1.0' );
define( 'GGC_URL', plugin_dir_url( __FILE__ ) );
define( 'GGC_ABS', plugin_dir_path( __FILE__ ) );
define( 'GGC_SLUG', plugin_basename( __FILE__ ) );
define( 'GGC_REL', basename( dirname( __FILE__ ) ) );
define( 'GGC_LANG', GGC_ABS.'i18n/' );
define( 'GGC_ADMIN_PAGES', GGC_ABS.'admin-pages/' );
define( 'GGC_LIB', GGC_ABS.'lib/' );
define( 'GGC_CSS', GGC_URL.'css/' );
define( 'GGC_IMG', GGC_URL.'images/' );
define( 'GGC_JS', GGC_URL.'js/' );
// INTERNATIONALIZATION
load_plugin_textdomain( GGC, null, GGC_REL );
require_once( GGC_LIB.'hooks.php' );
require_once( GGC_LIB.'settings.php' );
require_once( GGC_LIB.'notifications.php' );
require_once( GGC_LIB.'oauth.php' );
require_once( GGC_LIB.'cron.php' );
/**
* Create the settings page
* @since 1.0
*/
function ggc_create_admin_menus() {
add_comments_page( 'Google Glass', 'Google Glass', 'edit_posts', 'google-glass-comments', 'ggc_settings_page' );
}
function ggc_settings_page() {
require_once( GGC_ADMIN_PAGES.'settings.php' );
}