PHP code example of fup / wordpress-middleware

1. Go to this page and download the library: Download fup/wordpress-middleware library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fup / wordpress-middleware example snippets


    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
    {
        $template = $container->get(TemplateRendererInterface::class);
        $wordpressBridgeService = $container->get(WordpressBridgeService::class);
        return new WordpressAction($template, $wordpressBridgeService, 'yourproject::your-template');
    }

$app->pipe( WordpressAction::class);

return [
   'factories'  => [
      WordpressAction::class => WordpressActionFactory::class
   ]
];

<?= $this->wordpress_string