Description: Renders an unordered list of years with months, linked to corresponding date-based taxonomy archive, nested therein.
Description: Add support for date-based taxonomy archives. Render an unordered list of years with months, linked to corresponding date-based taxonomy archive, nested therein.
Author: Erick Hitter
Version: 0.1
Version: 0.2
Author URI: http://www.ethitter.com/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
classDate_Based_Taxonomy_Archives{
...
...
@@ -33,13 +47,13 @@ class Date_Based_Taxonomy_Archives {
$query=$wpdb->prepare("SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts$join$where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC $limit");
...
...
@@ -68,14 +82,14 @@ class Date_Based_Taxonomy_Archives {
//Generate cache key, check cache, query DB if necessary and cache results
Renders an unordered list of years with months, linked to corresponding date-based taxonomy archive, nested therein.
\ No newline at end of file
Add support for date-based taxonomy archives. Also includes a function for outputting archive links.
== Description ==
Add support for date-based taxonomy archives.
Includes a function for rendering an unordered list of years with months, linked to corresponding date-based taxonomy archive, nested therein.
**This plugin is intended for use by plugin and theme developers. It simply adds support for date-based taxonomy archives, but has no native user interface.**
== Installation ==
1. Upload date-based-taxonomy-archives to /wp-content/plugins/.
2. Activate plugin through the WordPress Plugins menu.
3. Go to Settings > Permalinks and click _Save Changes_ to refresh permalinks.
== Frequently Asked Questions ==
= How do I use this plugin? =
Add the function `date_based_taxonomy_archives()` to any template element that appears on a taxonomy archive. The function accepts an array containing the following arguments:
* `taxonomies` - array of taxonomy slugs.
* `show_post_counts` - boolean value specifying whether or not to display show counts in parenthesis after archive links.
* `limit` - integer specifying the number of archive links to show. Omit to show all archive links for the specified taxonomy.
* `before` - output to display before archive link.
* `after` - output to display after archive link.
* `echo` - boolean value specifying whether to echo or return archive links.
= What filters does this plugin include? =
* `date_based_taxonomy_archives_args` - applied to arguments passed to `date_based_taxonomy_archives()` at runtime.