diff --git a/lib/rest-api.php b/lib/rest-api.php index d69e177009b32..a85b6c7eaa56c 100644 --- a/lib/rest-api.php +++ b/lib/rest-api.php @@ -43,7 +43,7 @@ function gutenberg_register_archive_link_field() { 'type', 'archive_link', array( - 'get_callback' => function ( $post_object ) { + 'get_callback' => static function ( $post_object ) { return (string) get_post_type_archive_link( $post_object['slug'] ) }, 'update_callback' => null,