Plugin Directory

Changeset 204904


Ignore:
Timestamp:
02/13/2010 06:04:36 PM (16 years ago)
Author:
hendrikwill
Message:

adding version 0.4

Location:
wp-google-weather/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-google-weather/trunk/readme.txt

    r144236 r204904  
    44Tags: google, weather, forecast, api, widget
    55Requires at least: 2.8
    6 Tested up to: 2.8.3
    7 Stable tag: 0.3
     6Tested up to: 2.9.1
     7Stable tag: 0.4
    88
    9 Displays a weather widget using the unofficial Google weather API.
     9Displays a weather widget via widget or shortcode using the unofficial Google weather API.
    1010
    1111== Description ==
     
    1919* specifiy output language
    2020* choose between Celsius or Fahrenheit
     21* supports shortcodes
    2122* comes with predefined CSS style
    2223* valid XHTML output
     
    2425== Credits ==
    2526
    26 Copyright 2009 by Hendrik Will
     27Copyright 2010 by Hendrik Will
    2728
    2829This program is free software; you can redistribute it and/or modify
     
    49505. decide whether it should display only today's weather or also a 3 day forecast
    5051
     52To add the widget to posts and pages use the shortcode [wp_google_weather].
     53Example: [wp_google_weather city="new york" temperature="f" language="en" forecast="1"]
    5154
    5255== Screenshots ==
     
    7275
    7376== Changelog ==
     77= 0.4 - 13.02.2010 =
     78* added shortcode support to use the widget on any post or page
     79* fixed CSS issues
     80
    7481= 0.3 - 09.08.2009 =
    7582* added an extra div wrapper with additional css class to fix layout problems depending on the template (thanks Danny and Joe)
     
    8794* add translation for backend
    8895* choose from different styles
     96* add caching
     97* add tinyMCE button
  • wp-google-weather/trunk/wp-google-weather.css

    r139837 r204904  
    4747    margin: 0 1px 0 0;
    4848    text-align: center;
    49     width: 98px;
     49    width: 99px;
    5050}
    5151
     
    8686}
    8787
    88 #sidebar .hw_wpgw img {
     88#sidebar .hw_wpgw img,
     89.hw_wpgw img {
    8990    border: 0;
    9091    display: inline;
  • wp-google-weather/trunk/wp-google-weather.php

    r144242 r204904  
    44Plugin URI: http://imwill.com/wp-google-weather/
    55Description: Displays a weather widget using the Google weather API.
    6 Version: 0.3
     6Version: 0.4
    77Author: Hendrik Will
    88Author URI: http://imwill.com
     
    247247        return $output;
    248248    }
    249 
    250249}
    251250
     
    256255add_action('wp_head', 'wpgw_css');
    257256
     257/**
     258 * Add function to load weather shortcode.
     259 * @since 0.4
     260 */
     261
     262add_shortcode('wp_google_weather', 'hw_wp_gw_shortcode');
     263
     264function hw_wp_gw_shortcode($atts, $content = null) {
     265    extract(shortcode_atts(array(
     266        "city" => 'Braunschweig, Germany',
     267        "temperature" => 'c',
     268        "language" => 'en',
     269        "forecast" => 'true'
     270        ), $atts)
     271    );
     272    $hw_wpgw = new hw_wpgw();
     273    return $hw_wpgw->buildWidget($city, $temperature, $language, $forecast);
     274}
     275
    258276?>
Note: See TracChangeset for help on using the changeset viewer.