| 1 |
<?php |
| 2 |
/****************************************************************************** |
| 3 |
* * |
| 4 |
* This file is part of RPB Chessboard, a WordPress plugin. * |
| 5 |
* Copyright (C) 2013-2026 Yoann Le Montagner <yo35 -at- melix.net> * |
| 6 |
* * |
| 7 |
* This program is free software: you can redistribute it and/or modify * |
| 8 |
* it under the terms of the GNU General Public License as published by * |
| 9 |
* the Free Software Foundation, either version 3 of the License, or * |
| 10 |
* (at your option) any later version. * |
| 11 |
* * |
| 12 |
* This program is distributed in the hope that it will be useful, * |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 15 |
* GNU General Public License for more details. * |
| 16 |
* * |
| 17 |
* You should have received a copy of the GNU General Public License * |
| 18 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. * |
| 19 |
* * |
| 20 |
******************************************************************************/ |
| 21 |
|
| 22 |
/* |
| 23 |
Plugin Name: RPB Chessboard |
| 24 |
Plugin URI: https://wordpress.org/plugins/rpb-chessboard/ |
| 25 |
Description: This plugin allows you to typeset and display chess diagrams and PGN-encoded chess games. |
| 26 |
Text Domain: rpb-chessboard |
| 27 |
Domain Path: /languages |
| 28 |
Author: Yoann Le Montagner |
| 29 |
Author URI: https://github.com/yo35 |
| 30 |
License: GPLv3 |
| 31 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html |
| 32 |
Requires at least: 7.1 |
| 33 |
Requires PHP: 7.2 |
| 34 |
Version: 8.1.6 |
| 35 |
*/ |
| 36 |
|
| 37 |
// Plugin version |
| 38 |
// WARNING: must corresponds to what is defined in the plugin header. Do NOT use `get_plugin_data(..)` (see #240). |
| 39 |
define( 'RPBCHESSBOARD_VERSION', '8.1.6' ); |
| 40 |
|
| 41 |
// Directories |
| 42 |
define( 'RPBCHESSBOARD_ABSPATH', plugin_dir_path( __FILE__ ) ); |
| 43 |
define( 'RPBCHESSBOARD_BASENAME', plugin_basename( __FILE__ ) ); |
| 44 |
define( 'RPBCHESSBOARD_URL', plugin_dir_url( __FILE__ ) ); |
| 45 |
|
| 46 |
|
| 47 |
// Enable localization |
| 48 |
load_plugin_textdomain( 'rpb-chessboard', false, basename( dirname( __FILE__ ) ) . '/languages' ); |
| 49 |
|
| 50 |
|
| 51 |
// Plugin initialization |
| 52 |
add_action( 'init', 'rpbchessboard_init' ); |
| 53 |
function rpbchessboard_init() { |
| 54 |
require_once RPBCHESSBOARD_ABSPATH . 'php/helpers/loader.php'; |
| 55 |
require_once RPBCHESSBOARD_ABSPATH . 'php/helpers/validation.php'; |
| 56 |
$controller = RPBChessboardHelperLoader::loadController( is_admin() ? 'ControllerAdmin' : 'ControllerFrontend' ); |
| 57 |
$controller->init(); |
| 58 |
} |
| 59 |
|