Skip to content

Commit

Permalink
chore: remove deprecated plugin wrapper (#6)
Browse files Browse the repository at this point in the history
### What this PR does?
移除对已过时的 PluginWrapper 的引用

see also halo-dev/halo#6243 for more details

```release-note
None
```
  • Loading branch information
guqing authored Jul 2, 2024
1 parent af883ef commit d7cde80
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import java.util.Properties;
import lombok.RequiredArgsConstructor;
import org.pf4j.PluginWrapper;
import org.springframework.stereotype.Component;
import org.springframework.util.PropertyPlaceholderHelper;
import org.thymeleaf.context.ITemplateContext;
import org.thymeleaf.model.IModel;
import org.thymeleaf.model.IModelFactory;
import org.thymeleaf.processor.element.IElementModelStructureHandler;
import reactor.core.publisher.Mono;
import run.halo.app.plugin.PluginContext;
import run.halo.app.theme.dialect.TemplateHeadProcessor;

@Component
Expand All @@ -19,7 +19,7 @@ public class HyperLinkHeadProcessor implements TemplateHeadProcessor {
static final PropertyPlaceholderHelper PROPERTY_PLACEHOLDER_HELPER =
new PropertyPlaceholderHelper("${", "}");

private final PluginWrapper pluginWrapper;
private final PluginContext pluginContext;

@Override
public Mono<Void> process(ITemplateContext context, IModel model,
Expand All @@ -32,7 +32,7 @@ public Mono<Void> process(ITemplateContext context, IModel model,
private String hyperlinkCardComponentScript() {

final Properties properties = new Properties();
properties.setProperty("version", pluginWrapper.getDescriptor().getVersion());
properties.setProperty("version", pluginContext.getVersion());

return PROPERTY_PLACEHOLDER_HELPER.replacePlaceholders("""
<!-- plugin-editor-hyperlink-card start -->
Expand Down

0 comments on commit d7cde80

Please sign in to comment.