I'd like to change the heading text on an edit page—this bit:
I'm currently targeting it with jQuery (.wrap h2:first-of-type
) and rewriting it that way, but it's not totally elegant - there's a bit of a flash when the page first loads that I'd like to avoid.
I know I could register a custom post type and set those titles manually (the labels
attribute), but I'd only like it to change when certain conditions are met, and I'd like to change it to use information saved elsewhere in the site.
I'd like to avoid output buffering as well.
From what I can tell, core is just echoing $post_type_object->labels->name
- is there any way to filter that output? I can't find anything, but I may be looking in the wrong places.
Thanks!