1 link.module | _link_field_options_defaults() |
Provides default values for #link_field_options properties.
File
- core/
modules/ link/ link.module, line 830 - Defines simple link field types.
Code
function _link_field_options_defaults() {
return array(
// Possible values: 'optional' or 'required'. If 'optional', the element
// can be submitted without filling in the url textfield.
'url_mode' => 'optional',
// Options: LINK_BOTH, LINK_INTERNAL, LINK_EXTERNAL.
'link_type' => LINK_BOTH,
'validate_url' => TRUE,
// Options: LINK_TARGET_DEFAULT, LINK_TARGET_TOP, LINK_TARGET_NEW_WINDOW
// and LINK_TARGET_USER. LINK_TARGET_USER will show a checkbox to indicate
// if the link should use '_blank' as target.
'target' => LINK_TARGET_DEFAULT,
// Options are: 'optional', 'required', 'value' and 'none'. If 'optional'
// or 'required', a textfield will be shown to enter a title for the link.
'title_mode' => 'optional',
'title_maxlength' => 128,
// If TRUE, the element's #title property will be used as the the label for
// the link's 'title' textfield. Otherwise, the string 'Title' will be
// used.
'title_label_use_field_label' => FALSE,
// If true, the element will show a textfield to enter the value of the
// "title" link attribute.
'configurable_title' => FALSE,
// If true, the element will show a textfield to enter a custom link
// class.
'configurable_class' => FALSE,
);
}