SHARE
TWEET

Untitled

a guest Feb 21st, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ction ot_shortcode_box($atts, $content = '') {
  2.     extract(
  3.         shortcode_atts(
  4.             array(
  5.                 'type' => '',
  6.                 'title' => ''
  7.             ),
  8.             $atts
  9.         )
  10.     );
  11.  
  12.     if ($type === 'box1') {
  13.         return '<div class="box box1"><div class="box-title"><i class="fas fa-bookmark"></i>'.$title.'</div><div class="box-content">'.$content.'</div></div>';
  14.     }
  15.    
  16.     if ($type === 'box2') {
  17.         return '<div class="box box2"><div class="box-title"><i class="fas fa-shapes"></i>'.$title.'</div><div class="box-content">'.$content.'</div></div>';
  18.     }
  19.  
  20.     return '';
  21. }
  22. add_shortcode('box', 'ot_shortcode_box');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top