diff --git a/src/Uplink/Admin/Fields/Field.php b/src/Uplink/Admin/Fields/Field.php index 56fe77eb..ede06230 100644 --- a/src/Uplink/Admin/Fields/Field.php +++ b/src/Uplink/Admin/Fields/Field.php @@ -237,22 +237,11 @@ public function get_render_html(): string { $args = [ 'field' => $this, + 'resource' => $this->resource, 'group' => $this->group->get_name( $this->get_slug() ), ]; - if ( $this->resource->is_using_oauth() ) { - ob_start(); - - if ( $this->resource->oauth_requires_license_key() ) { - echo $this->view->render( self::VIEW, $args ); - } - - UplinkNamespace\render_authorize_button( $this->get_slug() ); - - $html = (string) ob_get_clean(); - } else { - $html = $this->view->render( self::VIEW, $args ); - } + $html = $this->view->render( self::VIEW, $args ); /** * Filters the field HTML. diff --git a/src/views/admin/fields/field.php b/src/views/admin/fields/field.php index ef5134f9..d51b2e26 100644 --- a/src/views/admin/fields/field.php +++ b/src/views/admin/fields/field.php @@ -1,11 +1,13 @@ get_nonce_field(); ?> + is_using_oauth() ) : ?> + slug, $resource->get_home_url(), $resource->license_key); ?> + should_show_label() ) : ?>