Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active June 14, 2016 17:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save billerickson/b7a07a52fad398f8eaba7f5f8ea71505 to your computer and use it in GitHub Desktop.
<?php
/**
* ACF Rule Values: Page Type
*
* @author Bill Erickson
* @see http://www.billerickson.net/acf-custom-location-rules
*
* @param array $choices, available rule values for this type
* @return array
*/
function ea_acf_rule_values_page_type( $choices ) {
$choices['no_children'] = 'No Children';
return $choices;
}
add_filter( 'acf/location/rule_values/page_type', 'ea_acf_rule_values_page_type' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment