如果您确定不需要这些插件,并且TGM没有为您的插件提供任何必需的许可证,那么只需pull TGM Plugin Activation right out.
这是一个三步骤的过程。一:查找并删除插件注册函数。
<?php
/**
* Required and Recommended Plugins
*/
function prefix_register_plugins() {
/**
* Array of plugin arrays. Required keys are name and slug.
* If the source is NOT from the .org repo, then source is also required.
*/
$plugins = array(
// WordPress SEO
array(
\'name\' => \'WordPress SEO by Yoast\',
\'slug\' => \'wordpress-seo\',
\'required\' => false,
),
...
);
tgmpa( $plugins );
}
add_action( \'tgmpa_register\', \'prefix_register_plugins\' );
第二:查找并删除引用TGMPA类文件的require\\u once()调用。
<?php
/**
* Include the TGM_Plugin_Activation class.
*/
require_once dirname( __FILE__ ) . \'/class-tgm-plugin-activation.php\';
三:删除
class-tgm-plugin-activation.php
因为它不再需要了。