我想在登录时禁用插件"qTranslate“。
我知道我可以通过这个函数做到这一点:“if ( is_user_logged_in() ){ ... } ",但是我不知道应该在哪里使用this..any帮助?
谢谢
发布于 2013-10-21 10:24:54
如果你在以下方面有收获,请告诉我:
function qtrans_disable()
{
global $typenow, $pagenow;
if (in_array($typenow, array('post')) &&
in_array($pagenow, array('post-new.php', 'post.php')))
{
remove_action('admin_head', 'qtrans_adminHeader' );
remove_filter('admin_footer', 'qtrans_modifyExcerpt' );
remove_filter('the_editor', 'qtrans_modifyRichEditor');
}
}
if ( is_user_logged_in() )
{
add_action('current_screen', 'qtrans_disable');
}https://stackoverflow.com/questions/18835695
复制相似问题