Skip to content

Commit

Permalink
Merge pull request #2 from grappler/patch-1
Browse files Browse the repository at this point in the history
Add check if class Gamajo_Template_Loader exists
  • Loading branch information
pippinsplugins committed Dec 30, 2013
2 parents 7187ee7 + b14972b commit 9a61912
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pw-sample-template-loader.php
Expand Up @@ -8,7 +8,9 @@

define( 'PW_SAMPLE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );

require PW_SAMPLE_PLUGIN_DIR . 'class-gamajo-template-loader.php';
if( ! class_exists( 'Gamajo_Template_Loader' ) ) {
require PW_SAMPLE_PLUGIN_DIR . 'class-gamajo-template-loader.php';
}
require PW_SAMPLE_PLUGIN_DIR . 'class-pw-template-loader.php';

function pw_sample_shortcode() {
Expand All @@ -22,4 +24,4 @@ function pw_sample_shortcode() {
return ob_get_clean();

}
add_shortcode( 'pw_sample', 'pw_sample_shortcode' );
add_shortcode( 'pw_sample', 'pw_sample_shortcode' );

0 comments on commit 9a61912

Please sign in to comment.