示例#1
0
文件: tags.php 项目: ecerta/webcomic
 /**
  * Render a formatted webcomic print adjustment.
  * 
  * <code class="php">
  * // render the current webcomic's adjustment for a domestic print
  * webcomic_print_amount( 'domestic' );
  * 
  * // render the original-print shipping adjustment for webcomic 42
  * webcomic_print_amount( 'original-shipping', 42 );
  * </code>
  * 
  * <code class="bbcode">
  * // render the current webcomic's adjustment for a domestic print
  * [webcomic_print_amount type="domestic"]
  * 
  * // render the original-print shipping adjustment for webcomic 42
  * [webcomic_print_amount type="original-shipping" the_post="42"]
  * </code>
  * 
  * @package Webcomic
  * @param string $type The adjustment to return, one of 'domestic', 'domestic-price', 'domestic-shipping', 'international', 'international-price', 'international-shipping', 'original', 'original-price', or 'original-shipping'.
  * @param mixed $the_post The post object or ID to get print adjustments for.
  * @uses WebcomicTag::webcomic_print_adjustment()
  */
 function webcomic_print_adjustment($type, $the_post = false)
 {
     echo WebcomicTag::webcomic_print_adjustment($type, $the_post);
 }
示例#2
0
 /**
  * Handle webcomic_print_adjustment shortcode.
  * 
  * @param array $atts Shortcode attributes.
  * @return string
  * @uses WebcomicTag::webcomic_print_adjustment()
  */
 public function webcomic_print_adjustment($atts)
 {
     extract(shortcode_atts(array('type' => '', 'the_post' => false), $atts));
     return WebcomicTag::webcomic_print_adjustment($type, $the_post);
 }