-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AddWordPressShortcodesFromViews() - not implemented
- Loading branch information
1 parent
01ce70f
commit 3cd2629
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
PeachPied.WordPress.AspNetCore/Internal/ViewsAsShortcodesPlugin.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc.ViewComponents; | ||
using PeachPied.WordPress.Standard; | ||
|
||
namespace PeachPied.WordPress.AspNetCore.Internal | ||
{ | ||
internal sealed class ViewsAsShortcodesPlugin : IWpPlugin, IWpPluginProvider // TODO | ||
{ | ||
readonly IViewComponentDescriptorCollectionProvider _viewsProvider; | ||
|
||
public ViewsAsShortcodesPlugin(IViewComponentDescriptorCollectionProvider viewsProvider) | ||
{ | ||
_viewsProvider = viewsProvider; | ||
} | ||
|
||
ValueTask IWpPlugin.ConfigureAsync(WpApp app, CancellationToken token) | ||
{ | ||
if (_viewsProvider != null) | ||
{ | ||
foreach (var item in _viewsProvider.ViewComponents.Items) | ||
{ | ||
|
||
} | ||
} | ||
|
||
return ValueTask.CompletedTask; | ||
} | ||
|
||
IEnumerable<IWpPlugin> IWpPluginProvider.GetPlugins(IServiceProvider provider, string wpRootPath) => new[] { this }; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters