Skip to content

Instantly share code, notes, and snippets.

@bfintal
Created March 14, 2013 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfintal/1f5756cfc1545eae5244 to your computer and use it in GitHub Desktop.
Save bfintal/1f5756cfc1545eae5244 to your computer and use it in GitHub Desktop.
replace the contents of application/models/shortcodes/pricingtable.php with this
<?php
class BFIShortcodePricingtableModel extends BFIShortcodeModel implements iBFIShortcode {
const SHORTCODE = 'pricingtable';
public $class = '';
public function render($content = NULL, $unusedAttributeString = '') {
return "<div class='bfi_pricingtable $this->class' $unusedAttributeString>$content</div><div class='clearfix'></div>";
}
}
class BFIShortcodePricingtabModel extends BFIShortcodeModel implements iBFIShortcode {
const SHORTCODE = 'pricingtab';
public $size = '';
public $columns = '3';
public $title = '';
public $desc = '';
public $button = '';
public $link = '';
public $newwindow = false;
public $class = '';
public function render($content = NULL, $unusedAttributeString = '') {
$newwindow = $this->newwindow ? "target='_blank'" : '';
$bigTabClass = $this->size == 'large' ? 'big' : '';
$bigTabClass = $this->size == 'small' ? 'small' : $bigTabClass;
$desc = $this->desc ? "<div class='subtitle'>$this->desc</div>" : '';
$button = $this->button ? "<a href='$this->link' $newwindow>$this->button</a>" : '';
return do_shortcode("[col$this->columns class='$bigTabClass $this->class' $unusedAttributeString]
<h3>$this->title</h3>
<div class='description'><div>$content</div></div>
$desc
$button
[/col$this->columns]");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment