widget.php in Polylang 0.1, at widget.php
| 1 | <?php |
| 2 | |
| 3 | class Polylang_Widget extends WP_Widget { |
| 4 | function __construct() { |
| 5 | $widget_ops = array( 'description' => __( 'Displays a language switcher', 'polylang') ); |
| 6 | parent::__construct('polylang', __('Language Switcher', 'polylang'), $widget_ops); |
| 7 | } |
| 8 | |
| 9 | function widget($args, $instance) { |
| 10 | extract( $args ); |
| 11 | |
| 12 | echo "$before_widget\n"; |
| 13 | do_action('the_languages'); |
| 14 | echo "$after_widget\n"; |
| 15 | } |
| 16 | |
| 17 | } // Class Polylang_Widget |
| 18 | |
| 19 | ?> |
| 20 |