Skip to content

Instantly share code, notes, and snippets.

View Hansanghyeon's full-sized avatar
🎯

999 Hansanghyeon

🎯
View GitHub Profile
@Hansanghyeon
Hansanghyeon / heredoc-function.php
Created March 3, 2021 08:33 — forked from Pephers/heredoc-function.php
How to call a PHP function inside a Heredoc.
<?php
$cb = function ($fn) {
return $fn;
};
echo <<<HEREDOC
Hello, {$cb(ucfirst('world'))}
HEREDOC;
@Hansanghyeon
Hansanghyeon / subdir-loader.php
Created October 22, 2021 06:54 — forked from richardtape/subdir-loader.php
Allow WordPress-MU plugins to be loaded automatically from a sub directory
<?php
/**
* Plugin Name: MU plugins subdirectory loader
* Plugin URI: http://code.ctlt.ubc.ca
* Description: Enables the loading of plugins sitting in mu-plugins (as folders)
* Version: 0.1
* Author: iamfriendly, CTLT
* Author URI: http://ubc.ca/
*