Created
November 28, 2012 15:40
-
-
Save strangerstudios/4162053 to your computer and use it in GitHub Desktop.
Hide the PMPro "Require Membership" meta box from non-admins on add/edit post screen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hide the PMPro "Require Membership" meta box from non-admins on add/edit post screen. | |
*/ | |
function hide_pmpro_meta_box() | |
{ | |
if(!current_user_can("manage_options")) | |
remove_action("admin_menu", "pmpro_page_meta_wrapper"); | |
} | |
add_action("init", "hide_pmpro_meta_box", 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Hide the PMPro “Require Membership” meta box from non-admins on add/edit post screen." at Paid Memberships Pro here: https://www.paidmembershipspro.com/hide-the-pmpro-require-membership-meta-box-from-non-admins-on-addedit-post-screen/