Since 1.30.0 (#151741) a task’s progress log is stored as comments of type lh_task_log, one per entry, instead of one serialized _lh_tasks-progress_log post meta array. Every append to the array read the whole log and saved it back, so two entries written at the same moment (a heartbeat and a note, say) could drop one. Each entry is now its own row. LH_Tasks_progress_log_class (includes/lh-tasks-progress-log-class.php) owns the storage.
Shape
- The comment’s post is the task, its user is the actor (0 for the system), its date is the entry’s time (site local, with the GMT date alongside) and its content is the note, which may be empty. Always approved.
- The event and every other key of the entry (
from_status,to_status,fields,viaand so on) are comment meta named_lh_tasks-log-{key}, for example_lh_tasks-log-event. - Callers are unchanged:
LH_Tasks_task_actions_class::append_progress_log( $post_id, $entry )writes and now returns the new entry’s ID (or false).LH_Tasks_task_actions_class::get_progress_log( $post_id )is the one reader, used byget-task,list-tasks, the task page and follow-ups. It returns the same entry shape as before, oldest first, pluslog_id: the entry’s own ID. - Each append purges the task page from LiteSpeed (
litespeed_purge_post) and fireslh_tasks_progress_log_appended($post_id, $log_id).
Kept internal
Entries are inserted directly into the comments table, not through wp_insert_comment(), so nothing that listens for new comments sees them. Enable Mastodon Apps mirrors every approved comment into a published post (fix proposed upstream as akirk/enable-mastodon-apps#360), and ActivityPub and BuddyPress record comment activity. No comment notifications or spam checks run. Log comments are also left out of:
- comment queries that don’t ask for the type by name: the Comments screen, comment lists, the Recent Comments widget and block, the dashboard (
comments_clauses); - comment feeds (
comment_feed_where); - comment counts, for the site and for a task (
wp_count_comments, subtracting from whatever other plugins returned, andpre_wp_update_comment_count_now); - the REST comments endpoint, lists and single comments alike, even when the type is asked for (
rest_comment_query,rest_request_before_callbacks). Core would otherwise let anyone who can read a task, such as its assignee, read its log there.
Migration (1.30.0, removed in 1.30.1)
1.30.0 moved every existing log across on init, a batch of tasks per request, keeping each entry’s time and actor, and deleted each task’s old meta once all its entries were verified. Every site had finished within minutes, with no failures, so 1.30.1 (#154918) removed the migration and the reader’s fallback to the old meta. Migrated entries still carry _lh_tasks-log-legacy_index (their position in the old array); the reader hides it. The options lh_tasks_progress_log_comments_migrated left on each site are no longer read.

