~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to extra/wordpress/helioviewer-latest-image.php

  • Committer: Keith Hughitt
  • Date: 2011-06-24 17:59:08 UTC
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: keith.hughitt@nasa.gov-20110624175908-0bpqp3bf533zc3my
Added initial version of Wordpress widget.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * @package Helioviewer
 
4
 * @version 0.1
 
5
 */
 
6
/*
 
7
Plugin Name: Helioviewer.org - Latest Image
 
8
Description: Displays the most recent image of the Sun from Helioviewer.org.
 
9
Author: Keith Hughitt
 
10
Author URI: https://launchpad.net/~keith-hughitt
 
11
License: Mozilla Public License 1.1
 
12
Version: 0.1
 
13
*/
 
14
 
 
15
function helioviewer_widget() {
 
16
?>
 
17
<div id='helioviewer-wordpress-widget'>
 
18
    <h3 class="widget-title">Helioviewer.org</h3>
 
19
    <a href='http://www.helioviewer.org' target="_blank">
 
20
        <img src="http://helioviewer.org/api/?action=takeScreenshot&date=2099-01-01T00:00:00.000Z&layers=[SDO,AIA,AIA,304,1,100]&imageScale=9.6&x1=-1228.8&y1=-1228.8&x2=1228.8&y2=1228.8&display=true" alt="Latest AIA 304 image from Helioviewer.org." style='width: 100%;' />
 
21
    </a>
 
22
</div>
 
23
<?
 
24
}
 
25
 
 
26
function helioviewer_install()
 
27
{
 
28
    register_sidebar_widget(__('Helioviewer.org - Latest Image'), 'helioviewer_widget');
 
29
}
 
30
 
 
31
add_action("plugins_loaded", "helioviewer_install");
 
32
?>