hook_field_extra_fields_alter

function hook_field_extra_fields_alter

hook_field_extra_fields_alter(&$info)

Alter "pseudo-field" components on fieldable entities.

Parameters

$info: The associative array of 'pseudo-field' components.

See also

hook_field_extra_fields()

Related topics

File

modules/field/field.api.php, line 88
Hooks provided by the Field module.

Code

function hook_field_extra_fields_alter(&$info) {
  // Force node title to always be at the top of the list by default.
  foreach (node_type_get_types() as $bundle) {
    if (isset($info['node'][$bundle->type]['form']['title'])) {
      $info['node'][$bundle->type]['form']['title']['weight'] = -20;
    }
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.api.php/function/hook_field_extra_fields_alter/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部