Skip to content

Commit

Permalink
fix select rule issue in all author page (#1823)
Browse files Browse the repository at this point in the history
  • Loading branch information
Armanul46 authored Aug 29, 2024
1 parent 2726c7a commit 9b1c2c0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions includes/model/All_Authors.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,17 @@ public function author_list( $type = '' ) {

$args['orderby'] = 'display_name';

if( 'all' != $all_authors_select_role ) {
$args['role__in'] = array( $all_authors_select_role );
if ( 'author' == $all_authors_select_role ) {
$meta_query = array(
array(
'key' => '_user_type',
'value' => 'author',
'compare' => '='
)
);
$args['meta_query'] = $meta_query;
} elseif ( 'all' != $all_authors_select_role ) {
$args['role__in'] = array( $all_authors_select_role );
}

if( ! empty( $_REQUEST['alphabet'] ) && 'ALL' != $_REQUEST['alphabet'] ) {
Expand Down

0 comments on commit 9b1c2c0

Please sign in to comment.