Changeset 1766083
- Timestamp:
- 11/14/2017 03:20:20 PM (8 years ago)
- File:
-
- 1 edited
-
radiojar-player/tags/1.1/inc/widget.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
radiojar-player/tags/1.1/inc/widget.php
r1766028 r1766083 1 <?php 2 // 3 // Radiojar-player widget 4 // 5 if ( ! class_exists( 'Radiojar_Audio_Player' ) ): 6 class Radiojar_Audio_Player extends WP_Widget { 1 7 2 <?php 3 class Radiojar_Audio_Player extends WP_Widget { 4 5 function __construct() { 6 $widget_ops = array('classname' => 'Radiojar Audio Player', 'description' => 'Displays an Latest - playlist category!' ); 7 $control_ops = array(/*'width' => 300, 'height' => 400*/ ); 8 parent::__construct( 'Radiojar Audio Player', $name = 'Radiojar Audio Player ??', $widget_ops, $control_ops ); 9 } 10 8 function __construct() { 9 $widget_ops = array('description' => ' ' ); 10 parent::__construct( 'socials-ignited', $name = esc_html__( 'Radiojar Player 🎵', 'radiojar-player' ),$widget_ops); 11 } 12 11 13 function widget($args, $instance){ 12 14 … … 17 19 echo $args['after_widget']; 18 20 19 } 21 } 22 23 } // class 24 25 function rjp_widget_function() { 26 register_widget( 'Radiojar_Audio_Player' ); 20 27 } 21 28 22 add_action( 'widgets_init', create_function('', 'return register_widget("Radiojar_Audio_Player");') ); 23 ?> 29 add_action( 'widgets_init', 'rjp_widget_function' ); 30 31 endif; //class_exists 32 33
Note: See TracChangeset
for help on using the changeset viewer.