* @license GPL 2+ GNU GPL licence above 2+ * @link http://wp3.in * @since 2.0.0-alpha2 * */ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die; } class AnsPress_Subscribe_Widget extends WP_Widget { public function AnsPress_Subscribe_Widget() { // Instantiate the parent object parent::__construct( false, __('AnsPress Subscribe', 'ap') ); } public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); echo $args['before_widget']; if ( ! empty( $title ) ) { echo $args['before_title'] . $title . $args['after_title']; } ap_subscribe_btn_html(); echo $args['after_widget']; } public function form( $instance ) { if ( isset( $instance[ 'title' ] ) ) { $title = $instance[ 'title' ]; } else { $title = __( 'Subscribe questions', 'ap' ); } ?>