You appear to be a bot. Output may be restricted
Description
Display information about high and low tides obtained from the NOAA Tides and Currents websitee.g.
- Threemile Cut entrance, Darien River GA
- May 18,2012
- 02:10 AM 0.7 Low Tide
- 07:50 AM 6.6 High Tide
- 02:11 PM 0.2 Low Tide
- 08:07 PM 7.8 High Tide
Usage
$string = us_tides( $atts );Parameters
- $atts
- ( mixed ) optional –
Returns
string Result of shortcodeSource
File name: us-tides/shortcodes/us-tides.phpLines:
1 to 29 of 29
function us_tides( $atts=NULL ) { $station = bw_array_get( $atts, "station", "8423745" ); $link = bw_array_get( $atts, "link", "y" ); $link = bw_validate_torf( $link ); $date_format = bw_array_get( $atts, "date_format", "M d,Y" ); $response = us_load_xml_file( $station ); if ( $response ) { $stationname = $response->stationname; $state = $response->state; $text = "Tide times and heights for:"; $text .= " "; $text .= $stationname; $text .= " "; $text .= $state; if ( $link ) { alink( "stationname", "http://tidesandcurrents.noaa.gov/noaatidepredictions/NOAATidesFacade.jsp?Stationid=$station", $text ); } else { p( $text, "stationname" ); } p( bw_format_date( null, $date_format ) ); $today = bw_format_date( null, "Y/m/d" ); foreach ( $response->data->item as $item ) { if ( $item->date == $today ) { us_format_item( $item ); } } } return( bw_ret()); }View on GitHub
