示例#1
0
文件: tags.php 项目: ecerta/webcomic
 /**
  * Render a donation amount.
  * 
  * <code class="php">
  * // render the current collections donation amount
  * webcomic_donation_amount();
  * 
  * // render the donation amount for collection 42 using ',' for the decimal and '.' for the thousands separator
  * webcomic_donation_amount( ',', '.', 'webcomic42' );
  * </code>
  * 
  * <code class="bbcode">
  * // render the current collections donation amount
  * [webcomic_donation_amount]
  * 
  * // render the donation amount for collection 42 using ',' for the decimal and '.' for the thousands separator
  * [webcomic_donation_amount dec="," sep="." collection="webcomic42"]
  * </code>
  * 
  * @package Webcomic
  * @param string $dec Decimal point for number_format().
  * @param string $sep Thousands separator for number_format().
  * @param string $collection The collection to render a donation amount for.
  * @uses WebcomicTag::webcomic_donation_amount()
  */
 function webcomic_donation_amount($dec = '.', $sep = ',', $collection = '')
 {
     echo WebcomicTag::webcomic_donation_amount($dec, $sep, $collection);
 }
示例#2
0
 /**
  * Handle webcomic_donation_amount shortcode.
  * 
  * @param array $atts Shortcode attributes.
  * @return string
  * @uses WebcomicTag::webcomic_donation_amount()
  */
 public function webcomic_donation_amount($atts)
 {
     extract(shortcode_atts(array('dec' => '.', 'sep' => ',', 'collection' => ''), $atts));
     return WebcomicTag::webcomic_donation_amount($dec, $sep, $collection);
 }