blockquote.php in Bootstrap Theme Shortcodes 7
File
inc/elements/blockquote.php
View source
<?php
function bs_shortcodes_shortcode_blockquote($attrs, $text) {
$attrs = shortcode_attrs(array(
'blockquote' => '',
'source' => '',
), $attrs);
$blockquote = url($attrs['blockquote']);
if ($text) {
$source = empty($attrs['source']) ? check_plain($text) : check_plain($attrs['source']);
$source = '<footer>- <cite title="Source Title">' . $source . '</cite></footer>';
return '<blockquote">' . $text . $source . '</blockquote>';
}
else {
$text = empty($attrs['text']) ? check_plain($text) : check_plain($attrs['text']);
$text = $text;
$source = empty($attrs['source']) ? check_plain($text) : check_plain($attrs['source']);
$source = '<footer>- <cite title="Source Title">' . $source . '</cite></footer>';
return '<blockquote">' . $text . $source . '</blockquote>';
}
return $blockquote;
}
function bs_shortcodes_shortcode_blockquote_tip($format, $long) {
$output = array();
$output[] = '<p><strong>' . t('[blockquote]This is your normal blockquote area, it has no settings[/blockquote]') . '</strong>';
if ($long) {
$output[] = t('Wraps content in a styled blockquote.') . '</p>';
$output[] = '<p> </p>';
}
else {
$output[] = t('Wraps content in a styled blockquote.') . '</p>';
}
return implode(' ', $output);
}
function bs_shortcodes_shortcode_blockquote_reverse($attrs, $text) {
$attrs = shortcode_attrs(array(
'blockquoter' => '',
'sourcer' => '',
), $attrs);
$blockquoter = url($attrs['blockquoter']);
if ($text) {
$sourcer = empty($attrs['sourcer']) ? check_plain($text) : check_plain($attrs['sourcer']);
$sourcer = '<footer><cite title="Source Title">' . $sourcer . ' -</cite></footer>';
return '<blockquote class="blockquote-reverse">' . $text . $sourcer . '</blockquote>';
}
else {
return $text;
}
return $blockquote_reverse;
}
function bs_shortcodes_shortcode_blockquote_reverse_tip($format, $long) {
$output = array();
$output[] = '<p><strong>' . t('[blockquote_reverse]This is your normal blockquote area, it has no settings[/blockquote_reverse]') . '</strong>';
if ($long) {
$output[] = t('Wraps content in a styled blockquote.') . '</p>';
$output[] = '<p> </p>';
}
else {
$output[] = t('Wraps content in a styled blockquote.') . '</p>';
}
return implode(' ', $output);
}