Skip to content

Instantly share code, notes, and snippets.

@bonny
Last active December 17, 2015 16:09
Show Gist options
  • Save bonny/5636690 to your computer and use it in GitHub Desktop.
Save bonny/5636690 to your computer and use it in GitHub Desktop.
simple_fields_register_field_group with date & timepicker 2 (for WordPress Simple Fields plugin)
<?php
simple_fields_register_field_group('date_field_group',
array (
'name' => 'Test field group for date picker',
'fields' => array(
array(
'slug' => "my_date2_field_slug",
'name' => 'Test date selector',
'type' => 'date_v2',
"options" => array(
"show" => "on_click",
"show_as" => "datetime",
"default_date" => "today"
)
)
)
)
);
simple_fields_register_post_connector('test_connector_for_date',
array (
'name' => "Connector for date",
'field_groups' => array(
array(
'slug' => 'date_field_group'
)
),
'post_types' => array('post', 'page', 'my_custom_post_type')
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment