WordPress.org

Make WordPress Core

Opened 13 months ago

Last modified 13 months ago

#38805 new defect (bug)

A hook is missing in class WP_List_Table

Reported by: madvic Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.6.1
Component: Administration Keywords:
Focuses: Cc:

Description

If I want to add a column to a WP_List_Table, I used this hooks :

  • manage_{$this->screen->id}_columns
  • manage_{$this->screen->id}_sortable_columns
  • manage_{$screen->id}_custom_column

But the last one doesn't exist in WP_List_Table, I can create a column but I can't insert data into.

Here the documentation :
https://make.wordpress.org/docs/plugin-developer-handbook/10-plugin-components/custom-list-table-columns/#output-table-cell-contents

Here the source of WP_List_Table :
https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-list-table.php

Actually, I want to hook a plugin with this hook, I can't add columns.

Thanks

Change History (2)

#2 in reply to: ↑ 1 @madvic
13 months ago

Yes it is, but not in WP_List_Table, we can't hook this class. Ant it used in many projects.

Replying to SergeyBiryukov:

But the last one doesn't exist in WP_List_Table, I can create a column but I can't insert data into.

It exists in classes that extend WP_List_Table though:

Last edited 13 months ago by madvic (previous) (diff)
Note: See TracTickets for help on using tickets.