',
esc_attr($tablestatus->Name),
esc_attr($tablestatus->Engine),
$tablestatus->is_optimizable ? 1 : 0,
$is_multisite_mode ? esc_attr($tablestatus->blog_id) : '');
printf('| %2$s | ', esc_attr__('No.', 'wp-optimize'), esc_html(number_format_i18n($row_number)));
printf('%3$s', esc_attr($tablestatus->Name), esc_attr__('Table', 'wp-optimize'), esc_html($tablestatus->Name));
if (!empty($tablestatus->plugin_status)) {
if ($tablestatus->wp_core_table) {
printf(' %s ', esc_html__('Belongs to:', 'wp-optimize'));
printf('%s', esc_html__('WordPress core', 'wp-optimize'));
} elseif (false !== stripos($tablestatus->Name, 'actionscheduler_')) {
printf(' %s ', esc_html__('This table is used by many plugins for batch processing.', 'wp-optimize'));
printf('%s', esc_html__('Thus, it cannot be deleted.', 'wp-optimize'));
} else {
echo '';
printf('%s ', esc_html__('Known plugins that use this table name:', 'wp-optimize'));
foreach ($tablestatus->plugin_status as $plugins_status) {
$plugin = $plugins_status['plugin'];
$status = $plugins_status['status'];
echo ' ';
if (in_array($plugin, $closed_plugins)) {
continue;
}
if ('sfwd-lms' === $plugin) {
$wp_optimize->wp_optimize_url('https://www.learndash.com/', '', 'LearnDash');
} else {
$wp_optimize->wp_optimize_url('https://wordpress.org/plugins/'.$plugin.'/', '', ''.esc_html($plugin).'');
}
if (false === $status['installed']) {
printf(' [%s]', esc_html__('not installed', 'wp-optimize'));
} elseif (false === $status['active']) {
printf(' [%s]', esc_html__('inactive', 'wp-optimize'));
}
}
echo ' ';
}
}
echo " | \n";
$table_rows = intval($tablestatus->Rows);
printf('%3$s | ', esc_attr__('Records', 'wp-optimize'), esc_attr($table_rows), esc_html(number_format_i18n($table_rows)));
printf('%3$s | ', esc_attr__('Data Size', 'wp-optimize'), esc_attr(intval($tablestatus->Data_length)), esc_html($wp_optimize->format_size($tablestatus->Data_length)));
printf('%3$s | ', esc_attr__('Index Size', 'wp-optimize'), esc_attr(intval($tablestatus->Index_length)), esc_html($wp_optimize->format_size($tablestatus->Index_length)));
if ($tablestatus->is_optimizable) {
printf('%2$s | ', esc_attr__('Type', 'wp-optimize'), esc_html($tablestatus->Engine));
printf('', esc_attr__('Overhead', 'wp-optimize'), esc_attr(intval($tablestatus->Data_free)));
$font_colour = ($optimize_db ? (($tablestatus->Data_free > $small_overhead_size) ? '#0000FF' : '#004600') : (($tablestatus->Data_free > $small_overhead_size) ? '#9B0000' : '#004600'));
printf('%2$s', esc_attr($font_colour), esc_html($wp_optimize->format_size($tablestatus->Data_free)));
echo " | \n";
} else {
printf('%2$s | ', esc_attr__('Type', 'wp-optimize'), esc_html($tablestatus->Engine));
printf('', esc_attr__('Overhead', 'wp-optimize'));
?>
-
|
%2$s', esc_attr__('Actions', 'wp-optimize'), wp_kses_post(apply_filters('wpo_tables_list_additional_column_data', '', $tablestatus)));
echo "\n";
}
?>