Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$ui = new ui();
$ui->hooks();
class ui {
function __construct(){}
function hooks() {
\add_action( 'init', [ $this, 'willow' ], 10 );
}
function willow(){
if ( ! function_exists( 'willow' ) ) { return false; }
// register extension ##
willow()->extend->register([
'context' => str_replace( __NAMESPACE__.'\\', '', __CLASS__ ),
'class' => 'q\theme\child\context\navigation', // force context class ##
'methods' => 'public' // public only -- default ##
]);
}
function hello( $args = null ){
return [
0 => [
'who' => 'Me',
'time' => 'Now'
],
1 => [
'who' => 'You',
'time' => 'Then'
],
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment