|
|
@ -44,12 +44,18 @@ function call_to_action( $atts ) { |
|
|
|
$atts = shortcode_atts( |
|
|
|
$atts = shortcode_atts( |
|
|
|
[ |
|
|
|
[ |
|
|
|
'link' => '#', |
|
|
|
'link' => '#', |
|
|
|
|
|
|
|
'url' => false, |
|
|
|
'text' => 'Call To Action', |
|
|
|
'text' => 'Call To Action', |
|
|
|
], |
|
|
|
], |
|
|
|
$atts, |
|
|
|
$atts, |
|
|
|
'aldine_call_to_action' |
|
|
|
'aldine_call_to_action' |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Fallback for shortcodes using the old url attribute |
|
|
|
|
|
|
|
if ( $atts['link'] === '#' && $atts['url'] ) { |
|
|
|
|
|
|
|
$atts['link'] = $atts['url']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return sprintf( |
|
|
|
return sprintf( |
|
|
|
'<a class="call-to-action" href="%1$s" title="%2$s">%2$s</a>', |
|
|
|
'<a class="call-to-action" href="%1$s" title="%2$s">%2$s</a>', |
|
|
|
$atts['link'], |
|
|
|
$atts['link'], |
|
|
|