Description
Return the telephone number in desired HTML markup, if set or passed as number=
Usage
_bw_telephone( $atts );Parameters
- $atts
- ( mixed ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-phone.phpLines:
1 to 31 of 31
function _bw_telephone( $atts=null ) { $prefix = bw_array_get( $atts, "prefix", null ); if ( null === $prefix ) { $prefix = __( "Tel", "oik" ); } $sep = bw_array_get( $atts, "sep", ": " ); $number = bw_array_get( $atts, "number", null ); $index = bw_array_get( $atts, "index", "telephone" ); $class = bw_array_get( $atts, "class", null ); $link = bw_array_get( $atts, "link", null ); if ( !$number ) { $number = bw_get_option_arr( $index, "bw_options", $atts ); } if ( $number <> "" ) { _bw_telephone_link( $atts, $number, true ); $tag = bw_array_get( $atts, "tag", "div" ); stag( $tag, "tel $class" ); span( "type"); e( $prefix ); epan(); span( "sep" ); e( $sep ); epan(); span( "value" ); e( $number ); epan(); etag( $tag ); _bw_telephone_link( $atts, $number, false ); } return( bw_ret()); }View on GitHub View on Trac
Called by
1 to 7 of 7
- bw_emergency() – Implement [bw_emergency] shortcode to display the emergency number, if set
- bw_fax() – Implement [bw_fax] shortcode to display the fax number, if set
- bw_mob() – Inline [bw_mob] shortcode to display an inline mobile number, using span
- bw_mobile() – Implement [bw_mobile] shortcode to display the mobile (cell) number, if set
- bw_skype() – Implement [bw_skype] shortcode to display the Skype contact information
- bw_tel() – Implement [bw_tel] shortcode to display an inline telephone number, using span
- bw_telephone() – Implement [bw_telephone] shortcode to display the telephone number, if set
Invoked by
Calls
1 to 9 of 9
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_get_option_arr() – Retrieve the requested option value depending on the $atts array
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- e() – Outputs some translated / non-translatable text
- epan() –
- etag() – Output an end tag
- span() –
- stag() – Output an HTML opening tag
- _bw_telephone_link() – Create an enclosing link start or end tag
