Drupal7在content管理列表添加一列
                        
                            时间:2021-07-01 10:21:17
                            帮助过:26人阅读
							                        
                     
                    
                    
在后台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';
 -     }
 -   }
 - }
 
  |