Last active
August 29, 2015 14:17
-
-
Save A5hleyRich/d112894641aa96159f87 to your computer and use it in GitHub Desktop.
Delightful Download Docs
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
$lists = array( | |
'title' => array( | |
'name' => __( 'Title', 'delightful-downloads' ), | |
'format' => '<a href="%url%" title="%title%" rel="nofollow">%title%</a>' | |
), | |
'title_date' => array( | |
'name' => __( 'Title (Date)', 'delightful-downloads' ), | |
'format' => '<a href="%url%" title="%title% (%date%)" rel="nofollow">%title% (%date%)</a>' | |
), | |
'title_count' => array( | |
'name' => __( 'Title (Count)', 'delightful-downloads' ), | |
'format' => '<a href="%url%" title="%title% (Downloads: %count%)" rel="nofollow">%title% (Downloads: %count%)</a>' | |
), | |
'title_filesize' => array( | |
'name' => __( 'Title (Filesize)', 'delightful-downloads' ), | |
'format' => '<a href="%url%" title="%title% (%filesize%)" rel="nofollow">%title% (%filesize%)</a>' | |
) | |
); |
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
function custom_list( $lists ) { | |
$lists['icon_date'] = array( | |
'name' => 'Icon (Date)', | |
'format' => '<i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title% - %date%</a>' | |
); | |
return $lists; | |
} | |
add_filter( 'dedo_get_lists', 'custom_list' ); |
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
function custom_list( $lists ) { | |
$new_lists['icon_date'] = array( | |
'name' => 'Icon (Date)', | |
'format' => '<i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title% - %date%</a>' | |
); | |
return $new_lists; | |
} | |
add_filter( 'dedo_get_lists', 'custom_list' ); |
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
function custom_list( $lists ) { | |
unset( $lists['title_filesize'] ); | |
return $lists; | |
} | |
add_filter( 'dedo_get_lists', 'custom_list' ); |
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
$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
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
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
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