Skip to content

Commit

Permalink
Merge pull request #134 from RRZE-Webteam/dev
Browse files Browse the repository at this point in the history
Update authors.php
  • Loading branch information
rvdforst authored Aug 10, 2023
2 parents d099116 + 6bfcb03 commit bb85119
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/authors/authors.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public function init()
add_action('admin_head', array($this, 'remove_quick_edit_authors_box'));

add_filter('posts_where', array($this, 'posts_where_filter'), 10, 2);
add_filter('posts_join', array($this, 'posts_join_filter'));
add_filter('posts_groupby', array($this, 'posts_groupby_filter'));
add_filter('posts_join', array($this, 'posts_join_filter'), 10, 2);
add_filter('posts_groupby', array($this, 'posts_groupby_filter'), 10, 2);

add_action('load-edit.php', array($this, 'load_edit'));

Expand Down Expand Up @@ -862,9 +862,9 @@ public function posts_where_filter($where, $wp_query)
return $where;
}

public function posts_join_filter($join)
public function posts_join_filter($join, $wp_query)
{
global $wp_query, $wpdb;
global $wpdb;

if (method_exists($wp_query, 'is_author') && $wp_query->is_author()) {
if (!$this->is_post_type_enabled($wp_query->query_vars['post_type'], $this->module)) {
Expand All @@ -890,9 +890,9 @@ public function posts_join_filter($join)
return $join;
}

public function posts_groupby_filter($groupby)
public function posts_groupby_filter($groupby, $wp_query)
{
global $wp_query, $wpdb;
global $wpdb;

if (method_exists($wp_query, 'is_author') && $wp_query->is_author()) {
if (!$this->is_post_type_enabled($wp_query->query_vars['post_type'], $this->module)) {
Expand Down

0 comments on commit bb85119

Please sign in to comment.