Using a plugin class inside a template
The best way to use your class without knowing the object is an action. You register the action before the theme files for presentation are loaded, WordPress will handle the rest. Sample code: <?php # -*- coding: utf-8 -*- /** * Plugin Name: Plugin Action Demo */ add_action( ‘init’, array ( ‘Plugin_Action_Demo’, ‘init’ ) ); … Read more