// ========================================================================= // BUTTON SHORTCODE WITH ATTRIBUTES // ========================================================================= function btn_shortcode( $atts, $content = null ) { $a = shortcode_atts( array( 'href' => '#', 'text' => '' ), $atts ); return '<a class="btn-cta" href="' . esc_attr($a['href']) . '">' . esc_attr($a['text']) . '</a>'; } add_shortcode( 'button', 'btn_shortcode' );
Leave a Reply