Thanks for making those updates!
Future versions might use their own widget instead of the Text Widget, and show the latest (10) saved links in the widget with a "more" link that goes to all the links in a users profile. Currently the profile section from the Users plugin is a bit of a mess. We need a hassle-free way for plugin developers to add extra pages to user profiles. I'll give that some thought.
The reason I would give Save Post its own widget is because in its current form, the widget title still shows to logged out users. Something like this would setup the widget:
PHP Code:
/**
* Register Saved Post widget
*/
public function install_plugin($h)
{
$h->addWidget('save_post', 'save_post', ''); // plugin name, function name, optional arguments
}
/**
* Displays Save Post widget
*/
public function widget_save_post($h)
{
$h->displayTemplate('save_post_widget', 'save_post'); // template name, plugin name
}
In the template, you'd need to put a wrapper around the code, e.g.
PHP Code:
<h2 class='widget_head widget_save_post_title'>Saved Posts</h2>
<div class='widget_body widget_save_post_body'>
// output
</div>
The end result would look the same, but you'd have a bit more flexibility and not need the Text Widget.
This is fun, eh? :-D
Bookmarks