BakerMan

ECP 2.0.10 increase Advanced List Widget limit

Jan 8th, 2013
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. add_filter('widget_display_callback', 'increase_event_widget_limit', 10, 2);
  2.  
  3. /**
  4.  * Test if the current widget is an Advanced List Widget and fix the
  5.  * event limit if so.
  6.  */
  7. function increase_event_widget_limit(array $instance, $widget) {
  8.     if (is_a($widget, 'TribeEventsAdvancedListWidget'))
  9.         $instance['limit'] = 30;
  10.  
  11.     return $instance;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment