PluginProbe
TablePress – Tables in WordPress made easy / 3.2
TablePress – Tables in WordPress made easy v3.2
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 | views/view-about.php +45 -33 2.23.2 View file →
@@ -24,11 +24,10 @@
24 24 /**
25 25 * Number of screen columns for post boxes on this screen.
26 26 *
27 27 * @since 1.0.0
28 - * @var int
29 28 */
30 - protected $screen_columns = 2;
29 + protected int $screen_columns = 2;
31 30
32 31 /**
33 32 * Set up the view with data and do things that are specific for this view.
34 33 *
@@ -36,8 +35,9 @@
36 35 *
37 36 * @param string $action Action for this view.
38 37 * @param array<string, mixed> $data Data for this view.
39 38 */
39 + #[\Override]
40 40 public function setup( /* string */ $action, array $data ) /* : void */ {
41 41 // Don't use type hints in the method declaration to prevent PHP errors, as the method is inherited.
42 42
43 43 parent::setup( $action, $data );
@@ -61,11 +61,9 @@
61 61 * @param array<string, mixed> $data Data for this screen.
62 62 * @param array<string, mixed> $box Information about the text box.
63 63 */
64 64 public function textbox_spacer( array $data, array $box ): void {
65 - ?>
66 - <p></p>
67 - <?php
65 + echo '<p></p>';
68 66 }
69 67
70 68 /**
71 69 * Print the content of the "Plugin Purpose" post meta box.
@@ -79,9 +77,9 @@
79 77 ?>
80 78 <p>
81 79 <?php _e( 'TablePress allows you to create and manage tables in the admin area of WordPress.', 'tablepress' ); ?>
82 80 <?php _e( 'Tables may contain text, numbers, formulas, and even HTML code (e.g. to include images or links).', 'tablepress' ); ?>
83 - <?php _e( 'You can embed the tables into posts, pages, or other site areas using a block in the block editor.', 'tablepress' ); ?>
81 + <?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' ); ?>
84 82 </p>
85 83 <?php
86 84 }
87 85
@@ -106,10 +104,12 @@
106 104 </p>
107 105 <p>
108 106 <?php
109 107 // Show the instructions string depending on whether the Block Editor is used on the site or not.
110 - if ( $data['site_uses_block_editor'] ) {
108 + if ( 'block' === $data['site_used_editor'] ) {
111 109 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' ) );
110 + } elseif ( 'elementor' === $data['site_used_editor'] ) {
111 + 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' ) );
112 112 } else {
113 113 _e( 'To insert a table into a post or page, paste its Shortcode at the desired place in the editor.', 'tablepress' );
114 114 echo ' ';
115 115 _e( 'Each table has a unique ID that needs to be adjusted in that Shortcode.', 'tablepress' );
@@ -153,16 +153,23 @@
153 153 */
154 154 public function postbox_author_license( array $data, array $box ): void {
155 155 ?>
156 156 <p>
157 - <?php printf( __( 'This plugin was written and developed by <a href="%s">Tobias Bäthge</a>.', 'tablepress' ), 'https://tobias.baethge.com/' ); ?>
157 + <?php
158 + /* translators: %s: Author's website URL */
159 + printf( __( 'This plugin was written and developed by <a href="%s">Tobias Bäthge</a>.', 'tablepress' ), 'https://tobias.baethge.com/' );
160 + ?>
158 161 <?php _e( 'It is licensed as Free Software under GNU General Public License 2 (GPL 2).', 'tablepress' ); ?>
159 162 </p>
160 163 <p>
161 - <?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' ); ?>
164 + <?php
165 + /* translators: %s: WordPress Plugin Directory URL */
166 + 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' );
167 + ?>
162 168 </p>
163 169 <?php
164 170 if ( tb_tp_fs()->is_free_plan() ) {
171 + /* translators: %s: TablePress Premium website URL */
165 172 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' ) . ' '
166 173 . __( 'The available Pro and Max plans offer user support and many exciting and helpful features for your tables.', 'tablepress' ) . '</strong></p>';
167 174 }
168 175 ?>
@@ -203,33 +210,36 @@
203 210 * @param array<string, mixed> $data Data for this screen.
204 211 * @param array<string, mixed> $box Information about the meta box.
205 212 */
206 213 public function postbox_debug_version_information( array $data, array $box ): void {
207 - $mysqli = ( isset( $GLOBALS['wpdb']->use_mysqli, $GLOBALS['wpdb']->dbh ) && $GLOBALS['wpdb']->use_mysqli );
208 214 ?>
209 215 <p>
210 216 <strong><?php _e( 'Please provide this information in bug reports and support requests.', 'tablepress' ); ?></strong>
211 217 </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; mysqli Extension: <?php echo $mysqli ? 'true' : 'false'; ?>
223 - <br />&middot; mySQL (Server): <?php echo $mysqli ? mysqli_get_server_info( $GLOBALS['wpdb']->dbh ) : '<em>no mysqli</em>'; // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info ?>
224 - <br />&middot; mySQL (Client): <?php echo $mysqli ? mysqli_get_client_info() : '<em>no mysqli</em>'; // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_client_info ?>
225 - <br />&middot; ZIP support: <?php echo $data['zip_support_available'] ? 'yes' : 'no'; ?>
226 - <br />&middot; UTF-8 conversion: <?php echo ( function_exists( 'mb_detect_encoding' ) && function_exists( 'iconv' ) ) ? 'yes' : 'no'; ?>
227 - <br />&middot; WP Memory Limit: <?php echo WP_MEMORY_LIMIT; ?>
228 - <br />&middot; Server Memory Limit: <?php echo (int) @ini_get( 'memory_limit' ) . 'M'; // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged ?>
229 - <br />&middot; WP_DEBUG: <?php echo WP_DEBUG ? 'true' : 'false'; ?>
230 - <br />&middot; WP_POST_REVISIONS: <?php echo is_bool( WP_POST_REVISIONS ) ? ( WP_POST_REVISIONS ? 'true' : 'false' ) : WP_POST_REVISIONS; // @phpstan-ignore-line ?>
231 - </p>
218 + <ul>
219 + <li>Website: <?php echo site_url(); ?></li>
220 + <li>Block Theme: <?php echo wp_is_block_theme() ? 'yes' : 'no'; ?></li>
221 + <li>TablePress: <?php echo TablePress::version; ?></li>
222 + <li>TablePress (DB): <?php echo TablePress::db_version; ?></li>
223 + <li>TablePress table scheme: <?php echo TablePress::table_scheme_version; ?></li>
224 + <li>Plan: Free</li>
225 + <li>Plugin installed: <?php echo wp_date( 'Y/m/d H:i:s', $data['first_activation'] ); ?></li>
226 + <li>WordPress: <?php echo $GLOBALS['wp_version']; ?></li>
227 + <li>Multisite: <?php echo is_multisite() ? 'yes' : 'no'; ?></li>
228 + <li>PHP: <?php echo PHP_VERSION; ?></li>
229 + <li>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 ?></li>
230 + <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>
231 + <li>mbstring: <?php echo extension_loaded( 'mbstring' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
232 + <li>ZipArchive: <?php echo class_exists( 'ZipArchive', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
233 + <li>DOMDocument: <?php echo class_exists( 'DOMDocument', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
234 + <li>simplexml_load_string: <?php echo function_exists( 'simplexml_load_string' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
235 + <li>libxml_disable_entity_loader: <?php echo function_exists( 'libxml_disable_entity_loader' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?></li>
236 + <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>
237 + <li>WP Memory Limit: <?php echo WP_MEMORY_LIMIT; ?></li>
238 + <li>Server Memory Limit: <?php echo esc_html( @ini_get( 'memory_limit' ) ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged ?></li>
239 + <li>WP_DEBUG: <?php echo WP_DEBUG ? 'true' : 'false'; ?></li>
240 + <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>
241 + </ul>
232 242 <?php
233 243 }
234 244
235 245 /**
@@ -243,12 +253,14 @@
243 253 public function postbox_credits_thanks( array $data, array $box ): void {
244 254 ?>
245 255 <p>
246 256 <?php _e( 'Special Thanks go to:', 'tablepress' ); ?>
247 - <br />&middot; <?php printf( __( 'Allan Jardine for <a href="%s">DataTables</a>,', 'tablepress' ), 'https://www.datatables.net/' ); ?>
248 - <br />&middot; <?php printf( __( 'the translators in the <a href="%s">Plugin Directory</a>,', 'tablepress' ), 'https://translate.wordpress.org/projects/wp-plugins/tablepress/' ); ?>
249 - <br />&middot; <?php _e( 'all customers, donors, contributors, supporters, reviewers, and users of the plugin!', 'tablepress' ); ?>
250 257 </p>
258 + <ul>
259 + <li><?php printf( __( 'Allan Jardine for <a href="%s">DataTables</a>,', 'tablepress' ), 'https://datatables.net/' ); ?></li>
260 + <li><?php printf( __( 'the translators in the <a href="%s">Plugin Directory</a>,', 'tablepress' ), 'https://translate.wordpress.org/projects/wp-plugins/tablepress/' ); ?></li>
261 + <li><?php _e( 'all customers, donors, contributors, supporters, reviewers, and users of the plugin!', 'tablepress' ); ?></li>
262 + </ul>
251 263 <?php
252 264 }
253 265
254 266 } // class TablePress_About_View