function social_content_twitter_create_instances in Social Content 7
Same name and namespace in other branches
- 7.2 modules/twitter/social_content_twitter.fields.inc \social_content_twitter_create_instances()
Returns a structured array defining the instances for this content type.
Return value
An associative array specifying the instances we wish to add to our new node type.
1 call to social_content_twitter_create_instances()
- social_content_twitter_install in modules/
twitter/ social_content_twitter.install - Implements hook_install().
File
- modules/
twitter/ social_content_twitter.fields.inc, line 328 - Fields for the `Tweet` content type.
Code
function social_content_twitter_create_instances() {
$t = get_t();
return array(
'field_tweet_user' => array(
'label' => 'User',
'widget' => array(
'weight' => '1',
'type' => 'text_textfield',
'module' => 'text',
'active' => 1,
'settings' => array(
'size' => '60',
),
),
'settings' => array(
'text_processing' => '0',
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'above',
'type' => 'text_default',
'settings' => array(),
'module' => 'text',
'weight' => 1,
),
'teaser' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'default_value' => NULL,
'field_name' => 'field_tweet_user',
'entity_type' => 'node',
'bundle' => 'tweet',
'deleted' => '0',
),
'field_tweet_user_picture' => array(
'label' => 'User Picture',
'widget' => array(
'weight' => '2',
'type' => 'image_image',
'module' => 'image',
'active' => 1,
'settings' => array(
'progress_indicator' => 'throbber',
'preview_image_style' => 'thumbnail',
),
),
'settings' => array(
'file_directory' => 'social_content/twitter',
'file_extensions' => 'png gif jpg jpeg',
'max_filesize' => '',
'max_resolution' => '',
'min_resolution' => '',
'alt_field' => 0,
'title_field' => 0,
'default_image' => 0,
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'above',
'type' => 'image',
'settings' => array(
'image_style' => '',
'image_link' => '',
),
'module' => 'image',
'weight' => 2,
),
'teaser' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'field_name' => 'field_tweet_user_picture',
'entity_type' => 'node',
'bundle' => 'twitter',
'deleted' => '0',
),
'field_tweet_link' => array(
'label' => 'Tweet link',
'widget' => array(
'weight' => '33',
'type' => 'link_field',
'module' => 'link',
'active' => 0,
'settings' => array(),
),
'settings' => array(
'validate_url' => 0,
'url' => 0,
'title' => 'none',
'title_value' => '',
'title_maxlength' => '128',
'display' => array(
'url_cutoff' => '80',
),
'attributes' => array(
'target' => '_blank',
'rel' => '',
'class' => '',
'configurable_title' => 0,
'title' => '',
),
'rel_remove' => 'default',
'enable_tokens' => 1,
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'above',
'type' => 'link_default',
'settings' => array(),
'module' => 'link',
'weight' => 3,
),
'teaser' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'default_value' => NULL,
'field_name' => 'field_tweet_link',
'entity_type' => 'node',
'bundle' => 'twitter',
'deleted' => '0',
),
'field_tweet_external_id' => array(
'label' => 'External id',
'widget' => array(
'weight' => '4',
'type' => 'text_textfield',
'module' => 'text',
'active' => 1,
'settings' => array(
'size' => '60',
),
),
'settings' => array(
'text_processing' => '0',
'user_register_form' => FALSE,
),
'display' => array(
'default' => array(
'label' => 'above',
'type' => 'text_default',
'settings' => array(),
'module' => 'text',
'weight' => 4,
),
'teaser' => array(
'type' => 'hidden',
'label' => 'above',
'settings' => array(),
'weight' => 0,
),
),
'required' => 0,
'description' => '',
'default_value' => NULL,
'field_name' => 'field_tweet_external_id',
'entity_type' => 'node',
'bundle' => 'tweet',
'deleted' => '0',
),
);
}