Skip to content

Instantly share code, notes, and snippets.

View acerus's full-sized avatar
🚀
to Infinity and Beyond!

Paul acerus

🚀
to Infinity and Beyond!
View GitHub Profile
<?php
class MyTheme
{
private function actionAfterSetup($function)
{
add_action('after_setup_theme', function() use ($function) {
$function();
});
}
@acerus
acerus / plugin-class-demo.php
Created June 28, 2019 16:01 — forked from thefuxia/plugin-class-demo.php
Plugin Class Demo
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Plugin Class Demo
* Description: How I am using the base class in plugins.
* Plugin URI:
* Version: 2012.09.29
* Author: Thomas Scholz
* Author URI: http://toscho.de
* License: GPL
* Text Domain: plugin_unique_name