This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ require_once( AOC_PATH . '/includes/users-widget.php' ); /** * Widget class for updated user galleries. * @package AOC * @subpackage Gallery * @since 0.8 */ final class aocGalleryUpdates extends aocUsersWidget { /** * Widget configuration. * @see aocUsersWidget::startUp() */ protected function widgetLoad() { $this->wID = 'aoc_updated_gallery'; $this->wTitle = __('Gallery Updates', $this->PID); $this->wOptions = array( 'classname' => 'widget_gallery_recent', 'description' => __('Shows the latest updated user galleries.', $this->PID) ); } /** * Widget Output. * @see WP_Widget::widget() */ public function widget( $args, $instance ) { global $wpdb; extract ( $args, EXTR_SKIP); $number = (int) $instance['number']; if ( 1 > $number ) { $number = 5; } elseif ( 20 < $number ) { $number = 20; } echo $before_widget; if ( ! empty($instance['title']) ) { echo $before_title. $instance['title'] . $after_title; } echo ''; echo $after_widget; } }