[wp-trac] [WordPress Trac] #38805: A hook is missing in class WP_List_Table
WordPress Trac
noreply at wordpress.org
Wed Apr 8 17:52:20 UTC 2020
#38805: A hook is missing in class WP_List_Table
----------------------------+------------------------------
Reporter: madvic | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 4.6.1
Severity: major | Resolution:
Keywords: 2nd-opinion | Focuses:
----------------------------+------------------------------
Changes (by emilymoran84):
* severity: normal => major
Comment:
Replying to [comment:3 desrosj]:
> Marking this for a second opinion. The `WP_List_Table` is meant to be a
base class, but the other two filters do exist in `WP_List_Table` today.
So I could see adding this filter.
>
> @madvic is this still a pain point for you?
@desrosj Has there been any progress on this? I found this thread in my
own search for a solution. I am trying to add a custom column to a custom
table of an installed plugin. I too followed the same article as @madvic
https://make.wordpress.org/docs/plugin-developer-handbook/10-plugin-
components/custom-list-table-columns/#output-table-cell-contents
I was able to add the column to the table with
{{{
manage_{$this->screen->id}_columns
}}}
using the screen ID of that plugin's table page. However, as stated, the
{{{
manage_{$screen->id}_custom_column
}}}
doesn't seem to exist, so my content won't display in the columns.
As this table isn't a custom post type, or any of the other class
available as stated by @SergeyBiryukov , I'm unable to add content with
any of those options. This is the screen object readout for that table's
page, and you can see that there's no post type, taxonomy, etc for me to
use, and since {$screen->id} doesn't work, I'm at a loss:
{{{
WP_Screen Object ( [action] => [base] => memberpress_page_memberpress-
members [columns:WP_Screen:private] => 0 [id] =>
memberpress_page_memberpress-members [in_admin:protected] => site
[is_network] => [is_user] => [parent_base] => [parent_file] => [post_type]
=> [taxonomy] => [_help_tabs:WP_Screen:private] => Array ( )
[_help_sidebar:WP_Screen:private] =>
[_screen_reader_content:WP_Screen:private] => Array ( )
[_options:WP_Screen:private] => Array ( )
[_show_screen_options:WP_Screen:private] =>
[_screen_settings:WP_Screen:private] => [is_block_editor] => )
}}}
Being able to add content to the column in this table would be a huge
help. I'd love to know if there is a way to do this yet. Thank you!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38805#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list