Created
February 1, 2021 19:45
-
-
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…)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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