forked from publishpress/publishpress-planner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathincludes.php
More file actions
79 lines (69 loc) · 2.83 KB
/
includes.php
File metadata and controls
79 lines (69 loc) · 2.83 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
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* @package PublishPress
* @author PublishPress
*
* Copyright (c) 2018 PublishPress
*
* ------------------------------------------------------------------------------
* Based on Edit Flow
* Author: Daniel Bachhuber, Scott Bressler, Mohammad Jangda, Automattic, and
* others
* Copyright (c ) 2009-2016 Mohammad Jangda, Daniel Bachhuber, et al.
* ------------------------------------------------------------------------------
*
* This file is part of PublishPress
*
* PublishPress 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 3 of the License, or
* (at your option ) any later version.
*
* PublishPress 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 PublishPress. If not, see <http://www.gnu.org/licenses/>.
*/
use PublishPress\Legacy\Auto_loader;
if ( ! defined('PP_LOADED')) {
$settingsPage = add_query_arg(
[
'page' => 'pp-modules-settings',
'module' => 'pp-modules-settings-settings',
],
get_admin_url(null, 'admin.php')
);
// Define contants
define('PUBLISHPRESS_VERSION', '1.18.6-beta.1');
define('PUBLISHPRESS_BASE_PATH', __DIR__);
define('PUBLISHPRESS_FILE_PATH', PUBLISHPRESS_BASE_PATH . '/' . basename(__FILE__));
define('PUBLISHPRESS_URL', plugins_url('/', __FILE__));
define('PUBLISHPRESS_SETTINGS_PAGE', $settingsPage);
define('PUBLISHPRESS_LIBRARIES_PATH', PUBLISHPRESS_BASE_PATH . '/libraries');
/**
* Use PUBLISHPRESS_BASE_PATH instead.
*
* @deprecated
*/
define('PUBLISHPRESS_ROOT', PUBLISHPRESS_BASE_PATH);
// Define the Priority for the notification/notification_status_change method
// Added to allow users select a custom priority
if ( ! defined('PP_NOTIFICATION_PRIORITY_STATUS_CHANGE')) {
define('PP_NOTIFICATION_PRIORITY_STATUS_CHANGE', 10);
}
if (file_exists(PUBLISHPRESS_BASE_PATH . '/vendor/autoload.php')) {
require_once PUBLISHPRESS_BASE_PATH . '/vendor/autoload.php';
}
// Register the autoloader
if ( ! class_exists('\\PublishPress\\Legacy\\Auto_loader')) {
require_once PUBLISHPRESS_LIBRARIES_PATH . '/Legacy/Auto_loader.php';
}
// Register the library
Auto_loader::register('\\PublishPress\\Legacy\\', PUBLISHPRESS_LIBRARIES_PATH . '/Legacy');
Auto_loader::register('\\PublishPress\\Notifications\\', PUBLISHPRESS_LIBRARIES_PATH . '/Notifications');
require_once PUBLISHPRESS_BASE_PATH . '/deprecated.php';
define('PP_LOADED', 1);
}