Skip to content

Commit

Permalink
Merge pull request #631 from Automattic/revert-580-master
Browse files Browse the repository at this point in the history
Revert "BUGFIX regular expression in posts_where_filter()"
  • Loading branch information
rebeccahum authored Dec 7, 2018
2 parents 938f7a0 + 22051f1 commit 6170df0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion co-authors-plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ function posts_where_filter( $where, $query ) {
$current_user_query = $wpdb->term_taxonomy . '.taxonomy = \'' . $this->coauthor_taxonomy . '\' AND ' . $wpdb->term_taxonomy . '.term_id = \'' . $current_coauthor_term->term_id . '\'';
$this->having_terms .= ' ' . $wpdb->term_taxonomy . '.term_id = \'' . $current_coauthor_term->term_id . '\' OR ';

$where = preg_replace( '/(\b(?:' . $wpdb->posts . '\.)?post_author\s*=\s*(' . get_current_user_id() . ')( |\)))/', $current_user_query, $where, -1 ); #' . $wpdb->postmeta . '.meta_id IS NOT NULL AND}
$where = preg_replace( '/(\b(?:' . $wpdb->posts . '\.)?post_author\s*=\s*(' . get_current_user_id() . '))/', $current_user_query, $where, - 1 ); #' . $wpdb->postmeta . '.meta_id IS NOT NULL AND}
}
}

Expand Down

0 comments on commit 6170df0

Please sign in to comment.