Skip to content
Create a gist now

Instantly share code, notes, and snippets.

color: #FFF;background-color: #5CB85C;text-decoration: none;
border-color: #4CAE4C;display: inline-block;padding: 6px 12px;margin-bottom: 0;
font-size: 14px;font-weight: normal;line-height: 1.428571429;text-align: center;
white-space: nowrap;vertical-align: middle;cursor: pointer;background-image: none;
border: 1px solid rgba(0, 0, 0, 0);border-radius: 4px;-webkit-user-select: none;
-moz-user-select: none;-ms-user-select: none;-o-user-select: none;user-select: none;
background-color: #448744;
p.text-center{text-align: center}
* Plugin Name: WP Appleton Call to Action Buttons
* Author: David Kryzaniak
//Tell WP we'd like to add a shortcode
'calltoaction', //Name of the shortcode [calltoaction]
'getCallToActionButton' //The function that "makes" the shortcode
function getCallToActionButton($atts,$content='Default'){
$atts = shortcode_atts(
'url'=>'/', //set the default href url
'rel'=>'' //set the rel (for rel="nofollow")
plugins_url( '/CallToAction.css', __FILE__ )
); //enqueue a style sheet
return '<p class="text-center">'. //make them centered
'<a class="fancy-button" rel="'.$atts['rel'].'" href="'.$atts['url'].'">'.$content.'</a>'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.