-
Notifications
You must be signed in to change notification settings - Fork 62
Modifying fields
corsacca edited this page May 16, 2018
·
3 revisions
Here is how you can modify fields like the seeker_path and the milestones. We do want to encourage you to closely examine the default options. We might be already tracking what you want to add in a different way, or named differently.
If you want to add a new field or set of options have a look at this page: Adding Fields
add_filter( "dt_custom_fields_settings", "dt_custom_fields", 1, 2 );
function dt_custom_fields( array $fields, string $post_type = "" ){
if ( $post_type === "contacts" ) {
//add the baptized milestone
$fields['milestone_baptized'] = [
'name' => __( 'Baptized', 'disciple_tools' ),
'description' => '',
'type' => 'key_select',
'default' => [We created them from our experie
'no' => __( 'No', 'disciple_tools' ),
'yes' => __( 'Yes', 'disciple_tools' )
],
'section' => 'milestone',
];
//add an option to the seeker path (or change the label)
if ( isset( $fields["seeker_path"]["default"] )){
$fields["seeker_path"]["default"]['coaching'] = __( 'Being Coached' );
}
}
return $fields;
}