Skip to content

Commit c0117a5

Browse files
authored
Merge pull request #8 from stleary/wordpress-release-1.0
fix some comments, add comma
2 parents 66fdce8 + cbaecb1 commit c0117a5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/class-stars-at-night-manager.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
/**
5353
* This class calculates and emits astronomical values in an HTML table.
5454
* For testing, the values are just written to stdout
55-
http://www.heavens-above.com/PassSummary.aspx?satid=25544&lat=30.891&lng=-98.4265&loc=Unspecified&alt=300&tz=CST
56-
http://stackoverflow.com/questions/4979836/domdocument-in-php/4983721#4983721
5755
*/
5856
class Stars_At_Night_Manager {
5957
protected $loader;
@@ -130,7 +128,7 @@ public function enqueuestyles() {
130128
* except for the first param which is the program name, and is ignored.
131129
* Remaining params (order is unimportant):
132130
* name=the name of the location to be calculated
133-
* lat=lattitude of location in fractional degrees (e.g. 30.8910). Positive is north, negative is south of equator
131+
* lat=latitude of location in fractional degrees (e.g. 30.8910). Positive is north, negative is south of equator
134132
* long=longitude of location in fractional degrees (e.g.-98.4265). Positive is east, negative is west of the UTC line
135133
* timezone=timezone name, must be value recognized by php. See http://php.net/manual/en/timezones.php
136134
* date=a date that php can parse. For the current day, use "now"
@@ -271,7 +269,7 @@ public function run_stars_at_night( $atts ) {
271269
/**
272270
* Validates the parameters sent by the user.
273271
* @param $name the name of the location to be calculated
274-
* @param $lat lattitude of location in fractional degrees
272+
* @param $lat latitude of location in fractional degrees
275273
* @param $long longitude of location in fractional degrees
276274
* @param $timezone timezone name, must be value recognized by php
277275
* @param $date a date that php can parse
@@ -290,7 +288,7 @@ private function data_validator( $name, $lat, $long, $timezone, $date, $graphica
290288
FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_ENCODE_AMP );
291289

292290
/**
293-
* lat must be valid fractional decimals +- 0-90
291+
* lat must be valid fractional decimal [-90:90]
294292
*/
295293
if ( !is_numeric( $lat ) ) {
296294
$result .= " Latitude must be numeric.";
@@ -301,7 +299,7 @@ private function data_validator( $name, $lat, $long, $timezone, $date, $graphica
301299
}
302300

303301
/**
304-
* long must be valid fractional decimal, +- 0-90
302+
* long must be valid fractional decimal [-180:180]
305303
*/
306304
if ( !is_numeric( $long ) ) {
307305
$result .= " Longitude must be numeric.";
@@ -375,7 +373,7 @@ private function calculateTwilight( $today, $tzOffset, $sunTime, $delta ) {
375373
private function display($name, $lat, $long, $today, $sunRise, $sunSet, $moonRise, $moonSet, $morningTwilight, $eveningTwilight) {
376374
$string =
377375
'<div class="ngc2244_stars_at_night_css">' .
378-
'<bold>' . $name . ' (' .$lat . ' ' . $long . ') astronomical times for ' .
376+
'<bold>' . $name . ' (' .$lat . ', ' . $long . ') astronomical times for ' .
379377
$today . '</bold>' .
380378
'<table>' .
381379
'<tr>' .

0 commit comments

Comments
 (0)