Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: allow_empty_comment

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
1890                     'comment_author'       => null,
1891                     'comment_author_email' => null,
1892                     'comment_author_url'   => null,
1893                     'comment_parent'       => 0,
1894                     'user_id'              => 0,
1895                )
1896           );
1897
1898           /** This filter is documented in wp-includes/comment.php */
1899           $allow_empty = apply_filters( 'allow_empty_comment', false, $check );
1900
1901           if ( $allow_empty ) {
1902                return true;
1903           }
1904
1905           /*
1906            * Do not allow a comment to be created with missing or empty
1907            * comment_content. See wp_handle_comment_submission().
1908            */