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 | |
// List of links for up to 10 of the most used categories in the last month. | |
$top_terms = prefix_get_top_terms( 'category' ); | |
echo '<ul>'; | |
foreach ( $top_terms as $top_term ) { | |
echo '<li><a href="' . get_term_link( $top_term ) . '">' . $top_term->name . '</a>'; | |
} | |
echo '</ul>'; | |
// List of links for up to 5 of the most used tags in the last 15 days. |
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 | |
/** | |
* A copy of WordPress' sanitize_file_name function that doesn't replace | |
* spaces with dashes. Use on the sanitize_file_name filter to stop WordPress | |
* replacing filenames with dashes. | |
* | |
* ...Or don't. It's probably a bad idea. | |
* | |
* @param string $sanitized_filename The previously sanitized filename. | |
* @param string $filename The original unsanitized filename. |