/** * Is the query for a webcomic archive page? * * <code class="php"> * if ( is_webcomic_archive() ) { * // this is a webcomic archive page * } * * if ( is_post_type_archive( 'webcomic42' ) ) { * // this is the archive page for webcomic collection 42 * } * </code> * * @package Webcomic * @return boolean * @uses WebcomicTag::is_webcomic_archive() */ function is_webcomic_archive() { return WebcomicTag::is_webcomic_archive(); }
/** * Automagically integrate basic webcomic functionality. * * Reorders webcomics on post type and taxonomy archive pages so * that they appear in chronological order. * * @param object $query WP_Query object. * @uses WebcomicTag::is_webcomic_archive() * @uses WebcomicTag::is_webcomic_tax() * @filter string webcomic_integrate_sort Filters the sort order of webcomics on post type and taxonomy archive pages. */ public function integrate_sort_asc($query) { if (self::$integrate and $query->is_main_query() and (WebcomicTag::is_webcomic_archive() or WebcomicTag::is_webcomic_tax())) { $query->set('order', apply_filters('webcomic_integrate_sort', 'ASC')); } }