龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

Drupal7 在content管理列表添加一列

时间:2014-07-22 14:48来源: 作者: 点击:
分享到:
在后台admin/content的列表中添加一列。
在后台admin/content的列表中添加一列。
/**
 * Implements hook_form_alter().
 */
function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if($form_id == 'node_admin_content') {
    $form['admin']['nodes']['#header']['state'] = t('new row');
    foreach($form['admin']['nodes']['#options'] as $key => $row) {
      $form['admin']['nodes']['#options'][$key]['state'] = 'new row';
    }
  }
}
精彩图集

赞助商链接