Last active
September 11, 2015 19:29
-
-
Save A5hleyRich/dbbaebf7c9d8e69d43c8 to your computer and use it in GitHub Desktop.
Delightful Downloads Custom Outputs
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_output( $styles ) { | |
$styles['icon_link'] = array( | |
'name' => __( 'Icon Link', 'delightful-downloads' ), | |
'format' => '<div class="download_container"><i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title%</a></div>' | |
); | |
return $styles; | |
} | |
add_filter( 'dedo_get_styles', 'dedo_custom_output' ); |
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 | |
$styles = array( | |
'button' => array( | |
'name' => __( 'Button', 'delightful-downloads' ), | |
'format' => '<a href="%url%" title="%text%" rel="nofollow" class="%class%">%text%</a>' | |
), | |
'link' => array( | |
'name' => __( 'Link', 'delightful-downloads' ), | |
'format' => '<a href="%url%" title="%text%" rel="nofollow" class="%class%">%text%</a>' | |
), | |
'plain_text' => array( | |
'name' => __( 'Plain Text', 'delightful-downloads' ), | |
'format' => '%url%' | |
) | |
); |
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_output( $styles ) { | |
$new_styles['icon_link'] = array( | |
'name' => __( 'Icon Link', 'delightful-downloads' ), | |
'format' => '<div class="download_container"><i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title%</a></div>' | |
); | |
return $new_styles; | |
} | |
add_filter( 'dedo_get_styles', 'dedo_custom_output' ); |
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_output( $styles ) { | |
unset( $styles['plain_text'] ); | |
return $styles; | |
} | |
add_filter( 'dedo_get_styles', 'dedo_custom_output' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment