t.', 'the-events-calendar' ), 'type' => 'text', ], 'limit' => [ 'label' => _x( 'Show:', 'The label for the amount of events to show in the List Widget.', 'the-events-calendar' ), 'type' => 'number', 'default' => $this->default_arguments['limit'], 'min' => 1, 'max' => 10, 'step' => 1, ], 'no_upcoming_events' => [ 'label' => _x( 'Hide this widget if there are no upcoming events.', 'The label for the option to hide the List Widget if no upcoming events.', 'the-events-calendar' ), 'type' => 'checkbox', ], 'featured_events_only' => [ 'label' => _x( 'Limit to featured events only', 'The label for the option to only show featured events in the List Widget', 'the-events-calendar' ), 'type' => 'checkbox', ], 'jsonld_enable' => [ 'label' => _x( 'Generate JSON-LD data', 'The label for the option to enable JSON-LD in the List Widget.', 'the-events-calendar' ), 'type' => 'checkbox', ], ]; } /** * {@inheritDoc} */ protected function args_to_context( array $arguments, Context $context ) { $alterations = parent::args_to_context( $arguments, $context ); // Only Featured Events. $alterations['featured'] = tribe_is_truthy( $arguments['featured_events_only'] ); // Enable JSON-LD? $alterations['jsonld_enable'] = (int) tribe_is_truthy( $arguments['jsonld_enable'] ); // Hide widget if no events. $alterations['no_upcoming_events'] = tribe_is_truthy( $arguments['no_upcoming_events'] ); // Add posts per page. $alterations['events_per_page'] = (int) isset( $arguments['limit'] ) && $arguments['limit'] > 0 ? (int) $arguments['limit'] : 5; return $this->filter_args_to_context( $alterations, $arguments ); } /** * Add full events list widget stylesheets to customizer styles array to check. * * @since 5.3.0 * * @param array $sheets Array of sheets to search for. * @param string $css_template String containing the inline css to add. * * @return array Modified array of sheets to search for. */ public function add_full_stylesheet_to_customizer( $sheets, $css_template ) { return array_merge( $sheets, [ 'tribe-events-widgets-v2-events-list-full' ] ); } }
Fatal error: Uncaught Error: Class "Tribe\Events\Views\V2\Widgets\Widget_List" not found in /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Widgets/Assets.php:52 Stack trace: #0 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Widgets/Service_Provider.php(57): Tribe\Events\Views\V2\Widgets\Assets->register() #1 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Widgets/Service_Provider.php(46): Tribe\Events\Views\V2\Widgets\Service_Provider->register_assets() #2 /htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(462): Tribe\Events\Views\V2\Widgets\Service_Provider->register() #3 /htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php(46): TEC\Common\lucatume\DI52\Container->register('Tribe\\Events\\Vi...') #4 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Service_Provider.php(51): TEC\Common\Contracts\Container->register('Tribe\\Events\\Vi...') #5 /htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(462): Tribe\Events\Views\V2\Service_Provider->register() #6 /htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php(46): TEC\Common\lucatume\DI52\Container->register('Tribe\\Events\\Vi...') #7 /htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Container.php(305): TEC\Common\Contracts\Container->register('Tribe\\Events\\Vi...') #8 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Main.php(655): tribe_register_provider('Tribe\\Events\\Vi...') #9 /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Main.php(528): Tribe__Events__Main->bind_implementations() #10 /htdocs/wp-includes/class-wp-hook.php(324): Tribe__Events__Main->bootstrap('') #11 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #12 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #13 /htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php(128): do_action('tribe_common_lo...') #14 /htdocs/wp-includes/class-wp-hook.php(324): Tribe__Main->plugins_loaded('') #15 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #16 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #17 /htdocs/wp-settings.php(506): do_action('plugins_loaded') #18 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #19 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #20 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #21 /htdocs/index.php(17): require('/htdocs/wp-blog...') #22 {main} thrown in /htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Widgets/Assets.php on line 52