Skip to content

Commit

Permalink
Merge branch 'dev/5.6' into feature/delete-subscribers-with-no-posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Daniel Deepak committed Nov 25, 2017
2 parents 517dbb8 + 3c438c2 commit c237de8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/base/users/class-bd-user-meta-box-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@ protected function delete_users( $options, $delete_options ) {
* @access protected
*
* @param array $delete_options Delete Options.
* @param object $user User objet that needs to be deleted.
* @param object $user User object that needs to be deleted.
*
* @return bool True if the user can be deleted, false otherwise.
*/
protected function can_delete_by_post_count( $delete_options, $user ) {
if ( $delete_options['no_posts'] &&
array_key_exists( 'post_type', $delete_options ) &&
count_user_posts( $user->ID, $delete_options['post_type'] ) > 0 ) {
if ( $delete_options['no_posts'] && count_user_posts( $user->ID, get_post_types( array( 'public' => true ) ) ) > 0 ) {
return false;
}

Expand Down

0 comments on commit c237de8

Please sign in to comment.