Skip to content

Commit

Permalink
Update YoastSeoSchemaController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 24, 2024
1 parent 017990f commit a7a107d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions php/YoastSeoSchemaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public function maybe_add_expires( $data ) {
return $data;
}

if ( ! \post_type_supports( \get_post_type( $post_id ), 'expiration' ) ) {
return $data;
}

$data['expires'] = $expiration_date->format( \DATE_ATOM );

return $data;
Expand Down

0 comments on commit a7a107d

Please sign in to comment.