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 | classes/class-css.php +6 -12 2.43.2 View file →
@@ -246,9 +246,9 @@
246 246 /*
247 247 * Do we have credentials already? (Otherwise the form will have been rendered, which is not supported here.)
248 248 * Or, if we have credentials, are they valid?
249 249 */
250 - if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { // @phpstan-ignore-line
250 + if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { // @phpstan-ignore argument.type
251 251 ob_end_clean();
252 252 return false;
253 253 }
254 254
@@ -278,18 +278,18 @@
278 278 $credentials = request_filesystem_credentials( '', '', false, '', null, false );
279 279 // Do we have credentials already? Otherwise the form will have been rendered already.
280 280 if ( false === $credentials ) {
281 281 $form_data = ob_get_clean();
282 - $form_data = str_replace( 'name="upgrade" id="upgrade" class="button"', 'name="upgrade" id="upgrade" class="button button-primary button-large"', $form_data ); // @phpstan-ignore-line
282 + $form_data = str_replace( 'name="upgrade" id="upgrade" class="button"', 'name="upgrade" id="upgrade" class="components-button is-primary"', $form_data ); // @phpstan-ignore argument.type
283 283 return $form_data;
284 284 }
285 285
286 286 // We have received credentials, but don't know if they are valid yet.
287 - if ( ! WP_Filesystem( $credentials ) ) { // @phpstan-ignore-line
287 + if ( ! WP_Filesystem( $credentials ) ) { // @phpstan-ignore argument.type
288 288 // Credentials failed, so ask again (with $error flag true).
289 289 request_filesystem_credentials( '', '', true, '', null, false );
290 290 $form_data = ob_get_clean();
291 - $form_data = str_replace( 'name="upgrade" id="upgrade" class="button"', 'name="upgrade" id="upgrade" class="button button-primary button-large"', $form_data ); // @phpstan-ignore-line
291 + $form_data = str_replace( 'name="upgrade" id="upgrade" class="button"', 'name="upgrade" id="upgrade" class="components-button is-primary"', $form_data ); // @phpstan-ignore argument.type
292 292 return $form_data;
293 293 }
294 294
295 295 // We have valid access to the filesystem now -> try to save the files, or delete them if the "Custom CSS" is empty.
@@ -328,14 +328,8 @@
328 328
329 329 $default_css_minified = $this->load_default_css_from_file( false );
330 330 if ( false === $default_css_minified ) {
331 331 $default_css_minified = '';
332 - } else {
333 - // Change relative URLs to web font files to absolute URLs, as combining the CSS files and saving to another directory breaks the relative URLs.
334 - $absolute_path = plugins_url( 'css/build/tablepress.', TABLEPRESS__FILE__ );
335 - // Make the absolute URL protocol-relative to prevent mixed content warnings.
336 - $absolute_path = str_replace( array( 'http:', 'https:' ), '', $absolute_path );
337 - $default_css_minified = str_replace( 'url(tablepress.', 'url(' . $absolute_path, $default_css_minified );
338 332 }
339 333 $file_content = array(
340 334 'normal' => $custom_css_normal,
341 335 'minified' => $custom_css_minified,
@@ -377,9 +371,9 @@
377 371 /*
378 372 * Do we have credentials already? (Otherwise the form will have been rendered, which is not supported here.)
379 373 * Or, if we have credentials, are they valid?
380 374 */
381 - if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { // @phpstan-ignore-line
375 + if ( false === $credentials || ! WP_Filesystem( $credentials ) ) { // @phpstan-ignore argument.type
382 376 ob_end_clean();
383 377 return false;
384 378 }
385 379
@@ -449,9 +443,9 @@
449 443 w3tc_minify_flush();
450 444 }
451 445 // WP Fastest Cache.
452 446 if ( isset( $GLOBALS['wp_fastest_cache'] ) && is_callable( array( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) ) {
453 - $GLOBALS['wp_fastest_cache']->deleteCache( true ); // @phpstan-ignore-line
447 + $GLOBALS['wp_fastest_cache']->deleteCache( true ); // @phpstan-ignore method.nonObject
454 448 }
455 449 }
456 450
457 451 } // class TablePress_CSS