plugin = $plugin; $widget_options = array( 'classname' => 'st_button_widget', 'description' => esc_html__( 'Add ShareThis share buttons to your sidebar.', 'sharethis-share-buttons' ), ); parent::__construct( 'st_button_widget', 'ShareThis Buttons', $widget_options ); } /** * Create the widget output. * * @param array $args Widget output arguments. * @param array $instance The widget instance. */ public function widget( $args, $instance ) { global $post; $data_url = ''; if ( is_archive() || is_front_page() || is_tag() ) { $data_url = 'data-url=' . get_permalink( $post->ID ); } // Add buttons. ?>
>