whyisjake

Jake Spurlock

May 18th, 2010
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. <?php
  2.  
  3. if (is_post_type('the_store')) {
  4.  
  5. function add_some_stuff($content) {
  6.     $whateveryouwanttoadd = <<<PAYPAL
  7.             <form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">
  8.             <input type="hidden" name="cmd" value="_cart">
  9.             <input type="hidden" name="business" value="$mama_paypal">
  10.             <input type="hidden" name="item_name" value="the_title()">
  11.             <input type="hidden" name="shopping_url" value="the_permalink()">
  12.             <input type="hidden" name="item_number" value="the_ID()">
  13.             <input type="hidden" name="amount" value="$price[0]">
  14.             <input type="hidden" name="currency_code" value="USD">
  15.             <input type="hidden" name="shipping" value="$shipping[0]">
  16.             <input type="hidden" name="shipping2" value="$another[0]">
  17.             <input type="hidden" name="handling_cart" value="$mama_handling">
  18.             <input type="hidden" name="bn"  value="ButtonFactory.PayPal.001">
  19.             <input type="image" name="add" src="http://www.powersellersunite.com/buttonfactory/sc-but-01.gif">
  20.             </form>
  21. PAYPAL;
  22.  
  23.         $content = preg_replace('/<\/p>/', '</p><p>'. $whateveryouwanttoadd.'</p>', $content, 1);
  24.  
  25.     return $content;
  26. }
  27.  
  28. add_filter('the_content', 'add_some_stuff');
  29.  
  30. }
  31.  
  32. ?>
Add Comment
Please, Sign In to add comment