prefix . 'ai_content_x_logs'; $logs = $wpdb->get_results("SELECT * FROM $table_name ORDER BY id DESC LIMIT 10"); $options = get_option('ai_content_x'); $cronjob_post_status = $options['cronjob_post_status'] ?? 'draft'; $args = array( 'post_type' => 'post', 'post_status' => $cronjob_post_status ?? 'draft', 'meta_key' => '_ai_content_x_queue', 'meta_value' => 'on', 'orderby' => 'ID', 'order' => 'ASC', 'posts_per_page' => 1, ); $posts = get_posts($args); ?>
| " . $post->ID . " | "; echo "" . esc_html($post->post_title) . " | "; echo "" . esc_html($post->post_status) . " | "; echo "" . human_time_diff(wp_next_scheduled('ai_content_x_cronjob'), current_time('timestamp')) . " | "; echo ""; echo ""; } ?> |
"; echo _('Lastest 10 runs of cronjob.'); echo "
"; ?>| Post ID | Prompt | Date | Type | " . $log->post_id . " | "; echo "" . esc_html($log->prompt) . " | "; echo "" . human_time_diff(strtotime($log->created_at), current_time('timestamp')) . " ago | "; echo "" . esc_html($log->type) . "";
if ($log->type === 'error') {
echo " ";
echo esc_html($log->message);
echo " ";
}
echo " | ";
echo "";
}
?>
|---|