Let plugins run their own PHP code
A plugin can now bring a plugin.php that registers hooks, scheduled tasks, its own tables, public pages and admin screens. Failures stay contained to the plugin; a form on a plugin page can be submitted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b61f958ca1
commit
9825bac3b3
17 files changed
+897
-19
No files matched your search
@@ -17,7 +17,7 @@ use Symfony\Component\Routing\Attribute\Route;
|
||||
*/
|
||||
final class SeoController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
public function __construct(private \App\Plugin\PluginRuntime $plugins,
|
||||
private Connection $db,
|
||||
private SiteSettings $settings,
|
||||
private PostRepository $posts,
|
||||
@@ -74,6 +74,8 @@ final class SeoController extends AbstractController
|
||||
$entries[] = ['loc' => $origin.'/'.PostRepository::ARCHIVE_PREFIX[$row['kind']].'/'.$row['slug'], 'lastmod' => null];
|
||||
}
|
||||
|
||||
$entries = $this->plugins->applyFilters('sitemap.entries', $entries, $origin);
|
||||
|
||||
return $this->xml($this->renderView('seo/sitemap.xml.twig', ['entries' => $entries]));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user