| @@ -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 | * |
| @@ -62,11 +61,9 @@ | ||
| 62 | 61 | * @param array<string, mixed> $data Data for this screen. |
| 63 | 62 | * @param array<string, mixed> $box Information about the text box. |
| 64 | 63 | */ |
| 65 | 64 | public function textbox_spacer( array $data, array $box ): void { |
| 66 | - ?> | |
| 67 | - <p></p> | |
| 68 | - <?php | |
| 65 | + echo '<p></p>'; | |
| 69 | 66 | } |
| 70 | 67 | |
| 71 | 68 | /** |
| 72 | 69 | * Print the content of the "Plugin Purpose" post meta box. |
| @@ -80,9 +77,9 @@ | ||
| 80 | 77 | ?> |
| 81 | 78 | <p> |
| 82 | 79 | <?php _e( 'TablePress allows you to create and manage tables in the admin area of WordPress.', 'tablepress' ); ?> |
| 83 | 80 | <?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' ); ?> | |
| 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' ); ?> | |
| 85 | 82 | </p> |
| 86 | 83 | <?php |
| 87 | 84 | } |
| 88 | 85 | |
| @@ -107,10 +104,12 @@ | ||
| 107 | 104 | </p> |
| 108 | 105 | <p> |
| 109 | 106 | <?php |
| 110 | 107 | // Show the instructions string depending on whether the Block Editor is used on the site or not. |
| 111 | - if ( $data['site_uses_block_editor'] ) { | |
| 108 | + if ( 'block' === $data['site_used_editor'] ) { | |
| 112 | 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' ) ); | |
| 113 | 112 | } else { |
| 114 | 113 | _e( 'To insert a table into a post or page, paste its Shortcode at the desired place in the editor.', 'tablepress' ); |
| 115 | 114 | echo ' '; |
| 116 | 115 | _e( 'Each table has a unique ID that needs to be adjusted in that Shortcode.', 'tablepress' ); |
| @@ -154,16 +153,23 @@ | ||
| 154 | 153 | */ |
| 155 | 154 | public function postbox_author_license( array $data, array $box ): void { |
| 156 | 155 | ?> |
| 157 | 156 | <p> |
| 158 | - <?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 | + ?> | |
| 159 | 161 | <?php _e( 'It is licensed as Free Software under GNU General Public License 2 (GPL 2).', 'tablepress' ); ?> |
| 160 | 162 | </p> |
| 161 | 163 | <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' ); ?> | |
| 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 | + ?> | |
| 163 | 168 | </p> |
| 164 | 169 | <?php |
| 165 | 170 | if ( tb_tp_fs()->is_free_plan() ) { |
| 171 | + /* translators: %s: TablePress Premium website URL */ | |
| 166 | 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' ) . ' ' |
| 167 | 173 | . __( 'The available Pro and Max plans offer user support and many exciting and helpful features for your tables.', 'tablepress' ) . '</strong></p>'; |
| 168 | 174 | } |
| 169 | 175 | ?> |
| @@ -208,31 +214,32 @@ | ||
| 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 | - · Website: <?php echo site_url(); ?> | |
| 214 | - <br />· TablePress: <?php echo TablePress::version; ?> | |
| 215 | - <br />· TablePress (DB): <?php echo TablePress::db_version; ?> | |
| 216 | - <br />· TablePress table scheme: <?php echo TablePress::table_scheme_version; ?> | |
| 217 | - <br />· Plan: Free | |
| 218 | - <br />· Plugin installed: <?php echo wp_date( 'Y/m/d H:i:s', $data['first_activation'] ); ?> | |
| 219 | - <br />· WordPress: <?php echo $GLOBALS['wp_version']; ?> | |
| 220 | - <br />· Multisite: <?php echo is_multisite() ? 'yes' : 'no'; ?> | |
| 221 | - <br />· PHP: <?php echo PHP_VERSION; ?> | |
| 222 | - <br />· 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 />· 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 />· mbstring: <?php echo extension_loaded( 'mbstring' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?> | |
| 225 | - <br />· ZipArchive: <?php echo class_exists( 'ZipArchive', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?> | |
| 226 | - <br />· DOMDocument: <?php echo class_exists( 'DOMDocument', false ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?> | |
| 227 | - <br />· simplexml_load_string: <?php echo function_exists( 'simplexml_load_string' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?> | |
| 228 | - <br />· libxml_disable_entity_loader: <?php echo function_exists( 'libxml_disable_entity_loader' ) ? 'yes' : '<span style="color:#800000;font-weight:bold;">no</span>'; ?> | |
| 229 | - <br />· 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 />· WP Memory Limit: <?php echo WP_MEMORY_LIMIT; ?> | |
| 231 | - <br />· Server Memory Limit: <?php echo esc_html( @ini_get( 'memory_limit' ) ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged ?> | |
| 232 | - <br />· WP_DEBUG: <?php echo WP_DEBUG ? 'true' : 'false'; ?> | |
| 233 | - <br />· WP_POST_REVISIONS: <?php echo is_bool( WP_POST_REVISIONS ) ? ( WP_POST_REVISIONS ? 'true' : 'false' ) : WP_POST_REVISIONS; // @phpstan-ignore-line ?> | |
| 234 | - </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> | |
| 235 | 242 | <?php |
| 236 | 243 | } |
| 237 | 244 | |
| 238 | 245 | /** |
| @@ -246,12 +253,14 @@ | ||
| 246 | 253 | public function postbox_credits_thanks( array $data, array $box ): void { |
| 247 | 254 | ?> |
| 248 | 255 | <p> |
| 249 | 256 | <?php _e( 'Special Thanks go to:', 'tablepress' ); ?> |
| 250 | - <br />· <?php printf( __( 'Allan Jardine for <a href="%s">DataTables</a>,', 'tablepress' ), 'https://www.datatables.net/' ); ?> | |
| 251 | - <br />· <?php printf( __( 'the translators in the <a href="%s">Plugin Directory</a>,', 'tablepress' ), 'https://translate.wordpress.org/projects/wp-plugins/tablepress/' ); ?> | |
| 252 | - <br />· <?php _e( 'all customers, donors, contributors, supporters, reviewers, and users of the plugin!', 'tablepress' ); ?> | |
| 253 | 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> | |
| 254 | 263 | <?php |
| 255 | 264 | } |
| 256 | 265 | |
| 257 | 266 | } // class TablePress_About_View |