Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. function shortcode_ticker( $attr, $content ) {
  4.  
  5.     // Start the output buffer. This allows us use normal
  6.     // markup while setting it to a variable.
  7.     ob_start();
  8.  
  9.     ?>
  10.  
  11.     <div class="test">
  12.     Some test content
  13.     </div>
  14.  
  15.     <?php
  16.  
  17.     $output = ob_get_contents();
  18.  
  19.     ob_end_clean();
  20.  
  21.     return $output;
  22. }
  23.  
  24. add_shortcode( 'ticker', 'shortcode_ticker' );
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement