Olivia,
say to your developers to change just this in shortcodes.php:
- Added just 'target' => 'self'
- And target="_'.$target.'".
So it is nice and not forced upon users. Only used if someone use target="_blank" inside button shortcode.
// Button
public static function button($atts, $content='') {
extract(shortcode_atts(array(
'link' => '/',
'type' => 'default',
'style' => '',
'size' => '',
'icon' => '',
'target' => 'self'
), $atts));
$classNames = 'btn btn-info';
$linkContent = $content;
$styles = array('default' => 'btn-default', 'primary' => 'btn-primary', 'success' => 'btn-success',
'info' => 'btn-info', 'warning' => 'btn-warning', 'danger' => 'btn-danger', 'link' => 'btn-link');
$sizes = array('large' => 'btn-lg', 'small' => 'btn-sm', 'xsmall' => 'btn-xs');
if ($type === 'bootstrap') {
$classNames = 'btn';
array_key_exists(strtolower($style), $styles) ? $classNames .= ' ' . $styles[strtolower($style)] : '';
array_key_exists(strtolower($size), $sizes) ? $classNames .= ' ' . $sizes[strtolower($size)] : '';
}
if ($icon !== '') {
$linkContent = '<span class="' . esc_attr($icon) . '"> </span>' . $linkContent;
}
return '<a class="' . $classNames . '" href="' . esc_attr($link) . '" target="_'.$target.'">' . $linkContent . '</a>';
};
Olivia,
say to your developers to change just this in shortcodes.php:
- Added just **'target' => 'self'**
- And **target="_'.$target.'"**.
So it is nice and not forced upon users. Only used if someone use **target="_blank"** inside button shortcode.
// Button
public static function button($atts, $content='') {
extract(shortcode_atts(array(
'link' => '/',
'type' => 'default',
'style' => '',
'size' => '',
'icon' => '',
'target' => 'self'
), $atts));
$classNames = 'btn btn-info';
$linkContent = $content;
$styles = array('default' => 'btn-default', 'primary' => 'btn-primary', 'success' => 'btn-success',
'info' => 'btn-info', 'warning' => 'btn-warning', 'danger' => 'btn-danger', 'link' => 'btn-link');
$sizes = array('large' => 'btn-lg', 'small' => 'btn-sm', 'xsmall' => 'btn-xs');
if ($type === 'bootstrap') {
$classNames = 'btn';
array_key_exists(strtolower($style), $styles) ? $classNames .= ' ' . $styles[strtolower($style)] : '';
array_key_exists(strtolower($size), $sizes) ? $classNames .= ' ' . $sizes[strtolower($size)] : '';
}
if ($icon !== '') {
$linkContent = '<span class="' . esc_attr($icon) . '"> </span>' . $linkContent;
}
return '<a class="' . $classNames . '" href="' . esc_attr($link) . '" target="_'.$target.'">' . $linkContent . '</a>';
};