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