PluginProbe
TablePress – Tables in WordPress made easy / 3.0
TablePress – Tables in WordPress made easy v3.0
3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 All 44 releases
← All changes | tablepress.php +133 -75 1.9.23.0 View file →
@@ -1,75 +1,133 @@
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' ) );
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 3.0
8 + *
9 + *
10 + * Plugin Name: TablePress
11 + * Plugin URI: https://tablepress.org/
12 + * Description: Embed beautiful and interactive tables into your WordPress website’s posts and pages, without having to write code!
13 + * Version: 3.0
14 + * Requires at least: 6.2
15 + * Requires PHP: 7.4
16 + * Author: Tobias Bäthge
17 + * Author URI: https://tablepress.org/
18 + * Author email: wordpress@tobias.baethge.com
19 + * License: GPL 2
20 + * Donate URI: https://tablepress.org/donate/
21 + *
22 + *
23 + * Copyright 2012-2024 Tobias Bäthge
24 + *
25 + * TablePress is free software: you can redistribute it and/or modify
26 + * it under the terms of the GNU General Public License, version 2, as published by
27 + * the Free Software Foundation.
28 + *
29 + * TablePress is distributed in the hope that it will be useful,
30 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 + * GNU General Public License for more details.
33 + *
34 + * You should have received a copy of the GNU General Public License
35 + * along with WordPress. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
36 + *
37 + * Note: This file must not contain PHP code that does not run on PHP < 7.4!
38 + */
39 +
40 +// Prohibit direct script loading.
41 +defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
42 +
43 +if ( ! defined( 'TABLEPRESS_IS_PLAYGROUND_PREVIEW' ) ) {
44 + define( 'TABLEPRESS_IS_PLAYGROUND_PREVIEW', false );
45 +}
46 +
47 +if ( function_exists( 'tb_tp_fs' ) ) {
48 + tb_tp_fs()->set_basename( false, __FILE__ ); // @phpstan-ignore argument.type (Wrong variable type in Freemius function docblock.)
49 +} else {
50 + /**
51 + * Helper function for easier Freemius SDK access.
52 + *
53 + * @since 2.0.0
54 + *
55 + * @return Freemius Freemius SDK instance.
56 + */
57 + function tb_tp_fs() /* No return type declaration, due to required PHP compatibility of this file! */ {
58 + global $tb_tp_fs;
59 +
60 + if ( ! isset( $tb_tp_fs ) ) {
61 + // Include Freemius SDK.
62 + require_once __DIR__ . '/libraries/freemius/start.php';
63 +
64 + $tb_tp_fs = fs_dynamic_init( array(
65 + 'id' => '10340',
66 + 'slug' => 'tablepress',
67 + 'type' => 'plugin',
68 + 'public_key' => 'pk_b215ca1bb4041cf43ed137ae7665b',
69 + 'is_premium' => false,
70 + 'has_addons' => false,
71 + 'has_paid_plans' => true,
72 + 'menu' => array(
73 + 'slug' => 'tablepress',
74 + 'contact' => false,
75 + 'support' => false,
76 + 'account' => false,
77 + ),
78 + 'opt_in_moderation' => array(
79 + 'new' => true,
80 + 'updates' => false,
81 + 'localhost' => false,
82 + ),
83 + 'is_live' => true,
84 + 'anonymous_mode' => TABLEPRESS_IS_PLAYGROUND_PREVIEW,
85 + ) );
86 + }
87 +
88 + return $tb_tp_fs;
89 + }
90 +
91 + // Init Freemius.
92 + tb_tp_fs();
93 +
94 + // Register Freemius plugin filter hooks.
95 + require_once __DIR__ . '/controllers/freemius-filters.php';
96 +
97 + // Signal that the SDK was initiated.
98 + do_action( 'tb_tp_fs_loaded' );
99 +
100 + /*
101 + * Define certain plugin variables as constants.
102 + */
103 + if ( ! defined( 'TABLEPRESS_ABSPATH' ) ) {
104 + define( 'TABLEPRESS_ABSPATH', trailingslashit( __DIR__ ) );
105 + }
106 + if ( ! defined( 'TABLEPRESS__FILE__' ) ) {
107 + define( 'TABLEPRESS__FILE__', __FILE__ );
108 + }
109 + if ( ! defined( 'TABLEPRESS_BASENAME' ) ) {
110 + define( 'TABLEPRESS_BASENAME', plugin_basename( TABLEPRESS__FILE__ ) );
111 + }
112 + if ( ! defined( 'TABLEPRESS_JSON_OPTIONS' ) ) {
113 + // JSON_UNESCAPED_SLASHES: Don't escape slashes, e.g. to make search/replace of URLs in the database easier.
114 + define( 'TABLEPRESS_JSON_OPTIONS', JSON_UNESCAPED_SLASHES );
115 + }
116 +
117 + /*
118 + * Check if the site environment fulfills the minimum requirements.
119 + */
120 + if ( ! require_once TABLEPRESS_ABSPATH . 'controllers/environment-checks.php' ) {
121 + return; // Exit early if the return value from the file is false.
122 + }
123 +
124 + /*
125 + * Load TablePress class, which holds common functions and variables.
126 + */
127 + require_once TABLEPRESS_ABSPATH . 'classes/class-tablepress.php';
128 +
129 + /*
130 + * Start up TablePress on WordPress's "init" action hook.
131 + */
132 + add_action( 'init', array( 'TablePress', 'run' ) );
133 +}