johnbillion / extended-cpts

A library which provides extended functionality to WordPress custom post types and taxonomies.
GNU General Public License v2.0
979 stars 96 forks source link

Lowercase forced on certain labels #76

Closed retlehs closed 7 years ago

retlehs commented 7 years ago

example on a post type for FAQs:

add_action('init', function () {
    register_extended_post_type('faq', [
        'menu_icon' => 'dashicons-editor-help'
    ], [
        'singular' => 'FAQ',
        'plural' => 'FAQs'
    ]);
});

results in "No faqs found" rather than "No FAQs found"

image

johnbillion commented 7 years ago

Thanks for the report. I've made various tweaks to the way that labels are built in the past and I found that lowercasing the name makes sense most of the time, because an initialism as a post type name is relatively uncommon.

However, I have just had an idea. Maybe the label generation should respect the case if more than just the first letter in the name is capitalised. I'll have a play around with it.