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 | classes/class-evaluate.php +1 -8 2.2.13.0 View file →
@@ -47,13 +47,8 @@
47 47 if ( ! $phpspreadsheet_requirements_fulfilled ) {
48 48 return true;
49 49 }
50 50
51 - // Use the legacy evaluate class, if the PHPSpreadsheet files do not exist (e.g. because `composer install` was not run).
52 - if ( ! file_exists( TABLEPRESS_ABSPATH . 'libraries/autoload.php' ) ) {
53 - return true;
54 - }
55 -
56 51 return false;
57 52 }
58 53
59 54 /**
@@ -65,12 +60,10 @@
65 60 * @param string $table_id ID of the passed table.
66 61 * @return array<int, array<int, string>> Table data with evaluated formulas.
67 62 */
68 63 public function evaluate_table_data( array $table_data, string $table_id ): array {
69 - $use_legacy_evaluate_class = $this->_should_use_legacy_evaluate_class();
70 -
71 64 // Choose the Table Evaluate library based on the PHP version and the filter hook value.
72 - if ( $use_legacy_evaluate_class ) {
65 + if ( $this->_should_use_legacy_evaluate_class() ) {
73 66 $evaluate_class = TablePress::load_class( 'TablePress_Evaluate_Legacy', 'class-evaluate-legacy.php', 'classes' );
74 67 } else {
75 68 $evaluate_class = TablePress::load_class( 'TablePress_Evaluate_PHPSpreadsheet', 'class-evaluate-phpspreadsheet.php', 'classes' );
76 69 }