| 1 |
<?php |
| 2 |
/** |
| 3 |
* Vimeo Widget |
| 4 |
* |
| 5 |
* @package GamiPress\Widgets\Widget\Vimeo |
| 6 |
* @author GamiPress <[email protected]>, Ruben Garcia <[email protected]> |
| 7 |
* @since 1.0.0 |
| 8 |
*/ |
| 9 |
// Exit if accessed directly |
| 10 |
if( !defined( 'ABSPATH' ) ) exit; |
| 11 |
|
| 12 |
class GamiPress_Vimeo_Widget extends GamiPress_Widget { |
| 13 |
|
| 14 |
public function __construct() { |
| 15 |
|
| 16 |
parent::__construct( |
| 17 |
'gamipress_vimeo_widget', |
| 18 |
__( 'GamiPress: Vimeo', 'gamipress' ), |
| 19 |
__( 'Display a Vimeo video.', 'gamipress' ) |
| 20 |
); |
| 21 |
|
| 22 |
} |
| 23 |
|
| 24 |
public function get_fields() { |
| 25 |
|
| 26 |
return GamiPress()->shortcodes['gamipress_vimeo']->fields; |
| 27 |
|
| 28 |
} |
| 29 |
|
| 30 |
public function get_widget( $args, $instance ) { |
| 31 |
|
| 32 |
echo gamipress_do_shortcode( 'gamipress_vimeo', array( |
| 33 |
'url' => $instance['url'], |
| 34 |
'width' => $instance['width'], |
| 35 |
'height' => $instance['height'], |
| 36 |
) ); |
| 37 |
|
| 38 |
} |
| 39 |
|
| 40 |
} |