ID); // at lease 1 location rule if( empty($groups) ) { $groups = array( // group_0 array( // rule_0 array( 'param' => 'post_type', 'operator' => '==', 'value' => 'post', 'order_no' => 0, 'group_no' => 0 ) ) ); } ?>

$group ): $group_id = 'group_' . $group_id; ?>

$rule ): $rule_id = 'rule_' . $rule_id; ?>
array( 'post_type' => __("Post Type",'acf'), 'user_type' => __("Logged in User Type",'acf'), ), __("Post",'acf') => array( 'post' => __("Post",'acf'), 'post_category' => __("Post Category",'acf'), 'post_format' => __("Post Format",'acf'), 'post_status' => __("Post Status",'acf'), 'taxonomy' => __("Post Taxonomy",'acf'), ), __("Page",'acf') => array( 'page' => __("Page",'acf'), 'page_type' => __("Page Type",'acf'), 'page_parent' => __("Page Parent",'acf'), 'page_template' => __("Page Template",'acf'), ), __("Other",'acf') => array( 'ef_media' => __("Attachment",'acf'), 'ef_taxonomy' => __("Taxonomy Term",'acf'), 'ef_user' => __("User",'acf'), ) ); // allow custom location rules $choices = apply_filters( 'acf/location/rule_types', $choices ); // create field $args = array( 'type' => 'select', 'name' => 'location[' . $group_id . '][' . $rule_id . '][param]', 'value' => $rule['param'], 'choices' => $choices, ); do_action('acf/create_field', $args); ?> __("is equal to",'acf'), '!=' => __("is not equal to",'acf'), ); // allow custom location rules $choices = apply_filters( 'acf/location/rule_operators', $choices ); // create field do_action('acf/create_field', array( 'type' => 'select', 'name' => 'location[' . $group_id . '][' . $rule_id . '][operator]', 'value' => $rule['operator'], 'choices' => $choices )); ?> ajax_render_location(array( 'group_id' => $group_id, 'rule_id' => $rule_id, 'value' => $rule['value'], 'param' => $rule['param'], )); ?>