Changeset 140449
- Timestamp:
- 07/29/2009 11:56:22 AM (17 years ago)
- Location:
- charted-archives/trunk
- Files:
-
- 2 edited
-
ChartedArchives.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
charted-archives/trunk/ChartedArchives.php
r140182 r140449 4 4 Plugin URI: http://www.bos89.nl/wordpress-charted-archives-plugin/ 5 5 Description: Show your archives by month in a bar chart, after an idea from John Nunemaker. 6 Version: 1. 26 Version: 1.3 7 7 Author: M. Stegink 8 8 Author URI: http://www.bos89.nl/ … … 15 15 function Charted_Archives($rows) { 16 16 global $wpdb; 17 $table = $wpdb->prefix . 'posts'; 17 18 if ($rows == '' || $rows == 0) { $rows = 7; } 18 $sql = 'select count(*) as n, monthname(post_date) as monthname, month(post_date) as month, year(post_date) as year from wp_postswhere post_type = "post" group by year, month order by year desc, month desc limit ' . $rows;19 $sql = 'select count(*) as n, monthname(post_date) as monthname, month(post_date) as month, year(post_date) as year from ' . $table . ' where post_type = "post" group by year, month order by year desc, month desc limit ' . $rows; 19 20 $months = $wpdb->get_results($sql); 20 21 $months = array_reverse($months); -
charted-archives/trunk/readme.txt
r140186 r140449 50 50 51 51 * Added a shortcode on user request 52 53 = 1.3 = 54 55 * Solved issue with non-standard database table prefix
Note: See TracChangeset
for help on using the changeset viewer.