Custom Buttons

You can customize the default buttons that are registered by Delightful Downloads using the dedo_get_buttons filter. This will allow you to add or remove button styles that are used by the [ddownload] shortcode and will also affect which buttons are shown by the shortcode generator. In addition, any custom buttons can be selected as the default button style in the Settings screen under the Shortcodes tab.

Don’t know CSS, HTML or PHP? Check out the Customizer Add-On.

Custom Buttons Shortcode Generator

Custom Buttons Settings Screen

The following buttons are registered by default:

Add Buttons

To add a new button to those already registered by Delightful Downloads simply add a new key to the $buttons array:

To completely replace the default buttons simply overwrite the $buttons array:

You use a custom button like so, [ddownload id="123" style="button" button="bright_pink"]. Remember that you will need to style the button using CSS and the class name button-bright-pink.

Remove Buttons

Existing buttons can be removed by simply unsetting them. The following snippet will remove the red and yellow buttons:

All of the above code snippets should be added to your theme’s function.php file.