Skip to content

Commit

Permalink
Fix: Remove WP_Post type hint from prefill_post_content (#13430)
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Birchler <[email protected]>
  • Loading branch information
AnuragVasanwala and swissspidy authored Jul 26, 2023
1 parent 404bbd4 commit b66f865
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions includes/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,14 @@ public function admin_body_class( $class ) {
* @since 1.0.0
*
* @param string|mixed $content Default post content.
* @param WP_Post $post Post object.
* @param WP_Post|null $post Post object.
* @return string|mixed Pre-filled post content if applicable, or the default content otherwise.
*/
public function prefill_post_content( $content, WP_Post $post ) {
public function prefill_post_content( $content, ?WP_Post $post ) {
if ( ! $post ) {
return $content;
}

if ( ! isset( $_GET['from-web-story'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return $content;
}
Expand Down

0 comments on commit b66f865

Please sign in to comment.