JRoy
2/28/2019 - 4:31 PM

ACF - Default Repeater Rows

if( !function_exists('default_value_field_5bf4736324b36') ) {
    // Add default service types for new installs
    add_filter('acf/load_value/key=field_5bf4736324b36', 'default_value_field_5bf4736324b36', 10, 3);
    function default_value_field_5bf4736324b36($value, $post_id, $field) {
        if ($value === false) {
            $value = array(
                array(
                    'field_5bf4737024b37' => 'Windows',
                    'field_5bf4738d24b39' => 'Window',
                    'field_5bf4737a24b38' => 'windows'
                ),
                array(
                    'field_5bf4737024b37' => 'Doors',
                    'field_5bf4738d24b39' => 'Door',
                    'field_5bf4737a24b38' => 'doors'
                ),
            );
        }
        return $value;
    }
}