File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3434 "lint" : " parallel-lint -e php --no-colors --exclude vendor ." ,
3535 "phpcs" : " phpcs" ,
3636 "phpcs:fix" : " phpcbf" ,
37- "phpstan" : " phpstan --ansi --memory-limit=1G" ,
37+ "phpstan" : " phpstan analyze --ansi --memory-limit=1G" ,
3838 "suite" : [
3939 " @lint" ,
4040 " @phpcs" ,
Original file line number Diff line number Diff line change @@ -343,12 +343,13 @@ function register_preview_link_hooks_for_all_draft_post_types() {
343343/**
344344 * Adds the preview link to rest responses.
345345 *
346- * @param WP_REST_Response $response The rest response object.
347- * @param WP_Post $post Post object.
346+ * @param WP_HTTP_Response $response The rest response object.
347+ * @param WP_REST_Server $post Post object.
348+ * @param WP_REST_Request $request The request object.
348349 *
349350 * @return WP_REST_Response The rest response object.
350351 */
351- function rest_post_dispatch ( $ response , $ post ) {
352+ function rest_post_dispatch ( $ response , $ post, $ request ) {
352353
353354 if ( isset ( $ post ->post_status ) && 'draft ' === $ post ->post_status ) {
354355 $ response ->data ['link ' ] = get_preview_post_link ( $ post ->ID );
You can’t perform that action at this time.
0 commit comments