*/ protected function objectTypes(): array { return ['post', 'media']; } public function capabilities(): array { return self::caps(sort: $this->orderby() !== null); } public function sortArgs(Column $column): ?array { $o = $this->orderby(); return $o === null ? null : ['orderby' => $o]; } public function value(Column $column, int $id): string { $post = get_post($id); if (!$post) { return ''; } return match ($this->nativeKey()) { 'title' => (string) $post->post_title, 'author' => (string) (get_userdata((int) $post->post_author)->display_name ?? ''), 'date' => Format::date($post->post_date, 'wp'), 'comments' => (string) get_comments_number($id), 'parent' => $post->post_parent && Access::canRead((int) $post->post_parent) ? (string) get_the_title($post->post_parent) : '', default => '', }; } }