Last active
September 11, 2015 19:23
-
-
Save A5hleyRich/87d446a3ea9f577fc9ce to your computer and use it in GitHub Desktop.
Delightful Downloads Custom Buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dedo_custom_button( $buttons ) { | |
$buttons['custom'] = array( | |
'name' => __( 'Custom Button', 'delightful-downloads' ), | |
'class' => 'button-custom' | |
); | |
return $buttons; | |
} | |
add_filter( 'dedo_get_buttons', 'dedo_custom_button' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$buttons = array( | |
'black' => array( | |
'name' => __( 'Black', 'delightful-downloads' ), | |
'class' => 'button-black' | |
), | |
'blue' => array( | |
'name' => __( 'Blue', 'delightful-downloads' ), | |
'class' => 'button-blue' | |
), | |
'grey' => array( | |
'name' => __( 'Grey', 'delightful-downloads' ), | |
'class' => 'button-grey' | |
), | |
'green' => array( | |
'name' => __( 'Green', 'delightful-downloads' ), | |
'class' => 'button-green' | |
), | |
'purple' => array( | |
'name' => __( 'Purple', 'delightful-downloads' ), | |
'class' => 'button-purple' | |
), | |
'red' => array( | |
'name' => __( 'Red', 'delightful-downloads' ), | |
'class' => 'button-red' | |
), | |
'yellow' => array( | |
'name' => __( 'Yellow', 'delightful-downloads' ), | |
'class' => 'button-yellow' | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dedo_custom_button( $buttons ) { | |
$custom_buttons['bright_pink'] = array( | |
'name' => __( 'Bright Pink', 'delightful-downloads' ), | |
'class' => 'button-bright-pink' | |
); | |
return $custom_buttons; | |
} | |
add_filter( 'dedo_get_buttons', 'dedo_custom_button' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dedo_custom_button( $buttons ) { | |
unset( $buttons['red'] ); | |
unset( $buttons['yellow'] ); | |
return $buttons; | |
} | |
add_filter( 'dedo_get_buttons', 'dedo_custom_button' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment