Last active
December 20, 2020 14:00
-
-
Save qstudio/ff31329415ebb164a6c20f2a300d7aad to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
// factory.php | |
$dashboard = new q\user\controller\dashboard(); | |
$dashboard->hooks(); | |
// dashboard.php | |
namespace q\theme\child\controller; | |
class page { | |
function __construct(){ | |
// ... empty ## | |
} | |
function hooks(){ | |
// add custom view ## | |
\add_filter( 'willow/view/custom', function( $array ){ | |
return array_merge( | |
[ | |
'dashboard.willow' => [ | |
'template' => 'dashboard.willow', | |
'name' => 'User : Dashboard', | |
'class' => '\q_user' | |
], | |
], | |
$array | |
); | |
}, 10, 1 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment