| @@ -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,172 @@ | ||
| 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 | 45 | add_thickbox(); // For the table preview. |
| 45 | 46 | $this->admin_page->enqueue_script( 'list' ); |
| 46 | 47 | |
| 48 | + if ( $data['messages']['superseded_extensions'] ) { | |
| 49 | + $superseded_extensions = array( | |
| 50 | + 'tablepress-advanced-access-rights/tablepress-advanced-access-rights.php' => array( | |
| 51 | + 'name' => 'TablePress Extension: Advanced Access Rights', | |
| 52 | + 'compatible' => true, | |
| 53 | + ), | |
| 54 | + 'tablepress-auto-export-tables/tablepress-auto-export-tables.php' => array( | |
| 55 | + 'name' => 'TablePress Extension: Automatic Table Export', | |
| 56 | + 'compatible' => true, | |
| 57 | + ), | |
| 58 | + 'tablepress-cell-highlighting/tablepress-cell-highlighting.php' => array( | |
| 59 | + 'name' => 'TablePress Extension: Cell Highlighting', | |
| 60 | + 'compatible' => true, | |
| 61 | + ), | |
| 62 | + 'tablepress-datatables-alphabetsearch/tablepress-datatables-alphabetsearch.php' => array( | |
| 63 | + 'name' => 'TablePress Extension: DataTables AlphabetSearch', | |
| 64 | + 'compatible' => false, | |
| 65 | + ), | |
| 66 | + 'tablepress-datatables-buttons/tablepress-datatables-buttons.php' => array( | |
| 67 | + 'name' => 'TablePress Extension: DataTables Buttons', | |
| 68 | + 'compatible' => true, | |
| 69 | + ), | |
| 70 | + 'tablepress-datatables-column-filter-widgets/tablepress-datatables-column-filter-widgets.php' => array( | |
| 71 | + 'name' => 'TablePress Extension: DataTables ColumnFilterWidgets', | |
| 72 | + 'compatible' => false, | |
| 73 | + ), | |
| 74 | + 'tablepress-datatables-columnfilter/tablepress-datatables-columnfilter.php' => array( | |
| 75 | + 'name' => 'TablePress Extension: DataTables Column Filter', | |
| 76 | + 'compatible' => false, | |
| 77 | + ), | |
| 78 | + 'tablepress-datatables-counter-column/tablepress-datatables-counter-column.php' => array( | |
| 79 | + 'name' => 'TablePress Extension: DataTables Counter Column', | |
| 80 | + 'compatible' => true, | |
| 81 | + ), | |
| 82 | + 'tablepress-datatables-fixedcolumns/tablepress-datatables-fixedcolumns.php' => array( | |
| 83 | + 'name' => 'TablePress Extension: DataTables FixedColumns', | |
| 84 | + 'compatible' => false, | |
| 85 | + ), | |
| 86 | + 'tablepress-datatables-fixedheader/tablepress-datatables-fixedheader.php' => array( | |
| 87 | + 'name' => 'TablePress Extension: DataTables FixedHeader', | |
| 88 | + 'compatible' => true, | |
| 89 | + ), | |
| 90 | + 'tablepress-datatables-row-details/tablepress-datatables-row-details.php' => array( | |
| 91 | + 'name' => 'TablePress Extension: DataTables Row Details', | |
| 92 | + 'compatible' => false, | |
| 93 | + ), | |
| 94 | + 'tablepress-datatables-rowgroup/tablepress-datatables-rowgroup.php' => array( | |
| 95 | + 'name' => 'TablePress Extension: DataTables RowGroup', | |
| 96 | + 'compatible' => false, | |
| 97 | + ), | |
| 98 | + 'tablepress-responsive-tables/tablepress-responsive-tables.php' => array( | |
| 99 | + 'name' => 'TablePress Extension: Responsive Tables', | |
| 100 | + 'compatible' => false, | |
| 101 | + ), | |
| 102 | + 'tablepress-row-filter/tablepress-row-filter.php' => array( | |
| 103 | + 'name' => 'TablePress Extension: Row Filtering', | |
| 104 | + 'compatible' => true, | |
| 105 | + ), | |
| 106 | + 'tablepress-row-highlighting/tablepress-row-highlighting.php' => array( | |
| 107 | + 'name' => 'TablePress Extension: Row Highlighting', | |
| 108 | + 'compatible' => true, | |
| 109 | + ), | |
| 110 | + 'tablepress-table-auto-update/tablepress-table-auto-update.php' => array( | |
| 111 | + 'name' => 'TablePress Extension: Table Auto Update', | |
| 112 | + 'compatible' => true, | |
| 113 | + ), | |
| 114 | + 'tablepress-table-column-order/tablepress-table-column-order.php' => array( | |
| 115 | + 'name' => 'TablePress Extension: Table Column Order', | |
| 116 | + 'compatible' => true, | |
| 117 | + ), | |
| 118 | + ); | |
| 119 | + | |
| 120 | + $active_compatible_superseded_extensions = array(); | |
| 121 | + $active_incompatible_superseded_extensions = array(); | |
| 122 | + foreach ( $superseded_extensions as $plugin => $extension ) { | |
| 123 | + if ( is_plugin_active( $plugin ) ) { | |
| 124 | + if ( $extension['compatible'] ) { | |
| 125 | + $active_compatible_superseded_extensions[] = $extension['name']; | |
| 126 | + } else { | |
| 127 | + $active_incompatible_superseded_extensions[] = $extension['name']; | |
| 128 | + } | |
| 129 | + } | |
| 130 | + } | |
| 131 | + | |
| 132 | + /* | |
| 133 | + * If no superseded extensions are used, hide the message, to prevent running the checks on every load of the view. | |
| 134 | + * This leaves a small risk of an Extension being activated later, but that's acceptable as they are no longer publicly available. | |
| 135 | + */ | |
| 136 | + if ( empty( $active_incompatible_superseded_extensions ) && ( empty( $active_compatible_superseded_extensions ) || ! tb_tp_fs()->is_free_plan() ) ) { | |
| 137 | + TablePress::$model_options->update( 'message_superseded_extensions', false ); | |
| 138 | + } | |
| 139 | + | |
| 140 | + $message = ''; | |
| 141 | + | |
| 142 | + $notice_css_classes = 'not-dismissible'; | |
| 143 | + | |
| 144 | + if ( ! empty( $active_incompatible_superseded_extensions ) ) { | |
| 145 | + $notice_css_classes .= ' notice-error notice-large'; | |
| 146 | + | |
| 147 | + $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>'; | |
| 148 | + $message .= '<ul style="list-style:disc;margin:0.5em 1em;font-size:16px;">'; | |
| 149 | + foreach ( $active_incompatible_superseded_extensions as $extension ) { | |
| 150 | + $message .= '<li>' . esc_html( $extension ) . '</li>'; | |
| 151 | + } | |
| 152 | + $message .= '</ul>'; | |
| 153 | + $message .= '<p style="font-size:16px;"><strong>' . __( 'Keeping them activated can lead to errors on your website.', 'tablepress' ) . '</strong></p>'; | |
| 154 | + | |
| 155 | + if ( tb_tp_fs()->is_free_plan() ) { | |
| 156 | + $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>' | |
| 157 | + . __( 'TablePress Pro and TablePress Max come with updated and heavily improved versions of these features and include direct priority email support.', 'tablepress' ) . '</p>'; | |
| 158 | + } | |
| 159 | + | |
| 160 | + if ( ! empty( $active_compatible_superseded_extensions ) && tb_tp_fs()->is_free_plan() ) { | |
| 161 | + $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>'; | |
| 162 | + $message .= '<ul style="list-style:disc;margin:0.5em 1em;font-size:14px;">'; | |
| 163 | + foreach ( $active_compatible_superseded_extensions as $extension ) { | |
| 164 | + $message .= '<li>' . esc_html( $extension ) . '</li>'; | |
| 165 | + } | |
| 166 | + $message .= '</ul>'; | |
| 167 | + } | |
| 168 | + } elseif ( ! empty( $active_compatible_superseded_extensions ) && tb_tp_fs()->is_free_plan() ) { | |
| 169 | + $notice_css_classes .= ' notice-warning notice-alt'; | |
| 170 | + | |
| 171 | + $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>'; | |
| 172 | + $message .= '<ul style="list-style:disc;margin:0.5em 1em;">'; | |
| 173 | + foreach ( $active_compatible_superseded_extensions as $extension ) { | |
| 174 | + $message .= '<li>' . esc_html( $extension ) . '</li>'; | |
| 175 | + } | |
| 176 | + $message .= '</ul>'; | |
| 177 | + $message .= '<p style="font-size:14px;"><strong>' . __( 'It is possible that these become incompatible with TablePress or WordPress in the future!', 'tablepress' ) . '</strong></p>'; | |
| 178 | + $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>'; | |
| 179 | + } | |
| 180 | + | |
| 181 | + if ( '' !== $message ) { | |
| 182 | + if ( tb_tp_fs()->is_free_plan() ) { | |
| 183 | + $message .= '<p style="font-size:16px;margin-top:1.5em;"><strong>' . __( 'Upgrade to a TablePress Premium license plan now and get:', 'tablepress' ) . '</strong></p>'; | |
| 184 | + $message .= '<ul style="list-style:disc;margin:0.5em 1em;font-size:16px;">'; | |
| 185 | + $message .= '<li>' . __( 'Updated and heavily improved versions of these features!', 'tablepress' ) . '</li>'; | |
| 186 | + $message .= '<li>' . __( 'Direct integration into the user interface!', 'tablepress' ) . '</li>'; | |
| 187 | + $message .= '<li>' . __( 'Regular updates that ensure compatibility with WordPress!', 'tablepress' ) . '</li>'; | |
| 188 | + $message .= '<li>' . __( 'Priority email support!', 'tablepress' ) . '</li>'; | |
| 189 | + $message .= '</ul>'; | |
| 190 | + $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>'; | |
| 191 | + $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' ) ); | |
| 192 | + } | |
| 193 | + $message .= $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'superseded_extensions', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>'; | |
| 194 | + | |
| 195 | + $title = '<em>' . __( 'Important Notice!', 'tablepress' ) . '</em>'; | |
| 196 | + | |
| 197 | + $this->add_header_message( $message, $notice_css_classes, $title ); | |
| 198 | + } | |
| 199 | + } | |
| 200 | + | |
| 47 | 201 | 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>'; | |
| 202 | + $message = '<p style="font-size:14px;"><strong>' . __( 'Thank you for choosing TablePress, the most popular table plugin for WordPress!', 'tablepress' ) . '</strong></p>'; | |
| 49 | 203 | $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 | 204 | |
| 51 | 205 | if ( tb_tp_fs()->is_free_plan() ) { |
| 52 | 206 | $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,9 +205,9 @@ | ||
| 51 | 205 | if ( tb_tp_fs()->is_free_plan() ) { |
| 52 | 206 | $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 | 207 | } |
| 54 | 208 | |
| 55 | - $message .= '<p style="margin-top:14px;">' . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'first_visit', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>'; | |
| 209 | + $message .= '<p style="margin-top:1em;">' . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'first_visit', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>'; | |
| 56 | 210 | |
| 57 | 211 | $title = '<em>' . __( 'Welcome!', 'tablepress' ) . '</em>'; |
| 58 | 212 | |
| 59 | 213 | $this->add_header_message( $message, 'notice-info not-dismissible', $title ); |
| @@ -58,10 +212,10 @@ | ||
| 58 | 212 | |
| 59 | 213 | $this->add_header_message( $message, 'notice-info not-dismissible', $title ); |
| 60 | 214 | } |
| 61 | 215 | |
| 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;" />' | |
| 216 | + if ( $data['messages']['donation_nag'] ) { | |
| 217 | + $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 | 218 | . __( 'Hi, my name is Tobias, I’m the developer of the TablePress plugin.', 'tablepress' ) . '</p>'; |
| 65 | 219 | $message .= '<p style="font-size:14px;">' . __( 'Thank you for using it!', 'tablepress' ) . ' '; |
| 66 | 220 | if ( $data['table_count'] > 0 ) { |
| 67 | 221 | $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,12 +222,12 @@ | ||
| 68 | 222 | } else { |
| 69 | 223 | $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 | 224 | } |
| 71 | 225 | $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 />' | |
| 226 | + $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 | 227 | . __( 'The available Pro and Max plans offer user support and many exciting and helpful features for your tables.', 'tablepress' ) . '</strong></p>'; |
| 74 | 228 | $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' ) ) | |
| 229 | + $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 | 230 | . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'donation_nag', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>'; |
| 77 | 231 | |
| 78 | 232 | $title = '<em>' . __( 'TablePress has more to offer!', 'tablepress' ) . '</em>'; |
| 79 | 233 | |
| @@ -79,44 +233,17 @@ | ||
| 79 | 233 | |
| 80 | 234 | $this->add_header_message( $message, 'notice-success not-dismissible', $title ); |
| 81 | 235 | } |
| 82 | 236 | |
| 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>'; | |
| 237 | + if ( $data['messages']['plugin_update'] ) { | |
| 238 | + $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 | 239 | |
| 86 | 240 | if ( tb_tp_fs()->is_free_plan() ) { |
| 87 | 241 | $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 | 242 | } |
| 89 | 243 | |
| 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' ); | |
| 244 | + $message .= '<p style="margin-top:1em;">' . $this->ajax_link( array( 'action' => 'hide_message', 'item' => 'plugin_update', 'return' => 'list' ), __( 'Hide this message', 'tablepress' ) ) . '</p>'; | |
| 92 | 245 | |
| 93 | - /* | |
| 94 | - * Show the message only if the user is on | |
| 95 | - * the Free plan or has the "tablepress_edit_options" capability. | |
| 96 | - */ | |
| 97 | - if ( 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 | 246 | $title = '<em>' . sprintf( __( 'Thank you for updating to TablePress %s!', 'tablepress' ), TablePress::version ) . '</em>'; |
| 120 | 247 | |
| 121 | 248 | $this->add_header_message( $message, 'notice-info not-dismissible', $title ); |
| 122 | 249 | } |
| @@ -153,8 +280,9 @@ | ||
| 153 | 280 | * Render the current view (in this view: without form tag). |
| 154 | 281 | * |
| 155 | 282 | * @since 1.0.0 |
| 156 | 283 | */ |
| 284 | + #[\Override] | |
| 157 | 285 | public function render(): void { |
| 158 | 286 | ?> |
| 159 | 287 | <div id="tablepress-page" class="wrap"> |
| 160 | 288 | <?php |
| @@ -160,9 +288,9 @@ | ||
| 160 | 288 | <?php |
| 161 | 289 | $this->print_nav_tab_menu(); |
| 162 | 290 | ?> |
| 163 | 291 | <div id="tablepress-body"> |
| 164 | - <hr class="wp-header-end" /> | |
| 292 | + <hr class="wp-header-end"> | |
| 165 | 293 | <?php |
| 166 | 294 | // Print all header messages. |
| 167 | 295 | foreach ( $this->header_messages as $message ) { |
| 168 | 296 | echo $message; |
| @@ -192,9 +320,9 @@ | ||
| 192 | 320 | $this->do_meta_boxes( 'side' ); |
| 193 | 321 | ?> |
| 194 | 322 | </div> |
| 195 | 323 | </div> |
| 196 | - <br class="clear" /> | |
| 324 | + <br class="clear"> | |
| 197 | 325 | </div> |
| 198 | 326 | </div> |
| 199 | 327 | </div> |
| 200 | 328 | <?php |
| @@ -235,12 +363,12 @@ | ||
| 235 | 363 | if ( ! empty( $_GET['s'] ) ) { |
| 236 | 364 | printf( '<span class="subtitle">' . __( 'Search results for “%s”', 'tablepress' ) . '</span>', esc_html( wp_unslash( $_GET['s'] ) ) ); |
| 237 | 365 | } |
| 238 | 366 | ?> |
| 239 | -<form method="get" action=""> | |
| 367 | +<form method="get"> | |
| 240 | 368 | <?php |
| 241 | 369 | if ( isset( $_GET['page'] ) ) { |
| 242 | - echo '<input type="hidden" name="page" value="' . esc_attr( $_GET['page'] ) . '" />' . "\n"; | |
| 370 | + echo '<input type="hidden" name="page" value="' . esc_attr( $_GET['page'] ) . '">' . "\n"; | |
| 243 | 371 | } |
| 244 | 372 | $this->wp_list_table->search_box( __( 'Search Tables', 'tablepress' ), 'tables_search' ); |
| 245 | 373 | ?> |
| 246 | 374 | </form> |