Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WP 5.9 deprecation notice with who in WP_User_Query #701

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/php/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ function users_select_form( $selected = null, $args = null ) {
extract($parsed_args, EXTR_SKIP);

$args = array(
'who' => 'authors',
'capability' => 'publish_posts',
'fields' => array(
'ID',
'display_name',
Expand All @@ -478,7 +478,7 @@ function users_select_form( $selected = null, $args = null ) {

<?php if( !empty($users) ) : ?>
<ul class="<?php echo esc_attr( $list_class ) ?>">
<?php foreach( $users as $user ) :
<?php foreach( $users as $user ) :
$checked = ( in_array($user->ID, $selected) ) ? 'checked="checked"' : '';
// Add a class to checkbox of current user so we know not to add them in notified list during notifiedMessage() js function
$current_user_class = ( get_current_user_id() == $user->ID ) ? 'class="post_following_list-current_user" ' : '';
Expand Down
Loading