Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: users_have_additional_content

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
304           /**
305            * Filters whether the users being deleted have additional content
306            * associated with them outside of the `post_author` and `link_owner` relationships.
307            *
308            * @since 5.2.0
309            *
310            * @param bool  $users_have_additional_content Whether the users have additional content. Default false.
311            * @param int[] $user_ids                      Array of IDs for users being deleted.
312            */
313           $users_have_content = (bool) apply_filters( 'users_have_additional_content', false, $user_ids );
314
315           if ( $user_ids && ! $users_have_content ) {
316                if ( $wpdb->get_var(
317                     "SELECT ID FROM {$wpdb->posts}
318                     WHERE post_author IN( " . implode( ',', $user_ids ) . ' )
319                     LIMIT 1'
320                ) ) {
321                     $users_have_content = true;
322                } elseif ( $wpdb->get_var(