From 15fbd789e57019150ba1b681f853282090fe6abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 22 Nov 2023 21:55:35 +0100 Subject: [PATCH] fix stuff from template --- Transformers/add-transformer.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Transformers/add-transformer.md b/Transformers/add-transformer.md index da3089d..7922690 100644 --- a/Transformers/add-transformer.md +++ b/Transformers/add-transformer.md @@ -6,18 +6,18 @@ The WordPress ActivityPub plugin offers an advanced built-in transformer, but it To do that we simply hook to the `activivitypub_transformer_register` action which provides access to the transformer manager as a parameter. Developers can use this manager to add new transformers using the `register()` method of this manager instance. -## Registering Widgets +## Registering Transformers To register new transformers use the following code: ```php -function register_new_transformers( $widgets_manager ) { +function register_new_transformers( $transformers_manager ) { - require_once( __DIR__ . '/widgets/widget-1.php' ); - require_once( __DIR__ . '/widgets/widget-2.php' ); + require_once( __DIR__ . '/activitypub/transformer/name-1.php' ); + require_once( __DIR__ . '/activitypub/transformer/name-2.php' ); - $widgets_manager->register( new \Transformer_1() ); - $widgets_manager->register( new \Transformer_2() ); + $transformers_manager->register( new \Transformer_1() ); + $transformers_manager->register( new \Transformer_2() ); } add_action( 'activivitypub_transformer_register', 'register_new_transformers' );