-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathwp-discourse.php
84 lines (80 loc) · 4.22 KB
/
wp-discourse.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
75
76
77
78
79
80
81
82
83
84
<?php
/**
* Plugin Name: WP-Discourse
* Description: Use Discourse as a community engine for your WordPress blog
* Version: 2.5.6
* Requires at least: 5.1
* Requires PHP: 5.6
* Author: Discourse
* Text Domain: wp-discourse
* Domain Path: /languages
* Author URI: https://github.com/discourse/wp-discourse
* Plugin URI: https://github.com/discourse/wp-discourse
* GitHub Plugin URI: https://github.com/discourse/wp-discourse
*
* @package WPDiscourse
*/
/** Copyright 2014 Civilized Discourse Construction Kit, Inc ([email protected])
*
* 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.
*
* 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
*/
define( 'WPDISCOURSE_PATH', plugin_dir_path( __FILE__ ) );
define( 'WPDISCOURSE_URL', plugins_url( '', __FILE__ ) );
define( 'MIN_WP_VERSION', '4.7' );
define( 'MIN_PHP_VERSION', '5.6.0' );
define( 'WPDISCOURSE_VERSION', '2.5.6' );
define( 'WPDISCOURSE_LOGO_URL', WPDISCOURSE_PATH . 'assets/icon.svg' );
$base64 = base64_encode( file_get_contents( WPDISCOURSE_LOGO_URL ) );
define( 'WPDISCOURSE_LOGO', "data:image/svg+xml;base64,$base64" );
require_once WPDISCOURSE_PATH . 'lib/plugin-utilities.php';
require_once WPDISCOURSE_PATH . 'lib/webhook-utilities.php';
require_once WPDISCOURSE_PATH . 'lib/template-functions.php';
require_once WPDISCOURSE_PATH . 'lib/utilities/public-utilities.php';
require_once WPDISCOURSE_PATH . 'lib/utilities/utilities.php';
require_once WPDISCOURSE_PATH . 'lib/discourse.php';
require_once WPDISCOURSE_PATH . 'lib/discourse-base.php';
require_once WPDISCOURSE_PATH . 'lib/discourse-comment.php';
require_once WPDISCOURSE_PATH . 'lib/discourse-publish.php';
require_once WPDISCOURSE_PATH . 'lib/sso-provider/sso.php';
require_once WPDISCOURSE_PATH . 'lib/sso-provider/discourse-sso.php';
require_once WPDISCOURSE_PATH . 'lib/sync-discourse-user.php';
require_once WPDISCOURSE_PATH . 'lib/sync-discourse-topic.php';
require_once WPDISCOURSE_PATH . 'lib/email-notification.php';
require_once WPDISCOURSE_PATH . 'lib/sso-client/sso-client-base.php';
require_once WPDISCOURSE_PATH . 'lib/wordpress-email-verification.php';
require_once WPDISCOURSE_PATH . 'lib/discourse-comment-formatter.php';
require_once WPDISCOURSE_PATH . 'lib/sso-client/nonce.php';
require_once WPDISCOURSE_PATH . 'lib/sso-client/client.php';
require_once WPDISCOURSE_PATH . 'lib/sso-client/query-redirect.php';
require_once WPDISCOURSE_PATH . 'lib/shortcodes/sso-client.php';
require_once WPDISCOURSE_PATH . 'templates/html-templates.php';
require_once WPDISCOURSE_PATH . 'admin/discourse-sidebar/discourse-sidebar.php';
require_once WPDISCOURSE_PATH . 'vendor_namespaced/autoload.php';
require_once WPDISCOURSE_PATH . 'lib/logs/logger.php';
require_once WPDISCOURSE_PATH . 'admin/admin.php';
require_once WPDISCOURSE_PATH . 'blocks/comments/comments.php';
new WPDiscourse\Discourse\Discourse();
$discourse_email_notification = new WPDiscourse\EmailNotification\EmailNotification();
$discourse_publish = new WPDiscourse\DiscoursePublish\DiscoursePublish( $discourse_email_notification );
new WPDiscourse\Admin\DiscourseSidebar( $discourse_publish );
$discourse_comment_formatter = new WPDiscourse\DiscourseCommentFormatter\DiscourseCommentFormatter();
new WPDiscourse\DiscourseComment\DiscourseComment( $discourse_comment_formatter );
new WPDiscourse\WordPressEmailVerification\WordPressEmailVerification( 'discourse_email_verification_key', 'discourse' );
new WPDiscourse\DiscourseSSO\DiscourseSSO();
new WPDiscourse\SyncDiscourseUser\SyncDiscourseUser();
new WPDiscourse\SyncDiscourseTopic\SyncDiscourseTopic();
new WPDiscourse\SSOClient\Client();
new WPDiscourse\SSOClient\QueryRedirect();
new WPDiscourse\SSOClient\SSOClientShortcode();