Closed wpmark closed 10 years ago
An enhancement rather than an issue! Would it not be a good idea to make the Post Type labels filterable so that the labels can be changed in the Admin?
Perhaps change the code here:
https://github.com/justintadlock/whistles/blob/master/inc/post-types.php#L81-L94
to something like this?
/* Labels used when displaying the posts. */ 'labels' => apply_filters( 'whistles_labels', array( 'name' => __( 'Whistles', 'whistles' ), 'singular_name' => __( 'Whistle', 'whistles' ), 'menu_name' => __( 'Whistles', 'whistles' ), 'name_admin_bar' => __( 'Whistle', 'whistles' ), 'add_new' => __( 'Add New', 'whistles' ), 'add_new_item' => __( 'Add New Whistle', 'whistles' ), 'edit_item' => __( 'Edit Whistle', 'whistles' ), 'new_item' => __( 'New Whistle', 'whistles' ), 'view_item' => __( 'View Whistle', 'whistles' ), 'search_items' => __( 'Search Whistles', 'whistles' ), 'not_found' => __( 'No whistles found', 'whistles' ), 'not_found_in_trash' => __( 'No whistles found in trash', 'whistles' ), 'all_items' => __( 'Whistles', 'whistles' ), ) )
WP already allows this. Check: http://codex.wordpress.org/Function_Reference/get_post_type_labels#Filters
You learn something knew everyday with WordPress. Thanks for your time on this Justin.
An enhancement rather than an issue! Would it not be a good idea to make the Post Type labels filterable so that the labels can be changed in the Admin?
Perhaps change the code here:
https://github.com/justintadlock/whistles/blob/master/inc/post-types.php#L81-L94
to something like this?