Skip to content

Instantly share code, notes, and snippets.

@zackkatz
Created February 1, 2021 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackkatz/d160cdd144de2ae713d3983df9720bf1 to your computer and use it in GitHub Desktop.
Save zackkatz/d160cdd144de2ae713d3983df9720bf1 to your computer and use it in GitHub Desktop.
GravityView - Add a "GravityView Plugins" filter to the Plugins list ("active", "inactive", etc…)
<?php
/**
* Add to your functions.php file
*
* Note: this does the same thing as searching for "GravityView.co" in the plugins search box!
*/
add_filter( 'views_plugins', function( $views = array() ) {
$link = esc_html__( 'GravityView Plugins', 'gravityview' );
$views['gravityview'] = '<a href="' . esc_url( admin_url( 'plugins.php?plugin_status=search&paged=1&s=gravityview.co' ) ) . '" onclick="jQuery(\'#plugin-search-input\').val(\'gravityview.co\').trigger(\'submit\'); return false;">' . $link . '</a>';
return $views;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment