fix: cost column SQL error + Peptide Topics column squish (v0.13.5)
Two bugs in class-post-list-columns.php: 1. Cost always showed $0.00: a PHP '// phpcs:ignore' comment was placed inside the SQL string literal, causing MariaDB syntax error on every render_cost_cell() query. Moved comment to the line above wpdb->prepare() where it belongs. 2. Peptide Topics column header compressed to near-zero width by the three fixed-width PRAB columns (Writing Model + Image Model + Cost = 255px). Added min-width: 80px to .column-taxonomy-peptide_topic so the header renders horizontally.
This commit is contained in:
@@ -115,6 +115,7 @@ class PRAutoBlogger_Post_List_Columns {
|
||||
. '.column-prab_writing_model{width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}'
|
||||
. '.column-prab_image_model{width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}'
|
||||
. '.column-prab_cost{width:55px;white-space:nowrap;overflow:visible}'
|
||||
. '.column-taxonomy-peptide_topic{min-width:80px}'
|
||||
. '.prab-cost-wrap{position:relative;display:inline-block}'
|
||||
. '.prab-cost-trigger{font-size:12px;color:#2271b1;text-decoration:underline;cursor:pointer}'
|
||||
. '.prab-cost-popover{display:none;position:absolute;right:0;top:100%;z-index:9999;'
|
||||
@@ -182,7 +183,8 @@ class PRAutoBlogger_Post_List_Columns {
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
|
||||
$rows = $wpdb->get_results(
|
||||
$wpdb->prepare(
|
||||
"SELECT stage, model, prompt_tokens, completion_tokens, estimated_cost // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
"SELECT stage, model, prompt_tokens, completion_tokens, estimated_cost
|
||||
FROM {$table} WHERE post_id = %d ORDER BY id ASC",
|
||||
$post_id
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user