Opened 15 years ago
Closed 15 years ago
#16279 closed defect (bug) (fixed)
Don't hardcode colspan in WP_List_Table when there are no items
| Reported by: | garyc40 | Owned by: | garyc40 |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Administration | Version: | 3.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Currently in WP_List_Table::display_rows_or_placeholder(), when there's no item, colspan = "2" is applied to the no-item cell despite the number of visible columns.
Attachments (2)
Change History (9)
#1
@
15 years ago
- Milestone Awaiting Review → 3.1
This something we need to address in 3.1? Sounds like it, and I think I've seen evidence of this in the UI with odd wrapping.
#3
@
15 years ago
This doesn't take into account hidden columns.
Also, when you do take into account hidden columns with a - count( $hidden ), I get one more, as my array is this: array( 0 => 'response', 1 => '' ). Not a clue why I have the empty value, but an array_filter() can remove it if it isn't just me.
#6
@
15 years ago
- Keywords needs-testing removed
- Resolution fixed
- Status closed → reopened
There's a dedicated method for that: get_column_count(). See 16279.diff.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
don't hardcode colspan