Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: akismet_excluded_comment_types

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
520            * comments that could have been checked by Akismet. Allow these comments
521            * to be excluded from the "approved comment count" query in order to
522            * avoid artificially inflating the approved comment count.
523            *
524            * @param array $comment_types An array of comment types that won't be considered
525            *                             when counting a user's approved comments.
526            *
527            * @since 4.2.2
528            */
529           $excluded_comment_types = apply_filters( 'akismet_excluded_comment_types', array() );
530
531           $comment_type_where = '';
532
533           if ( is_array( $excluded_comment_types ) && ! empty( $excluded_comment_types ) ) {
534                $excluded_comment_types = array_unique( $excluded_comment_types );
535
536                foreach ( $excluded_comment_types as $excluded_comment_type ) {
537                     $comment_type_where .= $wpdb->prepare( ' AND comment_type <> %s ', $excluded_comment_type );
538                }