Closed petertoi closed 10 years ago
Thanks for the PR and sorry it took so long to merge!
array_merge_recursive
creates issues with the configuration, see #44
I decided to roll back this change because of the issues it causes. The ability to set the labels this way is handy, but not worth it. To set just one label, it's best to override it:
$events = new Super_Custom_Post_Type( 'event' );
$events->cpt['labels']['search_items'] = __( 'Search all events', 'events' );
I'll think about adding a conditional to the magic method to allow for something like,
$events->labels( 'search_items', __( 'Search all events', 'events' ) );
This fixes an issue where values set in the 2nd dimension array 'labels' were not being merged because array_merge only merges the 1st dimension array elements.
The fix allows the user to customize a single element in the 'labels' array and ensure that the Super CPT defaults apply to the remaining sibling elements rather than have the WordPress defaults take precedence.