wordpress user admin columns
-
I was wondering if anyone can help me with that. I have a code for admin user extra columns:
function new_modify_user_table( $column ) { $column['id'] = 'ID'; $column['favorites'] = 'Favorites'; return $column; } add_filter( 'manage_users_columns', 'new_modify_user_table' ); function new_modify_user_table_row( $val, $column_name, $user_id ) { switch ($column_name) { case 'id' : return get_the_author_meta( 'ID', $user_id ); case 'favorites' : return get_the_author_meta('simplefavorites', $user_id); var_dump($posts); default: } return $val; } add_filter( 'manage_users_custom_column', 'new_modify_user_table_row', 10, 3 );
and my simplefavorites meta looks like this:
array ( 0 => array ( 0 => array ( 'site_id' => 1, 'posts' => array ( 0 => 51380, 1 => 60244, 2 => 59759, 3 => 34970, 4 => 59849, 5 => 49747, 6 => 27365, 7 => 18653, 8 => 15613, ), 'groups' => array ( 0 => array ( 'group_id' => 1, 'site_id' => 1, 'group_name' => 'Default List', 'posts' => array ( 0 => 51380, 1 => 60244, 2 => 59759, 3 => 34970, 4 => 59849, 5 => 49747, 6 => 27365, 7 => 18653, 8 => 15613, ), ), ), ), ), )
i would like to display in the column number of posts from the array. Is this possible? What can i do? How i can drill down to array with this function?
Thanks in advance!
Alex
- The topic ‘wordpress user admin columns’ is closed to new replies.