CPTP_Module_GetArchives::getarchives_where PHP Method

getarchives_where() public method

function modified by [steve]
public getarchives_where ( $where, $r )
    public function getarchives_where($where, $r)
    {
        $this->get_archives_where_r = $r;
        if (isset($r['post_type'])) {
            $where = str_replace('\'post\'', '\'' . $r['post_type'] . '\'', $where);
        }
        if (isset($r['taxonomy']) && is_array($r['taxonomy'])) {
            global $wpdb;
            $where = $where . " AND {$wpdb->term_taxonomy}.taxonomy = '" . $r['taxonomy']['name'] . "' AND {$wpdb->term_taxonomy}.term_id = '" . $r['taxonomy']['termid'] . "'";
        }
        return $where;
    }