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
1198            * Filters a comment after it is prepared for the database.
1199            *
1200            * Allows modification of the comment right after it is prepared for the database.
1201            *
1202            * @since 4.7.0
1203            *
1204            * @param array           $prepared_comment The prepared comment data for `wp_insert_comment`.
1205            * @param WP_REST_Request $request          The current request.
1206            */
1207           return apply_filters( 'rest_preprocess_comment', $prepared_comment, $request );
1208      }
1209
1210      /**
1211       * Retrieves the comment's schema, conforming to JSON Schema.
1212       *
1213       * @since 4.7.0
1214       *
1215       * @return array
1216       */