add isset() check for class attributes in button shortcode as it was causing php error
This commit is contained in:
parent
a98d9aa94d
commit
8d2a91ed93
|
@ -133,7 +133,7 @@ add_filter( 'wp_mail_from_name', 'barebones_mail_from_name' );
|
|||
|
||||
function button_shortcode( $atts, $content = null )
|
||||
{
|
||||
$atts['class'] = $atts['class'] ? $atts['class'] : 'btn';
|
||||
$atts['class'] = isset($atts['class']) ? $atts['class'] : 'btn';
|
||||
|
||||
return '<a class="' . $atts['class'] . '" href="' . $atts['link'] . '">' . $content . '</a>';
|
||||
}
|
||||
|
@ -174,4 +174,3 @@ function barebones_tiny_mce_before_init( $settings )
|
|||
}
|
||||
|
||||
add_filter( 'tiny_mce_before_init', 'barebones_tiny_mce_before_init' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue