| @@ -3,17 +3,17 @@ | ||
| 3 | 3 | * WordPress plugin "TablePress" main file, responsible for initiating the plugin. |
| 4 | 4 | * |
| 5 | 5 | * @package TablePress |
| 6 | 6 | * @author Tobias Bäthge |
| 7 | - * @version 2.3 | |
| 7 | + * @version 3.0 | |
| 8 | 8 | * |
| 9 | 9 | * |
| 10 | 10 | * Plugin Name: TablePress |
| 11 | 11 | * Plugin URI: https://tablepress.org/ |
| 12 | 12 | * Description: Embed beautiful and interactive tables into your WordPress website’s posts and pages, without having to write code! |
| 13 | - * Version: 2.3 | |
| 14 | - * Requires at least: 6.0 | |
| 15 | - * Requires PHP: 7.2 | |
| 13 | + * Version: 3.0 | |
| 14 | + * Requires at least: 6.2 | |
| 15 | + * Requires PHP: 7.4 | |
| 16 | 16 | * Author: Tobias Bäthge |
| 17 | 17 | * Author URI: https://tablepress.org/ |
| 18 | 18 | * Author email: wordpress@tobias.baethge.com |
| 19 | 19 | * License: GPL 2 |
| @@ -33,9 +33,9 @@ | ||
| 33 | 33 | * |
| 34 | 34 | * You should have received a copy of the GNU General Public License |
| 35 | 35 | * along with WordPress. If not, see https://www.gnu.org/licenses/gpl-2.0.html. |
| 36 | 36 | * |
| 37 | - * Note: This file must not contain PHP code that does not run on PHP < 7.2! | |
| 37 | + * Note: This file must not contain PHP code that does not run on PHP < 7.4! | |
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | // Prohibit direct script loading. |
| 41 | 41 | defined( 'ABSPATH' ) || die( 'No direct script access allowed!' ); |
| @@ -44,9 +44,9 @@ | ||
| 44 | 44 | define( 'TABLEPRESS_IS_PLAYGROUND_PREVIEW', false ); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | if ( function_exists( 'tb_tp_fs' ) ) { |
| 48 | - tb_tp_fs()->set_basename( false, __FILE__ ); // @phpstan-ignore-line | |
| 48 | + tb_tp_fs()->set_basename( false, __FILE__ ); // @phpstan-ignore argument.type (Wrong variable type in Freemius function docblock.) | |
| 49 | 49 | } else { |
| 50 | 50 | /** |
| 51 | 51 | * Helper function for easier Freemius SDK access. |
| 52 | 52 | * |
| @@ -73,9 +73,8 @@ | ||
| 73 | 73 | 'slug' => 'tablepress', |
| 74 | 74 | 'contact' => false, |
| 75 | 75 | 'support' => false, |
| 76 | 76 | 'account' => false, |
| 77 | - 'pricing' => false, | |
| 78 | 77 | ), |
| 79 | 78 | 'opt_in_moderation' => array( |
| 80 | 79 | 'new' => true, |
| 81 | 80 | 'updates' => false, |
| @@ -91,27 +90,10 @@ | ||
| 91 | 90 | |
| 92 | 91 | // Init Freemius. |
| 93 | 92 | tb_tp_fs(); |
| 94 | 93 | |
| 95 | - // Load the TablePress plugin icon for the Freemius opt-in/activation screen. | |
| 96 | - tb_tp_fs()->add_filter( | |
| 97 | - 'plugin_icon', | |
| 98 | - static function () /* No return type declaration, due to required PHP compatibility of this file! */ { | |
| 99 | - return __DIR__ . '/admin/img/tablepress.png'; | |
| 100 | - } | |
| 101 | - ); | |
| 102 | - | |
| 103 | - // Hide the tabs navigation on Freemius screens. | |
| 104 | - tb_tp_fs()->add_filter( 'hide_account_tabs', '__return_true' ); | |
| 105 | - | |
| 106 | - // Hide the Powered by Freemius tab from generated pages, like "Upgrade" or "Pricing". | |
| 107 | - tb_tp_fs()->add_filter( 'hide_freemius_powered_by', '__return_true' ); | |
| 108 | - | |
| 109 | - // Use different arrow icons in the admin menu. | |
| 110 | - tb_tp_fs()->override_i18n( array( | |
| 111 | - 'symbol_arrow-left' => '←', | |
| 112 | - 'symbol_arrow-right' => '→', | |
| 113 | - ) ); | |
| 94 | + // Register Freemius plugin filter hooks. | |
| 95 | + require_once __DIR__ . '/controllers/freemius-filters.php'; | |
| 114 | 96 | |
| 115 | 97 | // Signal that the SDK was initiated. |
| 116 | 98 | do_action( 'tb_tp_fs_loaded' ); |
| 117 | 99 | |