Support » Plugin: WP-Members: Membership Framework » remove wp-members metabox

Viewing 3 replies - 1 through 3 (of 3 total)
  • w_ dec

    (@wendydecelis)

    any idea about how this can be solved please?

    Basically, what I need is to hide the wp-members meta box from the posts page. I do not want the users to be able to block/unblock posts.

    Thanks
    W

    Same here. It’s a major oversight, IMHO, to allow members to unblock their own posts.

    I did it by editing the core files (of the plugin, not WP), which sucks because you have to remember to do it if there’s a new version. The file I changed is “post.php” in the “admin” subfolder; the function is called wpmem_block_data().

    I made two changes: one to put the meta box way down at the bottom, the other to only show the options to people who can publish posts.

    To move the meta box, change ‘high’ to ‘low’ in this line:

    add_meta_box( 'wpmem-block-meta-id', $post_title, 'wpmem_block_meta', 'post', 'side', 'high' );

    To only display the options to publishers, add an “if” statement at the start of the function, like this:

    function wpmem_block_meta()  
    
    {  
    
    	if (!current_user_can('publish_posts')) {
    		echo 'You cannot change privacy permissions.';
    		return;
    	}
    
        global $post;

    Everything after the “global $post” stays unchanged: I just added the “if” statement to check whether they have publishing rights. It works, but it’s messy. Hope it helps!

    Does anyone know of a way to do this without hacking the plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove wp-members metabox’ is closed to new replies.