getRealPath(); // Verify each file is within cache directory if ( strpos( $file_path, $real_cache_dir ) !== 0 ) { continue; } if ( $file->isDir() ) { @rmdir( $file_path ); } else { @unlink( $file_path ); } } @rmdir( $cache_dir ); } } // Clear any transients using proper LIKE escaping global $wpdb; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s", $wpdb->esc_like( '_transient_maple_perf_' ) . '%' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s", $wpdb->esc_like( '_transient_timeout_maple_perf_' ) . '%' ) );