Created
January 12, 2021 08:28
-
-
Save markjaquith/852c716b06df15aea6bf07e1161bbb91 to your computer and use it in GitHub Desktop.
Disable ACF UI
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
<?php | |
// Block the ACF settings UI entirely, except on local dev. | |
if (! defined('WP_LOCAL_DEV') || ! WP_LOCAL_DEV) { | |
add_filter('acf/settings/show_admin', '__return_false'); | |
add_filter('acf/settings/capability', function () { return 'do_not_allow'; }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment