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'],
));
?> |
|
|