| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: WP-Discourse |
| 4 |
* Description: Use Discourse as a community engine for your WordPress blog |
| 5 |
* Version: 2.5.9 |
| 6 |
* Requires at least: 5.1 |
| 7 |
* Requires PHP: 5.6 |
| 8 |
* Author: Discourse |
| 9 |
* Text Domain: wp-discourse |
| 10 |
* Domain Path: /languages |
| 11 |
* Author URI: https://github.com/discourse/wp-discourse |
| 12 |
* Plugin URI: https://github.com/discourse/wp-discourse |
| 13 |
* GitHub Plugin URI: https://github.com/discourse/wp-discourse |
| 14 |
* |
| 15 |
* @package WPDiscourse |
| 16 |
*/ |
| 17 |
|
| 18 |
/** Copyright 2014 Civilized Discourse Construction Kit, Inc (team@discourse.org) |
| 19 |
* |
| 20 |
* This program is free software; you can redistribute it and/or modify |
| 21 |
* it under the terms of the GNU General Public License as published by |
| 22 |
* the Free Software Foundation; either version 2 of the License, or |
| 23 |
* (at your option) any later version. |
| 24 |
* |
| 25 |
* This program is distributed in the hope that it will be useful, |
| 26 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 |
* GNU General Public License for more details. |
| 29 |
* |
| 30 |
* You should have received a copy of the GNU General Public License |
| 31 |
* along with this program; if not, write to the Free Software |
| 32 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 33 |
*/ |
| 34 |
|
| 35 |
define( 'WPDISCOURSE_PATH', plugin_dir_path( __FILE__ ) ); |
| 36 |
define( 'WPDISCOURSE_URL', plugins_url( '', __FILE__ ) ); |
| 37 |
define( 'MIN_WP_VERSION', '4.7' ); |
| 38 |
define( 'MIN_PHP_VERSION', '5.6.0' ); |
| 39 |
define( 'WPDISCOURSE_VERSION', '2.5.8' ); |
| 40 |
define( 'WPDISCOURSE_LOGO_URL', WPDISCOURSE_PATH . 'assets/icon.svg' ); |
| 41 |
$base64 = base64_encode( file_get_contents( WPDISCOURSE_LOGO_URL ) ); |
| 42 |
define( 'WPDISCOURSE_LOGO', "data:image/svg+xml;base64,$base64" ); |
| 43 |
|
| 44 |
require_once WPDISCOURSE_PATH . 'lib/plugin-utilities.php'; |
| 45 |
require_once WPDISCOURSE_PATH . 'lib/webhook-utilities.php'; |
| 46 |
require_once WPDISCOURSE_PATH . 'lib/template-functions.php'; |
| 47 |
require_once WPDISCOURSE_PATH . 'lib/utilities/public-utilities.php'; |
| 48 |
require_once WPDISCOURSE_PATH . 'lib/utilities/utilities.php'; |
| 49 |
require_once WPDISCOURSE_PATH . 'lib/discourse.php'; |
| 50 |
require_once WPDISCOURSE_PATH . 'lib/discourse-base.php'; |
| 51 |
require_once WPDISCOURSE_PATH . 'lib/discourse-comment.php'; |
| 52 |
require_once WPDISCOURSE_PATH . 'lib/discourse-publish.php'; |
| 53 |
require_once WPDISCOURSE_PATH . 'lib/sso-provider/sso.php'; |
| 54 |
require_once WPDISCOURSE_PATH . 'lib/sso-provider/discourse-sso.php'; |
| 55 |
require_once WPDISCOURSE_PATH . 'lib/sync-discourse-user.php'; |
| 56 |
require_once WPDISCOURSE_PATH . 'lib/sync-discourse-topic.php'; |
| 57 |
require_once WPDISCOURSE_PATH . 'lib/email-notification.php'; |
| 58 |
require_once WPDISCOURSE_PATH . 'lib/sso-client/sso-client-base.php'; |
| 59 |
require_once WPDISCOURSE_PATH . 'lib/wordpress-email-verification.php'; |
| 60 |
require_once WPDISCOURSE_PATH . 'lib/discourse-comment-formatter.php'; |
| 61 |
require_once WPDISCOURSE_PATH . 'lib/sso-client/nonce.php'; |
| 62 |
require_once WPDISCOURSE_PATH . 'lib/sso-client/client.php'; |
| 63 |
require_once WPDISCOURSE_PATH . 'lib/sso-client/query-redirect.php'; |
| 64 |
require_once WPDISCOURSE_PATH . 'lib/shortcodes/sso-client.php'; |
| 65 |
require_once WPDISCOURSE_PATH . 'templates/html-templates.php'; |
| 66 |
require_once WPDISCOURSE_PATH . 'admin/discourse-sidebar/discourse-sidebar.php'; |
| 67 |
require_once WPDISCOURSE_PATH . 'vendor_namespaced/autoload.php'; |
| 68 |
require_once WPDISCOURSE_PATH . 'lib/logs/logger.php'; |
| 69 |
require_once WPDISCOURSE_PATH . 'admin/admin.php'; |
| 70 |
require_once WPDISCOURSE_PATH . 'blocks/comments/comments.php'; |
| 71 |
|
| 72 |
new WPDiscourse\Discourse\Discourse(); |
| 73 |
$discourse_email_notification = new WPDiscourse\EmailNotification\EmailNotification(); |
| 74 |
$discourse_publish = new WPDiscourse\DiscoursePublish\DiscoursePublish( $discourse_email_notification ); |
| 75 |
new WPDiscourse\Admin\DiscourseSidebar( $discourse_publish ); |
| 76 |
$discourse_comment_formatter = new WPDiscourse\DiscourseCommentFormatter\DiscourseCommentFormatter(); |
| 77 |
new WPDiscourse\DiscourseComment\DiscourseComment( $discourse_comment_formatter ); |
| 78 |
new WPDiscourse\WordPressEmailVerification\WordPressEmailVerification( 'discourse_email_verification_key', 'discourse' ); |
| 79 |
new WPDiscourse\DiscourseSSO\DiscourseSSO(); |
| 80 |
new WPDiscourse\SyncDiscourseUser\SyncDiscourseUser(); |
| 81 |
new WPDiscourse\SyncDiscourseTopic\SyncDiscourseTopic(); |
| 82 |
new WPDiscourse\SSOClient\Client(); |
| 83 |
new WPDiscourse\SSOClient\QueryRedirect(); |
| 84 |
new WPDiscourse\SSOClient\SSOClientShortcode(); |
| 85 |
|