esc_html__( 'Readmill is the best book reader for phones and tablets. With this widget you can enable users to send a book to their device with one click.', 'jetpack' ), ) ); if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) ) { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_script' ) ); } $this->default_title = __( 'Send To Readmill', 'jetpack' ); $this->default_size = 'large'; } function enqueue_script() { wp_enqueue_script( 'readmill', 'https://platform.readmill.com/send.js', array(), '20130220', false ); } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ function form( $instance ) { $title = isset( $instance['title' ] ) ? $instance['title'] : false; if ( false === $title ) { $title = $this->default_title; } $epub_link = isset( $instance['epub_link'] ) ? $instance['epub_link'] : ''; $buy_link = isset( $instance['buy_link'] ) ? $instance['buy_link'] : ''; $size = isset( $instance['size'] ) ? $instance['size'] : $this->default_size; ?>

the Readmill WordPress Widget support page.", 'jetpack' ), 'http://en.support.wordpress.com/widgets/readmill/' ); ?>

default_title === $instance['title'] ) { $instance['title'] = false; // Store as false in case of language change } return $instance; } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ function widget( $args, $instance ) { $title = isset( $instance['title' ] ) ? $instance['title'] : false; if ( false === $title ) $title = $this->default_title; $title = apply_filters( 'widget_title', $title ); echo $args['before_widget']; if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; $epub_link = isset( $instance['epub_link'] ) ? $instance['epub_link'] : ''; $buy_link = isset( $instance['buy_link'] ) ? $instance['buy_link'] : ''; $size = isset( $instance['size'] ) ? $instance['size'] : $this->default_size; if ( empty( $epub_link ) && current_user_can( 'edit_theme_options' ) ) : ?>

Send to Readmill