Last active
July 5, 2016 23:35
-
-
Save geoffgraham/f28a14fb13796ccecf39 to your computer and use it in GitHub Desktop.
The Events Calendar 3.12.1 // Increase Number of Events in Advanced List Widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('widget_display_callback', 'increase_event_widget_limit', 10, 2); | |
/** | |
* Test if the current widget is an Advanced List Widget and fix the event limit if it is. | |
*/ | |
function increase_event_widget_limit(array $instance, $widget) { | |
if (is_a($widget, 'Tribe__Events__Pro__Advanced_List_Widget')) | |
$instance['limit'] = 30; | |
return $instance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment