Wopisanje
This simple, lightweight plugin solves one particular issue. WordPress doesn’t include any alt text or a title tag when using Gravatars. This addresses that by using the comment author name for each of your comment’s Gravatars, and for any other Gravatar usage it should use the authors display name.
So if you create a post it will use your name for your Gravatars Alt text and Title tag and then for the comments it will use the commenters name for their Gravatars Alt text and Title tags.
With this plugin you can squash those pesky warnings given by SEO reporting tools that look for missing alt text and title tags.
Important Notes
Instalacija
- Install via the WordPress Plugin manager, or unzip and add to wp-content/plugins.
- Activate the plugin via the dashboard.
- Refresh a page containing Gravatars (Blog post most likely), clear caches if necessary.
- Check your source code and Gravatars should now contain the right Alt text and Title tag.
Or you can just copy the function and drop it into your functions.php file, if not wanting to use yet another plugin.
Pohódnoćenja
Za tutón tykač pohódnoćenja njejsu.
Sobuskutkowarjo a wuwiwarjo
„Fix Gravatar Alt Text & Title Tag“ je softwara wotewrjeneho žórła. Slědowacy ludźo su k tutomu tykačej přinošowali.
SobuskutkowarjoPřełožće „Fix Gravatar Alt Text & Title Tag“ do swojeje rěče.
Na wuwiću zajimowany?
Přehladajće kod, hladajće do SVN-repozitorija abo abonujće wuwiwanski protokol přez RSS.
Protokol změnow
1.1 – 2024-07-03
- Added logic to add or replace the title attribute in the avatar image with the appropriate author information.
- Implemented sanitization of author name using esc_attr() for enhanced security
- Replaced str_replace with preg_replace for precise and robust attribute replacement
- Added a fallback to ‚Anonymous‘ if no valid author name is found.
- Enhanced overall accuracy, flexibility, and security of the plugin
1.0
- Initial plugin – 7 September 2017