Skip to content

Commit

Permalink
Add webcomic_integrate_sort filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Sisk committed Mar 17, 2013
1 parent 8308db7 commit da56393
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webcomic.php
Original file line number Diff line number Diff line change
Expand Up @@ -1623,10 +1623,11 @@ public function the_content( $content ) {
* @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', 'ASC' );
$query->set( 'order', apply_filters( 'webcomic_integrate_sort', 'ASC' ) );
}
}

Expand Down

0 comments on commit da56393

Please sign in to comment.