Remove Jetpack for users

jdunhin

New member
Joined
Feb 27, 2013
Messages
93
Points
0
Hi

I saw that Jetpack is available for all users. That is a no for me so I put a stop to this.

Create a directory "wp-content/mu-plugins". More about "mu-plugins"

Creat a PHP file with any name. But I created no-jetpack.php.

Paste in this code:
PHP:
add_action( 'jetpack_admin_menu', 'hide_jetpack_from_users' );
function hide_jetpack_from_users() {
    if ( ! current_user_can( 'administrator' ) ) {
        remove_menu_page( 'jetpack' );
    }
}
Now upload the file to wp-content/mu-plugins and you are all done!

Can also do it for other menu's. Like remove post.
PHP:
add_action( 'jetpack_admin_menu', 'hide_post_from_others' );
function hide_post_from_others() {
    if ( ! current_user_can( 'administrator' ) ) {
        remove_menu_page( 'edit.php' );
    }
}
Hope it can help some of you. I put all of my tips on my blog also.
 
Last edited:
Older threads
Replies
12
Views
5,678
Replies
3
Views
2,427
Replies
3
Views
3,183
Newer threads
Replies
0
Views
1,936
Replies
6
Views
2,741
Replies
2
Views
2,510
Latest threads
Replies
1
Views
83
Replies
1
Views
86
Replies
1
Views
150
Replies
1
Views
184
Replies
1
Views
273
Recommended threads
Replies
7
Views
2,561
Replies
0
Views
1,901
Replies
2
Views
480
Replies
11
Views
6,268

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top