要修复错误,可以执行以下操作:
function new_modify_user_table_row( $val, $column_name, $user_id ) {
$user = get_userdata( $user_id );
switch ($column_name) {
case \'les-non-specialistes\' :
return get_the_author_meta( \'les-non-specialistes\', $user_id );
break;
case \'specialistes\' :
return \'\';
break;
default:
}
return $val; //<-- Changed
}
关于日期,你要找哪一天?它应该放在哪一列(新的一列)?
我猜一下,我希望这能让你开始。一般来说,如果要添加上次修改的日期,可以执行以下操作(未测试的代码):
case \'last-modified\': //<-- new column that maybe you added above
global $post;
$ugly_date = $post->post_modified;
$pretty_date = date("Y, M, jS",strtotime($ugly_date)); //<-- format as desired. There are smarter ways of doing this part
return $pretty_date;
break;
(参考:
http://codex.wordpress.org/Function_Reference/$职位)
祝你好运