Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_prepare_revision

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
633            *
634            * Allows modification of the revision right before it is returned.
635            *
636            * @since 4.7.0
637            *
638            * @param WP_REST_Response $response The response object.
639            * @param WP_Post          $post     The original revision object.
640            * @param WP_REST_Request  $request  Request used to generate the response.
641            */
642           return apply_filters( 'rest_prepare_revision', $response, $post, $request );
643      }
644
645      /**
646       * Checks the post_date_gmt or modified_gmt and prepare any post or
647       * modified date for single post output.
648       *
649       * @since 4.7.0
650       *
651       * @param string      $date_gmt GMT publication time.