PHP code example of siteoptimo / wp-plugin-parser
1. Go to this page and download the library: Download siteoptimo/wp-plugin-parser 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/ */
siteoptimo / wp-plugin-parser example snippets
use SiteOptimo\WpPluginParser\WpPluginParser;
use SiteOptimo\WpPluginParser\Entity\Plugin;
$zipFile = 'path/to/plugin.zip';
try {
/** @var Plugin $plugin */
$plugin = WpPluginParser::parsePlugin($zipFile);
echo $plugin->getName() . ':';
var_dump($plugin);
} catch(\SiteOptimo\WpPluginParser\Exception\WpPluginParserException $e) {
// Handle exception.
}