PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 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 All 45 releases
← All changes | views/view-about.php +48 -35 2.4 → 3.4 View file →
@@ -7,8 +7,10 @@
7 7 * @author Tobias Bäthge
8 8 * @since 1.0.0
9 9 */
10 10
11 +declare(strict_types=1);
12 +
11 13 // Prohibit direct script loading.
12 14 defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
13 15
14 16 /**
@@ -24,11 +26,10 @@
24 26 /**
25 27 * Number of screen columns for post boxes on this screen.
26 28 *
27 29 * @since 1.0.0
28 - * @var int
29 30 */
30 - protected $screen_columns = 2;
31 + protected int $screen_columns = 2;
31 32
32 33 /**
33 34 * Set up the view with data and do things that are specific for this view.
34 35 *
@@ -42,8 +43,10 @@
42 43 // Don't use type hints in the method declaration to prevent PHP errors, as the method is inherited.
43 44
44 45 parent::setup( $action, $data );
45 46
47 + TablePress::enqueue_script( 'common', array( 'jquery-core', 'postbox' ) );
48 +
46 49 $this->add_text_box( 'spacer', array( $this, 'textbox_spacer' ), 'normal' );
47 50 $this->add_text_box( 'spacer', array( $this, 'textbox_spacer' ), 'side' );
48 51 $this->add_meta_box( 'plugin-purpose', __( 'Plugin Purpose', 'tablepress' ), array( $this, 'postbox_plugin_purpose' ), 'normal' );
49 52 $this->add_meta_box( 'usage', __( 'Usage', 'tablepress' ), array( $this, 'postbox_usage' ), 'normal' );
@@ -62,11 +65,9 @@
62 65 * @param array<string, mixed> $data Data for this screen.
63 66 * @param array<string, mixed> $box Information about the text box.
64 67 */
65 68 public function textbox_spacer( array $data, array $box ): void {
66 - ?>
67 - <p></p>
68 - <?php
69 + echo '<p></p>';
69 70 }
70 71
71 72 /**
72 73 * Print the content of the "Plugin Purpose" post meta box.
@@ -80,9 +81,9 @@
80 81 ?>
81 82 <p>
82 83 <?php _e( 'TablePress allows you to create and manage tables in the admin area of WordPress.', 'tablepress' ); ?>
83 84 <?php _e( 'Tables may contain text, numbers, formulas, and even HTML code (e.g. to include images or links).', 'tablepress' ); ?>
84 - <?php _e( 'You can embed the tables into posts, pages, or other site areas using a block in the block editor.', 'tablepress' ); ?>
85 + <?php _e( 'You can embed the tables into posts, pages, or other site areas using a block in the block editor, a widget in the Elementor page builder, or a Shortcode.', 'tablepress' ); ?>
85 86 </p>
86 87 <?php
87 88 }
88 89
@@ -107,10 +108,12 @@
107 108 </p>
108 109 <p>
109 110 <?php
110 111 // Show the instructions string depending on whether the Block Editor is used on the site or not.
111 - if ( $data['site_uses_block_editor'] ) {
112 + if ( 'block' === $data['site_used_editor'] ) {
112 113 printf( __( 'To insert a table into a post or page, add a “%1$s” block in the block editor and select the desired table.', 'tablepress' ), __( 'TablePress table', 'tablepress' ) );
114 + } elseif ( 'elementor' === $data['site_used_editor'] ) {
115 + printf( __( 'To insert a table into a post or page, add a “%1$s” widget in the Elementor editor and select the desired table.', 'tablepress' ), __( 'TablePress table', 'tablepress' ) );
113 116 } else {
114 117 _e( 'To insert a table into a post or page, paste its Shortcode at the desired place in the editor.', 'tablepress' );
115 118 echo ' ';
116 119 _e( 'Each table has a unique ID that needs to be adjusted in that Shortcode.', 'tablepress' );
@@ -154,16 +157,23 @@
154 157 */
155 158 public function postbox_author_license( array $data, array $box ): void {
156 159 ?>
157 160 <p>
158 - <?php printf( __( 'This plugin was written and developed by <a href="%s">Tobias Bäthge</a>.', 'tablepress' ), 'https://tobias.baethge.com/' ); ?>
161 + <?php
162 + /* translators: %s: Author's website URL */
163 + printf( __( 'This plugin was written and developed by <a href="%s">Tobias Bäthge</a>.', 'tablepress' ), 'https://tobias.baethge.com/' );
164 + ?>
159 165 <?php _e( 'It is licensed as Free Software under GNU General Public License 2 (GPL 2).', 'tablepress' ); ?>
160 166 </p>
161 167 <p>
162 - <?php printf( __( 'Please rate and review the plugin in the <a href="%s">WordPress Plugin Directory</a>.', 'tablepress' ), 'https://wordpress.org/support/view/plugin-reviews/tablepress' ); ?>
168 + <?php
169 + /* translators: %s: WordPress Plugin Directory URL */
170 + printf( __( 'Please rate and review the plugin in the <a href="%s">WordPress Plugin Directory</a>.', 'tablepress' ), 'https://wordpress.org/support/view/plugin-reviews/tablepress' );
171 + ?>
163 172 </p>
164 173 <?php
165 174 if ( tb_tp_fs()->is_free_plan() ) {
175 + /* translators: %s: TablePress Premium website URL */
166 176 echo '<p><strong>' . sprintf( __( 'I would like to invite you to check out the <a href="%s">Premium versions of TablePress</a>.', 'tablepress' ), 'https://tablepress.org/premium/?utm_source=plugin&utm_medium=textlink&utm_content=about-screen' ) . ' '
167 177 . __( 'The available Pro and Max plans offer user support and many exciting and helpful features for your tables.', 'tablepress' ) . '</strong></p>';
168 178 }
169 179 ?>
@@ -208,31 +218,32 @@
208 218 ?>
209 219 <p>
210 220 <strong><?php _e( 'Please provide this information in bug reports and support requests.', 'tablepress' ); ?></strong>
211 221 </p>
212 - <p class="ltr">
213 - &middot; Website: <?php echo site_url(); ?>
214 - <br>&middot; TablePress: <?php echo TablePress::version; ?>
215 - <br>&middot; TablePress (DB): <?php echo TablePress::db_version; ?>
216 - <br>&middot; TablePress table scheme: <?php echo TablePress::table_scheme_version; ?>
217 - <br>&middot; Plan: Free
218 - <br>&middot; Plugin installed: <?php echo wp_date( 'Y/m/d H:i:s', $data['first_activation'] ); ?>
219 - <br>&middot; WordPress: <?php echo $GLOBALS['wp_version']; ?>
220 - <br>&middot; Multisite: <?php echo is_multisite() ? 'yes' : 'no'; ?>
221 - <br>&middot; PHP: <?php echo PHP_VERSION; ?>
222 - <br>&middot; mySQL (Server): <?php echo ( isset( $GLOBALS['wpdb']->dbh ) && function_exists( 'mysqli_get_server_info' ) ) ? mysqli_get_server_info( $GLOBALS['wpdb']->dbh ) : 'no mySQL server'; // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info ?>
223 - <br>&middot; mySQL (Client): <?php echo function_exists( 'mysqli_get_client_info' ) ? mysqli_get_client_info() : 'no mySQL client'; // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_client_info ?>
224 - <br>&middot; mbstring: <?php echo extension_loaded( 'mbstring' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?>
225 - <br>&middot; ZipArchive: <?php echo class_exists( 'ZipArchive', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?>
226 - <br>&middot; DOMDocument: <?php echo class_exists( 'DOMDocument', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?>
227 - <br>&middot; simplexml_load_string: <?php echo function_exists( 'simplexml_load_string' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?>
228 - <br>&middot; libxml_disable_entity_loader: <?php echo function_exists( 'libxml_disable_entity_loader' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?>
229 - <br>&middot; UTF-8 conversion: <?php echo ( function_exists( 'mb_detect_encoding' ) && function_exists( 'iconv' ) ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?>
230 - <br>&middot; WP Memory Limit: <?php echo WP_MEMORY_LIMIT; ?>
231 - <br>&middot; Server Memory Limit: <?php echo esc_html( @ini_get( 'memory_limit' ) ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged ?>
232 - <br>&middot; WP_DEBUG: <?php echo WP_DEBUG ? 'true' : 'false'; ?>
233 - <br>&middot; WP_POST_REVISIONS: <?php echo is_bool( WP_POST_REVISIONS ) ? ( WP_POST_REVISIONS ? 'true' : 'false' ) : WP_POST_REVISIONS; // @phpstan-ignore-line ?>
234 - </p>
222 + <ul>
223 + <li>Website: <?php echo site_url(); ?></li>
224 + <li>Block Theme: <?php echo wp_is_block_theme() ? 'yes' : 'no'; ?></li>
225 + <li>TablePress: <?php echo TablePress::version; ?></li>
226 + <li>TablePress (DB): <?php echo TablePress::db_version; ?></li>
227 + <li>TablePress table scheme: <?php echo TablePress::table_scheme_version; ?></li>
228 + <li>Plan: Free</li>
229 + <li>Plugin installed: <?php echo wp_date( 'Y/m/d H:i:s', $data['first_activation'] ); ?></li>
230 + <li>WordPress: <?php echo wp_get_wp_version(); ?></li>
231 + <li>Multisite: <?php echo is_multisite() ? 'yes' : 'no'; ?></li>
232 + <li>PHP: <?php echo PHP_VERSION; ?></li>
233 + <li>mySQL (Server): <?php echo ( isset( $GLOBALS['wpdb']->dbh ) && 'mysqli' === get_class( $GLOBALS['wpdb']->dbh ) && function_exists( 'mysqli_get_server_info' ) ) ? mysqli_get_server_info( $GLOBALS['wpdb']->dbh ) : 'no mySQL server'; // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info ?></li>
234 + <li>mySQL (Client): <?php echo function_exists( 'mysqli_get_client_info' ) ? mysqli_get_client_info() : 'no mySQL client'; // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_client_info ?></li>
235 + <li>mbstring: <?php echo extension_loaded( 'mbstring' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
236 + <li>ZipArchive: <?php echo class_exists( 'ZipArchive', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
237 + <li>DOMDocument: <?php echo class_exists( 'DOMDocument', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
238 + <li>simplexml_load_string: <?php echo function_exists( 'simplexml_load_string' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
239 + <li>libxml_disable_entity_loader: <?php echo function_exists( 'libxml_disable_entity_loader' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
240 + <li>UTF-8 conversion: <?php echo ( function_exists( 'mb_detect_encoding' ) && function_exists( 'iconv' ) ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
241 + <li>WP Memory Limit: <?php echo WP_MEMORY_LIMIT; ?></li>
242 + <li>Server Memory Limit: <?php echo esc_html( @ini_get( 'memory_limit' ) ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged ?></li>
243 + <li>WP_DEBUG: <?php echo WP_DEBUG ? 'true' : 'false'; ?></li>
244 + <li>WP_POST_REVISIONS: <?php echo is_bool( WP_POST_REVISIONS ) ? ( WP_POST_REVISIONS ? 'true' : 'false' ) : WP_POST_REVISIONS; // @phpstan-ignore constant.notFound, phpstanWP.wpConstant.fetch, phpstanWP.wpConstant.fetch, phpstanWP.wpConstant.fetch (The constant is printed for debugging purposes.) ?></li>
245 + </ul>
235 246 <?php
236 247 }
237 248
238 249 /**
@@ -246,12 +257,14 @@
246 257 public function postbox_credits_thanks( array $data, array $box ): void {
247 258 ?>
248 259 <p>
249 260 <?php _e( 'Special Thanks go to:', 'tablepress' ); ?>
250 - <br>&middot; <?php printf( __( 'Allan Jardine for <a href="%s">DataTables</a>,', 'tablepress' ), 'https://www.datatables.net/' ); ?>
251 - <br>&middot; <?php printf( __( 'the translators in the <a href="%s">Plugin Directory</a>,', 'tablepress' ), 'https://translate.wordpress.org/projects/wp-plugins/tablepress/' ); ?>
252 - <br>&middot; <?php _e( 'all customers, donors, contributors, supporters, reviewers, and users of the plugin!', 'tablepress' ); ?>
253 261 </p>
262 + <ul>
263 + <li><?php printf( __( 'Allan Jardine for <a href="%s">DataTables</a>,', 'tablepress' ), 'https://datatables.net/' ); ?></li>
264 + <li><?php printf( __( 'the translators in the <a href="%s">Plugin Directory</a>,', 'tablepress' ), 'https://translate.wordpress.org/projects/wp-plugins/tablepress/' ); ?></li>
265 + <li><?php _e( 'all customers, donors, contributors, supporters, reviewers, and users of the plugin!', 'tablepress' ); ?></li>
266 + </ul>
254 267 <?php
255 268 }
256 269
257 270 } // class TablePress_About_View