CSS class specific to content type
-
Three years ago I opened a topic (https://ww.wp.xz.cn/support/topic/specific-class-according-to-content-type/) requesting a feature, where a CSS class would be added, specificely to the content of the article being displayed. Something like addthis_home for the homepage, addthis_pages for pages, addthis_posts for blog entries, etc…
Back then, a contributor had replied that I could use another plugin of the same author to achieve the functionality I needed, which by now is already abandoned…
Anyway, for that version of the plugin, and for any update that was released for it, I was modifying the code myself to achieve that functionality.
But since in the current version it’s just a matter of altering a single line in the code of the plugin, would you consider adding the feature in the stock release? Honestly it’s so frustrating to monitor the sites I administer, that use this plugin to manually update the code… The problem is I can’t overload the stock method in functions.php so that the functionality remains even after an update of the plugin…
So, the code edit I’m proposing is this:
File addthis/backend/AddThisFeature.php
Line 1510, change:
$htmlTemplate = '<div class="%1$s addthis_tool" %2$s></div>';To:
$htmlTemplate = '<div class="%1$s addthis_tool addthis_'.AddThisTool::currentTemplateType().'" %2$s></div>';I hope I get back from you regarding this feature request!
Regards.
The topic ‘CSS class specific to content type’ is closed to new replies.