fix stuff from template

This commit is contained in:
André Menrath 2023-11-22 21:55:35 +01:00
parent 1483499c75
commit 15fbd789e5

View file

@ -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' );