Plugin Directory

Changeset 883564


Ignore:
Timestamp:
03/28/2014 02:00:17 PM (12 years ago)
Author:
aniketpant
Message:

Minor edits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • instamojo/trunk/widget.php

    r883557 r883564  
    55 * It extends the WordPress Widget class.
    66 */
    7 class instamojo_widget extends WP_Widget {
     7class instamojo_widget extends WP_Widget
     8{
    89
    910
     
    1112   *  Default constructor.
    1213   */
    13   function instamojo_widget() {
     14  function instamojo_widget()
     15  {
    1416    // Load any other optional scripts
    1517    add_action('load-widgets.php', array(&$this, 'my_custom_load'));
     
    3335   *  Called in the constructor.
    3436   */
    35   function my_custom_load() {
     37  function my_custom_load()
     38  {
    3639
    3740  }
     
    4144   *  This is responsible for how the widget looks in your WordPress site.
    4245   */
    43   function widget($args, $instance) {
     46  function widget($args, $instance)
     47  {
    4448    wp_register_style('widgetcss', plugin_dir_url(__FILE__).'assets/css/imojo.css');
    4549    wp_enqueue_style('widgetcss');
     
    96100   *  This works when you fill data in the widget form input from the WordPress admin.
    97101   */
    98   function update($new_instance, $old_instance) {
     102  function update($new_instance, $old_instance)
     103  {
    99104    $instance = $old_instance;
    100105    $instance['button_pos'] = strip_tags($new_instance['button_pos']);
     
    128133   *  This is responsible for how the form in the WordPress admin looks.
    129134   */
    130   function form($instance) {
     135  function form($instance)
     136  {
    131137    $defaults = array('title' => '', 'instamojo_url' => '', 'button_pos' => 'top', 'button_style' => 'none', 'type' => true);
    132138    $instance = wp_parse_args((array)$instance, $defaults);
Note: See TracChangeset for help on using the changeset viewer.