Exemplo n.º 1
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Popular Ads Today', APP_TD) : $instance['title']);
     if (empty($instance['number']) || !($number = absint($instance['number']))) {
         $number = 10;
     }
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     cp_todays_count_widget(APP_POST_TYPE, $number);
     echo $after_widget;
 }
Exemplo n.º 2
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Popular Ads Today', 'appthemes') : $instance['title']);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     cp_todays_count_widget(APP_POST_TYPE, 5);
     echo $after_widget;
 }
Exemplo n.º 3
0
 public function content($instance)
 {
     $instance = array_merge($this->defaults, (array) $instance);
     if (empty($instance['number']) || !($number = absint($instance['number']))) {
         $number = 10;
     }
     cp_todays_count_widget(APP_POST_TYPE, $number);
 }