Plugin Directory

Changeset 1766083


Ignore:
Timestamp:
11/14/2017 03:20:20 PM (8 years ago)
Author:
radiojar
Message:

changes in widget 1.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • radiojar-player/tags/1.1/inc/widget.php

    r1766028 r1766083  
     1<?php
     2//
     3// Radiojar-player widget
     4//
     5if ( ! class_exists( 'Radiojar_Audio_Player' ) ):
     6class Radiojar_Audio_Player extends WP_Widget {
    17
    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' => '&nbsp;' );
     10        parent::__construct( 'socials-ignited', $name = esc_html__( 'Radiojar Player 🎵', 'radiojar-player' ),$widget_ops);
     11    }
     12
    1113    function widget($args, $instance){
    1214
     
    1719        echo $args['after_widget'];
    1820   
    19     }
     21    }
     22
     23} // class
     24
     25function rjp_widget_function() {
     26    register_widget( 'Radiojar_Audio_Player' );
    2027}
    2128
    22 add_action( 'widgets_init', create_function('', 'return register_widget("Radiojar_Audio_Player");') );
    23 ?>
     29add_action( 'widgets_init', 'rjp_widget_function' );
     30
     31endif; //class_exists
     32
     33
Note: See TracChangeset for help on using the changeset viewer.