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-list.php +191 -48 2.23.2 View file →
@@ -24,11 +24,10 @@
24 24 /**
25 25 * Object for the All Tables List Table.
26 26 *
27 27 * @since 1.0.0
28 - * @var TablePress_All_Tables_List_Table
29 28 */
30 - protected $wp_list_table;
29 + protected \TablePress_All_Tables_List_Table $wp_list_table;
31 30
32 31 /**
33 32 * Set up the view with data and do things that are specific for this view.
34 33 *
@@ -36,17 +35,176 @@
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 parent::setup( $action, $data );
43 44
44 - add_thickbox(); // For the table preview.
45 45 $this->admin_page->enqueue_script( 'list' );
46 46
47 + if ( $data['messages']['superseded_extensions'] ) {
48 + $superseded_extensions = array(
49 + 'tablepress-advanced-access-rights/tablepress-advanced-access-rights.php' => array(
50 + 'name' => 'TablePress Extension: Advanced Access Rights',
51 + 'compatible' => true,
52 + ),
53 + 'tablepress-auto-export-tables/tablepress-auto-export-tables.php' => array(
54 + 'name' => 'TablePress Extension: Automatic Table Export',
55 + 'compatible' => true,
56 + ),
57 + 'tablepress-cell-highlighting/tablepress-cell-highlighting.php' => array(
58 + 'name' => 'TablePress Extension: Cell Highlighting',
59 + 'compatible' => true,
60 + ),
61 + 'tablepress-datatables-alphabetsearch/tablepress-datatables-alphabetsearch.php' => array(
62 + 'name' => 'TablePress Extension: DataTables AlphabetSearch',
63 + 'compatible' => false,
64 + ),
65 + 'tablepress-datatables-buttons/tablepress-datatables-buttons.php' => array(
66 + 'name' => 'TablePress Extension: DataTables Buttons',
67 + 'compatible' => true,
68 + ),
69 + 'tablepress-datatables-column-filter-widgets/tablepress-datatables-column-filter-widgets.php' => array(
70 + 'name' => 'TablePress Extension: DataTables ColumnFilterWidgets',
71 + 'compatible' => false,
72 + ),
73 + 'tablepress-datatables-columnfilter/tablepress-datatables-columnfilter.php' => array(
74 + 'name' => 'TablePress Extension: DataTables Column Filter',
75 + 'compatible' => false,
76 + ),
77 + 'tablepress-datatables-counter-column/tablepress-datatables-counter-column.php' => array(
78 + 'name' => 'TablePress Extension: DataTables Counter Column',
79 + 'compatible' => true,
80 + ),
81 + 'tablepress-datatables-fixedcolumns/tablepress-datatables-fixedcolumns.php' => array(
82 + 'name' => 'TablePress Extension: DataTables FixedColumns',
83 + 'compatible' => false,
84 + ),
85 + 'tablepress-datatables-fixedheader/tablepress-datatables-fixedheader.php' => array(
86 + 'name' => 'TablePress Extension: DataTables FixedHeader',
87 + 'compatible' => true,
88 + ),
89 + 'tablepress-datatables-inverted-filter/tablepress-datatables-inverted-filter.php' => array(
90 + 'name' => 'TablePress Extension: DataTables Inverted Filter',
91 + 'compatible' => false,
92 + ),
93 + 'tablepress-datatables-row-details/tablepress-datatables-row-details.php' => array(
94 + 'name' => 'TablePress Extension: DataTables Row Details',
95 + 'compatible' => false,
96 + ),
97 + 'tablepress-datatables-rowgroup/tablepress-datatables-rowgroup.php' => array(
98 + 'name' => 'TablePress Extension: DataTables RowGroup',
99 + 'compatible' => false,
100 + ),
101 + 'tablepress-responsive-tables/tablepress-responsive-tables.php' => array(
102 + 'name' => 'TablePress Extension: Responsive Tables',
103 + 'compatible' => false,
104 + ),
105 + 'tablepress-row-filter/tablepress-row-filter.php' => array(
106 + 'name' => 'TablePress Extension: Row Filtering',
107 + 'compatible' => true,
108 + ),
109 + 'tablepress-row-highlighting/tablepress-row-highlighting.php' => array(
110 + 'name' => 'TablePress Extension: Row Highlighting',
111 + 'compatible' => true,
112 + ),
113 + 'tablepress-table-auto-update/tablepress-table-auto-update.php' => array(
114 + 'name' => 'TablePress Extension: Table Auto Update',
115 + 'compatible' => true,
116 + ),
117 + 'tablepress-table-column-order/tablepress-table-column-order.php' => array(
118 + 'name' => 'TablePress Extension: Table Column Order',
119 + 'compatible' => true,
120 + ),
121 + );
122 +
123 + $active_compatible_superseded_extensions = array();
124 + $active_incompatible_superseded_extensions = array();
125 + foreach ( $superseded_extensions as $plugin => $extension ) {
126 + if ( is_plugin_active( $plugin ) ) {
127 + if ( $extension['compatible'] ) {
128 + $active_compatible_superseded_extensions[] = $extension['name'];
129 + } else {
130 + $active_incompatible_superseded_extensions[] = $extension['name'];
131 + }
132 + }
133 + }
134 +
135 + /*
136 + * If no superseded extensions are used, hide the message, to prevent running the checks on every load of the view.
137 + * This leaves a small risk of an Extension being activated later, but that's acceptable as they are no longer publicly available.
138 + */
139 + if ( empty( $active_incompatible_superseded_extensions ) && ( empty( $active_compatible_superseded_extensions ) || ! tb_tp_fs()->is_free_plan() ) ) {
140 + TablePress::$model_options->update( 'message_superseded_extensions', false );
141 + }
142 +
143 + $message = '';
144 +
145 + $notice_css_classes = 'not-dismissible';
146 +
147 + if ( ! empty( $active_incompatible_superseded_extensions ) ) {
148 + $notice_css_classes .= ' is-error';
149 +
150 + $message .= '<p style="font-size:16px;">' . __( 'You are using <strong>TablePress Extension plugins</strong> on this website that have been retired more than 2 years ago.', 'tablepress' ) . '<br>' . __( 'For technical reasons, some or all features of these outdated plugins <strong>do no longer work with TablePress 3</strong>:', 'tablepress' ) . '</p>';
151 + $message .= '<ul style="list-style:disc;margin:0.5em 1em;font-size:16px;">';
152 + foreach ( $active_incompatible_superseded_extensions as $extension ) {
153 + $message .= '<li>' . esc_html( $extension ) . '</li>';
154 + }
155 + $message .= '</ul>';
156 + $message .= '<p style="font-size:16px;"><strong>' . __( 'Keeping them activated can lead to errors on your website.', 'tablepress' ) . '</strong></p>';
157 +
158 + if ( tb_tp_fs()->is_free_plan() ) {
159 + $message .= '<p style="font-size:16px;"><strong>' . sprintf( __( 'To continue using these features, <a href="%s">upgrade to a TablePress Premium license plan</a>!', 'tablepress' ), 'https://tablepress.org/upgrade-extensions/?utm_source=plugin&utm_medium=textlink&utm_content=superseded-extensions-message' ) . '</strong><br>'
160 + . __( 'TablePress Pro and TablePress Max come with updated and heavily improved versions of these features and include direct priority email support.', 'tablepress' ) . '</p>';
161 + }
162 +
163 + if ( ! empty( $active_compatible_superseded_extensions ) && tb_tp_fs()->is_free_plan() ) {
164 + $message .= '<p style="margin-top:1em;font-size:14px;">' . __( 'In addition, these TablePress Extension plugins have been retired and might become incompatible in the future as well:', 'tablepress' ) . '</strong></p>';
165 + $message .= '<ul style="list-style:disc;margin:0.5em 1em;font-size:14px;">';
166 + foreach ( $active_compatible_superseded_extensions as $extension ) {
167 + $message .= '<li>' . esc_html( $extension ) . '</li>';
168 + }
169 + $message .= '</ul>';
170 + }
171 + } elseif ( ! empty( $active_compatible_superseded_extensions ) && tb_tp_fs()->is_free_plan() ) {
172 + $notice_css_classes .= ' is-warning';
173 +
174 + $message .= '<p style="font-size:14px;"><strong>' . __( 'You are using TablePress Extension plugins on this website that have been retired and will no longer receive updates or support:', 'tablepress' ) . '</strong></p>';
175 + $message .= '<ul style="list-style:disc;margin:0.5em 1em;">';
176 + foreach ( $active_compatible_superseded_extensions as $extension ) {
177 + $message .= '<li>' . esc_html( $extension ) . '</li>';
178 + }
179 + $message .= '</ul>';
180 + $message .= '<p style="font-size:14px;"><strong>' . __( 'It is possible that these become incompatible with TablePress or WordPress in the future!', 'tablepress' ) . '</strong></p>';
181 + $message .= '<p style="margin-top:1em;font-size:14px;">' . sprintf( __( 'However, their features were heavily improved and are now part of the up-to-date <a href="%s">TablePress Premium versions</a>!', 'tablepress' ), 'https://tablepress.org/upgrade-extensions/?utm_source=plugin&utm_medium=textlink&utm_content=superseded-extensions-message' ) . '</p>';
182 + }
183 +
184 + if ( '' !== $message ) {
185 + if ( tb_tp_fs()->is_free_plan() ) {
186 + $message .= '<p style="font-size:16px;margin-top:1.5em;"><strong>' . __( 'Upgrade to a TablePress Premium license plan now and get:', 'tablepress' ) . '</strong></p>';
187 + $message .= '<ul style="list-style:disc;margin:0.5em 1em;font-size:16px;">';
188 + $message .= '<li>' . __( 'Updated and heavily improved versions of these features!', 'tablepress' ) . '</li>';
189 + $message .= '<li>' . __( 'Direct integration into the user interface!', 'tablepress' ) . '</li>';
190 + $message .= '<li>' . __( 'Regular updates that ensure compatibility with WordPress!', 'tablepress' ) . '</li>';
191 + $message .= '<li>' . __( 'Priority email support!', 'tablepress' ) . '</li>';
192 + $message .= '</ul>';
193 + $message .= '<p style="font-size:16px;"><strong>' . sprintf( __( 'And the best: %s', 'tablepress' ), sprintf( __( 'Use the promo code %1$s during the checkout process for a special offer!', 'tablepress' ), '<code>UPGRADE</code>' ) ) . '</strong></p>';
194 + $message .= '<p style="margin-top:2em;">' . sprintf( '<a href="%s" class="components-button is-primary" style="font-size:14px;margin-right:3em;background:linear-gradient(135deg,#00d184 0%%,#0791e3 100%%);border:none;font-weight:bold;">%s<span class="dashicons dashicons-arrow-right-alt" style="vertical-align:middle;margin:0 0 4px 4px"></span></a>', 'https://tablepress.org/upgrade-extensions/?utm_source=plugin&utm_medium=button&utm_content=superseded-extensions-message', __( 'Upgrade to a TablePress Premium version now!', 'tablepress' ) );
195 + }
196 + $message .= $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'superseded_extensions', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>';
197 +
198 + $title = '<em>' . __( 'Important Notice!', 'tablepress' ) . '</em>';
199 +
200 + $this->add_header_message( $message, $notice_css_classes, $title );
201 + }
202 + }
203 +
47 204 if ( $data['messages']['first_visit'] ) {
48 - $message = '<p><strong style="font-size:14px;">' . __( 'Thank you for choosing TablePress, the most popular table plugin for WordPress!', 'tablepress' ) . '</strong></p>';
205 + $message = '<p style="font-size:14px;"><strong>' . __( 'Thank you for choosing TablePress, the most popular table plugin for WordPress!', 'tablepress' ) . '</strong></p>';
206 + /* translators: %1$s: URL to FAQ, %2$s: URL to Documentation, %3$s: URL to Support, %4$s: URL to plugin website */
49 207 $message .= '<p>' . sprintf( __( 'If you encounter any questions or problems, please visit the <a href="%1$s">FAQ</a>, the <a href="%2$s">Documentation</a>, and the <a href="%3$s">Support</a> section on the <a href="%4$s">plugin website</a>.', 'tablepress' ), 'https://tablepress.org/faq/', 'https://tablepress.org/documentation/', 'https://tablepress.org/support/', 'https://tablepress.org/' ) . '</p>';
50 208
51 209 if ( tb_tp_fs()->is_free_plan() ) {
52 210 $message .= '<p style="font-size:14px;"><strong>' . sprintf( __( 'More great features for you and your site’s visitors and priority email support are available with a Premium license plan of TablePress. <a href="%s">Go check them out!</a>', 'tablepress' ), 'https://tablepress.org/premium/?utm_source=plugin&utm_medium=textlink&utm_content=first-visit-message' ) . '</strong></p>';
@@ -51,75 +209,50 @@
51 209 if ( tb_tp_fs()->is_free_plan() ) {
52 210 $message .= '<p style="font-size:14px;"><strong>' . sprintf( __( 'More great features for you and your site’s visitors and priority email support are available with a Premium license plan of TablePress. <a href="%s">Go check them out!</a>', 'tablepress' ), 'https://tablepress.org/premium/?utm_source=plugin&utm_medium=textlink&utm_content=first-visit-message' ) . '</strong></p>';
53 211 }
54 212
55 - $message .= '<p style="margin-top:14px;">' . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'first_visit', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>';
213 + $message .= '<p style="margin-top:1em;">' . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'first_visit', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>';
56 214
57 215 $title = '<em>' . __( 'Welcome!', 'tablepress' ) . '</em>';
58 216
59 - $this->add_header_message( $message, 'notice-info not-dismissible', $title );
217 + $this->add_header_message( $message, 'is-info not-dismissible', $title );
60 218 }
61 219
62 - if ( $data['messages']['donation_message'] ) {
63 - $message = '<p style="font-size:14px;"><img alt="' . esc_attr__( 'Tobias Bäthge, developer of TablePress', 'tablepress' ) . '" src="https://secure.gravatar.com/avatar/50f1cff2e27a1f522b18ce229c057bc5?s=300" height="150" width="150" style="float:left;margin:2px 15px 30px 0;" />'
220 + if ( $data['messages']['donation_nag'] ) {
221 + $message = '<p style="font-size:14px;"><img alt="' . esc_attr__( 'Tobias Bäthge, developer of TablePress', 'tablepress' ) . '" src="https://secure.gravatar.com/avatar/50f1cff2e27a1f522b18ce229c057bc5?s=300" height="150" width="150" style="float:left;margin:2px 15px 30px 0;">'
64 222 . __( 'Hi, my name is Tobias, I&#8217;m the developer of the TablePress plugin.', 'tablepress' ) . '</p>';
65 223 $message .= '<p style="font-size:14px;">' . __( 'Thank you for using it!', 'tablepress' ) . ' ';
66 224 if ( $data['table_count'] > 0 ) {
225 + /* translators: %s: Number of tables */
67 226 $message .= sprintf( _n( 'I hope that everything works and that you are satisfied with the results of managing your %s table.', 'I hope that everything works and that you are satisfied with the results of managing your %s tables.', $data['table_count'], 'tablepress' ), $data['table_count'] );
68 227 } else {
228 + /* translators: %s: URL to TablePress website */
69 229 $message .= sprintf( __( 'It looks like you haven’t added a table yet. If you need help to get started, please find more information in the FAQ and Documentation on the <a href="%s">TablePress website</a>.', 'tablepress' ), 'https://tablepress.org/' );
70 230 }
71 231 $message .= '</p>';
72 - $message .= '<p style="font-size:14px;"><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=upgrade-message' ) . '<br />'
232 + $message .= '<p style="font-size:14px;"><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=upgrade-message' ) . '<br>'
73 233 . __( 'The available Pro and Max plans offer user support and many exciting and helpful features for your tables.', 'tablepress' ) . '</strong></p>';
74 234 $message .= '<p style="font-size:14px;">' . __( 'Sincerely, Tobias', 'tablepress' ) . '</p>';
75 - $message .= '<p>' . sprintf( '<a href="%s" class="button button-primary" style="font-size:14px;margin-right:1em">%s<span class="dashicons dashicons-arrow-right-alt" style="vertical-align:middle;margin:0 0 4px 4px"></span></a>', 'https://tablepress.org/premium/?utm_source=plugin&utm_medium=textlink&utm_content=upgrade-message', __( 'Tell me more about the Premium features', 'tablepress' ) )
235 + $message .= '<p style="margin-top:1em;">' . sprintf( '<a href="%s" class="components-button is-primary" style="font-size:14px;margin-right:3em;">%s<span class="dashicons dashicons-arrow-right-alt" style="vertical-align:middle;margin:0 0 4px 4px"></span></a>', 'https://tablepress.org/premium/?utm_source=plugin&utm_medium=button&utm_content=upgrade-message', __( 'Tell me more about the Premium features', 'tablepress' ) )
76 236 . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>';
77 237
78 238 $title = '<em>' . __( 'TablePress has more to offer!', 'tablepress' ) . '</em>';
79 239
80 - $this->add_header_message( $message, 'notice-success not-dismissible', $title );
240 + $this->add_header_message( $message, 'is-success not-dismissible', $title );
81 241 }
82 242
83 - if ( $data['messages']['plugin_update_message'] ) {
84 - $message = '<p>' . sprintf( __( 'To find out more about what’s new, please read the <a href="%s"><strong>release announcement</strong></a>.', 'tablepress' ), 'https://tablepress.org/news/' ) . '</p>';
243 + if ( $data['messages']['plugin_update'] ) {
244 + $message = '<p>' . sprintf( __( 'To find out more about what’s new, please read the <a href="%s"><strong>release announcement</strong></a>.', 'tablepress' ), 'https://tablepress.org/news/?utm_source=plugin&utm_medium=textlink&utm_content=plugin-update-message' ) . '</p>';
85 245
86 246 if ( tb_tp_fs()->is_free_plan() ) {
87 247 $message .= '<p><strong>' . sprintf( __( 'More great features and priority email support are available with a Premium license plan. <a href="%s">Check them out!</a>', 'tablepress' ), 'https://tablepress.org/premium/?utm_source=plugin&utm_medium=textlink&utm_content=plugin-update-message' ) . '</strong></p>';
88 248 }
89 249
90 - $url = 'https://tablepress.org/modules/default-style-customizer/?utm_source=plugin&utm_medium=textlink&utm_content=plugin-update-message';
91 - $button_label = __( 'Find out more', 'tablepress' );
250 + $message .= '<p style="margin-top:1em;">' . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'plugin_update', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>';
92 251
93 - /*
94 - * Show the message only if the previous version was not 2.2.x (to not spam the user with each update),
95 - * and if the user is on the Free plan or has the "tablepress_edit_options" capability.
96 - */
97 - if ( ! str_starts_with( TablePress::$model_options->get( 'prev_tablepress_version' ), '2.2' ) && ( tb_tp_fs()->is_free_plan() || current_user_can( 'tablepress_edit_options' ) ) ) {
98 - $message .= '<p style="font-size:14px;"><strong>' . __( 'Here’s the latest great addition:', 'tablepress' ) . '</strong></p>';
99 - $message .= '<div style="display:flex;max-width:625px;gap:20px;font-size:14px;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0, 0, 0, 0.04);padding:12px;">
100 - <div>
101 - <p style="font-size:14px;margin-top:0;">
102 - ' . __( 'The TablePress premium versions come with a table default style customizer!', 'tablepress' ) . '
103 - ' . __( 'Choose from multiple style variations or define your own color scheme in an easy-to-use visual tool!', 'tablepress' ) . '
104 - <strong>' . __( 'Change your tables’ default style without touching CSS code!', 'tablepress' ) . '</strong>
105 - </p>
106 - <div class="buttons" style="text-align:center;">
107 - <a href="' . $url . '" class="tablepress-button">
108 - <span>' . $button_label . '</span>
109 - <span class="dashicons dashicons-arrow-right-alt"></span>
110 - </a>
111 - </div>
112 - </div>
113 - <a href="' . $url . '"><img src="' . esc_url( plugins_url( 'admin/img/default-style-customizer.png', TABLEPRESS__FILE__ ) ) . '" width="305" height="172" alt="' . esc_attr__( 'Screenshot of the Default Style Customizer that is part of the TablePress premium versions.', 'tablepress' ) . '" /></a>
114 - </div>';
115 - }
116 -
117 - $message .= '<p style="margin-top:14px;">' . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'plugin_update', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>';
118 -
119 252 $title = '<em>' . sprintf( __( 'Thank you for updating to TablePress %s!', 'tablepress' ), TablePress::version ) . '</em>';
120 253
121 - $this->add_header_message( $message, 'notice-info not-dismissible', $title );
254 + $this->add_header_message( $message, 'is-info not-dismissible', $title );
122 255 }
123 256
124 257 $this->process_action_messages( array(
125 258 'success_delete' => _n( 'The table was deleted successfully.', 'The tables were deleted successfully.', 1, 'tablepress' ),
@@ -124,9 +257,15 @@
124 257 $this->process_action_messages( array(
125 258 'success_delete' => _n( 'The table was deleted successfully.', 'The tables were deleted successfully.', 1, 'tablepress' ),
126 259 'success_delete_plural' => _n( 'The table was deleted successfully.', 'The tables were deleted successfully.', 2, 'tablepress' ),
127 260 'error_delete' => __( 'Error: The table could not be deleted.', 'tablepress' ),
128 - 'success_copy' => _n( 'The table was copied successfully.', 'The tables were copied successfully.', 1, 'tablepress' ) . ( ( false !== $data['table_id'] ) ? ' ' . sprintf( __( 'The copied table has the table ID &#8220;%s&#8221;.', 'tablepress' ), esc_html( $data['table_id'] ) ) : '' ),
261 + 'success_copy' => _n( 'The table was copied successfully.', 'The tables were copied successfully.', 1, 'tablepress' )
262 + . ( ( false !== $data['table_id'] )
263 + ? ' ' . ( current_user_can( 'tablepress_edit_table', $data['table_id'] )
264 + ? sprintf( __( 'You can now <a href="%1$s">edit the copied table</a>, which has the table ID “%2$s”.', 'tablepress' ), esc_url( TablePress::url( array( 'action' => 'edit', 'table_id' => $data['table_id'] ) ) ), $data['table_id'] )
265 + : sprintf( __( 'The copied table has the table ID &#8220;%s&#8221;.', 'tablepress' ), esc_html( $data['table_id'] ) ) )
266 + : ''
267 + ),
129 268 'success_copy_plural' => _n( 'The table was copied successfully.', 'The tables were copied successfully.', 2, 'tablepress' ),
130 269 'error_copy' => __( 'Error: The table could not be copied.', 'tablepress' ),
131 270 'error_no_table' => __( 'Error: You did not specify a valid table ID.', 'tablepress' ),
132 271 'error_load_table' => __( 'Error: This table could not be loaded!', 'tablepress' ),
@@ -153,8 +292,9 @@
153 292 * Render the current view (in this view: without form tag).
154 293 *
155 294 * @since 1.0.0
156 295 */
296 + #[\Override]
157 297 public function render(): void {
158 298 ?>
159 299 <div id="tablepress-page" class="wrap">
160 300 <?php
@@ -160,9 +300,9 @@
160 300 <?php
161 301 $this->print_nav_tab_menu();
162 302 ?>
163 303 <div id="tablepress-body">
164 - <hr class="wp-header-end" />
304 + <hr class="wp-header-end">
165 305 <?php
166 306 // Print all header messages.
167 307 foreach ( $this->header_messages as $message ) {
168 308 echo $message;
@@ -192,9 +332,9 @@
192 332 $this->do_meta_boxes( 'side' );
193 333 ?>
194 334 </div>
195 335 </div>
196 - <br class="clear" />
336 + <br class="clear">
197 337 </div>
198 338 </div>
199 339 </div>
200 340 <?php
@@ -212,10 +352,12 @@
212 352 echo '<p>';
213 353 _e( 'This is a list of your tables.', 'tablepress' );
214 354 echo ' ';
215 355 // Show the instructions string depending on whether the Block Editor is used on the site or not.
216 - if ( $data['site_uses_block_editor'] ) {
356 + if ( 'block' === $data['site_used_editor'] ) {
217 357 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' ) );
358 + } elseif ( 'elementor' === $data['site_used_editor'] ) {
359 + 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' ) );
218 360 } else {
219 361 _e( 'To insert a table into a post or page, paste its Shortcode at the desired place in the editor.', 'tablepress' );
220 362 echo ' ';
221 363 _e( 'Each table has a unique ID that needs to be adjusted in that Shortcode.', 'tablepress' );
@@ -235,12 +377,12 @@
235 377 if ( ! empty( $_GET['s'] ) ) {
236 378 printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'tablepress' ) . '</span>', esc_html( wp_unslash( $_GET['s'] ) ) );
237 379 }
238 380 ?>
239 -<form method="get" action="">
381 +<form method="get">
240 382 <?php
241 383 if ( isset( $_GET['page'] ) ) {
242 - echo '<input type="hidden" name="page" value="' . esc_attr( $_GET['page'] ) . '" />' . "\n";
384 + echo '<input type="hidden" name="page" value="' . esc_attr( $_GET['page'] ) . '">' . "\n";
243 385 }
244 386 $this->wp_list_table->search_box( __( 'Search Tables', 'tablepress' ), 'tables_search' );
245 387 ?>
246 388 </form>
@@ -250,8 +392,9 @@
250 392 $this->do_text_boxes( 'header' );
251 393 $this->wp_list_table->display();
252 394 ?>
253 395 </form>
396 +<div id="tablepress-list-screen"></div>
254 397 <?php
255 398 }
256 399
257 400 /**