Skip to content

Commit

Permalink
refactor(Admin/Fields) always filter the auth button HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Sep 4, 2024
1 parent 0337546 commit bf5758e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Uplink/Admin/Fields/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,18 +249,22 @@ public function get_render_html(): string {

UplinkNamespace\render_authorize_button( $this->get_slug() );

return (string) ob_get_clean();
$html = (string) ob_get_clean();
} else {
$html = $this->view->render( self::VIEW, $args );
}

$html = $this->view->render( self::VIEW, $args );

/**
* Filters the field HTML.
*
* @param string $html The HTML.
* @param string $slug The plugin slug.
*/
return apply_filters( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/license_field_html', $html, $this->get_slug() );
return apply_filters(
'stellarwp/uplink/' . Config::get_hook_prefix() . '/license_field_html',
$html,
$this->get_slug()
);
}

/**
Expand Down

0 comments on commit bf5758e

Please sign in to comment.