ensure categories provided to get_posts is in an array
This commit is contained in:
parent
4b4762f45c
commit
e1806534a3
|
@ -43,6 +43,8 @@ class ComicPressDBInterface {
|
||||||
function get_terminal_post_in_categories($categories, $first = true) {
|
function get_terminal_post_in_categories($categories, $first = true) {
|
||||||
$this->_prepare_wp_query();
|
$this->_prepare_wp_query();
|
||||||
|
|
||||||
|
if (!is_array($categories)) { $categories = array($categories); }
|
||||||
|
|
||||||
$sort_order = $first ? "asc" : "desc";
|
$sort_order = $first ? "asc" : "desc";
|
||||||
$terminal_comic_query = new WP_Query();
|
$terminal_comic_query = new WP_Query();
|
||||||
$terminal_comic_query->query(array(
|
$terminal_comic_query->query(array(
|
||||||
|
|
Loading…
Reference in New Issue