Description
Displays the copyright statement for the company- showing start and end years
- e.g. (C) Copyright [bw_company] [bw_from]&sep[year]. &suffix
- where [bw_from] is the first year of the site
- &sep is the separator ( defaults to ',' for one year apart and '-' for a range )
- [year] represents the current year -
- &suffix defaults to "All rights reserved."
Usage
$string = bw_copyright( $atts );Parameters
- $atts
- ( array ) optional –
Returns
string Copyright statementSource
File name: oik/includes/bobbcomp.phpLines:
1 to 26 of 26
function bw_copyright( $atts = NULL ) { $copyright = bw_array_get( $atts, "prefix", null ); if ( null === $copyright ) { $copyright = __( "© Copyright", "oik" ); } $company = bw_array_get( $atts, "company", null ); if ( null === $company ) { $company = bw_get_option( "company", "bw_options" ); } $expanded_company = bw_do_shortcode( $company ); $suffix = bw_array_get( $atts, "suffix", null ); if ( null === $suffix ) { $suffix = __( "All rights reserved.", "oik" ); } $yearto = bw_format_date( null, 'Y'); $yearfrom = bw_array_get_dcb( $atts, "from", 'yearfrom', "bw_get_option", "bw_options" ); $years = bw_year_range( $yearfrom, $yearto, $atts ); span( "bw_copyright" ); /* translators: "Copyright-prefix company-name year-range. " */ e( sprintf( __( '%1$s %2$s %3$s. ', "oik" ), $copyright, $expanded_company, $years ) ); span( "suffix" ); e( $suffix ); epan(); epan(); return( bw_ret()); }View on GitHub View on Trac
Called by
1 to 2 of 2
Invoked by
Calls
1 to 10 of 10
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_array_get_dcb() – Return the array[index] or build the result by calling $callback, passing the $default as the arg.
- bw_do_shortcode() – Perform nested shortcode expansion
- bw_format_date() – Format a date with the specified format
- bw_get_option() – Get the value of an option field
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- bw_year_range() – Formats a range of years
- e() – Outputs some translated / non-translatable text
- epan() –
- span() –
