Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_prepare_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
955            *
956            * Allows modification of the comment right before it is returned.
957            *
958            * @since 4.7.0
959            *
960            * @param WP_REST_Response  $response The response object.
961            * @param WP_Comment        $comment  The original comment object.
962            * @param WP_REST_Request   $request  Request used to generate the response.
963            */
964           return apply_filters( 'rest_prepare_comment', $response, $comment, $request );
965      }
966
967      /**
968       * Prepares links for the request.
969       *
970       * @since 4.7.0
971       *
972       * @param WP_Comment $comment Comment object.
973       * @return array Links for the given comment.