Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_preprocess_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
1108            * Filters a comment after it is prepared for the database.
1109            *
1110            * Allows modification of the comment right after it is prepared for the database.
1111            *
1112            * @since 4.7.0
1113            *
1114            * @param array           $prepared_comment The prepared comment data for `wp_insert_comment`.
1115            * @param WP_REST_Request $request          The current request.
1116            */
1117           return apply_filters( 'rest_preprocess_comment', $prepared_comment, $request );
1118      }
1119
1120      /**
1121       * Retrieves the comment's schema, conforming to JSON Schema.
1122       *
1123       * @since 4.7.0
1124       * @access public
1125       *
1126       * @return array