From bb1694a4d3ecdfe38c69783e62794a4b90bc3e74 Mon Sep 17 00:00:00 2001 From: ulaulaman Date: Tue, 20 Oct 2020 00:36:56 +0200 Subject: [PATCH] Widget sidebar didattica --- sidebars/widgets.php | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sidebars/widgets.php diff --git a/sidebars/widgets.php b/sidebars/widgets.php new file mode 100644 index 0000000..8e9811f --- /dev/null +++ b/sidebars/widgets.php @@ -0,0 +1,57 @@ + __( 'Widget per l\'inserimento della sidebar dei contenuti didattici', 'text_domain' ), ) // Args + ); + } + + /** Front-end display of widget */ + public function widget( $args, $instance ) { + extract( $args ); + $shortcode = do_shortcode('[sbdidattica]'); + echo $shortcode; + echo $after_widget; + } + + /** Back-end widget form */ + public function form( $instance ) { + if ( isset( $instance[ 'title' ] ) ) { + $title = $instance[ 'title' ]; + } + else { + $title = __( 'Titolo', 'text_domain' ); + } + ?> +

+ + +

+