-
-
Save billerickson/89e9cfc646c017b7ab5a36521692677f to your computer and use it in GitHub Desktop.
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 | |
/** | |
* ACF Rule Type: Page Ancestor | |
* | |
* @author Bill Erickson | |
* @see http://www.billerickson.net/acf-custom-location-rules | |
* | |
* @param array $choices, all of the available rule types | |
* @return array | |
*/ | |
function ea_acf_rule_type_page_ancestor( $choices ) { | |
$choices['Page']['page_ancestor'] = 'Page Ancestor'; | |
return $choices; | |
} | |
add_filter( 'acf/location/rule_types', 'ea_acf_rule_type_page_ancestor' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment