[HOW-TO]: Enable logging for widgets and other things
-
AWESOME plugin!
I hope this helps someone.
If you want to enable the filter for widget text (only works for the actual txt/html widget box since each widget is parsed individually, not globally), you can enable it by adding 1 line to the plugins/link-log/link-log.php file.
Search for:
add_filter( 'the_content', 'swcc_linklog_parse_content' );
Add on a new line after it:
add_filter( 'widget_text', 'swcc_linklog_parse_content' );
I originally wanted this plugin to apply the filter globally to ALL links on the site but after some reading into it, there are very limited options for applying this filter globally without having a huge impact on speed and processing resources, so I’ve settled on the above modification instead. It basically covers all external links that I care to track and doesn’t add much burden to page loads.
You can apply the filter to any hooks that you want by changing “widget_text” to the hook content you want to be processed.
- The topic ‘[HOW-TO]: Enable logging for widgets and other things’ is closed to new replies.