Created
October 9, 2014 19:37
-
-
Save joeyz/118976563650f1bea2a4 to your computer and use it in GitHub Desktop.
Proper way to include plugins in your WP theme
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
// This function loads the plugin. | |
function jz_load_plugin() { | |
if (!class_exists('Vintage_Engagement_Widget')) { | |
// load Vintage Engagement Widget if not already loaded | |
include_once(TEMPLATEPATH.'/plugins/vintage_engagement_widget.php'); | |
} | |
if (!class_exists('Jewelry_Widget')) { | |
// load Vintage Engagement Widget if not already loaded | |
include_once(TEMPLATEPATH.'/plugins/jewelry_widget.php'); | |
} | |
if (!class_exists('Jz_Mini_Cart_Widget')) { | |
// load my altered mini cart widget | |
include_once(TEMPLATEPATH.'/plugins/jz-mini-cart.php'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment