Last active
April 22, 2016 06:07
-
-
Save amostajo/c25139e6a9eb5c44c26cc1e58855bec8 to your computer and use it in GitHub Desktop.
Wordpress MVC - Main Class call from template
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
<!-- Example in a wordpress template --> | |
<div class="theme-access"> | |
<?php echo $theme->my_method() ?> | |
</div> | |
<?php | |
// Example within wordpress php code | |
function test() | |
{ | |
global $theme; | |
$result = $theme->my_method(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment