Invalid HTML output
-
First thanks for this plugin! I’m just getting used to IndieWeb related plugins, and I think the idea has great potential. I was just about to hack the plugin for my site, but I thought it would be much nicer to help improving the original plugin instead of doing my own thing. 🙂
I discovered that the HMTL output of the function get_syndication_links is not valid, if one provides a text_before text, because an ul-element must only contain li-elements, not even text. That may result in a strange browser behaviours, as in my current theme.
I have some suggestions to improve the HTML output:
1. Replace line 238
$synlinks = '<span class="relsyn"><ul>' . $options['text_before'];
with something like$synlinks = '<span class="relsyn">' . $options['text_before'] . '<ul>';
2. A minor thing: Currently the CSS class naming convention is not very consistent (.relsyn, .u-syndication, .syn-name), so I’d suggest namespacing the classes: .syndication-links, .syndication-links-name, etc. (or if that’s too long e.g. .synlinks, .synlinks-name, etc.)
3. A minor thing: For individual styling it would help to apply a class to the ul-element (e.g. .syndication-links-list) and wrap $options[‘text_before] inside a span-element with a separate class (e.g. .syndication-links-text-before).
4. Alternative/Addition 1: Moving the HTML to a template file, which can be overridden by the theme.
5. Alternative/Addition 2: Provide a filter hook, so that one can modify the HTML output of the function get_syndication_links.
Besides that I have a feature question: Would it be possible to add an option to show the syndication links only on the full post, not the teaser on the homepage?
Thank you
- The topic ‘Invalid HTML output’ is closed to new replies.