[wp-trac] [WordPress Trac] #59587: Pass column count to "after_plugin_row" action hooks in WP_Plugins_List_Table
WordPress Trac
noreply at wordpress.org
Tue Oct 10 20:52:30 UTC 2023
#59587: Pass column count to "after_plugin_row" action hooks in
WP_Plugins_List_Table
------------------------------------+---------------------
Reporter: TobiasBg | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+---------------------
Comment (by afragen):
I'm really not sure how you are not getting the full width of the plugin
row when attempting to add your license renewal. I have plugins that use
the `after_plugin_row_{plugin_name}` and do not suffer this. Perhaps it's
just CSS that needs to be used with your row addition.
You can also use the `wp_list_table_class_name` hook to essentially
replace the function in question or the entire `WP_Plugin_List_Table`
class.
In either case core does not need to be modified. Here's a snippet of code
that I use for the opening of the plugin row.
{{{
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
$open = '<tr class="git-updater plugin-update-tr' . $active . '"'
. $multisite_theme_open . '>
<td colspan="' . $wp_list_table->get_column_count() . '"
class="plugin-update colspanchange">
<div class="">';
}}}
As you can see from the snippet above, I am able to directly access the
column width.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59587#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list