SHARE
TWEET

Untitled

a guest Oct 30th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. if ( empty( $attributes['data'] ) ) {
  3.     return;
  4. }
  5.  
  6. $id = 'testimonial-' . ( $attributes['id'] ?? '' );
  7.  
  8. $buttons = mb_get_block_field( 'btn_group' );
  9. foreach ( $buttons as $button ) {
  10.     $text          = $button['btn_txt'] ?? 'Click me';
  11.     $url           = $button['btn_url'] ?? '#';
  12.     $stacked       = $button['btn_stacked'] ?? false;
  13.     $stacked_style = $stacked ? 'stacked' : '';
  14.     $style         = $button['btn_style'] ?? 'standard';
  15.  
  16.     echo "<a href='$url' class='$stacked $style'>$text</a>";
  17. }
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