This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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