Skip to content

Instantly share code, notes, and snippets.

@cloudinstone
cloudinstone / wp-plugin-header.php
Last active June 28, 2024 10:58
WordPress Plugin Header
<?php
/**
* Plugin Name
*
* @package PluginPackage
* @author Your Name
* @copyright 2019 Your Name or Company Name
* @license GPL-2.0-or-later
*
* @wordpress-plugin
@cloudinstone
cloudinstone / Autoloader.php
Last active July 12, 2024 23:51
PHP Autoloader Class.
<?php
namespace DressPress;
final class Autoloader
{
private $namespace;
private $filepath;
public function __construct(string $namespace, string|null $filepath = null, bool $throw = true, bool $prepend = false)