Skip to content

Commit a8bdb73

Browse files
committed
Revert typo in composer file.
1 parent 2421625 commit a8bdb73

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

plugins/faustwp/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
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",

plugins/faustwp/includes/replacement/callbacks.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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 );

0 commit comments

Comments
 (0)