__( 'A collapsible archive with on-demand post titles.', 'content-trees' ), ) ); } /** * Render the widget using theme wrappers. * * @param array $args Tree options or theme widget wrappers. * @param array $instance Saved widget settings. */ public function widget( $args, $instance ) { $options = archive_options( $instance ); $title = $options['title']; $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Theme-owned HTML from register_sidebar()/dynamic_sidebar(); not a saved widget field. echo $args['before_widget']; if ( '' !== $title ) { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Theme-owned opening title markup; the filtered title is escaped separately below. echo $args['before_title']; echo esc_html( $title ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Theme-owned closing title markup from the registered sidebar. echo $args['after_title']; } $options['title'] = $title; $options['show_title'] = false; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- render() escapes text, attributes and URLs while constructing its HTML. echo render( $options ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Theme-owned closing widget markup from the registered sidebar. echo $args['after_widget']; } /** * Render the classic widget settings. * * @param array $instance Saved widget settings. */ public function form( $instance ) { $options = archive_options( $instance ); $title = $options['title']; ?>
__( 'Show individual posts', 'content-trees' ), 'group_years' => __( 'Group months by year', 'content-trees' ), ) as $key => $label ) : ?>
>
>
>
>
>
>