' ); // WPCS xss ok. Plugin's display safe function. break; default: break; } } /** * Register widget display posts entry classes. * * @param str $classes Comma separated entry posts classes. * @param array $instance Settings for the current widget instance. * @param Object $widget The widget instance. * @return str Entry posts classes. */ public function entry_classes( $classes, $instance, $widget ) { if ( 'tribe_events' === get_post_type() ) { $classes[] = 'dp-event no-zig'; } return $classes; } /** * Add items to widget title area. * * @param array $after_title Items before closing of widget title. * @param array $instance Settings for the current widget instance. * @return str */ public function dp_wid_title( $after_title, $instance ) { $link_html = ''; // Change only if theme specific after_title args has not been altered. if ( '' !== $after_title ) { return $after_title; } if ( 'tribe_events' === $instance['post_type'] ) { $link_html = sprintf( '%2$s %3$s', esc_url( tribe_get_events_link() ), esc_html__( 'Calender', 'bayleaf' ), bayleaf_get_icon( array( 'icon' => 'long-arrow-right' ) ) ); } return '' . $link_html . ''; } } Plugins_Compat::init();