Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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