/** * Adds our widget. * @package now-reading */ function nr_widget($args) { extract($args); $options = get_option('nowReadingWidget'); $title = $options['title']; echo $before_widget . $before_title . $title . $after_title; if (!defined('NOW_READING_VERSION') || floatval(NOW_READING_VERSION) < 4.2) { echo "<p>You don't appear to have the Now Reading plugin installed, or have an old version; you'll need to install or upgrade before this widget can display your data.</p>"; } else { nr_load_template('sidebar.php'); } echo $after_widget; }
/** * Provides a simple API for themes to load the sidebar template. */ function nr_display() { nr_load_template('sidebar.php'); }