array( 'post_type' => __("Post Type",'acf'), 'post_status' => __("Post Status",'acf'), 'post_format' => __("Post Format",'acf'), 'post_category' => __("Post Category",'acf'), 'post_taxonomy' => __("Post Taxonomy",'acf'), 'post' => __("Post",'acf') ), __("Page",'acf') => array( 'page_template' => __("Page Template",'acf'), 'page_type' => __("Page Type",'acf'), 'page_parent' => __("Page Parent",'acf'), 'page' => __("Page",'acf') ), __("User",'acf') => array( 'current_user' => __("Current User",'acf'), 'current_user_role' => __("Current User Role",'acf'), 'user_form' => __("User Form",'acf'), 'user_role' => __("User Role",'acf') ), __("Forms",'acf') => array( 'attachment' => __("Attachment",'acf'), 'taxonomy' => __("Taxonomy Term",'acf'), 'comment' => __("Comment",'acf'), 'widget' => __("Widget",'acf') ) )); $rule_operators = apply_filters( 'acf/location/rule_operators', array( '==' => __("is equal to",'acf'), '!=' => __("is not equal to",'acf'), )); ?>

$group ): // validate if( empty($group) ) { continue; } // $group_id must be completely different to $rule_id to avoid JS issues $group_id = "group_{$group_id}"; $h4 = ($group_id == "group_0") ? __("Show this field group if",'acf') : __("or",'acf'); ?>

$rule ): // valid rule $rule = wp_parse_args( $rule, array( 'field' => '', 'operator' => '==', 'value' => '', )); // $group_id must be completely different to $rule_id to avoid JS issues $rule_id = "rule_{$rule_id}"; ?>
'select', 'prefix' => "acf_field_group[location][{$group_id}][{$rule_id}]", 'name' => 'param', 'value' => $rule['param'], 'choices' => $rule_types, 'class' => 'location-rule-param' )); ?> 'select', 'prefix' => "acf_field_group[location][{$group_id}][{$rule_id}]", 'name' => 'operator', 'value' => $rule['operator'], 'choices' => $rule_operators, 'class' => 'location-rule-operator' )); ?> render_location_value(array( 'group_id' => $group_id, 'rule_id' => $rule_id, 'value' => $rule['value'], 'param' => $rule['param'], 'class' => 'location-rule-value' )); ?>