Skip to content

Commit

Permalink
Simplify implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Dec 11, 2024
1 parent 5399a7b commit 81092bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ function gutenberg_register_archive_link_field() {
array(
'get_callback' => function ( $post_object ) {
if ( isset( $post_object['has_archive'] ) && $post_object['has_archive'] ) {
$post_type = $post_object['slug'];
$archive_link = get_post_type_archive_link( $post_type );
$archive_link = get_post_type_archive_link( $post_object['slug'] );
return $archive_link ? $archive_link : '';
}
return '';
Expand Down

0 comments on commit 81092bf

Please sign in to comment.