This WordPress plugin showcases a pinboard.in linkroll as a widget. The feeds of multiple pinboard.in users can be merged and filtered by their tags.
Yes, WordPress has a core RSS widget, there's a plethora of plugins and there's a bunch of single purpose tools for integrating Pinboard feeds into WordPress. But after checking them (at least, some of them) i found no solution with my desired feature set – so i decided to build one myself.
- display one or multiple pinboard.in users rss feeds
- filter by their tags
- complete control over markup and styling
- customizable cache lifetime
At the moment there are two filter hooks for customizing Pinboard Linkroll without having to fork it.
pinboard_linkroll_cache_lifetime( $seconds )
pinboard_linkroll_template( $path )
The plugin uses WordPress' fetch_feed(), which uses the WordPress Transients API with a default lifetime of 12 hours. If, for testing purposes or to face frequent updates, this has to be changed, it can be done from the theme's functions.php
:
function change_pinboard_linkroll_cache_lifetime( $seconds ) {
return 1800;
}
add_filter( 'pinboard_linkroll_cache_lifetime', 'change_pinboard_linkroll_cache_lifetime' );
To override the default template with a path (which has to be relative to the active theme's path), paste the following into the theme's functions.php
and save the new template file to the specified location:
function change_pinboard_linkroll_template( $path ) {
return 'templates/widget-pinboard-linkroll.php';
}
add_filter( 'pinboard_linkroll_template', 'change_pinboard_linkroll_template' );
- added configurable 'read more' link at the end of linklist
- removed
pinboard_linkroll_css( $path )
and the loading of any css file - dropped bootstrap classes in favour of smacss classes in default template file
- added private method
_is_pinboard_username()
to check against pinboard.in username scheme - changed admin form
- major wording changes
- made link count option a select
- form is now 400px wide
- added output escaping
- i10n changes
- README completion
Initial Commit.