Created
April 15, 2015 03:18
-
-
Save daronspence/a1e7036673911e426bcd to your computer and use it in GitHub Desktop.
Remove an options page from the ACF Locations dropdown.
This file contains hidden or 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 | |
/** | |
* Remove ACFE Options Page from ACF Feild Groups Location | |
* | |
* @since 1.0 | |
*/ | |
add_filter('acf/location/rule_values/options_page', function( $choices ) { | |
unset( $choices['acfe-licenses'] ); // options sub page menu-slug | |
if ( empty( $choices ) ) | |
$choices[''] = __('No options pages exist', 'acf'); | |
return $choices; | |
}, 999, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment