| 1 |
<?php |
| 2 |
/** |
| 3 |
* WordPress plugin "TablePress" main file, responsible for initiating the plugin |
| 4 |
* |
| 5 |
* @package TablePress |
| 6 |
* @author Tobias Bäthge |
| 7 |
* @version 1.9.2 |
| 8 |
*/ |
| 9 |
|
| 10 |
/* |
| 11 |
Plugin Name: TablePress |
| 12 |
Plugin URI: https://tablepress.org/ |
| 13 |
Description: Embed beautiful and feature-rich tables into your posts and pages, without having to write code. |
| 14 |
Version: 1.9.2 |
| 15 |
Author: Tobias Bäthge |
| 16 |
Author URI: https://tobias.baethge.com/ |
| 17 |
Author email: wordpress@tobias.baethge.com |
| 18 |
Text Domain: tablepress |
| 19 |
Domain Path: /i18n |
| 20 |
License: GPL 2 |
| 21 |
Donate URI: https://tablepress.org/donate/ |
| 22 |
*/ |
| 23 |
|
| 24 |
/* Copyright 2012-2019 Tobias Bäthge |
| 25 |
|
| 26 |
This program is free software; you can redistribute it and/or modify |
| 27 |
it under the terms of the GNU General Public License, version 2, as |
| 28 |
published by the Free Software Foundation. |
| 29 |
|
| 30 |
This program is distributed in the hope that it will be useful, |
| 31 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 32 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 33 |
GNU General Public License for more details. |
| 34 |
|
| 35 |
You should have received a copy of the GNU General Public License |
| 36 |
along with this program; if not, write to the Free Software |
| 37 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 38 |
*/ |
| 39 |
|
| 40 |
// Prohibit direct script loading. |
| 41 |
defined( 'ABSPATH' ) || die( 'No direct script access allowed!' ); |
| 42 |
|
| 43 |
// Define certain plugin variables as constants. |
| 44 |
if ( ! defined( 'TABLEPRESS_ABSPATH' ) ) { |
| 45 |
define( 'TABLEPRESS_ABSPATH', plugin_dir_path( __FILE__ ) ); |
| 46 |
} |
| 47 |
|
| 48 |
if ( ! defined( 'TABLEPRESS__FILE__' ) ) { |
| 49 |
define( 'TABLEPRESS__FILE__', __FILE__ ); |
| 50 |
} |
| 51 |
|
| 52 |
if ( ! defined( 'TABLEPRESS_BASENAME' ) ) { |
| 53 |
define( 'TABLEPRESS_BASENAME', plugin_basename( TABLEPRESS__FILE__ ) ); |
| 54 |
} |
| 55 |
|
| 56 |
/* |
| 57 |
* Define global JSON encoding options that TablePress uses. |
| 58 |
* We don't escape slashes (anymore), which makes search/replace of URLs in the database much easier. |
| 59 |
*/ |
| 60 |
if ( ! defined( 'TABLEPRESS_JSON_OPTIONS' ) ) { |
| 61 |
$tablepress_json_options = 0; |
| 62 |
if ( defined( 'JSON_UNESCAPED_SLASHES' ) ) { |
| 63 |
$tablepress_json_options |= JSON_UNESCAPED_SLASHES; // Introduced in PHP 5.4. |
| 64 |
} |
| 65 |
define( 'TABLEPRESS_JSON_OPTIONS', $tablepress_json_options ); |
| 66 |
unset( $tablepress_json_options ); |
| 67 |
} |
| 68 |
|
| 69 |
/** |
| 70 |
* Load TablePress class, which holds common functions and variables. |
| 71 |
*/ |
| 72 |
require_once TABLEPRESS_ABSPATH . 'classes/class-tablepress.php'; |
| 73 |
|
| 74 |
// Start up TablePress on WordPress's "init" action hook. |
| 75 |
add_action( 'init', array( 'TablePress', 'run' ) ); |
| 76 |
|