استبدال عنصر التنقل #current-user بالنص

مرحبًا بالجميع.

أحتاج إلى استبدال عنصر #current-user (صورة الملف الشخصي) في شريط التنقل بالنص “profile”.
ما هو أفضل نهج للقيام بذلك؟

لقد جربت إضافة نص إلى #current-user a::before

وتعيين خاصية العرض لصورة الملف الشخصي إلى none،

ولكن هذا سيؤدي أيضًا إلى إخفاء الإشعارات.

النتيجة المطلوبة هي شيء من هذا القبيل.

27%20PM

شكرًا مقدّمًا.

I suppose you could create an image that contained the text “profile”. And just render that image instead of the avatar.

@blake, thanks for the response.
I am working on a new theme and I don’t think that would be optimal.
Do you think I could do it using the pluginAPI or a widget?

مرحباً،
هذا ممكن أيضاً باستخدام css. :slightly_smiling_face:

عام > CSS

li#current-user {
  a.icon {
    padding: 0.2143em 0.5em;
    border: 1px solid transparent;
    border-bottom: none;
    &:before {
      content: "profile";
      font-weight: 600;
    }
    img.avatar {
      display: none;
    }
  }
}
// محاذاة قائمة المستخدم الجديدة
.desktop-view {
  .user-menu.revamped {
    right: 0.25em;
  }
}