name = 'page_link'; $this->title = __('Page Link','acf'); } /*-------------------------------------------------------------------------------------- * * create_field * * @author Elliot Condon * @since 2.0.5 * @updated 2.2.0 * *-------------------------------------------------------------------------------------*/ function create_field($field) { // let post_object create the field $field['type'] = 'post_object'; do_action('acf/create_field', $field ); } /*-------------------------------------------------------------------------------------- * * create_options * * @author Elliot Condon * @since 2.0.6 * @updated 2.2.0 * *-------------------------------------------------------------------------------------*/ function create_options($key, $field) { // defaults $defaults = array( 'post_type' => '', 'multiple' => 0, 'allow_null' => 0, ); $field = array_merge($defaults, $field); ?> __("All",'acf') ); $choices = array_merge( $choices, $this->parent->get_post_types() ); do_action('acf/create_field', array( 'type' => 'select', 'name' => 'fields['.$key.'][post_type]', 'value' => $field['post_type'], 'choices' => $choices, 'multiple' => 1, )); ?> 'radio', 'name' => 'fields['.$key.'][allow_null]', 'value' => $field['allow_null'], 'choices' => array( 1 => __("Yes",'acf'), 0 => __("No",'acf'), ), 'layout' => 'horizontal', )); ?> 'radio', 'name' => 'fields['.$key.'][multiple]', 'value' => $field['multiple'], 'choices' => array( 1 => __("Yes",'acf'), 0 => __("No",'acf'), ), 'layout' => 'horizontal', )); ?> $v) { $value[$k] = get_permalink($v); } } else { $value = get_permalink($value); } return $value; } } ?>