IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1631 | 1631 | if ( !is_array($cache) ) |
1632 | 1632 | $cache = array(); |
1633 | 1633 | |
| 1634 | $post_type = apply_filters('get_calendar_post_type', 'post'); |
| 1635 | |
1634 | 1636 | // Quick check. If we have no posts at all, abort! |
1635 | 1637 | if ( !$posts ) { |
1636 | | $gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1"); |
| 1638 | $gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = '".$post_type."' AND post_status = 'publish' LIMIT 1"); |
1637 | 1639 | if ( !$gotsome ) { |
1638 | 1640 | $cache[ $key ] = ''; |
1639 | 1641 | wp_cache_set( 'get_calendar', $cache, 'calendar' ); |
… |
… |
|
1674 | 1676 | $previous = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year |
1675 | 1677 | FROM $wpdb->posts |
1676 | 1678 | WHERE post_date < '$thisyear-$thismonth-01' |
1677 | | AND post_type = 'post' AND post_status = 'publish' |
| 1679 | AND post_type = '".$post_type."' AND post_status = 'publish' |
1678 | 1680 | ORDER BY post_date DESC |
1679 | 1681 | LIMIT 1"); |
1680 | 1682 | $next = $wpdb->get_row("SELECT MONTH(post_date) AS month, YEAR(post_date) AS year |
1681 | 1683 | FROM $wpdb->posts |
1682 | 1684 | WHERE post_date > '$thisyear-$thismonth-{$last_day} 23:59:59' |
1683 | | AND post_type = 'post' AND post_status = 'publish' |
| 1685 | AND post_type = '".$post_type."' AND post_status = 'publish' |
1684 | 1686 | ORDER BY post_date ASC |
1685 | 1687 | LIMIT 1"); |
1686 | 1688 | |
… |
… |
|
1736 | 1738 | // Get days with posts |
1737 | 1739 | $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date) |
1738 | 1740 | FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' |
1739 | | AND post_type = 'post' AND post_status = 'publish' |
| 1741 | AND post_type = '".$post_type."' AND post_status = 'publish' |
1740 | 1742 | AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N); |
1741 | 1743 | if ( $dayswithposts ) { |
1742 | 1744 | foreach ( (array) $dayswithposts as $daywith ) { |
… |
… |
|
1754 | 1756 | ."FROM $wpdb->posts " |
1755 | 1757 | ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' " |
1756 | 1758 | ."AND post_date <= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59' " |
1757 | | ."AND post_type = 'post' AND post_status = 'publish'" |
| 1759 | ."AND post_type = '".$post_type."' AND post_status = 'publish'" |
1758 | 1760 | ); |
1759 | 1761 | if ( $ak_post_titles ) { |
1760 | 1762 | foreach ( (array) $ak_post_titles as $ak_post_title ) { |