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 | controllers/controller-admin_ajax.php +6 -6 trunk3.0 View file →
@@ -160,8 +160,10 @@
160 160 } else {
161 161 $message = 'success_save_error_id_change';
162 162 $error_details = 'table_id_could_not_be_changed: capability_check_failed';
163 163 }
164 +
165 + // @phpstan-ignore doWhile.alwaysFalse
164 166 } while ( false ); // Do-while-loop through this exactly once, to be able to "break;" early.
165 167
166 168 // Generate the response.
167 169
@@ -257,8 +259,10 @@
257 259 }
258 260
259 261 // At this point, the table data is valid and sanitized and can be rendered.
260 262 $success = true;
263 +
264 + // @phpstan-ignore doWhile.alwaysFalse
261 265 } while ( false ); // Do-while-loop through this exactly once, to be able to "break;" early.
262 266
263 267 if ( $success ) {
264 268 // Create a render class instance.
@@ -285,19 +289,15 @@
285 289 . __( 'This is a preview of your table.', 'tablepress' ) . ' '
286 290 . __( 'Because of CSS styling in your theme, the table might look different on your page!', 'tablepress' ) . ' '
287 291 . __( 'The Table Features for Site Visitors, like sorting, filtering, and pagination, are also not available in this preview!', 'tablepress' ) . '<br>';
288 292 // Show the instructions string depending on whether the Block Editor is used on the site or not.
289 - if ( 'block' === TablePress::site_used_editor() ) {
290 - /* translators: %1$s: Block name */
293 + if ( TablePress::site_uses_block_editor() ) {
291 294 $body_html .= sprintf( __( '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' ) );
292 - } elseif ( 'elementor' === TablePress::site_used_editor() ) {
293 - /* translators: %1$s: Widget name */
294 - $body_html .= sprintf( __( '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' ) );
295 295 } else {
296 296 $body_html .= __( 'To insert a table into a post or page, paste its Shortcode at the desired place in the editor.', 'tablepress' ) . ' '
297 297 . __( 'Each table has a unique ID that needs to be adjusted in that Shortcode.', 'tablepress' );
298 298 }
299 - $body_html .= '</p><div class="preview">' . $_render->get_output( 'html' ) . '</div></div>';
299 + $body_html .= '</p>' . $_render->get_output( 'html' ) . '</div>';
300 300 } else {
301 301 $head_html = '';
302 302 $body_html = __( 'The preview could not be loaded.', 'tablepress' );
303 303 }