Support » Plugin: KJM Admin Notices » Translate categories

  • When shown on front, the CSS class is constructed from the category->slug, which makes i possible to translate category names without affecting the display, and without extra css.

    But when shown in Admin, the CSS class is constructed from the category->name, and translating breaks the display, unless one adds extra admin CSS.

    Would you consider using the slug also in admin?

    Quick fix, to demonstrate, in class-kjm-admin-notices-admin.php line 871
    $notice_cat = !empty($notice['taxonomies']['kjm_notice_cat'][0]) ? get_term_by( 'name', $notice['taxonomies']['kjm_notice_cat'][0], 'kjm_notice_cat' )->slug : 'success';

Viewing 1 replies (of 1 total)
  • Plugin Author webmarka


    It is a good suggestion, we will see to implement it. Thank you @knutsp !

    You are right, frontend and backend notices do not work exactly the same way actually.

    On the other hand some of these differences are intentional. For instance, the display is not the same on the frontend or in the backend. Another example: if you dismiss an admin notice, and this notice is set to display on the frontend, you will still have to dismiss the frontend one as well.

    We are planning a slight code refactoring soon for the frontend side. Part of it was developed by another developer in the team and there is still a certain need for standardization and uniformity.

    I will keep you informed of the new developments here.

Viewing 1 replies (of 1 total)
  • The topic ‘Translate categories’ is closed to new replies.