|
7 | 7 | class Shortcode_Widget extends WP_Widget {
|
8 | 8 |
|
9 | 9 | function __construct() {
|
10 |
| - $widget_ops = array('classname' => 'shortcode_widget', 'description' => __('Shortcode or HTML or Plain Text','shortcode-widget')); |
| 10 | + $widget_ops = array('classname' => 'shortcode_widget', 'description' => __('Shortcode or HTML or Plain Text', SHORTCODE_WIDGET_TEXT_DOMAIN)); |
11 | 11 | $control_ops = array('width' => 400, 'height' => 350);
|
12 |
| - parent::__construct('shortcode-widget', __('Shortcode Widget','shortcode-widget'), $widget_ops, $control_ops); |
| 12 | + parent::__construct('shortcode-widget', __('Shortcode Widget', SHORTCODE_WIDGET_TEXT_DOMAIN), $widget_ops, $control_ops); |
13 | 13 | }
|
14 | 14 |
|
15 | 15 | function widget( $args, $instance ) {
|
@@ -39,12 +39,12 @@ function form( $instance ) {
|
39 | 39 | $title = strip_tags($instance['title']);
|
40 | 40 | $text = esc_textarea($instance['text']);
|
41 | 41 | ?>
|
42 |
| - <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','shortcode-widget'); ?></label> |
| 42 | + <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', SHORTCODE_WIDGET_TEXT_DOMAIN); ?></label> |
43 | 43 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
|
44 | 44 |
|
45 | 45 | <textarea class="widefat" rows="16" cols="20" id="<?php echo $this->get_field_id('text'); ?>" name="<?php echo $this->get_field_name('text'); ?>"><?php echo $text; ?></textarea>
|
46 | 46 |
|
47 |
| - <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e('Automatically add paragraphs','shortcode-widget'); ?></label></p> |
| 47 | + <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e('Automatically add paragraphs', SHORTCODE_WIDGET_TEXT_DOMAIN); ?></label></p> |
48 | 48 | <?php
|
49 | 49 | }
|
50 | 50 | }
|
|
0 commit comments