You appear to be a bot. Output may be restricted
Description
Implement [bw_address] shortcode to display an address using MicroformatsWhen the tag=div then we get a blocked version of the address. When tag=span the address should be inline.
Usage
$string = bw_address( $atts, $content, $shortcode_tag );
Parameters
- $atts
- ( array ) optional – shortcode parameters
- $content
- ( string ) optional – not expected
- $shortcode_tag
- ( string ) optional – shortcode tag
Returns
string generated HTMLSource
File name: oik/shortcodes/oik-address.phpLines:
1 to 28 of 28
function bw_address( $atts=null, $content=null, $shortcode_tag=null ) { $type = bw_array_get( $atts, "type", __( "Work", "oik" ) ); $tag = bw_array_get( $atts, "tag", "div" ); stag( $tag, "adr bw_address" ); stag( $tag, "type"); e( $type ); etag( $tag ); stag( $tag, "extended-address"); e( bw_get_option_arr( "extended-address", "bw_options", $atts ) ); etag( $tag ); stag( $tag, "street-address"); e( bw_get_option_arr( "street-address", "bw_options", $atts ) ); etag( $tag ); stag( $tag, "locality"); e( bw_get_option_arr( "locality", "bw_options", $atts ) ); etag( $tag ); stag( $tag, "region"); e( bw_get_option_arr( "region", "bw_options", $atts ) ); etag( $tag ); stag( $tag, "postal-code"); e( bw_get_option_arr( "postal-code", "bw_options", $atts ) ); etag( $tag ); stag( $tag, "country-name"); e( bw_get_option_arr( "country-name", "bw_options", $atts ) ); etag( $tag ); etag( $tag ); return( bw_ret() ); }View on GitHub View on Trac