WordPress.org

Make WordPress Core

Ticket #36860: 36860.diff

File 36860.diff, 933 bytes (added by garrett-eclipse, 15 months ago)

Initial Concept

  • src/wp-admin/users.php

     
    234234                        $userids = array_map( 'intval', (array) $_REQUEST['users'] );
    235235                }
    236236
    237                 $users_have_content = false;
     237                /**
     238                  * Filter to setup $users_have_content, also known as the users have content flag, before WordPress default checks.
     239                  *
     240                  * @since ###
     241                  *
     242                  * @param boolean $users_have_content The flag for users have content.
     243                  */
     244                $users_have_content = apply_filters( 'users_have_content', false, $userids ) );
     245
    238246                if ( $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_author IN( " . implode( ',', $userids ) . ' ) LIMIT 1' ) ) {
    239247                        $users_have_content = true;
    240248                } elseif ( $wpdb->get_var( "SELECT link_id FROM {$wpdb->links} WHERE link_owner IN( " . implode( ',', $userids ) . ' ) LIMIT 1' ) ) {