PHP code example of awps / wp-mailhog-mu-plugin

1. Go to this page and download the library: Download awps/wp-mailhog-mu-plugin 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/ */

    

awps / wp-mailhog-mu-plugin example snippets



$flags = \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS;
$iterator = new \FilesystemIterator(__DIR__, $flags);

foreach ($iterator as $path => $item) {
    if ($item->isDir()) {
        $muPath = trailingslashit($path);
        $fileName = basename($item->getFileName());
        $filePath = "{$muPath}/{$fileName}.php";

        if (file_exists($filePath)) {