Plugin Directory

Changeset 1750361


Ignore:
Timestamp:
10/21/2017 01:47:19 PM (8 years ago)
Author:
theode
Message:

changed variable and version

Location:
leaflet-map-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • leaflet-map-widget/trunk/leaflet-map-widget.php

    r1481018 r1750361  
    1919
    2020 */
    21  
    22  function register_LeafletMap_widget() {
    23     register_widget( 'LeafletMapwidget' );
     21
     22function register_LeafletMap_widget() {
     23    register_widget( 'LeafletMapwidget' );
    2424}
    2525add_action( 'widgets_init', 'register_LeafletMap_widget' );
     
    2929function leafletmapwidget_init() {
    3030
    31     $path = dirname(plugin_basename( __FILE__ )) . '/languages/';
    32     $loaded = load_plugin_textdomain( 'leafletmapwidget', false, $path);
     31    $path = dirname(plugin_basename( __FILE__ )) . '/languages/';
     32    $loaded = load_plugin_textdomain( 'leafletmapwidget', false, $path);
    3333}
    34  
     34
    3535/**
    3636 * Adds LeafletMapWidget widget.
     
    5555            echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
    5656        }
    57    
    58             echo do_shortcode('[leaflet-map address="'.$instance['adresse'].','.$instance['postcode_town'].'" zoom='.$instance['zoomlevel'].' scrollwheel=1][leaflet-marker]');
    59    
     57
     58            echo do_shortcode('[leaflet-map address="'.$instance['address'].','.$instance['postcode_town'].'" zoom='.$instance['zoomlevel'].' scrollwheel=1][leaflet-marker]');
     59
    6060        echo $args['after_widget'];
    6161    }
     
    6464    public function form( $instance ) {
    6565        $title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'New title', 'leafletmapwidget' );
    66         $adresse = ! empty( $instance['adresse'] ) ? $instance['adresse'] : __( 'adresse', 'leafletmapwidget' );
     66        $adresse = ! empty( $instance['address'] ) ? $instance['address'] : __( 'address', 'leafletmapwidget' );
    6767        $postcode_town = ! empty( $instance['postcode_town'] ) ? $instance['postcode_town'] : __( 'postcode_town', 'leafletmapwidget' );
    6868        $zoomlevel = ! empty( $instance['zoomlevel'] ) ? $instance['zoomlevel'] : __( '17', 'leafletmapwidget' );
    69        
     69
    7070        ?>
    7171        <p>
     
    7373        <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
    7474        </p>
    75        
     75
    7676        <p>
    7777            <label for="adresse" ><?php _e('Address','leafletmapwidget'); ?>:</label><br>
    78             <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'adresse' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'adresse' ) ); ?>" type="text" value="<?php echo esc_attr( $adresse ); ?>">
     78            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'address' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'address' ) ); ?>" type="text" value="<?php echo esc_attr( $adresse ); ?>">
    7979        </p>
    8080        <p>
     
    8282            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'postcode_town' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'postcode_town' ) ); ?>" type="text" value="<?php echo esc_attr( $postcode_town ); ?>">
    8383        </p>
    84        
     84
    8585        <p>
    8686            <label for="zoomlevel" ><?php _e('Zoomlevel (1 = World , 18 very detailed)','leafletmapwidget'); ?>:</label><br>
    8787            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'zoomlevel' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'zoomlevel' ) ); ?>" type="number" min=1 max=18 value="<?php echo esc_attr( $zoomlevel ); ?>">
    8888        </p>
    89    
    9089
    91        
     90
     91
    9292        <?php
    9393    }
     
    9797        $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
    9898        $instance['postcode_town'] = ( ! empty( $new_instance['postcode_town'] ) ) ? strip_tags( $new_instance['postcode_town'] ) : '';
    99         $instance['adresse'] = ( ! empty( $new_instance['adresse'] ) ) ? strip_tags( $new_instance['adresse'] ) : '';
     99        $instance['address'] = ( ! empty( $new_instance['address'] ) ) ? strip_tags( $new_instance['address'] ) : '';
    100100        $instance['zoomlevel'] = ( ! empty( $new_instance['zoomlevel'] ) ) ? strip_tags( $new_instance['zoomlevel'] ) : '';
    101        
     101
    102102        return $instance;
    103103    }
     
    105105} // class LeafletMapWidget
    106106
    107  
     107
    108108 ?>
  • leaflet-map-widget/trunk/readme.txt

    r1750353 r1750361  
    44Tags: leaflet, map, widget
    55Requires at least: 3.0.1
    6 Tested up to: 4.7
     6Tested up to: 4.8.2
    77Stable tag: trunk
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.