#21948 closed enhancement (fixed)
Allow filtering post type labels
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch commit needs-codex |
| Cc: | xoodrew@… |
Description (last modified by scribu)
Follow-up from #21944
22:49 <nacin> just needs a filter in get_post_type_labels() 22:51 <nacin> there's a separate API for basically everything else - query variables, rewrite rules, supports, taxonomies, meta boxes, menus
Attachments (4)
Change History (15)
comment:3
DrewAPicture — 8 months ago
- Cc xoodrew@… added
21948.2.diff introduces "post_type_labels_{$post_type}" instead, since you'll have a specific set of post types that you'll want to target.
comment:6
DrewAPicture — 8 months ago
+1 for 21948.2.diff
comment:7
jamescollins — 8 months ago
+1 to this idea.
My Custom Post Type Editor plugin currently has to override CPT labels after a CPT is registered by using the registered_post_type hook.
A filter before each CPT is registered would be much better.
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [22164]:
comment:10
johnbillion — 7 months ago
comment:11
DrewAPicture — 5 months ago
- Keywords needs-codex added
New filter [22164]:
- post_type_labels_{$post_type}
Note: See
TracTickets for help on using
tickets.

21948.diff introduces the 'post_type_labels' filter.
pancakes.php shows one potential usage.