如何禁用Jetpack模块,如Stats?

时间:2013-02-10 作者:Mert Nuhoglu

我想禁用一些Jetpack模块,例如Stats,以检查它们是否会使网站变慢。但我看不到一个选项来逐个禁用模块。

当然,可以整体禁用Jetpack插件。有没有办法只禁用统计模块?

4 个回复
最合适的回答,由SO网友:birgire 整理而成

如果按"Learn More" 每个Jetpack模块的按钮"Deactivate" 按钮显示在右侧。

Disabling the WP Stats Module

还有一个fork叫做Jetpack Lite

http://wordpress.org/extend/plugins/jetpack-lite/

一个非官方的“lite”Jetpack插件分支,只包含Stats和WP。me短链接模块。删除所有其他模块(文件和代码)。

SO网友:IvanRF

停用Jetpack上模块的过程已更改。

说明如下:Control Jetpack’s Modules on One Page

基本上,你需要去/wp-admin/admin.php?page=jetpack_modules 在那里你可以找到Deactivate 每个模块的按钮。

SO网友:Mrsonord

从设置页面禁用和删除单个jetpack模块的功能。

function jherve_kill_monitor ( $modules ) {
    unset( $modules[\'monitor\'] );
    return $modules;
}   
add_filter( \'jetpack_get_available_modules\', \'jherve_kill_monitor\' );

function jherve_kill_sso ( $modules ) {
    unset( $modules[\'sso\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jherve_kill_sso\' );

function jeherve_kill_notes ( $modules ) {
    unset( $modules[\'notes\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_notes\' );

function jeherve_kill_comments ( $modules ) {
    unset( $modules[\'comments\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_comments\' );

function jeherve_kill_carousel ( $modules ) {
    unset( $modules[\'carousel\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_carousel\' );

function jeherve_kill_likes ( $modules ) {
    unset( $modules[\'likes\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_likes\' );

function jeherve_kill_post_by_email ( $modules ) {
    unset( $modules[\'post-by-email\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_post_by_email\' );

function jeherve_kill_omnisearch ( $modules ) {
    unset( $modules[\'omnisearch\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_omnisearch\' );

function jeherve_kill_gravatar_hovercards ( $modules ) {
    unset( $modules[\'gravatar-hovercards\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_gravatar_hovercards\' );

function jeherve_kill_contact_form ( $modules ) {
    unset( $modules[\'contact-form\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_contact_form\' );

function jeherve_kill_widget_visibility ( $modules ) {
    unset( $modules[\'widget-visibility\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_widget_visibility\' );

function jeherve_kill_photon ( $modules ) {
    unset( $modules[\'photon\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_photon\' );

function jeherve_kill_videopress ( $modules ) {
    unset( $modules[\'videopress\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_videopress\' );

function jeherve_kill_latex ( $modules ) {
    unset( $modules[\'latex\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_latex\' );

function jeherve_kill_enhanced_distribution ( $modules ) {
    unset( $modules[\'enhanced-distribution\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_enhanced_distribution\' );

function jeherve_kill_infinite_scroll ( $modules ) {
    unset( $modules[\'infinite-scroll\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_infinite_scroll\' );

function jeherve_kill_subscriptions ( $modules ) {
    unset( $modules[\'subscriptions\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_subscriptions\' );

function jeherve_kill_tiled_gallery ( $modules ) {
    unset( $modules[\'tiled-gallery\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_tiled_gallery\' );

function jeherve_kill_vaultpress ( $modules ) {
    unset( $modules[\'vaultpress\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_vaultpress\' );

function jeherve_kill_mobile_push ( $modules ) {
    unset( $modules[\'mobile-push\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_mobile_push\');

function jeherve_kill_stats ( $modules ) {
    unset( $modules[\'stats\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_stats\' );

function jeherve_kill_sharedaddy ( $modules ) {
    unset( $modules[\'sharedaddy\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_sharedaddy\' );

function jeherve_kill_after_the_deadline ( $modules ) {
    unset( $modules[\'after-the-deadline\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_after_the_deadline\' );

function jeherve_kill_publicize ( $modules ) {
    unset( $modules[\'publicize\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_publicize\' );

function jeherve_kill_gplus_authorship ( $modules ) {
    unset( $modules[\'gplus-authorship\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_gplus_authorship\' );

function jeherve_kill_shortcodes ( $modules ) {
    unset( $modules[\'shortcodes\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_shortcodes\' );

function jeherve_kill_minileven ( $modules ) {
    unset( $modules[\'minileven\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_minileven\' );

function jeherve_kill_custom_css ( $modules ) {
    unset( $modules[\'custom-css\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_custom_css\' );

function jeherve_kill_widgets ( $modules ) {
    unset( $modules[\'widgets\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_widgets\' );

function jeherve_kill_wpcc ( $modules ) {
    unset( $modules[\'wpcc\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_wpcc\' );

function jeherve_kill_json_api ( $modules ) {
    unset( $modules[\'json-api\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_json_api\' );

function jeherve_kill_shortlinks ( $modules ) {
    unset( $modules[\'shortlinks\'] );
    return $modules;
}
add_filter( \'jetpack_get_available_modules\', \'jeherve_kill_shortlinks\' );

SO网友:Trablogger

有一种无需任何代码即可禁用每个模块的简单方法。

转到Jetpack dashboard并滚动至底部。查找(&Q);“模块”;选项卡,然后单击它。

在里面,您可以找到所有模块,并可以根据需要激活/停用每个模块。这就是我在没有任何代码的情况下停用WP Stats模块的方式。

结束

相关推荐

Blog statistics

我运行有3-5个用户的小型wordpress博客。人们一直在添加/编辑/删除和阅读内容。。。我想要的是能够看到一些统计数据。。。。哪些帖子/页面最受欢迎、更新最多、评论最多。。。哪些外部链接是点击次数最多的。。。等是否有插件(而非外部服务)来实现这一点?