Change the number of plugins counted on wp-admin/plugins.php


I have successfully hidden my plugin from the plugins page using $wp_list_table however the pagination at the top still lists plugins as ‘All (3)’ etc.

I managed to successfully alter the $wp_list_table array of _pagination_args = total_items.

But it was still rendering Plugins – ‘All (3)’ at the top of the page.

Any ideas on how I can fix this?

I have found WP_Plugins_List_Table::prepare_items()
has a global $totals variable but I am unsure of how I would change this,

Inside this function it has

$totals = array();
foreach ( $plugins as $type => $list )
    $totals[ $type ] = count( $list );

All I am looking for is to get the total plugins number and – 1 before it renders on the page.

, , Icarus 3 years 2020-04-04T16:52:34-05:00 0 Answers 90 views 0

Leave an answer