/** * Render a formatted webcomic print amount. * * <code class="php"> * // render the current webcomic's print amount for a domestic print * webcomic_print_amount( 'domestic' ); * * // render the original-print shipping amount for webcomic 42 using ',' for the decimal and '.' for the thousands separator * webcomic_print_amount( 'original-shipping', ',', '.', 42 ); * </code> * * <code class="bbcode"> * // render the current webcomic's print amount for a domestic print * [webcomic_print_amount type="domestic"] * * // render the original-print shipping amount for webcomic 42 using ',' for the decimal and '.' for the thousands separator * [webcomic_print_amount type="original-shipping" dec="," sep="." the_post="42"] * </code> * * @package Webcomic * @param string $type The amount to return, one of 'domestic', 'domestic-price', 'domestic-shipping', 'international', 'international-price', 'international-shipping', 'original', 'original-price', or 'original-shipping'. * @param string $dec Decimal point for number_format(). * @param string $sep Thousands separator for number_format(). * @param mixed $the_post The post object or ID to get print amounts for. * @uses WebcomicTag::webcomic_print_amount() */ function webcomic_print_amount($type, $dec = '.', $sep = ',', $the_post = false) { echo WebcomicTag::webcomic_print_amount($type, $dec, $sep, $the_post); }
/** * Handle webcomic_print_amount shortcode. * * @param array $atts Shortcode attributes. * @return string * @uses WebcomicTag::webcomic_print_amount() */ public function webcomic_print_amount($atts) { extract(shortcode_atts(array('type' => '', 'dec' => '.', 'sep' => ',', 'the_post' => false), $atts)); return WebcomicTag::webcomic_print_amount($type, $dec, $sep, $the_post); }