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 | |
/** | |
* Plugin Name: Managed plugins | |
* Description: Managed plugins detection | |
* Author: Vladimir Smitka | |
* Author URI: https://lynt.cz/ | |
* License: GNU General Public License v3 or later | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
defined('ABSPATH') or die('nothing here'); | |
add_filter( 'all_plugins', 'lynt_plugin_header' ); | |
function lynt_plugin_header( $plugins ) { | |
foreach ( $plugins as $key => $value ) { | |
if(is_link( WP_PLUGIN_DIR . '/' . explode("/",$key)[0])) { | |
$plugins[$key]['Name'] = '[Managed] '.$plugins[$key]['Name']; | |
} | |
} | |
return $plugins; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment