WordPress.org

Make WordPress Core

Ticket #21596: wp_get_archives.php.patch

File wp_get_archives.php.patch, 755 bytes (added by jjminkle, 7 years ago)

svn diff

  • wp-includes/general-template.php

     
    867867
    868868        $defaults = array(
    869869                'type' => 'monthly', 'limit' => '',
     870                'posttype' => 'post',
    870871                'format' => 'html', 'before' => '',
    871872                'after' => '', 'show_post_count' => false,
    872873                'echo' => 1
     
    903904        }
    904905
    905906        //filters
    906         $where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
     907        $where = apply_filters( 'getarchives_where', "WHERE post_type = '$posttype' AND post_status = 'publish'", $r );
    907908        $join = apply_filters( 'getarchives_join', '', $r );
    908909
    909910        $output = '';