Last active
September 11, 2015 19:35
-
-
Save A5hleyRich/ccbb933c1a62332b0f9c to your computer and use it in GitHub Desktop.
Delightful Downloads Custom Lists
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 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
<?php | |
$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
<?php | |
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
<?php | |
function custom_list( $lists ) { | |
unset( $lists['title_filesize'] ); | |
return $lists; | |
} | |
add_filter( 'dedo_get_lists', 'custom_list' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment